• R/O
  • SSH
  • HTTPS

wheretrainbuild: Commit


Commit MetaInfo

Revision27 (tree)
Zeit2019-06-24 22:36:33
Autordangerouswoo

Log Message

通過設定対応

Ändern Zusammenfassung

Diff

--- WhereTrainBuild/Dialog/EditPlanDialog.Designer.cs (revision 26)
+++ WhereTrainBuild/Dialog/EditPlanDialog.Designer.cs (revision 27)
@@ -36,6 +36,7 @@
3636 this.AliveDayNum = new System.Windows.Forms.NumericUpDown();
3737 this.StartDayNum = new System.Windows.Forms.NumericUpDown();
3838 this.StartTimePicker = new System.Windows.Forms.DateTimePicker();
39+ this.PassChk = new System.Windows.Forms.CheckBox();
3940 ((System.ComponentModel.ISupportInitialize)(this.AliveDayNum)).BeginInit();
4041 ((System.ComponentModel.ISupportInitialize)(this.StartDayNum)).BeginInit();
4142 this.SuspendLayout();
@@ -44,7 +45,7 @@
4445 //
4546 this.CancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
4647 this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
47- this.CancelBtn.Location = new System.Drawing.Point(117, 128);
48+ this.CancelBtn.Location = new System.Drawing.Point(117, 165);
4849 this.CancelBtn.Name = "CancelBtn";
4950 this.CancelBtn.Size = new System.Drawing.Size(75, 23);
5051 this.CancelBtn.TabIndex = 14;
@@ -54,7 +55,7 @@
5455 // OkBtn
5556 //
5657 this.OkBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
57- this.OkBtn.Location = new System.Drawing.Point(25, 128);
58+ this.OkBtn.Location = new System.Drawing.Point(25, 165);
5859 this.OkBtn.Name = "OkBtn";
5960 this.OkBtn.Size = new System.Drawing.Size(75, 23);
6061 this.OkBtn.TabIndex = 13;
@@ -124,11 +125,22 @@
124125 this.StartTimePicker.Size = new System.Drawing.Size(74, 19);
125126 this.StartTimePicker.TabIndex = 18;
126127 //
128+ // PassChk
129+ //
130+ this.PassChk.AutoSize = true;
131+ this.PassChk.Location = new System.Drawing.Point(25, 132);
132+ this.PassChk.Name = "PassChk";
133+ this.PassChk.Size = new System.Drawing.Size(48, 16);
134+ this.PassChk.TabIndex = 20;
135+ this.PassChk.Text = "通過";
136+ this.PassChk.UseVisualStyleBackColor = true;
137+ //
127138 // EditPlanDialog
128139 //
129140 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
130141 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
131- this.ClientSize = new System.Drawing.Size(204, 163);
142+ this.ClientSize = new System.Drawing.Size(204, 200);
143+ this.Controls.Add(this.PassChk);
132144 this.Controls.Add(this.StartDayNum);
133145 this.Controls.Add(this.StartTimePicker);
134146 this.Controls.Add(this.AliveDayNum);
@@ -158,5 +170,6 @@
158170 private System.Windows.Forms.NumericUpDown AliveDayNum;
159171 private System.Windows.Forms.NumericUpDown StartDayNum;
160172 private System.Windows.Forms.DateTimePicker StartTimePicker;
173+ private System.Windows.Forms.CheckBox PassChk;
161174 }
162175 }
\ No newline at end of file
--- WhereTrainBuild/Dialog/EditPlanDialog.cs (revision 26)
+++ WhereTrainBuild/Dialog/EditPlanDialog.cs (revision 27)
@@ -55,6 +55,8 @@
5555 Plan.AliveTime = new TimeSpan((int)AliveDayNum.Value, AliveTimePicker.Value.Hour, AliveTimePicker.Value.Minute, AliveTimePicker.Value.Second);
5656 Plan.StartTime = new TimeSpan((int)StartDayNum.Value, StartTimePicker.Value.Hour, StartTimePicker.Value.Minute, StartTimePicker.Value.Second);
5757
58+ Plan.Passing = PassChk.Checked;
59+
5860 DialogResult = DialogResult.OK;
5961 }
6062
@@ -69,6 +71,7 @@
6971 AliveTimePicker.Value = new DateTime(2000,1,1,Plan.AliveTime.Hours, Plan.AliveTime.Minutes, Plan.AliveTime.Seconds);
7072 StartDayNum.Value = Plan.StartTime.Days;
7173 StartTimePicker.Value = new DateTime(2000, 1, 1, Plan.StartTime.Hours, Plan.StartTime.Minutes, Plan.StartTime.Seconds);
74+ PassChk.Checked = Plan.Passing;
7275 }
7376 }
7477 }
--- WhereTrainBuild/MapUtil/Data/SceduleManager.cs (revision 26)
+++ WhereTrainBuild/MapUtil/Data/SceduleManager.cs (revision 27)
@@ -57,6 +57,11 @@
5757 protected StationInfoData m_station = null;
5858
5959 /// <summary>
60+ /// 通過フラグ
61+ /// </summary>
62+ protected bool m_passing = false;
63+
64+ /// <summary>
6065 /// 順序プロパティ
6166 /// </summary>
6267 public int Order
@@ -117,6 +122,21 @@
117122 }
118123
119124 /// <summary>
125+ /// 通過プロパティ
126+ /// </summary>
127+ public bool Passing
128+ {
129+ get
130+ {
131+ return m_passing;
132+ }
133+ set
134+ {
135+ m_passing = value;
136+ }
137+ }
138+
139+ /// <summary>
120140 /// コンストラクタ
121141 /// </summary>
122142 public Plan()
@@ -145,6 +165,7 @@
145165 mynode.SetAttribute("AliveTime", AliveTime.ToString());
146166 mynode.SetAttribute("StartTime", StartTime.ToString());
147167 mynode.SetAttribute("Station", Station.UniqID.ToString());
168+ mynode.SetAttribute("Passing", Passing.ToString());
148169
149170 return mynode;
150171 }
@@ -164,6 +185,12 @@
164185 var stationid = int.Parse(mynode.Attributes["Station"].Value);
165186 Station = stationmanager.Get(stationid);
166187
188+ var passingattr = mynode.Attributes["Passing"];
189+ if(passingattr != null)
190+ {
191+ Passing = bool.Parse(passingattr.Value);
192+ }
193+
167194 return true;
168195 }
169196
@@ -173,9 +200,9 @@
173200 /// <returns></returns>
174201 public override string ToString()
175202 {
176- return string.Format("{0},{1:00}:{2:00}:{3:00}-{4:00}:{5:00}:{6:00}", Station.Name,
203+ return string.Format("{0},{1:00}:{2:00}:{3:00}-{4:00}:{5:00}:{6:00},{7}", Station.Name,
177204 AliveTime.Hours, AliveTime.Minutes, AliveTime.Seconds,
178- StartTime.Hours,StartTime.Minutes,StartTime.Seconds);
205+ StartTime.Hours,StartTime.Minutes,StartTime.Seconds,Passing == true ? "Pass":"");
179206 }
180207 }
181208
Show on old repository browser