Skip to content

Commit f0955a7

Browse files
committed
Moved OutputBox "write line" code
1 parent 0e62ade commit f0955a7

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

Installer/Steps/S04_Installing.xaml.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ private async void Step_Loaded(object sender, RoutedEventArgs e)
3636
App.InstallerWindow.SetCancelButtonEnabled();
3737

3838
// Extract ZIP to temp folder
39-
OutputBox.Text += "Extracting installer...\r\n";
39+
OutputBoxWriteLine("Extracting installer...");
4040
TempFolder = Directory.CreateDirectory(Path.Combine(
4141
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "FluentStoreInstaller"));
4242
ZipFile = new(Path.Combine(TempFolder.FullName, "FluentStore_Beta.zip"));
@@ -82,7 +82,7 @@ private async void Step_Loaded(object sender, RoutedEventArgs e)
8282
App.InstallerWindow.ShowErrorMessage("Failed to start install script.");
8383
return;
8484
}
85-
OutputBox.Text += "Beginning install...\r\n";
85+
OutputBoxWriteLine("Beginning install...");
8686
psProc.BeginErrorReadLine();
8787
await psProc.StandardOutput.ReadLineAsync();
8888
await Task.Delay(100);
@@ -122,7 +122,7 @@ private async void Step_Loaded(object sender, RoutedEventArgs e)
122122
continue;
123123

124124
Debug.WriteLine("\tOut> " + line);
125-
OutputBox.Text += line.Replace(App.InstallerDir.FullName, "$(InstallerPath)") + "\r\n";
125+
OutputBoxWriteLine(line.Replace(App.InstallerDir.FullName, "$(InstallerPath)"));
126126
if (line.Contains("HRESULT"))
127127
{
128128
// Error occurred
@@ -173,6 +173,11 @@ private async void Step_Loaded(object sender, RoutedEventArgs e)
173173
}
174174
}
175175

176+
private void OutputBoxWriteLine(string line)
177+
{
178+
OutputBox.Text += line + "\r\n";
179+
}
180+
176181
public void Cancel()
177182
{
178183
try

0 commit comments

Comments
 (0)