mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-19 15:51:58 +00:00
EHR CP: Done?
This commit is contained in:
1 parent
902faa0578
commit
b7c377c466
5 files changed
+44
-11
No files matched your search
@@ -110,6 +110,7 @@ namespace CustomTeamAssigner
|
||||
break;
|
||||
case "search":
|
||||
Instance.SearchButtonImage.Source = image;
|
||||
if (RoleDescFinder.Instance != null) RoleDescFinder.Instance.SearchButtonImage.Source = image;
|
||||
break;
|
||||
case "template":
|
||||
Instance.TemplateButtonImage.Source = image;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
Title="QMQuestions" Height="450" Width="800">
|
||||
Title="QMQuestions" Height="680" Width="1260">
|
||||
|
||||
<Page.Resources>
|
||||
<Style TargetType="Button">
|
||||
@@ -120,6 +120,7 @@
|
||||
<Setter Property="Background" Value="#2D2D2D"/>
|
||||
<Setter Property="BorderBrush" Value="#1a3ba2"/>
|
||||
<Setter Property="Margin" Value="10,5,10,5"/>
|
||||
<Setter Property="Padding" Value="10"/>
|
||||
<Setter Property="FontSize" Value="20"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
@@ -145,13 +146,14 @@
|
||||
</Style>
|
||||
|
||||
<Style TargetType="ComboBox">
|
||||
<Setter Property="FontSize" Value="20"/>
|
||||
<Setter Property="FontSize" Value="30"/>
|
||||
<Setter Property="FontFamily" Value="Segoe UI"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="Background" Value="#2D2D2D"/>
|
||||
<Setter Property="BorderBrush" Value="Gray"/>
|
||||
<Setter Property="Margin" Value="10,5,10,5"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Width" Value="200"/>
|
||||
@@ -236,7 +238,7 @@
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="FontSize" Value="20"/>
|
||||
<Setter Property="Margin" Value="10,0,10,0"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
@@ -264,10 +266,10 @@
|
||||
</Style>
|
||||
</Page.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid Name="MainGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
@@ -320,7 +322,7 @@
|
||||
<TextBlock Text="Add to existing file"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button>
|
||||
<Button Click="CopyOutput">
|
||||
<Button.RenderTransform>
|
||||
<ScaleTransform/>
|
||||
</Button.RenderTransform>
|
||||
@@ -329,7 +331,7 @@
|
||||
<TextBlock Text="Copy"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button>
|
||||
<Button Click="GoBack">
|
||||
<Button.RenderTransform>
|
||||
<ScaleTransform/>
|
||||
</Button.RenderTransform>
|
||||
|
||||
@@ -11,19 +11,32 @@ namespace CustomTeamAssigner
|
||||
{
|
||||
InitializeComponent();
|
||||
Instance = this;
|
||||
MainGrid.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
private void SaveToNewFile(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (OutputTextBox.Text.Contains(";;") || CorrectAnswerComboBox.SelectedIndex == -1)
|
||||
{
|
||||
MessageBox.Show("Please fill in all fields before saving.", "Missing information", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
MessageBox.Show("Please select where your file will be saved. To make it easier for yourself, I recommend your Among Us / EHR_DATA folder. Please note that the file name must be \"QuizMasterQuestions.txt\".", "Save to new file", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
|
||||
var sfd = new Microsoft.Win32.SaveFileDialog
|
||||
{
|
||||
Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*",
|
||||
FilterIndex = 1,
|
||||
RestoreDirectory = true
|
||||
RestoreDirectory = true,
|
||||
DefaultDirectory = @"C:\Program Files (x86)\Steam\steamapps\common\Among Us\EHR_DATA",
|
||||
FileName = "QuizMasterQuestions.txt"
|
||||
};
|
||||
|
||||
if (sfd.ShowDialog() == true)
|
||||
{
|
||||
if (!sfd.FileName.EndsWith("QuizMasterQuestions.txt"))
|
||||
sfd.FileName = string.Join('\\', sfd.FileName.Split('\\').SkipLast(1)) + "\\QuizMasterQuestions.txt";
|
||||
System.IO.File.WriteAllText(sfd.FileName, OutputTextBox.Text);
|
||||
}
|
||||
}
|
||||
@@ -39,6 +52,12 @@ namespace CustomTeamAssigner
|
||||
|
||||
private void AddToExistingFile(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (OutputTextBox.Text.Contains(";;") || CorrectAnswerComboBox.SelectedIndex == -1)
|
||||
{
|
||||
MessageBox.Show("Please fill in all fields before saving.", "Missing information", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
var ofd = new Microsoft.Win32.OpenFileDialog
|
||||
{
|
||||
Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*",
|
||||
@@ -51,5 +70,16 @@ namespace CustomTeamAssigner
|
||||
System.IO.File.AppendAllText(ofd.FileName, '\n' + OutputTextBox.Text);
|
||||
}
|
||||
}
|
||||
|
||||
private void CopyOutput(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Clipboard.SetText(OutputTextBox.Text);
|
||||
}
|
||||
|
||||
private void GoBack(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MainGrid.Visibility = Visibility.Collapsed;
|
||||
Utils.SetMainWindowContents(Visibility.Visible);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Padding" Value="10"/>
|
||||
<Setter Property="Margin" Value="10"/>
|
||||
<Setter Property="Width" Value="300"/>
|
||||
<Setter Property="Width" Value="350"/>
|
||||
<Setter Property="Height" Value="70"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
@@ -121,7 +121,7 @@
|
||||
<ScaleTransform/>
|
||||
</Button.RenderTransform>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="Resources/search.svg" Name="SearchButtonImage" Width="30" Height="30" Margin="0,0,15,0"/>
|
||||
<Image Source="Resources/search.svg" Name="SearchButtonImage" Width="30" Height="30" Margin="15"/>
|
||||
<TextBlock Text="Find Description"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
@@ -356,7 +356,7 @@ README file in the root directory of this source tree.
|
||||
</Button.RenderTransform>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="Resources/save.svg" Name="SaveButtonImage" Width="30" Height="30" Margin="0,0,15,0"/>
|
||||
<TextBlock Text="Go Back"/>
|
||||
<TextBlock Text="Save"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
Reference in new issue
Block a user