リビジョン | 61 (tree) |
---|---|
日時 | 2021-05-19 18:46:26 |
作者 | dangerouswoo |
(メッセージはありません)
@@ -41,6 +41,7 @@ | ||
41 | 41 | this.CdLbl = new System.Windows.Forms.Label(); |
42 | 42 | this.label5 = new System.Windows.Forms.Label(); |
43 | 43 | this.GCdNum = new System.Windows.Forms.NumericUpDown(); |
44 | + this.MaxBtn = new System.Windows.Forms.Button(); | |
44 | 45 | ((System.ComponentModel.ISupportInitialize)(this.CdNum)).BeginInit(); |
45 | 46 | ((System.ComponentModel.ISupportInitialize)(this.GCdNum)).BeginInit(); |
46 | 47 | this.SuspendLayout(); |
@@ -51,7 +52,7 @@ | ||
51 | 52 | | System.Windows.Forms.AnchorStyles.Right))); |
52 | 53 | this.NameTxt.Location = new System.Drawing.Point(94, 12); |
53 | 54 | this.NameTxt.Name = "NameTxt"; |
54 | - this.NameTxt.Size = new System.Drawing.Size(95, 19); | |
55 | + this.NameTxt.Size = new System.Drawing.Size(138, 19); | |
55 | 56 | this.NameTxt.TabIndex = 0; |
56 | 57 | // |
57 | 58 | // label1 |
@@ -67,7 +68,7 @@ | ||
67 | 68 | // |
68 | 69 | this.VisibleChk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); |
69 | 70 | this.VisibleChk.AutoSize = true; |
70 | - this.VisibleChk.Location = new System.Drawing.Point(130, 100); | |
71 | + this.VisibleChk.Location = new System.Drawing.Point(173, 100); | |
71 | 72 | this.VisibleChk.Name = "VisibleChk"; |
72 | 73 | this.VisibleChk.Size = new System.Drawing.Size(59, 16); |
73 | 74 | this.VisibleChk.TabIndex = 2; |
@@ -78,7 +79,7 @@ | ||
78 | 79 | // |
79 | 80 | this.button2.Anchor = System.Windows.Forms.AnchorStyles.Bottom; |
80 | 81 | this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel; |
81 | - this.button2.Location = new System.Drawing.Point(111, 154); | |
82 | + this.button2.Location = new System.Drawing.Point(133, 154); | |
82 | 83 | this.button2.Name = "button2"; |
83 | 84 | this.button2.Size = new System.Drawing.Size(75, 23); |
84 | 85 | this.button2.TabIndex = 12; |
@@ -88,7 +89,7 @@ | ||
88 | 89 | // OkBtn |
89 | 90 | // |
90 | 91 | this.OkBtn.Anchor = System.Windows.Forms.AnchorStyles.Bottom; |
91 | - this.OkBtn.Location = new System.Drawing.Point(12, 154); | |
92 | + this.OkBtn.Location = new System.Drawing.Point(34, 154); | |
92 | 93 | this.OkBtn.Name = "OkBtn"; |
93 | 94 | this.OkBtn.Size = new System.Drawing.Size(75, 23); |
94 | 95 | this.OkBtn.TabIndex = 11; |
@@ -148,7 +149,7 @@ | ||
148 | 149 | 0, |
149 | 150 | -2147483648}); |
150 | 151 | this.CdNum.Name = "CdNum"; |
151 | - this.CdNum.Size = new System.Drawing.Size(95, 19); | |
152 | + this.CdNum.Size = new System.Drawing.Size(114, 19); | |
152 | 153 | this.CdNum.TabIndex = 14; |
153 | 154 | // |
154 | 155 | // CdLbl |
@@ -186,14 +187,25 @@ | ||
186 | 187 | 0, |
187 | 188 | -2147483648}); |
188 | 189 | this.GCdNum.Name = "GCdNum"; |
189 | - this.GCdNum.Size = new System.Drawing.Size(95, 19); | |
190 | + this.GCdNum.Size = new System.Drawing.Size(114, 19); | |
190 | 191 | this.GCdNum.TabIndex = 14; |
191 | 192 | // |
193 | + // MaxBtn | |
194 | + // | |
195 | + this.MaxBtn.Location = new System.Drawing.Point(214, 46); | |
196 | + this.MaxBtn.Name = "MaxBtn"; | |
197 | + this.MaxBtn.Size = new System.Drawing.Size(27, 23); | |
198 | + this.MaxBtn.TabIndex = 15; | |
199 | + this.MaxBtn.Text = "△"; | |
200 | + this.MaxBtn.UseVisualStyleBackColor = true; | |
201 | + this.MaxBtn.Click += new System.EventHandler(this.MaxBtn_Click); | |
202 | + // | |
192 | 203 | // StationDialog |
193 | 204 | // |
194 | 205 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); |
195 | 206 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
196 | - this.ClientSize = new System.Drawing.Size(201, 189); | |
207 | + this.ClientSize = new System.Drawing.Size(244, 189); | |
208 | + this.Controls.Add(this.MaxBtn); | |
197 | 209 | this.Controls.Add(this.GCdNum); |
198 | 210 | this.Controls.Add(this.CdNum); |
199 | 211 | this.Controls.Add(this.label3); |
@@ -234,5 +246,6 @@ | ||
234 | 246 | private System.Windows.Forms.Label CdLbl; |
235 | 247 | private System.Windows.Forms.Label label5; |
236 | 248 | private System.Windows.Forms.NumericUpDown GCdNum; |
249 | + private System.Windows.Forms.Button MaxBtn; | |
237 | 250 | } |
238 | 251 | } |
\ No newline at end of file |
@@ -81,5 +81,16 @@ | ||
81 | 81 | { |
82 | 82 | CdNum.Value = NameTxt.Text.GetHashCode(); |
83 | 83 | } |
84 | + | |
85 | + /// <summary> | |
86 | + /// 最大ボタン押下 | |
87 | + /// </summary> | |
88 | + /// <param name="sender"></param> | |
89 | + /// <param name="e"></param> | |
90 | + private void MaxBtn_Click(object sender, EventArgs e) | |
91 | + { | |
92 | + var maxcd = m_station.Manager.StationList().Max( info => info.StationCd ) + 1; | |
93 | + CdNum.Value = maxcd; | |
94 | + } | |
84 | 95 | } |
85 | 96 | } |
@@ -560,6 +560,7 @@ | ||
560 | 560 | var stationinfo = new StationInfoData(); |
561 | 561 | stationinfo.Latitude = dLat; |
562 | 562 | stationinfo.Longitude = dLng; |
563 | + stationinfo.Manager = m_factory.GetStationManager(); | |
563 | 564 | dlg.SetStation(stationinfo); |
564 | 565 | if (dlg.ShowDialog(this) == DialogResult.OK) |
565 | 566 | { |
@@ -1012,6 +1013,7 @@ | ||
1012 | 1013 | var stationinfo = new StationInfoData(); |
1013 | 1014 | stationinfo.Latitude = crossresult.CrossPoint.lat; |
1014 | 1015 | stationinfo.Longitude = crossresult.CrossPoint.lng; |
1016 | + stationinfo.Manager = m_factory.GetStationManager(); | |
1015 | 1017 | dlg.SetStation(stationinfo); |
1016 | 1018 | if (dlg.ShowDialog(this) == DialogResult.OK) |
1017 | 1019 | { |