-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a2f5944
commit de8bb51
Showing
7 changed files
with
134 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<Window x:Class="WinFOR_Customizer.ResultsWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:local="clr-namespace:WinFOR_Customizer" | ||
mc:Ignorable="d" | ||
Title="Installation Results" SizeToContent="WidthandHeight" ResizeMode="CanMinimize" | ||
WindowStartupLocation="CenterScreen"> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="*" MaxWidth="800"/> | ||
</Grid.ColumnDefinitions> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="*" MaxHeight="600"/> | ||
<RowDefinition Height="40" /> | ||
</Grid.RowDefinitions> | ||
<TextBox x:Name="ResultsTextBox" HorizontalAlignment="Center" TextWrapping="NoWrap" Text="" VerticalAlignment="Top" Width="Auto" Height="Auto" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" IsReadOnly="True" AcceptsReturn="True" BorderBrush="{x:Null}" BorderThickness="0" FontSize="14"/> | ||
<Button x:Name="ShowErrors" Content="Display Failed / Errors" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="2" Click="Display_Errors"/> | ||
|
||
</Grid> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System.Text; | ||
using System.Windows; | ||
|
||
namespace WinFOR_Customizer | ||
{ | ||
/// <summary> | ||
/// Interaction logic for ResultsWindow.xaml | ||
/// </summary> | ||
public partial class ResultsWindow : Window | ||
{ | ||
public ResultsWindow(StringBuilder results, StringBuilder errors) | ||
{ | ||
InitializeComponent(); | ||
ShowErrors.Visibility = Visibility.Hidden; | ||
Display_Results(results, errors); | ||
} | ||
public void Display_Results(StringBuilder results, StringBuilder errors) | ||
{ | ||
ResultsTextBox.Text = results.ToString(); | ||
int errors_lines = errors.ToString().Split('\n').Length; | ||
if (errors_lines > 3) | ||
{ | ||
ShowErrors.Visibility = Visibility.Visible; | ||
} | ||
} | ||
public void Display_Errors(object sender, RoutedEventArgs e) | ||
{ | ||
(StringBuilder _, StringBuilder errors) = (Application.Current.MainWindow as MainWindow)!.Process_Results(); | ||
int errors_lines = errors.ToString().Split('\n').Length; | ||
if (errors_lines > 3) | ||
{ | ||
ErrorWindow errorWindow = new(errors) | ||
{ | ||
Owner = this | ||
}; | ||
errorWindow.Show(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters