OSDN Git Service

AppliStation-GUI,ExecutionProgressViewerにタスク終了時動作オプションを追加
authorttp <ttp@users.sourceforge.jp>
Tue, 18 Mar 2008 04:24:37 +0000 (04:24 +0000)
committerttp <ttp@users.sourceforge.jp>
Tue, 18 Mar 2008 04:24:37 +0000 (04:24 +0000)
git-svn-id: http://localhost/svn/AppliStation/trunk@880 34ed2c89-c49f-4a4b-abdb-c318350108cf

AppliStation/AppliStation.Util/ExecutionProgressViewer.cs

index 2b99bfb..ea596d6 100644 (file)
@@ -18,6 +18,20 @@ namespace AppliStation.Util
                \r
                private Thread tasksetRunningThread = null;\r
                \r
+               /// <summary>\r
+               /// \8fI\97¹\8e\9e\82É\89½\82ð\8ds\82¤\82©\82Ì\83t\83\89\83O\r
+               /// </summary>\r
+               public enum ActionOnDoneFlags {\r
+                       None = 0,\r
+                       FlashWindow = 1,\r
+                       AutoCloseOnSuccess = 2,\r
+               }\r
+               \r
+               /// <summary>\r
+               /// \8fI\97¹\8e\9e\82É\89½\82ð\8ds\82¤\82©\r
+               /// </summary>\r
+               public ActionOnDoneFlags ActionOnDone = ActionOnDoneFlags.FlashWindow;\r
+               \r
                public Downloader Downloader {\r
                        get { return downloader; }\r
                }\r
@@ -143,9 +157,16 @@ namespace AppliStation.Util
                        }\r
                        \r
                        if (taskSet.Done) {\r
-                               NativeMethods.Form_FlashWindow(this,\r
+                               if ((ActionOnDone & ActionOnDoneFlags.FlashWindow) != 0) {\r
+                                       NativeMethods.Form_FlashWindow(this,\r
                                                               NativeMethods.FlashFlag.All | NativeMethods.FlashFlag.TimerNoFG,\r
                                                               uint.MaxValue, 0);\r
+                               }\r
+                               if (okButton.Enabled && (ActionOnDone & ActionOnDoneFlags.AutoCloseOnSuccess) != 0) {\r
+                                       this.DialogResult = DialogResult.OK;\r
+                                       Close();\r
+                                       Dispose();\r
+                               }\r
                        }\r
                }\r
                \r