OSDN Git Service

AppliStation-GUI,進捗ダイアログでログ表示のテキストボックスが自動でスクロールするように(修正) v1.3.0b1
authorttp <ttp@users.sourceforge.jp>
Sun, 14 Jun 2009 03:52:12 +0000 (12:52 +0900)
committerttp <ttp@users.sourceforge.jp>
Sun, 14 Jun 2009 03:52:12 +0000 (12:52 +0900)
AppliStation/AppliStation.Util/ExecutionProgressViewer.cs

index b0ef4fb..54e6d86 100644 (file)
@@ -89,8 +89,6 @@ namespace AppliStation.Util
                {\r
                        NaGetTaskSet taskSet = (NaGetTaskSet) sender;\r
                        \r
-                       bool isCursorPositionLast = logBox.SelectionStart >= logBox.TextLength-1;\r
-                       \r
                        if (e.TaskProgressPercent >= 0) {\r
                                progressBar.Value = (int) e.TaskProgressPercent;\r
                                progressBar.Style = ProgressBarStyle.Continuous;\r
@@ -161,9 +159,9 @@ namespace AppliStation.Util
                                        break;\r
                        }\r
                        \r
-                       if (isCursorPositionLast && logBox.TextLength > 0) {\r
-                               logBox.Select(logBox.TextLength-1, 0);\r
-                       }\r
+                       #if DEBUG\r
+                       logBox.ScrollToCaret();\r
+                       #endif\r
                        \r
                        if (taskSet.Done) {\r
                                if ((ActionOnDone & ActionOnDoneFlags.FlashWindow) != 0) {\r