From: AndouTomo Date: Sat, 16 Aug 2014 14:10:36 +0000 (+0900) Subject: v.1.1.6.0 X-Git-Url: http://git.osdn.net/view?p=kybernetes%2FKybernetes.git;a=commitdiff_plain;h=f449dac56959fc11c99604bb8573c13ee30dfac8 v.1.1.6.0 サブコンソールの追加、一部コマンドの結果をサブコンソールに展開するように処理変更 duplicateコマンドに-pオプション追加(見積もり時間もコピーする) 短めスクロール(ctrl+pgup/down)を追加 タスク表示処理をBaseForm側に委譲。 user.dbにインデックス再付与。 --- diff --git a/base/Properties/AssemblyInfo.cs b/base/Properties/AssemblyInfo.cs index e2dea06..8e48bc5 100644 --- a/base/Properties/AssemblyInfo.cs +++ b/base/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ using System.Resources; // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を // 既定値にすることができます: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.4.0")] -[assembly: AssemblyFileVersion("1.1.4.0")] +[assembly: AssemblyVersion("1.1.6.0")] +[assembly: AssemblyFileVersion("1.1.6.0")] [assembly: NeutralResourcesLanguageAttribute("ja")] diff --git a/base/data/DAO/TimeAreaData.cs b/base/data/DAO/TimeAreaData.cs index 519dcbd..d4788b5 100644 --- a/base/data/DAO/TimeAreaData.cs +++ b/base/data/DAO/TimeAreaData.cs @@ -73,6 +73,21 @@ namespace com.andoutomo.kybernetes.data.DAO get; set; } + + public string Indicator + { + get + { + if (ForcastMin > Span) + { + return "+"; + } + else + { + return "-"; + } + } + } } } diff --git a/base/view/BaseForm.Designer.cs b/base/view/BaseForm.Designer.cs index 8e5514b..3b894dc 100644 --- a/base/view/BaseForm.Designer.cs +++ b/base/view/BaseForm.Designer.cs @@ -31,17 +31,23 @@ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BaseForm)); this.pnlTask = new System.Windows.Forms.Panel(); this.txtInput = new System.Windows.Forms.TextBox(); - this.rConsole = new System.Windows.Forms.RichTextBox(); this.expData = new System.Windows.Forms.SaveFileDialog(); this.dmpData = new System.Windows.Forms.SaveFileDialog(); this.selSh = new System.Windows.Forms.OpenFileDialog(); this.BGColorDlg = new System.Windows.Forms.ColorDialog(); this.FRColorDlg = new System.Windows.Forms.ColorDialog(); this.splBase = new System.Windows.Forms.SplitContainer(); + this.splConsole = new System.Windows.Forms.SplitContainer(); + this.rSubConsole = new System.Windows.Forms.RichTextBox(); + this.rConsole = new System.Windows.Forms.TextBox(); ((System.ComponentModel.ISupportInitialize)(this.splBase)).BeginInit(); this.splBase.Panel1.SuspendLayout(); this.splBase.Panel2.SuspendLayout(); this.splBase.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splConsole)).BeginInit(); + this.splConsole.Panel1.SuspendLayout(); + this.splConsole.Panel2.SuspendLayout(); + this.splConsole.SuspendLayout(); this.SuspendLayout(); // // pnlTask @@ -52,10 +58,11 @@ this.pnlTask.AutoScroll = true; this.pnlTask.BackColor = System.Drawing.Color.Black; this.pnlTask.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlTask.Font = new System.Drawing.Font("ï¼­ï¼³ ゴシック", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); this.pnlTask.ForeColor = System.Drawing.Color.White; this.pnlTask.Location = new System.Drawing.Point(3, 3); this.pnlTask.Name = "pnlTask"; - this.pnlTask.Size = new System.Drawing.Size(836, 446); + this.pnlTask.Size = new System.Drawing.Size(836, 479); this.pnlTask.TabIndex = 0; // // txtInput @@ -65,30 +72,12 @@ this.txtInput.BackColor = System.Drawing.Color.Black; this.txtInput.Font = new System.Drawing.Font("ï¼­ï¼³ ゴシック", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); this.txtInput.ForeColor = System.Drawing.Color.White; - this.txtInput.Location = new System.Drawing.Point(3, 234); + this.txtInput.Location = new System.Drawing.Point(3, 255); this.txtInput.Name = "txtInput"; - this.txtInput.Size = new System.Drawing.Size(836, 19); + this.txtInput.Size = new System.Drawing.Size(450, 19); this.txtInput.TabIndex = 1; this.txtInput.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtInput_KeyDown); // - // rConsole - // - this.rConsole.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.rConsole.BackColor = System.Drawing.Color.Black; - this.rConsole.Font = new System.Drawing.Font("ï¼­ï¼³ ゴシック", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); - this.rConsole.ForeColor = System.Drawing.Color.White; - this.rConsole.Location = new System.Drawing.Point(3, 0); - this.rConsole.Name = "rConsole"; - this.rConsole.ReadOnly = true; - this.rConsole.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.ForcedVertical; - this.rConsole.Size = new System.Drawing.Size(836, 233); - this.rConsole.TabIndex = 0; - this.rConsole.TabStop = false; - this.rConsole.Text = ""; - this.rConsole.MouseUp += new System.Windows.Forms.MouseEventHandler(this.rConsole_MouseUp); - // // expData // this.expData.DefaultExt = "csv"; @@ -125,29 +114,86 @@ // // splBase.Panel2 // - this.splBase.Panel2.Controls.Add(this.txtInput); - this.splBase.Panel2.Controls.Add(this.rConsole); - this.splBase.Size = new System.Drawing.Size(840, 710); - this.splBase.SplitterDistance = 450; + this.splBase.Panel2.Controls.Add(this.splConsole); + this.splBase.Size = new System.Drawing.Size(840, 761); + this.splBase.SplitterDistance = 481; this.splBase.TabIndex = 0; this.splBase.TabStop = false; this.splBase.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splBase_SplitterMoved); // + // splConsole + // + this.splConsole.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.splConsole.Location = new System.Drawing.Point(0, 0); + this.splConsole.Name = "splConsole"; + // + // splConsole.Panel1 + // + this.splConsole.Panel1.Controls.Add(this.rConsole); + this.splConsole.Panel1.Controls.Add(this.txtInput); + // + // splConsole.Panel2 + // + this.splConsole.Panel2.Controls.Add(this.rSubConsole); + this.splConsole.Size = new System.Drawing.Size(836, 275); + this.splConsole.SplitterDistance = 447; + this.splConsole.TabIndex = 1; + this.splConsole.TabStop = false; + this.splConsole.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splConsole_SplitterMoved); + // + // rSubConsole + // + this.rSubConsole.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.rSubConsole.BackColor = System.Drawing.Color.Black; + this.rSubConsole.Font = new System.Drawing.Font("ï¼­ï¼³ ゴシック", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); + this.rSubConsole.ForeColor = System.Drawing.Color.White; + this.rSubConsole.Location = new System.Drawing.Point(0, 0); + this.rSubConsole.Name = "rSubConsole"; + this.rSubConsole.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical; + this.rSubConsole.Size = new System.Drawing.Size(388, 275); + this.rSubConsole.TabIndex = 0; + this.rSubConsole.TabStop = false; + this.rSubConsole.Text = ""; + this.rSubConsole.MouseUp += new System.Windows.Forms.MouseEventHandler(this.rSubConsole_MouseUp); + // + // rConsole + // + this.rConsole.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.rConsole.BackColor = System.Drawing.Color.Black; + this.rConsole.ForeColor = System.Drawing.Color.White; + this.rConsole.Location = new System.Drawing.Point(3, 0); + this.rConsole.Multiline = true; + this.rConsole.Name = "rConsole"; + this.rConsole.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.rConsole.Size = new System.Drawing.Size(448, 255); + this.rConsole.TabIndex = 2; + this.rConsole.TabStop = false; + this.rConsole.MouseUp += new System.Windows.Forms.MouseEventHandler(this.rConsole_MouseUp); + // // BaseForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(844, 712); + this.ClientSize = new System.Drawing.Size(844, 763); this.Controls.Add(this.splBase); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "BaseForm"; this.Text = "Kybernetes v1.0.0"; - this.ResizeEnd += new System.EventHandler(this.BaseForm_ResizeEnd); this.splBase.Panel1.ResumeLayout(false); this.splBase.Panel2.ResumeLayout(false); - this.splBase.Panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.splBase)).EndInit(); this.splBase.ResumeLayout(false); + this.splConsole.Panel1.ResumeLayout(false); + this.splConsole.Panel1.PerformLayout(); + this.splConsole.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splConsole)).EndInit(); + this.splConsole.ResumeLayout(false); this.ResumeLayout(false); } @@ -156,13 +202,15 @@ private System.Windows.Forms.Panel pnlTask; private System.Windows.Forms.TextBox txtInput; - private System.Windows.Forms.RichTextBox rConsole; private System.Windows.Forms.SaveFileDialog expData; private System.Windows.Forms.SaveFileDialog dmpData; private System.Windows.Forms.OpenFileDialog selSh; private System.Windows.Forms.ColorDialog BGColorDlg; private System.Windows.Forms.ColorDialog FRColorDlg; private System.Windows.Forms.SplitContainer splBase; + private System.Windows.Forms.SplitContainer splConsole; + private System.Windows.Forms.RichTextBox rSubConsole; + private System.Windows.Forms.TextBox rConsole; } } diff --git a/base/view/BaseForm.cs b/base/view/BaseForm.cs index c6164e4..ba9382f 100644 --- a/base/view/BaseForm.cs +++ b/base/view/BaseForm.cs @@ -6,6 +6,7 @@ using com.andoutomo.kybernetes.data.DAO; using System.Drawing; using com.andoutomo.kybernetes.data.accessor; using System.Runtime.InteropServices; +using com.andoutomo.kybernetes.data; namespace com.andoutomo.kybernetes.view @@ -53,7 +54,7 @@ namespace com.andoutomo.kybernetes.view { Credit creditForm = new Credit(); creditForm.StartPosition = FormStartPosition.CenterParent; - + creditForm.ShowDialog(); } /// @@ -62,7 +63,7 @@ namespace com.andoutomo.kybernetes.view /// public string invokeExpDialog() { - DialogResult result =this.expData.ShowDialog(); + DialogResult result = this.expData.ShowDialog(); if (result == DialogResult.OK) { return this.expData.FileName; @@ -91,7 +92,7 @@ namespace com.andoutomo.kybernetes.view /// public string invokeShellDialog() { - + DialogResult result = this.selSh.ShowDialog(); if (result == DialogResult.OK) { @@ -157,17 +158,17 @@ namespace com.andoutomo.kybernetes.view set { exitSwitch = value; } } - private int lastRow=17; + private int lastRow = 17; /// /// パネルを追加します。 /// /// public void addPanel(TaskData data) { - Panel targetPanel = new PanelController(this).createRow(lastRow,data); - + Panel targetPanel = new PanelController(this).createRow(lastRow, data); + pnlTask.Controls.Add(targetPanel); - lastRow += targetPanel.Height-1; + lastRow += targetPanel.Height - 1; } /// /// インデックスパネルを追加します @@ -176,7 +177,7 @@ namespace com.andoutomo.kybernetes.view public void addIndexPanel(string timeArea) { Panel targetPanel = new IndexPanelController().createRow(timeArea, this.pnlTask.Width, lastRow, frColor); - + pnlTask.Controls.Add(targetPanel); lastRow += targetPanel.Height - 1; } @@ -204,7 +205,7 @@ namespace com.andoutomo.kybernetes.view for (int h = dummy; h > 0; h--) { Control ctrl = pnlTask.Controls[h - 1]; - + for (int i = ctrl.Controls.Count; i > 0; i--) { ctrl.Controls[i - 1].Dispose(); @@ -217,7 +218,7 @@ namespace com.andoutomo.kybernetes.view //先頭行は足す pnlTask.Controls.Add(new CaptionPanelController().createRow(this.pnlTask.Width, frColor)); lastRow = 17; - + } /// /// コマンド内容を表示するかどうかを決定します。 @@ -235,13 +236,13 @@ namespace com.andoutomo.kybernetes.view private void txtInput_KeyDown(object sender, KeyEventArgs e) { int currentYPosition; - int currentScrollHeight = this.pnlTask.Height - 20; + int currentScrollHeight = this.pnlTask.Height - 25; switch (e.KeyCode) { case Keys.Enter: e.SuppressKeyPress = true; doCommand(); - + break; case Keys.Space: @@ -265,25 +266,40 @@ namespace com.andoutomo.kybernetes.view break; case Keys.Up: e.SuppressKeyPress = true; + txtInput.Text = history.prevCommand(); txtInput.Select(this.txtInput.Text.Length, 0); + break; case Keys.Down: e.SuppressKeyPress = true; + txtInput.Text = history.nextCommand(); txtInput.Select(this.txtInput.Text.Length, 0); - break; + break; case Keys.PageDown: currentYPosition = Math.Abs(this.pnlTask.AutoScrollPosition.Y); - this.pnlTask.AutoScrollPosition = new Point(0, currentYPosition + currentScrollHeight); - + if (e.Control) + { + this.pnlTask.AutoScrollPosition = new Point(0, currentYPosition + 25); + } + else + { + this.pnlTask.AutoScrollPosition = new Point(0, currentYPosition + currentScrollHeight); + } break; case Keys.PageUp: currentYPosition = Math.Abs(this.pnlTask.AutoScrollPosition.Y); - this.pnlTask.AutoScrollPosition = new Point(0, currentYPosition - currentScrollHeight); - + if (e.Control) + { + this.pnlTask.AutoScrollPosition = new Point(0, currentYPosition - 25); + } + else + { + this.pnlTask.AutoScrollPosition = new Point(0, currentYPosition - currentScrollHeight); + } break; } } @@ -293,14 +309,14 @@ namespace com.andoutomo.kybernetes.view private void doCommand() { rConsole.Focus(); - + if (Echo) { addText(txtInput.Text); } KybernetesLogger.Log.trace("[dispatch]" + txtInput.Text); - - + + string result = wkOnCmdDispatch(txtInput.Text.Trim()); if (!string.IsNullOrEmpty(result)) { @@ -398,7 +414,7 @@ namespace com.andoutomo.kybernetes.view /// /// /// - public string showDropBoxInputBox(List list,string prompt) + public string showDropBoxInputBox(List list, string prompt) { DropBoxInputBox inputBox = new DropBoxInputBox(prompt); inputBox.StartPosition = FormStartPosition.CenterParent; @@ -422,7 +438,7 @@ namespace com.andoutomo.kybernetes.view /// public string showDropBoxInputBox(List list, string prompt, string defaultData) { - DropBoxInputBox inputBox = new DropBoxInputBox(prompt,defaultData); + DropBoxInputBox inputBox = new DropBoxInputBox(prompt, defaultData); inputBox.StartPosition = FormStartPosition.CenterParent; inputBox.setDropData(list); @@ -443,35 +459,28 @@ namespace com.andoutomo.kybernetes.view /// private void rConsole_MouseUp(object sender, MouseEventArgs e) { + Clipboard.SetDataObject(rConsole.SelectedText.Trim()); //txtInput.Text += rConsole.SelectedText.Trim(); txtInput.Focus(); //選択状態を解除する this.txtInput.Select(this.txtInput.Text.Length, 0); - } /// - /// ウィンドウ全体のサイズ変更時イベントハンドラです。 + /// 選択対象をクリップボードにコピーします。サブコンソール版です。 /// /// /// - private void BaseForm_ResizeEnd(object sender, EventArgs e) + private void rSubConsole_MouseUp(object sender, MouseEventArgs e) { - // panelResize(); + Clipboard.SetDataObject(rSubConsole.SelectedText.Trim()); + txtInput.Focus(); + this.txtInput.Select(this.txtInput.Text.Length, 0); } + /// - /// タスクパネルの大きさ調整を行います。 - /// 起動されるのは、ウィンドウ全体のサイズ変更時、及びコマンド実行時です。 - /// - //private void panelResize() - //{ - //rConsole.Size = new Size(this.Width - 30, this.Height / 3); - //pnlTask.Size = new Size(this.Size.Width - 30, this.Size.Height - rConsole.Height-80); - //rConsole.Location = new Point(5,pnlTask.Size.Height + 10); - //} - /// - /// 背景色設定を呼び出します。 + /// 背景色設定を呼び出します。パネルとサブコンソールが対象です。 /// public bool setPnlBackground() { @@ -479,10 +488,11 @@ namespace com.andoutomo.kybernetes.view if (res == System.Windows.Forms.DialogResult.OK) { pnlTask.BackColor = BGColorDlg.Color; + rSubConsole.BackColor = BGColorDlg.Color; return true; } else { return false; } - + } /// /// 前景色設定を呼び出します. @@ -494,6 +504,7 @@ namespace com.andoutomo.kybernetes.view if (res == System.Windows.Forms.DialogResult.OK) { frColor = FRColorDlg.Color; + rSubConsole.ForeColor = FRColorDlg.Color; return true; } else { return false; } @@ -508,7 +519,7 @@ namespace com.andoutomo.kybernetes.view { txtInput.Focus(); } - + /// /// タイマーを呼び出します。 /// タイマーはモードレスダイアログとして表示されます。 @@ -528,12 +539,17 @@ namespace com.andoutomo.kybernetes.view form.Owner = this; form.Show(); } + /// + /// タイマーを呼び出します。タイトルも付けます。 + /// + /// + /// public void showTimer(int second, string title) { ClockForm form; if (second > 0) { - form = new ClockForm(second * 60,title); + form = new ClockForm(second * 60, title); } else { @@ -582,22 +598,40 @@ namespace com.andoutomo.kybernetes.view FlashWindowEx(ref fInfo); } #endregion - + /// + /// バッチコマンド用です。ちょっと迂遠ですが、バッチで読み込んだコマンドを + /// フォームで受け取り、さらにもう一回ディスパッチをフォームから依頼します。 + /// + /// public void cmdForBatch(string command) { - this.addText( wkOnCmdDispatch(command)); + this.addText(wkOnCmdDispatch(command)); } - + /// + /// コマンド実行時のハンドラです。 + /// + /// + /// public delegate void CmdDispatchEventHandler(object sender, CmdDispatchEventArg e); + + /// + /// コマンドイベントです。コマンド実行時処理をここに設定してください。 + /// public event CmdDispatchEventHandler onCmdDispatch; + /// + /// コマンドディスパッチを実施し、戻り値(CmdDispatchEventArg.Result)から + /// 画面表示用のテキストを受領します。 + /// + /// + /// string wkOnCmdDispatch(string command) { if (onCmdDispatch != null) { CmdDispatchEventArg args = new CmdDispatchEventArg(); args.Command = command; - + onCmdDispatch(this, args); return args.Result; @@ -607,8 +641,50 @@ namespace com.andoutomo.kybernetes.view throw new KybernetesApplicationException(); } } - } + public void showOnSubConsole(List estTimeStr) + { + this.rSubConsole.Text = System.Environment.NewLine; + + foreach (string str in estTimeStr) + { + this.rSubConsole.AppendText( + str + System.Environment.NewLine); + } + } + public void showOnPanel(List taskList) + { + + clearPanel(); + string wkAreaForIndex = ""; + DateComponent wkIndexDate = new DateComponent("19000101"); + foreach (TaskData data in taskList) + { + //data.Today = todayDate; + if (!data.isComplete) + { + if (wkAreaForIndex != data.TimeArea || wkIndexDate.calculateDateDiff(data.DoDate) != 0) + { + string wkIndex = "- " + data.TimeArea + " - on " + data.DoDate.getDateString("yyyy/MM/dd"); + addIndexPanel(wkIndex); + } + + wkAreaForIndex = data.TimeArea; + wkIndexDate = data.DoDate; + } + addPanel(data); + + } + } + + private void splConsole_SplitterMoved(object sender, SplitterEventArgs e) + { + txtInput.Focus(); + } + + + + } -} +} \ No newline at end of file diff --git a/base/view/BaseForm.resx b/base/view/BaseForm.resx index 3a0d304..4683cb1 100644 --- a/base/view/BaseForm.resx +++ b/base/view/BaseForm.resx @@ -132,6 +132,9 @@ 428, 17 + + 25 + diff --git a/kybernetes2.suo b/kybernetes2.suo index dea73a5..0e1ffcb 100644 Binary files a/kybernetes2.suo and b/kybernetes2.suo differ diff --git a/main/Properties/AssemblyInfo.cs b/main/Properties/AssemblyInfo.cs index f11b622..67e1f8f 100644 --- a/main/Properties/AssemblyInfo.cs +++ b/main/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ using System.Resources; // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を // 既定値にすることができます: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.5.1")] -[assembly: AssemblyFileVersion("1.1.5.1")] +[assembly: AssemblyVersion("1.1.6.0")] +[assembly: AssemblyFileVersion("1.1.6.0")] [assembly: NeutralResourcesLanguageAttribute("ja")] diff --git a/main/bin/Debug/setting.db b/main/bin/Debug/setting.db index 11bf670..a28b288 100644 Binary files a/main/bin/Debug/setting.db and b/main/bin/Debug/setting.db differ diff --git a/main/bin/Debug/user.db b/main/bin/Debug/user.db index fa404e7..d9e56b4 100644 Binary files a/main/bin/Debug/user.db and b/main/bin/Debug/user.db differ diff --git a/main/command/CRUD/EstimateCommand.cs b/main/command/CRUD/EstimateCommand.cs index 22ce2f5..21dd896 100644 --- a/main/command/CRUD/EstimateCommand.cs +++ b/main/command/CRUD/EstimateCommand.cs @@ -11,6 +11,7 @@ namespace com.andoutomo.kybernetes.command.reference { EstimateCommandArg param = (EstimateCommandArg)argument; string targetDate=string.Empty; + bool isToday; //タスクリストを取得 List taskList; @@ -18,12 +19,13 @@ namespace com.andoutomo.kybernetes.command.reference { taskList = TaskDataAccessor.getObject.getToDayTaskList(); targetDate="本日"; + isToday = true; } else { taskList = TaskDataAccessor.getObject.getDailyTaskList(param.targetDate); targetDate = param.targetDate.getDateString(); - + isToday = false; } //タイムエリアマスタからマスターリストを取得 List timeAreaList = TimeAreaDataAccessor.getObject.getAllTimeAreaForCalc(); @@ -55,13 +57,13 @@ namespace com.andoutomo.kybernetes.command.reference } List msgList = new List(); - //msgList.Add(targetDate + "の作業見積もり及び実績"); - //msgList.Add(string.Empty); + msgList.Add(targetDate + "の作業見積もり及び実績"); + msgList.Add(string.Empty); msgList.Add(" @ FROM-TO Span Forecast REAL REMAIN "); foreach (TimeAreaCalcData area_ in timeAreaList) { // image: @ FROM-TO Span Forecast REAL REMAIN - // image: A 09:00-12:00 3:00 2:40 3:20 1:10 + // image: A 09:00-12:00 3:00 2:40 3:20 1:10 string estimateStr = " " + area_.AreaStr; estimateStr += " "; estimateStr += getFiveLengthTimeStr(area_.StartTime); @@ -75,16 +77,20 @@ namespace com.andoutomo.kybernetes.command.reference estimateStr += new TimeComponent(area_.ActualMin).ToString(); estimateStr += " "; estimateStr += new TimeComponent(area_.RemainMin).ToString(); - + //estimateStr += " "; + //estimateStr += area_.Indicator; msgList.Add(estimateStr); } msgList.Add(string.Empty); - msgList.Add("現在時刻 : " + TimeComponent.justNow().ToString()); - msgList.Add("残り作業 : " + new TimeComponent(minuteRemains).ToString()); - msgList.Add("予想終了時刻: " + TimeComponent.justNow().add(minuteRemains).ToString()); - //msgList.Add(string.Empty); - - form.addMultiText(msgList); + //本日分だけ予想終了時刻を算出する + if (isToday) + { + msgList.Add("現在時刻 : " + TimeComponent.justNow().ToString()); + msgList.Add("残り作業 : " + new TimeComponent(minuteRemains).ToString()); + msgList.Add("予想終了時刻: " + TimeComponent.justNow().add(minuteRemains).ToString()); + //msgList.Add(string.Empty); + } + form.showOnSubConsole(msgList); return true; } diff --git a/main/command/CRUD/ListCommand.cs b/main/command/CRUD/ListCommand.cs index 4ccb057..38dee18 100644 --- a/main/command/CRUD/ListCommand.cs +++ b/main/command/CRUD/ListCommand.cs @@ -47,25 +47,7 @@ namespace com.andoutomo.kybernetes.command } } - - form.clearPanel(); - string wkAreaForIndex = ""; - foreach (TaskData data in dataList) - { - data.Today = todayDate; - if (!data.isComplete) - { - if (wkAreaForIndex != data.TimeArea) - { - string wkIndex = "- " + data.TimeArea + " - on " + data.DoDate.getDateString("yyyy/MM/dd"); - form.addIndexPanel(wkIndex); - } - - wkAreaForIndex = data.TimeArea; - } - form.addPanel(data); - - } + form.showOnPanel(dataList); message = string.Empty; return true; diff --git a/main/command/CRUD/LongListCommand.cs b/main/command/CRUD/LongListCommand.cs index d9be425..0775f78 100644 --- a/main/command/CRUD/LongListCommand.cs +++ b/main/command/CRUD/LongListCommand.cs @@ -23,25 +23,9 @@ namespace com.andoutomo.kybernetes.command.CRUD { taskList = TaskDataAccessor.getObject.getDailyTaskList(param.targetDate); } - - form.clearPanel(); + //パネルに表示する + form.showOnPanel(taskList); - string wkAreaForIndex = ""; - foreach (TaskData data in taskList) - { - data.Today = today; - if (!data.isComplete) - { - if (wkAreaForIndex != data.TimeArea) - { - string wkIndex = "- " + data.TimeArea + " - on " + data.DoDate.getDateString("yyyy/MM/dd"); - form.addIndexPanel(wkIndex); - } - - wkAreaForIndex = data.TimeArea; - } - form.addPanel(data); - } //ベースクラスを呼び出し見積もりを表示する return base.execute(); diff --git a/main/command/Control/DuplicateCommand.cs b/main/command/Control/DuplicateCommand.cs index 227a7fd..31fb874 100644 --- a/main/command/Control/DuplicateCommand.cs +++ b/main/command/Control/DuplicateCommand.cs @@ -21,9 +21,13 @@ namespace com.andoutomo.kybernetes.command.Control // 次番号を取得 data.TaskID = accessor.getMaxTaskID(); data.SortID = accessor.getMaxSortID(); - //見積もり時間は0にする。 - data.ForecastMin = 0; - + + //poptionがない場合 + if (!param.poption) + { + //見積もり時間は0にする。 + data.ForecastMin = 0; + } //データをインサート if (accessor.insertTask(data) diff --git a/main/command/Control/DuplicateCommandArg.cs b/main/command/Control/DuplicateCommandArg.cs index c9d37d1..9d109f2 100644 --- a/main/command/Control/DuplicateCommandArg.cs +++ b/main/command/Control/DuplicateCommandArg.cs @@ -4,9 +4,22 @@ namespace com.andoutomo.kybernetes.command.Control { class DuplicateCommandArg:StandardCommandArg { + internal bool poption + { + get; + private set; + } protected override void split() { + poption = false; + if (base.splitData.Length > 2) + { + if (splitData[2] == "-p") + { + poption = true; + } + } return; } diff --git a/main/command/SYSTEM/HelpCommand.cs b/main/command/SYSTEM/HelpCommand.cs index 6b3ce69..cb0c05c 100644 --- a/main/command/SYSTEM/HelpCommand.cs +++ b/main/command/SYSTEM/HelpCommand.cs @@ -30,7 +30,7 @@ namespace com.andoutomo.kybernetes.command resList.Add(" " + help.cmdStr + " " + help.cmdSummary); } - base.form.addMultiText(resList); + form.showOnSubConsole(resList); break; case HelpCommandType.One: @@ -51,7 +51,7 @@ namespace com.andoutomo.kybernetes.command resList2.Add(string.Empty); resList2.Add(data.cmdDetail); - base.form.addMultiText(resList2); + form.showOnSubConsole(resList2); } else { diff --git a/main/command/SYSTEM/LinkCommand.cs b/main/command/SYSTEM/LinkCommand.cs index 020230e..2d3dba9 100644 --- a/main/command/SYSTEM/LinkCommand.cs +++ b/main/command/SYSTEM/LinkCommand.cs @@ -25,7 +25,7 @@ namespace com.andoutomo.kybernetes.command.SYSTEM { retList.Add(data.Name + " -> " + data.Val); } - form.addMultiText(retList); + form.showOnSubConsole(retList); retStr = string.Empty; return true; } diff --git a/main/command/reference/FindCommand.cs b/main/command/reference/FindCommand.cs index 96e09cf..1513fd6 100644 --- a/main/command/reference/FindCommand.cs +++ b/main/command/reference/FindCommand.cs @@ -27,23 +27,7 @@ namespace com.andoutomo.kybernetes.command.reference message = dataList.Count + "件のタスクが見つかりました。"; } - form.clearPanel(); - string wkAreaForIndex = ""; - foreach (TaskData data in dataList) - { - data.Today = todayDate; - if (!data.isComplete) - { - if (wkAreaForIndex != data.TimeArea) - { - string wkIndex = "- " + data.TimeArea + " - on " + data.DoDate.getDateString("yyyy/MM/dd"); - form.addIndexPanel(wkIndex); - } - - wkAreaForIndex = data.TimeArea; - } - form.addPanel(data); - } + form.showOnPanel(dataList); return true; } diff --git a/main/command/reference/PwdCommand.cs b/main/command/reference/PwdCommand.cs index fa149a7..5abb662 100644 --- a/main/command/reference/PwdCommand.cs +++ b/main/command/reference/PwdCommand.cs @@ -46,7 +46,7 @@ namespace com.andoutomo.kybernetes.command.reference } - form.addMultiText(retList); + form.showOnSubConsole(retList); return true; } diff --git a/main/command/reference/ShowCommand.cs b/main/command/reference/ShowCommand.cs index 7ac9ed6..c00a859 100644 --- a/main/command/reference/ShowCommand.cs +++ b/main/command/reference/ShowCommand.cs @@ -75,7 +75,7 @@ namespace com.andoutomo.kybernetes.command.reference } - form.addMultiText(resultList); + form.showOnSubConsole(resultList); return true; } diff --git a/main/command/reference/SimulateCommand.cs b/main/command/reference/SimulateCommand.cs index f95eba1..72706b5 100644 --- a/main/command/reference/SimulateCommand.cs +++ b/main/command/reference/SimulateCommand.cs @@ -70,7 +70,7 @@ namespace com.andoutomo.kybernetes.command.reference retList.Add(string.Empty); retList.Add("終了予定時間 " + baseTime.ToString()); - form.addMultiText(retList); + form.showOnSubConsole(retList); return true; } diff --git a/main/command/reference/SumCommand.cs b/main/command/reference/SumCommand.cs index fc0ea8a..2a04d6c 100644 --- a/main/command/reference/SumCommand.cs +++ b/main/command/reference/SumCommand.cs @@ -36,7 +36,7 @@ namespace com.andoutomo.kybernetes.command.reference resultList.Add("予想時間:" + forcast.ToString() + " ( " + forcast.TotalMinute + " 分)"); resultList.Add("実績時間:" + realTime.ToString() + " ( " + realTime.TotalMinute + " 分)"); - form.addMultiText(resultList); + form.showOnSubConsole(resultList); return true; }