• R/O
  • HTTP
  • SSH
  • HTTPS

Kybernetes: Commit

kybetnetes ~ TaskOperatingSystem


Commit MetaInfo

Révisionf449dac56959fc11c99604bb8573c13ee30dfac8 (tree)
l'heure2014-08-16 23:10:36
AuteurAndouTomo <tomando.clar02@gmai...>
CommiterAndouTomo

Message de Log

v.1.1.6.0
サブコンソールの追加、一部コマンドの結果をサブコンソールに展開するように処理変更
duplicateコマンドに-pオプション追加(見積もり時間もコピーする)
短めスクロール(ctrl+pgup/down)を追加
タスク表示処理をBaseForm側に委譲。
user.dbにインデックス再付与。

Change Summary

Modification

--- a/base/Properties/AssemblyInfo.cs
+++ b/base/Properties/AssemblyInfo.cs
@@ -33,6 +33,6 @@ using System.Resources;
3333 // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
3434 // 既定値にすることができます:
3535 // [assembly: AssemblyVersion("1.0.*")]
36-[assembly: AssemblyVersion("1.1.4.0")]
37-[assembly: AssemblyFileVersion("1.1.4.0")]
36+[assembly: AssemblyVersion("1.1.6.0")]
37+[assembly: AssemblyFileVersion("1.1.6.0")]
3838 [assembly: NeutralResourcesLanguageAttribute("ja")]
--- a/base/data/DAO/TimeAreaData.cs
+++ b/base/data/DAO/TimeAreaData.cs
@@ -73,6 +73,21 @@ namespace com.andoutomo.kybernetes.data.DAO
7373 get;
7474 set;
7575 }
76+
77+ public string Indicator
78+ {
79+ get
80+ {
81+ if (ForcastMin > Span)
82+ {
83+ return "+";
84+ }
85+ else
86+ {
87+ return "-";
88+ }
89+ }
90+ }
7691 }
7792
7893 }
--- a/base/view/BaseForm.Designer.cs
+++ b/base/view/BaseForm.Designer.cs
@@ -31,17 +31,23 @@
3131 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BaseForm));
3232 this.pnlTask = new System.Windows.Forms.Panel();
3333 this.txtInput = new System.Windows.Forms.TextBox();
34- this.rConsole = new System.Windows.Forms.RichTextBox();
3534 this.expData = new System.Windows.Forms.SaveFileDialog();
3635 this.dmpData = new System.Windows.Forms.SaveFileDialog();
3736 this.selSh = new System.Windows.Forms.OpenFileDialog();
3837 this.BGColorDlg = new System.Windows.Forms.ColorDialog();
3938 this.FRColorDlg = new System.Windows.Forms.ColorDialog();
4039 this.splBase = new System.Windows.Forms.SplitContainer();
40+ this.splConsole = new System.Windows.Forms.SplitContainer();
41+ this.rSubConsole = new System.Windows.Forms.RichTextBox();
42+ this.rConsole = new System.Windows.Forms.TextBox();
4143 ((System.ComponentModel.ISupportInitialize)(this.splBase)).BeginInit();
4244 this.splBase.Panel1.SuspendLayout();
4345 this.splBase.Panel2.SuspendLayout();
4446 this.splBase.SuspendLayout();
47+ ((System.ComponentModel.ISupportInitialize)(this.splConsole)).BeginInit();
48+ this.splConsole.Panel1.SuspendLayout();
49+ this.splConsole.Panel2.SuspendLayout();
50+ this.splConsole.SuspendLayout();
4551 this.SuspendLayout();
4652 //
4753 // pnlTask
@@ -52,10 +58,11 @@
5258 this.pnlTask.AutoScroll = true;
5359 this.pnlTask.BackColor = System.Drawing.Color.Black;
5460 this.pnlTask.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
61+ this.pnlTask.Font = new System.Drawing.Font("MS ゴシック", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
5562 this.pnlTask.ForeColor = System.Drawing.Color.White;
5663 this.pnlTask.Location = new System.Drawing.Point(3, 3);
5764 this.pnlTask.Name = "pnlTask";
58- this.pnlTask.Size = new System.Drawing.Size(836, 446);
65+ this.pnlTask.Size = new System.Drawing.Size(836, 479);
5966 this.pnlTask.TabIndex = 0;
6067 //
6168 // txtInput
@@ -65,30 +72,12 @@
6572 this.txtInput.BackColor = System.Drawing.Color.Black;
6673 this.txtInput.Font = new System.Drawing.Font("MS ゴシック", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
6774 this.txtInput.ForeColor = System.Drawing.Color.White;
68- this.txtInput.Location = new System.Drawing.Point(3, 234);
75+ this.txtInput.Location = new System.Drawing.Point(3, 255);
6976 this.txtInput.Name = "txtInput";
70- this.txtInput.Size = new System.Drawing.Size(836, 19);
77+ this.txtInput.Size = new System.Drawing.Size(450, 19);
7178 this.txtInput.TabIndex = 1;
7279 this.txtInput.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtInput_KeyDown);
7380 //
74- // rConsole
75- //
76- this.rConsole.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
77- | System.Windows.Forms.AnchorStyles.Left)
78- | System.Windows.Forms.AnchorStyles.Right)));
79- this.rConsole.BackColor = System.Drawing.Color.Black;
80- this.rConsole.Font = new System.Drawing.Font("MS ゴシック", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
81- this.rConsole.ForeColor = System.Drawing.Color.White;
82- this.rConsole.Location = new System.Drawing.Point(3, 0);
83- this.rConsole.Name = "rConsole";
84- this.rConsole.ReadOnly = true;
85- this.rConsole.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.ForcedVertical;
86- this.rConsole.Size = new System.Drawing.Size(836, 233);
87- this.rConsole.TabIndex = 0;
88- this.rConsole.TabStop = false;
89- this.rConsole.Text = "";
90- this.rConsole.MouseUp += new System.Windows.Forms.MouseEventHandler(this.rConsole_MouseUp);
91- //
9281 // expData
9382 //
9483 this.expData.DefaultExt = "csv";
@@ -125,29 +114,86 @@
125114 //
126115 // splBase.Panel2
127116 //
128- this.splBase.Panel2.Controls.Add(this.txtInput);
129- this.splBase.Panel2.Controls.Add(this.rConsole);
130- this.splBase.Size = new System.Drawing.Size(840, 710);
131- this.splBase.SplitterDistance = 450;
117+ this.splBase.Panel2.Controls.Add(this.splConsole);
118+ this.splBase.Size = new System.Drawing.Size(840, 761);
119+ this.splBase.SplitterDistance = 481;
132120 this.splBase.TabIndex = 0;
133121 this.splBase.TabStop = false;
134122 this.splBase.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splBase_SplitterMoved);
135123 //
124+ // splConsole
125+ //
126+ this.splConsole.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
127+ | System.Windows.Forms.AnchorStyles.Left)
128+ | System.Windows.Forms.AnchorStyles.Right)));
129+ this.splConsole.Location = new System.Drawing.Point(0, 0);
130+ this.splConsole.Name = "splConsole";
131+ //
132+ // splConsole.Panel1
133+ //
134+ this.splConsole.Panel1.Controls.Add(this.rConsole);
135+ this.splConsole.Panel1.Controls.Add(this.txtInput);
136+ //
137+ // splConsole.Panel2
138+ //
139+ this.splConsole.Panel2.Controls.Add(this.rSubConsole);
140+ this.splConsole.Size = new System.Drawing.Size(836, 275);
141+ this.splConsole.SplitterDistance = 447;
142+ this.splConsole.TabIndex = 1;
143+ this.splConsole.TabStop = false;
144+ this.splConsole.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splConsole_SplitterMoved);
145+ //
146+ // rSubConsole
147+ //
148+ this.rSubConsole.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
149+ | System.Windows.Forms.AnchorStyles.Left)
150+ | System.Windows.Forms.AnchorStyles.Right)));
151+ this.rSubConsole.BackColor = System.Drawing.Color.Black;
152+ this.rSubConsole.Font = new System.Drawing.Font("MS ゴシック", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
153+ this.rSubConsole.ForeColor = System.Drawing.Color.White;
154+ this.rSubConsole.Location = new System.Drawing.Point(0, 0);
155+ this.rSubConsole.Name = "rSubConsole";
156+ this.rSubConsole.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
157+ this.rSubConsole.Size = new System.Drawing.Size(388, 275);
158+ this.rSubConsole.TabIndex = 0;
159+ this.rSubConsole.TabStop = false;
160+ this.rSubConsole.Text = "";
161+ this.rSubConsole.MouseUp += new System.Windows.Forms.MouseEventHandler(this.rSubConsole_MouseUp);
162+ //
163+ // rConsole
164+ //
165+ this.rConsole.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
166+ | System.Windows.Forms.AnchorStyles.Left)
167+ | System.Windows.Forms.AnchorStyles.Right)));
168+ this.rConsole.BackColor = System.Drawing.Color.Black;
169+ this.rConsole.ForeColor = System.Drawing.Color.White;
170+ this.rConsole.Location = new System.Drawing.Point(3, 0);
171+ this.rConsole.Multiline = true;
172+ this.rConsole.Name = "rConsole";
173+ this.rConsole.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
174+ this.rConsole.Size = new System.Drawing.Size(448, 255);
175+ this.rConsole.TabIndex = 2;
176+ this.rConsole.TabStop = false;
177+ this.rConsole.MouseUp += new System.Windows.Forms.MouseEventHandler(this.rConsole_MouseUp);
178+ //
136179 // BaseForm
137180 //
138181 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
139182 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
140- this.ClientSize = new System.Drawing.Size(844, 712);
183+ this.ClientSize = new System.Drawing.Size(844, 763);
141184 this.Controls.Add(this.splBase);
142185 this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
143186 this.Name = "BaseForm";
144187 this.Text = "Kybernetes v1.0.0";
145- this.ResizeEnd += new System.EventHandler(this.BaseForm_ResizeEnd);
146188 this.splBase.Panel1.ResumeLayout(false);
147189 this.splBase.Panel2.ResumeLayout(false);
148- this.splBase.Panel2.PerformLayout();
149190 ((System.ComponentModel.ISupportInitialize)(this.splBase)).EndInit();
150191 this.splBase.ResumeLayout(false);
192+ this.splConsole.Panel1.ResumeLayout(false);
193+ this.splConsole.Panel1.PerformLayout();
194+ this.splConsole.Panel2.ResumeLayout(false);
195+ ((System.ComponentModel.ISupportInitialize)(this.splConsole)).EndInit();
196+ this.splConsole.ResumeLayout(false);
151197 this.ResumeLayout(false);
152198
153199 }
@@ -156,13 +202,15 @@
156202
157203 private System.Windows.Forms.Panel pnlTask;
158204 private System.Windows.Forms.TextBox txtInput;
159- private System.Windows.Forms.RichTextBox rConsole;
160205 private System.Windows.Forms.SaveFileDialog expData;
161206 private System.Windows.Forms.SaveFileDialog dmpData;
162207 private System.Windows.Forms.OpenFileDialog selSh;
163208 private System.Windows.Forms.ColorDialog BGColorDlg;
164209 private System.Windows.Forms.ColorDialog FRColorDlg;
165210 private System.Windows.Forms.SplitContainer splBase;
211+ private System.Windows.Forms.SplitContainer splConsole;
212+ private System.Windows.Forms.RichTextBox rSubConsole;
213+ private System.Windows.Forms.TextBox rConsole;
166214 }
167215 }
168216
--- a/base/view/BaseForm.cs
+++ b/base/view/BaseForm.cs
@@ -6,6 +6,7 @@ using com.andoutomo.kybernetes.data.DAO;
66 using System.Drawing;
77 using com.andoutomo.kybernetes.data.accessor;
88 using System.Runtime.InteropServices;
9+using com.andoutomo.kybernetes.data;
910
1011
1112 namespace com.andoutomo.kybernetes.view
@@ -53,7 +54,7 @@ namespace com.andoutomo.kybernetes.view
5354 {
5455 Credit creditForm = new Credit();
5556 creditForm.StartPosition = FormStartPosition.CenterParent;
56-
57+
5758 creditForm.ShowDialog();
5859 }
5960 /// <summary>
@@ -62,7 +63,7 @@ namespace com.andoutomo.kybernetes.view
6263 /// <returns></returns>
6364 public string invokeExpDialog()
6465 {
65- DialogResult result =this.expData.ShowDialog();
66+ DialogResult result = this.expData.ShowDialog();
6667 if (result == DialogResult.OK)
6768 {
6869 return this.expData.FileName;
@@ -91,7 +92,7 @@ namespace com.andoutomo.kybernetes.view
9192 /// <returns></returns>
9293 public string invokeShellDialog()
9394 {
94-
95+
9596 DialogResult result = this.selSh.ShowDialog();
9697 if (result == DialogResult.OK)
9798 {
@@ -157,17 +158,17 @@ namespace com.andoutomo.kybernetes.view
157158 set { exitSwitch = value; }
158159 }
159160
160- private int lastRow=17;
161+ private int lastRow = 17;
161162 /// <summary>
162163 /// パネルを追加します。
163164 /// </summary>
164165 /// <param name="data"></param>
165166 public void addPanel(TaskData data)
166167 {
167- Panel targetPanel = new PanelController(this).createRow(lastRow,data);
168-
168+ Panel targetPanel = new PanelController(this).createRow(lastRow, data);
169+
169170 pnlTask.Controls.Add(targetPanel);
170- lastRow += targetPanel.Height-1;
171+ lastRow += targetPanel.Height - 1;
171172 }
172173 /// <summary>
173174 /// インデックスパネルを追加します
@@ -176,7 +177,7 @@ namespace com.andoutomo.kybernetes.view
176177 public void addIndexPanel(string timeArea)
177178 {
178179 Panel targetPanel = new IndexPanelController().createRow(timeArea, this.pnlTask.Width, lastRow, frColor);
179-
180+
180181 pnlTask.Controls.Add(targetPanel);
181182 lastRow += targetPanel.Height - 1;
182183 }
@@ -204,7 +205,7 @@ namespace com.andoutomo.kybernetes.view
204205 for (int h = dummy; h > 0; h--)
205206 {
206207 Control ctrl = pnlTask.Controls[h - 1];
207-
208+
208209 for (int i = ctrl.Controls.Count; i > 0; i--)
209210 {
210211 ctrl.Controls[i - 1].Dispose();
@@ -217,7 +218,7 @@ namespace com.andoutomo.kybernetes.view
217218 //先頭行は足す
218219 pnlTask.Controls.Add(new CaptionPanelController().createRow(this.pnlTask.Width, frColor));
219220 lastRow = 17;
220-
221+
221222 }
222223 /// <summary>
223224 /// コマンド内容を表示するかどうかを決定します。
@@ -235,13 +236,13 @@ namespace com.andoutomo.kybernetes.view
235236 private void txtInput_KeyDown(object sender, KeyEventArgs e)
236237 {
237238 int currentYPosition;
238- int currentScrollHeight = this.pnlTask.Height - 20;
239+ int currentScrollHeight = this.pnlTask.Height - 25;
239240 switch (e.KeyCode)
240241 {
241242 case Keys.Enter:
242243 e.SuppressKeyPress = true;
243244 doCommand();
244-
245+
245246 break;
246247
247248 case Keys.Space:
@@ -265,25 +266,40 @@ namespace com.andoutomo.kybernetes.view
265266 break;
266267 case Keys.Up:
267268 e.SuppressKeyPress = true;
269+
268270 txtInput.Text = history.prevCommand();
269271 txtInput.Select(this.txtInput.Text.Length, 0);
272+
270273 break;
271274 case Keys.Down:
272275 e.SuppressKeyPress = true;
276+
273277 txtInput.Text = history.nextCommand();
274278 txtInput.Select(this.txtInput.Text.Length, 0);
275- break;
276279
280+ break;
277281 case Keys.PageDown:
278282 currentYPosition = Math.Abs(this.pnlTask.AutoScrollPosition.Y);
279- this.pnlTask.AutoScrollPosition = new Point(0, currentYPosition + currentScrollHeight);
280-
283+ if (e.Control)
284+ {
285+ this.pnlTask.AutoScrollPosition = new Point(0, currentYPosition + 25);
286+ }
287+ else
288+ {
289+ this.pnlTask.AutoScrollPosition = new Point(0, currentYPosition + currentScrollHeight);
290+ }
281291 break;
282292
283293 case Keys.PageUp:
284294 currentYPosition = Math.Abs(this.pnlTask.AutoScrollPosition.Y);
285- this.pnlTask.AutoScrollPosition = new Point(0, currentYPosition - currentScrollHeight);
286-
295+ if (e.Control)
296+ {
297+ this.pnlTask.AutoScrollPosition = new Point(0, currentYPosition - 25);
298+ }
299+ else
300+ {
301+ this.pnlTask.AutoScrollPosition = new Point(0, currentYPosition - currentScrollHeight);
302+ }
287303 break;
288304 }
289305 }
@@ -293,14 +309,14 @@ namespace com.andoutomo.kybernetes.view
293309 private void doCommand()
294310 {
295311 rConsole.Focus();
296-
312+
297313 if (Echo)
298314 {
299315 addText(txtInput.Text);
300316 }
301317 KybernetesLogger.Log.trace("[dispatch]" + txtInput.Text);
302-
303-
318+
319+
304320 string result = wkOnCmdDispatch(txtInput.Text.Trim());
305321 if (!string.IsNullOrEmpty(result))
306322 {
@@ -398,7 +414,7 @@ namespace com.andoutomo.kybernetes.view
398414 /// </summary>
399415 /// <param name="prompt"></param>
400416 /// <returns></returns>
401- public string showDropBoxInputBox(List<SimpleDataBean> list,string prompt)
417+ public string showDropBoxInputBox(List<SimpleDataBean> list, string prompt)
402418 {
403419 DropBoxInputBox inputBox = new DropBoxInputBox(prompt);
404420 inputBox.StartPosition = FormStartPosition.CenterParent;
@@ -422,7 +438,7 @@ namespace com.andoutomo.kybernetes.view
422438 /// <returns></returns>
423439 public string showDropBoxInputBox(List<SimpleDataBean> list, string prompt, string defaultData)
424440 {
425- DropBoxInputBox inputBox = new DropBoxInputBox(prompt,defaultData);
441+ DropBoxInputBox inputBox = new DropBoxInputBox(prompt, defaultData);
426442 inputBox.StartPosition = FormStartPosition.CenterParent;
427443 inputBox.setDropData(list);
428444
@@ -443,35 +459,28 @@ namespace com.andoutomo.kybernetes.view
443459 /// <param name="e"></param>
444460 private void rConsole_MouseUp(object sender, MouseEventArgs e)
445461 {
462+
446463 Clipboard.SetDataObject(rConsole.SelectedText.Trim());
447464 //txtInput.Text += rConsole.SelectedText.Trim();
448465 txtInput.Focus();
449466 //選択状態を解除する
450467 this.txtInput.Select(this.txtInput.Text.Length, 0);
451-
452468 }
453469 /// <summary>
454- /// ウィンドウ全体のサイズ変更時イベントハンドラです。
470+ /// 選択対象をクリップボードにコピーします。サブコンソール版です。
455471 /// </summary>
456472 /// <param name="sender"></param>
457473 /// <param name="e"></param>
458- private void BaseForm_ResizeEnd(object sender, EventArgs e)
474+ private void rSubConsole_MouseUp(object sender, MouseEventArgs e)
459475 {
460- // panelResize();
476+ Clipboard.SetDataObject(rSubConsole.SelectedText.Trim());
461477
478+ txtInput.Focus();
479+ this.txtInput.Select(this.txtInput.Text.Length, 0);
462480 }
481+
463482 /// <summary>
464- /// タスクパネルの大きさ調整を行います。
465- /// 起動されるのは、ウィンドウ全体のサイズ変更時、及びコマンド実行時です。
466- /// </summary>
467- //private void panelResize()
468- //{
469- //rConsole.Size = new Size(this.Width - 30, this.Height / 3);
470- //pnlTask.Size = new Size(this.Size.Width - 30, this.Size.Height - rConsole.Height-80);
471- //rConsole.Location = new Point(5,pnlTask.Size.Height + 10);
472- //}
473- /// <summary>
474- /// 背景色設定を呼び出します。
483+ /// 背景色設定を呼び出します。パネルとサブコンソールが対象です。
475484 /// </summary>
476485 public bool setPnlBackground()
477486 {
@@ -479,10 +488,11 @@ namespace com.andoutomo.kybernetes.view
479488 if (res == System.Windows.Forms.DialogResult.OK)
480489 {
481490 pnlTask.BackColor = BGColorDlg.Color;
491+ rSubConsole.BackColor = BGColorDlg.Color;
482492 return true;
483493 }
484494 else { return false; }
485-
495+
486496 }
487497 /// <summary>
488498 /// 前景色設定を呼び出します.
@@ -494,6 +504,7 @@ namespace com.andoutomo.kybernetes.view
494504 if (res == System.Windows.Forms.DialogResult.OK)
495505 {
496506 frColor = FRColorDlg.Color;
507+ rSubConsole.ForeColor = FRColorDlg.Color;
497508 return true;
498509 }
499510 else { return false; }
@@ -508,7 +519,7 @@ namespace com.andoutomo.kybernetes.view
508519 {
509520 txtInput.Focus();
510521 }
511-
522+
512523 /// <summary>
513524 /// タイマーを呼び出します。
514525 /// タイマーはモードレスダイアログとして表示されます。
@@ -528,12 +539,17 @@ namespace com.andoutomo.kybernetes.view
528539 form.Owner = this;
529540 form.Show();
530541 }
542+ /// <summary>
543+ /// タイマーを呼び出します。タイトルも付けます。
544+ /// </summary>
545+ /// <param name="second"></param>
546+ /// <param name="title"></param>
531547 public void showTimer(int second, string title)
532548 {
533549 ClockForm form;
534550 if (second > 0)
535551 {
536- form = new ClockForm(second * 60,title);
552+ form = new ClockForm(second * 60, title);
537553 }
538554 else
539555 {
@@ -582,22 +598,40 @@ namespace com.andoutomo.kybernetes.view
582598 FlashWindowEx(ref fInfo);
583599 }
584600 #endregion
585-
601+ /// <summary>
602+ /// バッチコマンド用です。ちょっと迂遠ですが、バッチで読み込んだコマンドを
603+ /// フォームで受け取り、さらにもう一回ディスパッチをフォームから依頼します。
604+ /// </summary>
605+ /// <param name="command"></param>
586606 public void cmdForBatch(string command)
587607 {
588- this.addText( wkOnCmdDispatch(command));
608+ this.addText(wkOnCmdDispatch(command));
589609 }
590610
591-
611+ /// <summary>
612+ /// コマンド実行時のハンドラです。
613+ /// </summary>
614+ /// <param name="sender"></param>
615+ /// <param name="e"></param>
592616 public delegate void CmdDispatchEventHandler(object sender, CmdDispatchEventArg e);
617+
618+ /// <summary>
619+ /// コマンドイベントです。コマンド実行時処理をここに設定してください。
620+ /// </summary>
593621 public event CmdDispatchEventHandler onCmdDispatch;
622+ /// <summary>
623+ /// コマンドディスパッチを実施し、戻り値(CmdDispatchEventArg.Result)から
624+ /// 画面表示用のテキストを受領します。
625+ /// </summary>
626+ /// <param name="command"></param>
627+ /// <returns></returns>
594628 string wkOnCmdDispatch(string command)
595629 {
596630 if (onCmdDispatch != null)
597631 {
598632 CmdDispatchEventArg args = new CmdDispatchEventArg();
599633 args.Command = command;
600-
634+
601635 onCmdDispatch(this, args);
602636
603637 return args.Result;
@@ -607,8 +641,50 @@ namespace com.andoutomo.kybernetes.view
607641 throw new KybernetesApplicationException();
608642 }
609643 }
610- }
611644
645+ public void showOnSubConsole(List<string> estTimeStr)
646+ {
647+ this.rSubConsole.Text = System.Environment.NewLine;
648+
649+ foreach (string str in estTimeStr)
650+ {
651+ this.rSubConsole.AppendText(
652+ str + System.Environment.NewLine);
653+ }
654+ }
612655
656+ public void showOnPanel(List<TaskData> taskList)
657+ {
658+
659+ clearPanel();
660+ string wkAreaForIndex = "";
661+ DateComponent wkIndexDate = new DateComponent("19000101");
662+ foreach (TaskData data in taskList)
663+ {
664+ //data.Today = todayDate;
665+ if (!data.isComplete)
666+ {
667+ if (wkAreaForIndex != data.TimeArea || wkIndexDate.calculateDateDiff(data.DoDate) != 0)
668+ {
669+ string wkIndex = "- " + data.TimeArea + " - on " + data.DoDate.getDateString("yyyy/MM/dd");
670+ addIndexPanel(wkIndex);
671+ }
672+
673+ wkAreaForIndex = data.TimeArea;
674+ wkIndexDate = data.DoDate;
675+ }
676+ addPanel(data);
677+
678+ }
679+ }
680+
681+ private void splConsole_SplitterMoved(object sender, SplitterEventArgs e)
682+ {
683+ txtInput.Focus();
684+ }
685+
686+
687+
688+ }
613689
614-}
690+}
\ No newline at end of file
--- a/base/view/BaseForm.resx
+++ b/base/view/BaseForm.resx
@@ -132,6 +132,9 @@
132132 <metadata name="FRColorDlg.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
133133 <value>428, 17</value>
134134 </metadata>
135+ <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
136+ <value>25</value>
137+ </metadata>
135138 <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
136139 <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
137140 <value>
Binary files a/kybernetes2.suo and b/kybernetes2.suo differ
--- a/main/Properties/AssemblyInfo.cs
+++ b/main/Properties/AssemblyInfo.cs
@@ -33,6 +33,6 @@ using System.Resources;
3333 // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
3434 // 既定値にすることができます:
3535 // [assembly: AssemblyVersion("1.0.*")]
36-[assembly: AssemblyVersion("1.1.5.1")]
37-[assembly: AssemblyFileVersion("1.1.5.1")]
36+[assembly: AssemblyVersion("1.1.6.0")]
37+[assembly: AssemblyFileVersion("1.1.6.0")]
3838 [assembly: NeutralResourcesLanguageAttribute("ja")]
Binary files a/main/bin/Debug/setting.db and b/main/bin/Debug/setting.db differ
Binary files a/main/bin/Debug/user.db and b/main/bin/Debug/user.db differ
--- a/main/command/CRUD/EstimateCommand.cs
+++ b/main/command/CRUD/EstimateCommand.cs
@@ -11,6 +11,7 @@ namespace com.andoutomo.kybernetes.command.reference
1111 {
1212 EstimateCommandArg param = (EstimateCommandArg)argument;
1313 string targetDate=string.Empty;
14+ bool isToday;
1415
1516 //タスクリストを取得
1617 List<TaskData> taskList;
@@ -18,12 +19,13 @@ namespace com.andoutomo.kybernetes.command.reference
1819 {
1920 taskList = TaskDataAccessor.getObject.getToDayTaskList();
2021 targetDate="本日";
22+ isToday = true;
2123 }
2224 else
2325 {
2426 taskList = TaskDataAccessor.getObject.getDailyTaskList(param.targetDate);
2527 targetDate = param.targetDate.getDateString();
26-
28+ isToday = false;
2729 }
2830 //タイムエリアマスタからマスターリストを取得
2931 List<TimeAreaCalcData> timeAreaList = TimeAreaDataAccessor.getObject.getAllTimeAreaForCalc();
@@ -55,13 +57,13 @@ namespace com.andoutomo.kybernetes.command.reference
5557 }
5658
5759 List<string> msgList = new List<string>();
58- //msgList.Add(targetDate + "の作業見積もり及び実績");
59- //msgList.Add(string.Empty);
60+ msgList.Add(targetDate + "の作業見積もり及び実績");
61+ msgList.Add(string.Empty);
6062 msgList.Add(" @ FROM-TO Span Forecast REAL REMAIN ");
6163 foreach (TimeAreaCalcData area_ in timeAreaList)
6264 {
6365 // image: @ FROM-TO Span Forecast REAL REMAIN
64- // image: A 09:00-12:00 3:00 2:40 3:20 1:10
66+ // image: A 09:00-12:00 3:00 2:40 3:20 1:10
6567 string estimateStr = " " + area_.AreaStr;
6668 estimateStr += " ";
6769 estimateStr += getFiveLengthTimeStr(area_.StartTime);
@@ -75,16 +77,20 @@ namespace com.andoutomo.kybernetes.command.reference
7577 estimateStr += new TimeComponent(area_.ActualMin).ToString();
7678 estimateStr += " ";
7779 estimateStr += new TimeComponent(area_.RemainMin).ToString();
78-
80+ //estimateStr += " ";
81+ //estimateStr += area_.Indicator;
7982 msgList.Add(estimateStr);
8083 }
8184 msgList.Add(string.Empty);
82- msgList.Add("現在時刻 : " + TimeComponent.justNow().ToString());
83- msgList.Add("残り作業 : " + new TimeComponent(minuteRemains).ToString());
84- msgList.Add("予想終了時刻: " + TimeComponent.justNow().add(minuteRemains).ToString());
85- //msgList.Add(string.Empty);
86-
87- form.addMultiText(msgList);
85+ //本日分だけ予想終了時刻を算出する
86+ if (isToday)
87+ {
88+ msgList.Add("現在時刻 : " + TimeComponent.justNow().ToString());
89+ msgList.Add("残り作業 : " + new TimeComponent(minuteRemains).ToString());
90+ msgList.Add("予想終了時刻: " + TimeComponent.justNow().add(minuteRemains).ToString());
91+ //msgList.Add(string.Empty);
92+ }
93+ form.showOnSubConsole(msgList);
8894 return true;
8995 }
9096
--- a/main/command/CRUD/ListCommand.cs
+++ b/main/command/CRUD/ListCommand.cs
@@ -47,25 +47,7 @@ namespace com.andoutomo.kybernetes.command
4747 }
4848 }
4949
50-
51- form.clearPanel();
52- string wkAreaForIndex = "";
53- foreach (TaskData data in dataList)
54- {
55- data.Today = todayDate;
56- if (!data.isComplete)
57- {
58- if (wkAreaForIndex != data.TimeArea)
59- {
60- string wkIndex = "- " + data.TimeArea + " - on " + data.DoDate.getDateString("yyyy/MM/dd");
61- form.addIndexPanel(wkIndex);
62- }
63-
64- wkAreaForIndex = data.TimeArea;
65- }
66- form.addPanel(data);
67-
68- }
50+ form.showOnPanel(dataList);
6951
7052 message = string.Empty;
7153 return true;
--- a/main/command/CRUD/LongListCommand.cs
+++ b/main/command/CRUD/LongListCommand.cs
@@ -23,25 +23,9 @@ namespace com.andoutomo.kybernetes.command.CRUD
2323 {
2424 taskList = TaskDataAccessor.getObject.getDailyTaskList(param.targetDate);
2525 }
26-
27- form.clearPanel();
26+ //パネルに表示する
27+ form.showOnPanel(taskList);
2828
29- string wkAreaForIndex = "";
30- foreach (TaskData data in taskList)
31- {
32- data.Today = today;
33- if (!data.isComplete)
34- {
35- if (wkAreaForIndex != data.TimeArea)
36- {
37- string wkIndex = "- " + data.TimeArea + " - on " + data.DoDate.getDateString("yyyy/MM/dd");
38- form.addIndexPanel(wkIndex);
39- }
40-
41- wkAreaForIndex = data.TimeArea;
42- }
43- form.addPanel(data);
44- }
4529 //ベースクラスを呼び出し見積もりを表示する
4630 return base.execute();
4731
--- a/main/command/Control/DuplicateCommand.cs
+++ b/main/command/Control/DuplicateCommand.cs
@@ -21,9 +21,13 @@ namespace com.andoutomo.kybernetes.command.Control
2121 // 次番号を取得
2222 data.TaskID = accessor.getMaxTaskID();
2323 data.SortID = accessor.getMaxSortID();
24- //見積もり時間は0にする。
25- data.ForecastMin = 0;
26-
24+
25+ //poptionがない場合
26+ if (!param.poption)
27+ {
28+ //見積もり時間は0にする。
29+ data.ForecastMin = 0;
30+ }
2731
2832 //データをインサート
2933 if (accessor.insertTask(data)
--- a/main/command/Control/DuplicateCommandArg.cs
+++ b/main/command/Control/DuplicateCommandArg.cs
@@ -4,9 +4,22 @@ namespace com.andoutomo.kybernetes.command.Control
44 {
55 class DuplicateCommandArg:StandardCommandArg
66 {
7+ internal bool poption
8+ {
9+ get;
10+ private set;
11+ }
712
813 protected override void split()
914 {
15+ poption = false;
16+ if (base.splitData.Length > 2)
17+ {
18+ if (splitData[2] == "-p")
19+ {
20+ poption = true;
21+ }
22+ }
1023 return;
1124 }
1225
--- a/main/command/SYSTEM/HelpCommand.cs
+++ b/main/command/SYSTEM/HelpCommand.cs
@@ -30,7 +30,7 @@ namespace com.andoutomo.kybernetes.command
3030 resList.Add(" " + help.cmdStr + " " + help.cmdSummary);
3131 }
3232
33- base.form.addMultiText(resList);
33+ form.showOnSubConsole(resList);
3434
3535 break;
3636 case HelpCommandType.One:
@@ -51,7 +51,7 @@ namespace com.andoutomo.kybernetes.command
5151 resList2.Add(string.Empty);
5252 resList2.Add(data.cmdDetail);
5353
54- base.form.addMultiText(resList2);
54+ form.showOnSubConsole(resList2);
5555 }
5656 else
5757 {
--- a/main/command/SYSTEM/LinkCommand.cs
+++ b/main/command/SYSTEM/LinkCommand.cs
@@ -25,7 +25,7 @@ namespace com.andoutomo.kybernetes.command.SYSTEM
2525 {
2626 retList.Add(data.Name + " -> " + data.Val);
2727 }
28- form.addMultiText(retList);
28+ form.showOnSubConsole(retList);
2929 retStr = string.Empty;
3030 return true;
3131 }
--- a/main/command/reference/FindCommand.cs
+++ b/main/command/reference/FindCommand.cs
@@ -27,23 +27,7 @@ namespace com.andoutomo.kybernetes.command.reference
2727 message = dataList.Count + "件のタスクが見つかりました。";
2828 }
2929
30- form.clearPanel();
31- string wkAreaForIndex = "";
32- foreach (TaskData data in dataList)
33- {
34- data.Today = todayDate;
35- if (!data.isComplete)
36- {
37- if (wkAreaForIndex != data.TimeArea)
38- {
39- string wkIndex = "- " + data.TimeArea + " - on " + data.DoDate.getDateString("yyyy/MM/dd");
40- form.addIndexPanel(wkIndex);
41- }
42-
43- wkAreaForIndex = data.TimeArea;
44- }
45- form.addPanel(data);
46- }
30+ form.showOnPanel(dataList);
4731
4832 return true;
4933 }
--- a/main/command/reference/PwdCommand.cs
+++ b/main/command/reference/PwdCommand.cs
@@ -46,7 +46,7 @@ namespace com.andoutomo.kybernetes.command.reference
4646
4747 }
4848
49- form.addMultiText(retList);
49+ form.showOnSubConsole(retList);
5050
5151 return true;
5252 }
--- a/main/command/reference/ShowCommand.cs
+++ b/main/command/reference/ShowCommand.cs
@@ -75,7 +75,7 @@ namespace com.andoutomo.kybernetes.command.reference
7575 }
7676
7777
78- form.addMultiText(resultList);
78+ form.showOnSubConsole(resultList);
7979
8080 return true;
8181 }
--- a/main/command/reference/SimulateCommand.cs
+++ b/main/command/reference/SimulateCommand.cs
@@ -70,7 +70,7 @@ namespace com.andoutomo.kybernetes.command.reference
7070 retList.Add(string.Empty);
7171 retList.Add("終了予定時間 " + baseTime.ToString());
7272
73- form.addMultiText(retList);
73+ form.showOnSubConsole(retList);
7474
7575 return true;
7676 }
--- a/main/command/reference/SumCommand.cs
+++ b/main/command/reference/SumCommand.cs
@@ -36,7 +36,7 @@ namespace com.andoutomo.kybernetes.command.reference
3636 resultList.Add("予想時間:" + forcast.ToString() + " ( " + forcast.TotalMinute + " 分)");
3737 resultList.Add("実績時間:" + realTime.ToString() + " ( " + realTime.TotalMinute + " 分)");
3838
39- form.addMultiText(resultList);
39+ form.showOnSubConsole(resultList);
4040
4141 return true;
4242 }
Afficher sur ancien navigateur de dépôt.