@@ -20,7 +20,7 @@ public MainWindow()
20
20
{
21
21
InitializeComponent ( ) ;
22
22
23
- this . DataContext = uiData = new MainWindowData ( ) ;
23
+ this . DataContext = UiData = new MainWindowData ( ) ;
24
24
DefaultTitle = this . Title ;
25
25
IniConfigManager = new IniManager ( GetIniConfigFile ( ) ) ;
26
26
ImputIniConfig ( IniConfigManager ) ;
@@ -29,7 +29,7 @@ public MainWindow()
29
29
30
30
private readonly string DefaultTitle ;
31
31
32
- private MainWindowData uiData ;
32
+ private MainWindowData UiData ;
33
33
34
34
private void MainWindow_Loaded ( object sender , RoutedEventArgs e )
35
35
{
@@ -69,13 +69,13 @@ private void SetLanguage()
69
69
70
70
private async void StartTaskButton_Click ( object sender , RoutedEventArgs e )
71
71
{
72
- if ( uiData . TaskRunning )
72
+ if ( UiData . TaskRunning )
73
73
{
74
74
StopTask ( ) ;
75
75
return ;
76
76
}
77
77
StartTaskButton . Content = QueryLangDict ( "Button_StartTask_Stop" ) ;
78
- uiData . TaskRunning = true ;
78
+ UiData . TaskRunning = true ;
79
79
SetProgress ( 0 ) ;
80
80
taskFiles = new TaskFiles ( FilesList . Items ) ;
81
81
bool settingLegal = CheckConfig ( ) ;
@@ -92,7 +92,7 @@ private async void StartTaskButton_Click(object sender, RoutedEventArgs e)
92
92
}
93
93
await Task . Delay ( 3000 ) ; //Show result to user
94
94
StartTaskButton . Content = QueryLangDict ( "Button_StartTask_Start" ) ;
95
- uiData . TaskRunning = false ;
95
+ UiData . TaskRunning = false ;
96
96
SetProgress ( ) ;
97
97
}
98
98
@@ -183,8 +183,8 @@ private async void StartMonitorAsync()
183
183
usedRam /= 1048576 ; //1024^2
184
184
usedRam = Math . Round ( usedRam , 0 ) ;
185
185
}
186
- uiData . CpuUsage = cpuUseRatio + "%" ;
187
- uiData . RamUsage = usedRam + ramUnit + " (" + ramUseRatio + "%)" ;
186
+ UiData . CpuUsage = cpuUseRatio + "%" ;
187
+ UiData . RamUsage = usedRam + ramUnit + " (" + ramUseRatio + "%)" ;
188
188
await Task . Delay ( 1000 ) ;
189
189
}
190
190
}
@@ -200,15 +200,15 @@ private bool CheckConfig()
200
200
) ;
201
201
return false ;
202
202
}
203
- else if ( uiData . AppPath == "" )
203
+ else if ( UiData . AppPath == "" )
204
204
{
205
205
MessageBox . Show (
206
206
QueryLangDict ( "Message_CommandAppUnspecified" ) ,
207
207
errorTitle
208
208
) ;
209
209
return false ;
210
210
}
211
- else if ( uiData . OutputFloder == "" && uiData . OutputExtension == "" && uiData . OutputSuffix == "" )
211
+ else if ( UiData . OutputFloder == "" && UiData . OutputExtension == "" && UiData . OutputSuffix == "" )
212
212
{
213
213
var result = MessageBox . Show (
214
214
QueryLangDict ( "Message_OutputSettingsDangerous" ) ,
@@ -228,7 +228,7 @@ private bool CheckConfig()
228
228
) ;
229
229
return false ;
230
230
}
231
- else if ( uiData . SimulateCmd == 2 && AppPath . Text . IndexOf ( ' ' ) != - 1 )
231
+ else if ( UiData . SimulateCmd == 2 && AppPath . Text . IndexOf ( ' ' ) != - 1 )
232
232
{
233
233
MessageBox . Show (
234
234
QueryLangDict ( "Message_SimulateCmdIsIllegal" ) ,
@@ -415,13 +415,13 @@ private void ImputIniConfig(IniManager ini)
415
415
string windowHeight = ini . Read ( "Window" , "Height" ) ;
416
416
this . Height = Convert . ToDouble ( windowHeight ) ;
417
417
418
- uiData . AppPath = ini . Read ( "Command" , "AppPath" ) ;
419
- uiData . ArgsTemplet = ini . Read ( "Command" , "ArgsTemplet" ) ;
420
- uiData . UserArgs = ini . Read ( "Command" , "UserArgs" ) ;
421
- uiData . OutputExtension = ini . Read ( "Output" , "Extension" ) ;
422
- uiData . OutputSuffix = ini . Read ( "Output" , "Suffix" ) ;
423
- uiData . OutputFloder = ini . Read ( "Output" , "Floder" ) ;
424
- uiData . Priority = Convert . ToInt32 ( ini . Read ( "Process" , "Priority" ) ) ;
418
+ UiData . AppPath = ini . Read ( "Command" , "AppPath" ) ;
419
+ UiData . ArgsTemplet = ini . Read ( "Command" , "ArgsTemplet" ) ;
420
+ UiData . UserArgs = ini . Read ( "Command" , "UserArgs" ) ;
421
+ UiData . OutputExtension = ini . Read ( "Output" , "Extension" ) ;
422
+ UiData . OutputSuffix = ini . Read ( "Output" , "Suffix" ) ;
423
+ UiData . OutputFloder = ini . Read ( "Output" , "Floder" ) ;
424
+ UiData . Priority = Convert . ToInt32 ( ini . Read ( "Process" , "Priority" ) ) ;
425
425
int threadCount = Convert . ToInt32 ( ini . Read ( "Process" , "ThreadCount" ) ) ;
426
426
if ( threadCount > 8 )
427
427
{
@@ -430,9 +430,9 @@ private void ImputIniConfig(IniManager ini)
430
430
//CustomThreadCountItem.Tag = threadCount;
431
431
//CustomThreadCountItem.IsSelected = true;
432
432
}
433
- uiData . ThreadCount = threadCount ;
434
- uiData . WindowStyle = Convert . ToInt32 ( ini . Read ( "Process" , "WindowStyle" ) ) ;
435
- uiData . SimulateCmd = Convert . ToInt32 ( ini . Read ( "Process" , "SimulateCmd" ) ) ;
433
+ UiData . ThreadCount = threadCount ;
434
+ UiData . WindowStyle = Convert . ToInt32 ( ini . Read ( "Process" , "WindowStyle" ) ) ;
435
+ UiData . SimulateCmd = Convert . ToInt32 ( ini . Read ( "Process" , "SimulateCmd" ) ) ;
436
436
437
437
string culture = ini . Read ( "Language" , "Culture" ) ;
438
438
if ( culture != "" )
@@ -481,16 +481,16 @@ private void SaveIniConfig(IniManager ini)
481
481
ini . Write ( "Versions" , "ConfigFile" , IniConfigFileVersion ) ;
482
482
ini . Write ( "Window" , "Width" , this . Width ) ;
483
483
ini . Write ( "Window" , "Height" , this . Height ) ;
484
- ini . Write ( "Command" , "AppPath" , uiData . AppPath ) ;
485
- ini . Write ( "Command" , "ArgsTemplet" , uiData . ArgsTemplet ) ;
486
- ini . Write ( "Command" , "UserArgs" , uiData . UserArgs ) ;
487
- ini . Write ( "Output" , "Extension" , uiData . OutputExtension ) ;
488
- ini . Write ( "Output" , "Suffix" , uiData . OutputSuffix ) ;
489
- ini . Write ( "Output" , "Floder" , uiData . OutputFloder ) ;
490
- ini . Write ( "Process" , "Priority" , uiData . Priority ) ;
491
- ini . Write ( "Process" , "ThreadCount" , uiData . ThreadCount ) ;
492
- ini . Write ( "Process" , "WindowStyle" , uiData . WindowStyle ) ;
493
- ini . Write ( "Process" , "SimulateCmd" , uiData . SimulateCmd ) ;
484
+ ini . Write ( "Command" , "AppPath" , UiData . AppPath ) ;
485
+ ini . Write ( "Command" , "ArgsTemplet" , UiData . ArgsTemplet ) ;
486
+ ini . Write ( "Command" , "UserArgs" , UiData . UserArgs ) ;
487
+ ini . Write ( "Output" , "Extension" , UiData . OutputExtension ) ;
488
+ ini . Write ( "Output" , "Suffix" , UiData . OutputSuffix ) ;
489
+ ini . Write ( "Output" , "Floder" , UiData . OutputFloder ) ;
490
+ ini . Write ( "Process" , "Priority" , UiData . Priority ) ;
491
+ ini . Write ( "Process" , "ThreadCount" , UiData . ThreadCount ) ;
492
+ ini . Write ( "Process" , "WindowStyle" , UiData . WindowStyle ) ;
493
+ ini . Write ( "Process" , "SimulateCmd" , UiData . SimulateCmd ) ;
494
494
}
495
495
else
496
496
{
0 commit comments