From 5bc8d5d81d73f540596b6239f4b317a5828c3e7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0?= Date: Tue, 2 Oct 2018 16:45:42 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B1=D0=BB=D0=BE=D0=BA=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20resultView=20=D0=BF=D1=80=D0=B8=20=D0=B7=D0=B0=D0=BF?= =?UTF-8?q?=D1=83=D1=81=D0=BA=D0=B5=20=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F.=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=20wa?= =?UTF-8?q?itOrPauseLabel=20=D0=B4=D0=BB=D1=8F=20=D0=BE=D0=BF=D0=BE=D0=B2?= =?UTF-8?q?=D0=B5=D1=89=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BE=20=D0=B4=D0=BB?= =?UTF-8?q?=D0=B8=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D0=BE=D0=B9=20=D0=BE=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B0=D1=86=D0=B8=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fileFinder/MainForm.Designer.cs | 18 +++++++++++++++++- fileFinder/MainForm.cs | 6 ++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/fileFinder/MainForm.Designer.cs b/fileFinder/MainForm.Designer.cs index ee056f5..50d30cd 100644 --- a/fileFinder/MainForm.Designer.cs +++ b/fileFinder/MainForm.Designer.cs @@ -36,6 +36,7 @@ this.handleSearchBtn = new System.Windows.Forms.Button(); this.innerQueryTextBox = new System.Windows.Forms.TextBox(); this.queryTextBox = new System.Windows.Forms.TextBox(); + this.waitOrPauseLabel = new System.Windows.Forms.Label(); this.bottomPanel = new System.Windows.Forms.Panel(); this.infoLabel = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); @@ -47,6 +48,7 @@ // // resultViewer // + this.resultViewer.Cursor = System.Windows.Forms.Cursors.Arrow; this.resultViewer.Dock = System.Windows.Forms.DockStyle.Top; this.resultViewer.Location = new System.Drawing.Point(0, 0); this.resultViewer.Name = "resultViewer"; @@ -90,6 +92,7 @@ // // splitContainer.Panel2 // + this.splitContainer.Panel2.Controls.Add(this.waitOrPauseLabel); this.splitContainer.Panel2.Controls.Add(this.resultViewer); this.splitContainer.Panel2.Controls.Add(this.bottomPanel); this.splitContainer.Size = new System.Drawing.Size(800, 450); @@ -123,6 +126,18 @@ this.queryTextBox.Tag = ""; this.queryTextBox.Text = "*.txt"; // + // waitOrPauseLabel + // + this.waitOrPauseLabel.Cursor = System.Windows.Forms.Cursors.AppStarting; + this.waitOrPauseLabel.Location = new System.Drawing.Point(203, 137); + this.waitOrPauseLabel.Name = "waitOrPauseLabel"; + this.waitOrPauseLabel.Size = new System.Drawing.Size(395, 68); + this.waitOrPauseLabel.TabIndex = 7; + this.waitOrPauseLabel.Text = "Приложение выполняет поиск по заданным условиям. \r\nДля ознакомления с результатам" + + "и нажмите кнопку паузы\r\nили дождитесь окончания операции."; + this.waitOrPauseLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.waitOrPauseLabel.Visible = false; + // // bottomPanel // this.bottomPanel.AutoSize = true; @@ -152,7 +167,7 @@ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.Name = "MainForm"; - this.Text = "fileFinder Utility Created by Defend"; + this.Text = "fileFinder"; this.splitContainer.Panel1.ResumeLayout(false); this.splitContainer.Panel1.PerformLayout(); this.splitContainer.Panel2.ResumeLayout(false); @@ -176,6 +191,7 @@ private System.Windows.Forms.Label infoLabel; private System.Windows.Forms.TextBox queryTextBox; private System.Windows.Forms.TextBox innerQueryTextBox; + private System.Windows.Forms.Label waitOrPauseLabel; } } diff --git a/fileFinder/MainForm.cs b/fileFinder/MainForm.cs index 435ec7e..86c500e 100644 --- a/fileFinder/MainForm.cs +++ b/fileFinder/MainForm.cs @@ -145,6 +145,8 @@ namespace fileFinder if (mainController.isStopped) { handleSearchBtn.Text = "Pause Task"; + waitOrPauseLabel.Visible = true; + resultViewer.Enabled = false; mainController.beginTask(); TreeNode tN = await Task.Run(() => buildResultTree(mainController, progress)); updateResultViewer(tN); @@ -152,10 +154,14 @@ namespace fileFinder } else if (mainController.isPaused) { handleSearchBtn.Text = "Pause Task"; + waitOrPauseLabel.Visible = true; + resultViewer.Enabled = false; mainController.resumeTask(); } else { handleSearchBtn.Text = "Resume Task"; + waitOrPauseLabel.Visible = false; + resultViewer.Enabled = true; mainController.pauseTask(); } }