Develop and Download Open Source Software

Browse Subversion Repository

Contents of /NeoFT/Controls/ProgressMonitorPane.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations) (download)
Tue Mar 25 12:06:05 2008 UTC (16 years ago) by c477
File size: 3906 byte(s)


1 using System;
2 using System.Collections;
3 using System.ComponentModel;
4 using System.Drawing;
5 using System.Data;
6 using System.Windows.Forms;
7
8 namespace nft.controls
9 {
10 /// <summary>
11 /// ProgressMonitorPane の概要の説明です。
12 /// </summary>
13 public class ProgressMonitorPane : System.Windows.Forms.UserControl
14 {
15 private System.Windows.Forms.ProgressBar progress_l1;
16 private System.Windows.Forms.Label status_l1;
17 private System.Windows.Forms.ProgressBar progress_l2;
18 private System.Windows.Forms.Label status_l2;
19 /// <summary>
20 /// 必要なデザイナ変数です。
21 /// </summary>
22 private System.ComponentModel.Container components = null;
23
24 public ProgressMonitorPane()
25 {
26 // この呼び出しは、Windows.Forms フォーム デザイナで必要です。
27 InitializeComponent();
28
29 // TODO: InitializeComponent 呼び出しの後に初期化処理を追加します。
30
31 }
32
33 /// <summary>
34 /// 使用されているリソースに後処理を実行します。
35 /// </summary>
36 protected override void Dispose( bool disposing )
37 {
38 if( disposing )
39 {
40 if(components != null)
41 {
42 components.Dispose();
43 }
44 }
45 base.Dispose( disposing );
46 }
47
48 public void updateMessage( int level, int percentage, string msg )
49 {
50 if(level==1)
51 {
52 progress_l1.Value=percentage;
53 if(msg!=null)
54 status_l1.Text = msg;
55 }
56 else
57 {
58 progress_l2.Value=percentage;
59 if(msg!=null)
60 status_l2.Text = msg;
61 }
62 Application.DoEvents();
63 }
64
65 #region コンポーネント デザイナで生成されたコード
66 /// <summary>
67 /// デザイナ サポートに必要なメソッドです。このメソッドの内容を
68 /// コード エディタで変更しないでください。
69 /// </summary>
70 private void InitializeComponent()
71 {
72 this.progress_l1 = new System.Windows.Forms.ProgressBar();
73 this.status_l1 = new System.Windows.Forms.Label();
74 this.progress_l2 = new System.Windows.Forms.ProgressBar();
75 this.status_l2 = new System.Windows.Forms.Label();
76 this.SuspendLayout();
77 //
78 // progress_l1
79 //
80 this.progress_l1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
81 | System.Windows.Forms.AnchorStyles.Right)));
82 this.progress_l1.Location = new System.Drawing.Point(8, 14);
83 this.progress_l1.Name = "progress_l1";
84 this.progress_l1.Size = new System.Drawing.Size(216, 10);
85 this.progress_l1.TabIndex = 4;
86 //
87 // status_l1
88 //
89 this.status_l1.AutoSize = true;
90 this.status_l1.Location = new System.Drawing.Point(0, -2);
91 this.status_l1.Name = "status_l1";
92 this.status_l1.Size = new System.Drawing.Size(0, 15);
93 this.status_l1.TabIndex = 3;
94 this.status_l1.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
95 //
96 // progress_l2
97 //
98 this.progress_l2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
99 | System.Windows.Forms.AnchorStyles.Right)));
100 this.progress_l2.Location = new System.Drawing.Point(8, 42);
101 this.progress_l2.Name = "progress_l2";
102 this.progress_l2.Size = new System.Drawing.Size(216, 10);
103 this.progress_l2.TabIndex = 6;
104 //
105 // status_l2
106 //
107 this.status_l2.AutoSize = true;
108 this.status_l2.Location = new System.Drawing.Point(0, 26);
109 this.status_l2.Name = "status_l2";
110 this.status_l2.Size = new System.Drawing.Size(0, 15);
111 this.status_l2.TabIndex = 5;
112 this.status_l2.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
113 //
114 // ProgressMonitorPane
115 //
116 this.Controls.Add(this.progress_l2);
117 this.Controls.Add(this.status_l2);
118 this.Controls.Add(this.progress_l1);
119 this.Controls.Add(this.status_l1);
120 this.Name = "ProgressMonitorPane";
121 this.Size = new System.Drawing.Size(232, 56);
122 this.ResumeLayout(false);
123
124 }
125 #endregion
126 }
127 }

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26