本文整理汇总了C#中System.Windows.Forms.StatusBarPanel类的典型用法代码示例。如果您正苦于以下问题:C# StatusBarPanel类的具体用法?C# StatusBarPanel怎么用?C# StatusBarPanel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StatusBarPanel类属于System.Windows.Forms命名空间,在下文中一共展示了StatusBarPanel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: foreach
void ISupportInitialize.EndInit()
{
if (base.ShowPanels && (base.Panels.Count != 0))
{
this._textPanel = base.Panels[0];
foreach (StatusBarPanel panel in base.Panels)
{
if (panel is ProgressStatusBarPanel)
{
this._progressPanel = (ProgressStatusBarPanel) panel;
break;
}
}
}
}
开发者ID:ikvm,项目名称:webmatrix,代码行数:15,代码来源:MxStatusBar.cs
示例17: BottomStatusBar
public BottomStatusBar()
: base()
{
SizingGrip = false;
statusPanel = new StatusBarPanel();
statusPanel.BorderStyle = StatusBarPanelBorderStyle.Sunken;
statusPanel.Text = "Ready!";
statusPanel.ToolTipText = "Last Activity";
statusPanel.AutoSize = StatusBarPanelAutoSize.Spring;
Panels.Add(statusPanel);
ShowPanels = true;
}
开发者ID:Redeye123,项目名称:7DaysProfileEditor,代码行数:16,代码来源:StatusBar.cs
示例18: PrintWithStatusBar
public PrintWithStatusBar()
{
Text = "Print with Status Bar";
Menu = new MainMenu();
Menu.MenuItems.Add("&File");
Menu.MenuItems[0].MenuItems.Add("&Print",
new EventHandler(MenuFilePrintOnClick));
sbar = new StatusBar();
sbar.Parent = this;
sbar.ShowPanels = true;
sbarpanel = new StatusBarPanel();
sbarpanel.Text = "Ready";
sbarpanel.Width = Width/2;
sbar.Panels.Add(sbarpanel);
}
开发者ID:xs2ranjeet,项目名称:13ns9-1spr,代码行数:16,代码来源:PrintWithStatusBar.cs
示例19: FrmMain
public FrmMain()
{
InitializeComponent();
#region �ѽL����U�Կﶵ����l�ưʧ@
for(int i=0;i<10;i++)
{
cboBoardStyle.Items.Add("����"+(i+1).ToString());
}
cboBoardStyle.SelectedIndex = 5; //�w�]���謰��6��
#endregion
#region ���A�C����l�ưʧ@
StatusBarPanel[] oSBPs = new StatusBarPanel[5];
for(int i=0;i<oSBPs.Length;i++)
{
oSBPs[i] = new StatusBarPanel();
oSBPs[i].Width = 145;
statusBar1.Panels.Add(oSBPs[i]);
}
#endregion
}
开发者ID:hungtrinh81,项目名称:leonworkshop,代码行数:22,代码来源:FrmMain.cs
示例20: MinimumWidth3
public void MinimumWidth3 ()
{
StatusBarPanel p = new StatusBarPanel ();
p.Width = 50;
p.MinWidth = 200;
p.MinWidth = 25;
Assert.AreEqual (200, p.Width, "#1");
p = new StatusBarPanel ();
p.Width = 50;
p.MinWidth = 25;
Assert.AreEqual (50, p.Width, "#2");
p = new StatusBarPanel ();
p.Width = 50;
p.MinWidth = 100;
Assert.AreEqual (100, p.Width, "#3");
p = new StatusBarPanel ();
p.MinWidth = 200;
Assert.AreEqual (200, p.Width, "#4");
}
开发者ID:Profit0004,项目名称:mono,代码行数:22,代码来源:StatusBarPanelTest.cs
注:本文中的System.Windows.Forms.StatusBarPanel类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论