當前位置: 首頁>>代碼示例>>C#>>正文


C# Forms.StatusBarPanel類代碼示例

本文整理匯總了C#中System.Windows.Forms.StatusBarPanel的典型用法代碼示例。如果您正苦於以下問題:C# StatusBarPanel類的具體用法?C# StatusBarPanel怎麽用?C# StatusBarPanel使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


StatusBarPanel類屬於System.Windows.Forms命名空間,在下文中一共展示了StatusBarPanel類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: InitializeComponent

		private void InitializeComponent()
		{
			this.testLabel = new System.Windows.Forms.Label();
			testLabel.Text = "test";
			this.statBar = new System.Windows.Forms.StatusBar();
			this.msgPanel = new System.Windows.Forms.StatusBarPanel();
			((System.ComponentModel.ISupportInitialize)(this.msgPanel)).BeginInit();
			this.SuspendLayout();
			this.statBar.Location = new System.Drawing.Point(0, 400);
			this.statBar.Name = "statBar";
			this.statBar.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
																					   this.msgPanel
																					   });

			this.statBar.ShowPanels = true;
			this.statBar.Size = new System.Drawing.Size(536, 22);
			this.statBar.TabIndex = 0;
			this.statBar.DrawItem += new System.Windows.Forms.StatusBarDrawItemEventHandler(this.statBar_DrawItem);
			this.Controls.Add(this.statBar);
			// 
			// msgPanel
			// 
			this.msgPanel.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring;
			this.msgPanel.Style = System.Windows.Forms.StatusBarPanelStyle.OwnerDraw;
			this.msgPanel.Width = 341;
			this.Controls.Add(this.statBar);
			((System.ComponentModel.ISupportInitialize)(this.msgPanel)).EndInit();
			this.ResumeLayout(false);
		}
開發者ID:netordead,項目名稱:SqlInserter,代碼行數:29,代碼來源:BaseForm.cs

示例2: StatusBarDrawItemEventArgs

		public StatusBarDrawItemEventArgs (Graphics g, Font font, Rectangle r,
				int itemId, DrawItemState itemState, StatusBarPanel panel) :
			this (g, font, r, itemId, itemState, panel, Control.DefaultForeColor,
				Control.DefaultBackColor)
		
		{
		}
開發者ID:KonajuGames,項目名稱:SharpLang,代碼行數:7,代碼來源:StatusBarDrawItemEventArgs.cs

示例3: Form1_Load

        private void Form1_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'project_MDataSet.tblLanguage' table. You can move, or remove it, as needed.
            this.tblLanguageTableAdapter.Fill(this.project_MDataSet.tblLanguage);
            Language File = new Language();
            Language Exit = new Language();
            Language Settings = new Language();
            Language Users = new Language();
            Language Options = new Language();

            fileToolStripMenuItem.Text = File.getWord("File");
            exitToolStripMenuItem.Text = Exit.getWord("Exit");
            settingsToolStripMenuItem.Text = Settings.getWord("Settings");
            usersToolStripMenuItem.Text = Users.getWord("Users");
            optionsToolStripMenuItem.Text = Options.getWord("Options");
            loginform.ControlBox = false;
            loginform.ShowDialog();

            StatusBar mainStatusBar = new StatusBar();
            StatusBarPanel timeStatusBar = new StatusBarPanel();
            StatusBarPanel userloggedinStatusBar = new StatusBarPanel();
            timeStatusBar.Text = System.DateTime.Today.ToShortDateString();
            userloggedinStatusBar.Text = loginform.UserNameString;
            mainStatusBar.Panels.Add(userloggedinStatusBar);
            mainStatusBar.Panels.Add(timeStatusBar);
            mainStatusBar.ShowPanels = true;
            Controls.Add(mainStatusBar);
        }
開發者ID:WilcoHendriksen,項目名稱:Project_M,代碼行數:28,代碼來源:mainForm.cs

示例4: base

	// Constructors.
	public StatusBarDrawItemEventArgs
					(Graphics graphics, Font font, Rectangle rect,
					 int index, DrawItemState state, StatusBarPanel panel)
			: base(graphics, font, rect, index, state)
			{
				this.panel = panel;
			}
開發者ID:jjenki11,項目名稱:blaze-chem-rendering,代碼行數:8,代碼來源:StatusBarDrawItemEventArgs.cs

示例5: PresentationStatusBar

        /// <summary>
        /// I like status bars.  Status bars are good.
        /// </summary>
        public PresentationStatusBar()
        {
            // Pri4: It occurs to me that messages on a status bar can be much like a stack in
            //   that a new message can occur when one is already being displayed.  Maybe we should
            //   make a nice statusBar that has a built-in stack to push & pop messages (as well
            //   as clear the stack).

            this.ShowPanels = true;

            messagePanel = new StatusBarPanel();
            messagePanel.Style = StatusBarPanelStyle.Text;
            messagePanel.BorderStyle = StatusBarPanelBorderStyle.Sunken;
            messagePanel.AutoSize = StatusBarPanelAutoSize.Spring;

            pagePanel = new StatusBarPanel();
            pagePanel.Style = StatusBarPanelStyle.Text;
            pagePanel.BorderStyle = StatusBarPanelBorderStyle.Sunken;
            pagePanel.AutoSize = StatusBarPanelAutoSize.Contents;
            pagePanel.Alignment = HorizontalAlignment.Center;
            pagePanel.MinWidth = 100;
            pagePanel.Text = Strings.Slide_Of_Placeholder;

            this.Panels.Add(messagePanel);
            this.Panels.Add(pagePanel);
        }
開發者ID:psyCHOder,項目名稱:conferencexp,代碼行數:28,代碼來源:PresentationStatusBar.cs

示例6: base

	// Constructor.
	public StatusBarPanelClickEventArgs
				(StatusBarPanel statusBarPanel, MouseButtons button,
				 int clicks, int x, int y)
			: base(button, clicks, x, y, 0)
			{
				this.statusBarPanel = statusBarPanel;
			}
開發者ID:jjenki11,項目名稱:blaze-chem-rendering,代碼行數:8,代碼來源:StatusBarPanelClickEventArgs.cs

示例7: MinimumWidth2

		public void MinimumWidth2 ()
		{
			StatusBarPanel p = new StatusBarPanel ();
			p.Width = 50;
			p.MinWidth = 100;
			Assert.AreEqual (100, p.Width, "1");
		}
開發者ID:Profit0004,項目名稱:mono,代碼行數:7,代碼來源:StatusBarPanelTest.cs

示例8: Create

    public static void Create (Form Parent)
    { StatusBar Instance = new StatusBar () ;
      Instance.Parent = Parent ;
      Parent.Controls.Add (Instance) ;

      Panel = new StatusBarPanel () ;
      Panel.BorderStyle = StatusBarPanelBorderStyle.Sunken ;
      Panel.AutoSize = StatusBarPanelAutoSize.Spring ;

      Rect1 = new StatusBarPanel () ;
      Rect1.BorderStyle = StatusBarPanelBorderStyle.Sunken ;
      Rect1.Width = 70 ;
      Rect1.Alignment = HorizontalAlignment.Center ;

      Rect2 = new StatusBarPanel () ;
      Rect2.BorderStyle = StatusBarPanelBorderStyle.Sunken ;
      Rect2.Width = 70 ;
      Rect2.Alignment = HorizontalAlignment.Center ;

      Instance.ShowPanels = true ;

      Instance.Panels.Add (Panel) ;
      Instance.Panels.Add (Rect1) ;
      Instance.Panels.Add (Rect2) ;

      ShowText (" Ready") ;
    }
開發者ID:kcb146,項目名稱:editor,代碼行數:27,代碼來源:StatusBarManager.CS

示例9: Test1

		public Test1 ()
		{
			Button btn = new Button ();
			btn.Text = "Click Me";
			btn.Click += new EventHandler (button_clicked);

			Controls.Add (btn);
			StatusBar sb1;
			sb1 = new StatusBar ();
			sb1.Width = 300;
			sb1.ShowPanels = true;
			Controls.Add (sb1);

			StatusBarPanel p = new StatusBarPanel ();
			p.AutoSize = StatusBarPanelAutoSize.Spring;
			p.Text = "Clicks: 0";
			sb1.Panels.Add (p);
			clicks_panel = p;

			StatusBarPanel p2 = new StatusBarPanel ();
			p2.AutoSize = StatusBarPanelAutoSize.Contents;
			p2.Text = "i am an apeman";
			sb1.Panels.Add (p2);

			StatusBarPanel p3 = new StatusBarPanel ();
			p3.Alignment = HorizontalAlignment.Right;
			p3.AutoSize = StatusBarPanelAutoSize.Spring;
			p3.Text = "test";
			sb1.Panels.Add (p3);
			mouse_panel = p3;

			MouseMove += new MouseEventHandler (mouse_moved);
		}
開發者ID:hitswa,項目名稱:winforms,代碼行數:33,代碼來源:swf-statusbar.cs

示例10: ToolArgs

 public ToolArgs(Bitmap bmp, PictureBox picBox, StatusBarPanel p1, StatusBarPanel p2, IPaintSettings settings)
 {
     bitmap = bmp;
     pictureBox = picBox;
     panel1 = p1;
     panel2 = p2;
     this.settings = settings;
 }
開發者ID:mokacao,項目名稱:Paint,代碼行數:8,代碼來源:ToolArgs.cs

示例11: InitializeControls

 // Sets up the status bar and other controls.
 private void InitializeControls()
 {
     // Set up the status bar.
     StatusBarPanel panel = new StatusBarPanel();
     panel.BorderStyle = StatusBarPanelBorderStyle.Sunken;
     panel.Text = "Ready.";
     panel.AutoSize = StatusBarPanelAutoSize.Spring;
     this.statusBar.ShowPanels = true;
     this.statusBar.Panels.Add(panel);
 }
開發者ID:EdiCarlos,項目名稱:MyPractices,代碼行數:11,代碼來源:media.cs

示例12: ToStringTest

		public void ToStringTest ()
		{
			StatusBarPanel p = new StatusBarPanel ();
			Assert.AreEqual ("StatusBarPanel: {}", p.ToString(), "1");

			p.Text = "Hello";
			Assert.AreEqual ("StatusBarPanel: {Hello}", p.ToString(), "2");

			p.Text = "}";
			Assert.AreEqual ("StatusBarPanel: {}}", p.ToString(), "3");
		}
開發者ID:Profit0004,項目名稱:mono,代碼行數:11,代碼來源:StatusBarPanelTest.cs

示例13: AddPanels

        public void AddPanels()
        {
            for ( int i=0; i<6; i++)
            {
                StatusBarPanel panel = new StatusBarPanel();
                panel.BorderStyle = StatusBarPanelBorderStyle.Sunken;
                panel.AutoSize = StatusBarPanelAutoSize.Contents;

                Panels.Add(panel);
            }
        }
開發者ID:yinghau76,項目名稱:pviewer,代碼行數:11,代碼來源:ImageStatusBar.cs

示例14: MainForm

        public MainForm(ITileProvider floorTileProvider, ITileProvider objectTileProvider)
        {
            this.floorTileProvider = floorTileProvider;
            this.objectTileProvider = objectTileProvider;
            //			tileBrowserForm = new TileBrowserForm(floorTileProvider, objectTileProvider);
            mapView = new MapView(this);
            Controls.Add(mapView);
            Text = "Aesir";
            DataBindings.Add(new Binding("Size", settings, "FormSize", true,
                DataSourceUpdateMode.OnPropertyChanged));
            DataBindings.Add(new Binding("Location", settings, "FormLocation", true,
                DataSourceUpdateMode.OnPropertyChanged));
            MainMenu menu = new MainMenu();
            MenuItem[] fileItems = new MenuItem[] {
                new MenuItem("New"),
                new MenuItem("Open"),
                new MenuItem("Save")
            };
            menu.MenuItems.Add(new MenuItem("&File", fileItems));
            Menu = menu;
            StatusBarPanel panel = new StatusBarPanel();
            panel.BorderStyle = StatusBarPanelBorderStyle.Sunken;
            panel.AutoSize = StatusBarPanelAutoSize.Spring;
            panel.Text = "Ready";
            statusBar.Panels.Add(panel);
            statusBar.ShowPanels = true;
            Controls.Add(statusBar);
            //tileBrowserForm.Show();

            toolStrip.Renderer = new ToolStripSystemRenderer();
            Label label = new Label();
            label.Text = "LOL";
            toolStrip.Items.Add(new ToolStripControlHost(label));
            toolStrip.Items.Add(new ToolStripButton("Pencil"));
            toolStrip.Items.Add(new ToolStripButton("Line"));
            toolStrip.Items.Add(new ToolStripButton("Square"));
            Controls.Add(toolStrip);

            testForm = new Form();
            FloorTileBrowser shit = new FloorTileBrowser(floorTileProvider);
            shit.Dock = DockStyle.Fill;
            testForm.Controls.Add(shit);
            testForm.Show();
            // TEMP: stuff
            /*mapView.PaintWorldOverlay += delegate(object sender, PaintEventArgs args) {
                Console.WriteLine(mapView.VectorToTile(mousePosition));
                args.Graphics.DrawRectangle(Pens.Blue, new Rectangle((Point)(mapView.VectorToTile(mousePosition) * (Vector)Tile.Size), Tile.Size));
            };
            mapView.MouseMove += delegate(object sender, MouseEventArgs args) {
                mousePosition = (Vector)args.Location;
                mapView.Refresh();
            };*/
        }
開發者ID:jaggedsoft,項目名稱:aesirtk,代碼行數:53,代碼來源:MainForm.cs

示例15: MainForm

        /// <summary>
        /// Konstruktor klasy MainForm.
        /// </summary>
        public MainForm()
        {
            // Konfiguruję ustawienia okna.
            Size = new Size(1050, 600);
            Location = new Point(0, 0);
            Text = "Serwer komunikatora internetowego e-Talk";
            
            // Tworzę komponenty okna głównego:
            // - menu główne
            menu = new MainMenu();

            // - komponenty menu głównego
            m1 = new MenuItem("Ustawienia");
            menu.MenuItems.Add(m1);

            m3 = new MenuItem("O programie", new EventHandler(MMAboutClick), Shortcut.CtrlA);
            m3.Select += new EventHandler(MMAboutSelect);
            menu.MenuItems.Add(m3);

            m2 = new MenuItem("Wyjście", new EventHandler(MMWyjscieClick), Shortcut.CtrlW);
            m2.Select += new EventHandler(MMExitSelect);
            menu.MenuItems.Add(m2);

            // - podmenu ustawień
            subm1 = new MenuItem("Połącz z bazą", new EventHandler(MMLoginClick), Shortcut.CtrlL);
            subm1.Select += new EventHandler(MMLoginSelect);
            m1.MenuItems.Add(subm1);

            subm2 = new MenuItem("Nasłuchuj", new EventHandler(MMListenClick), Shortcut.CtrlN);
            subm2.Select += new EventHandler(MMListenSelect);
            subm2.Visible = false;
            m1.MenuItems.Add(subm2);

            // Tworzę panel pomocniczego tekstu.
            menuTextProvider1 = new StatusBarPanel();
            menuTextProvider1.Name = "menuTextProvider1";
            menuTextProvider1.Width = Size.Width / 2 + Size.Width / 8;
            menuTextProvider1.Text = "";

            // Przypisuję utworzone menu.
            Menu = menu;

            // Dodaję dolny panel.
            BuildTimerHelpBar();

            // Dodaję wewnętrzne komponenty.
            BuildInnerComponents();

        }
開發者ID:skubisz,項目名稱:komunikator-lpp,代碼行數:52,代碼來源:MainForm.cs


注:本文中的System.Windows.Forms.StatusBarPanel類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。