forked from HumMod/editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
StatusBarManager.CS
75 lines (55 loc) · 1.82 KB
/
StatusBarManager.CS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/* Model Editor / StatusBarManager
Created : 2011-04-04
Last Modified : 2011-04-04
Author : Tom Coleman
Copyright : 2011-2011
By : University of Mississippi Medical Center */
using System ;
using System.IO ;
using System.ComponentModel ;
using System.Drawing ;
using System.Windows.Forms ;
namespace ModelEditor
{ public class StatusBarManager
{ public static StatusBarPanel Panel ;
public static StatusBarPanel Rect1 ;
public static StatusBarPanel Rect2 ;
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") ;
}
public static void ShowText (String Message)
{ Panel.Text = Message ;
}
public static void AddText (String Message)
{ Panel.Text = Panel.Text + Message ;
}
public static void ClearText ()
{ Panel.Text = "" ;
}
public static void UpdateRect1 (String Message)
{ Rect1.Text = Message ;
}
public static void UpdateRect2 (String Message)
{ Rect2.Text = Message ;
}
}
}
/* End */