Skip to content

Commit

Permalink
Misc
Browse files Browse the repository at this point in the history
  • Loading branch information
nkasco committed Jan 16, 2023
1 parent a3d34c1 commit 02cacf7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@
<SymbolIcon Name="PingSymbol" Visibility="Collapsed" Symbol="Target" />
<!--<ComboBox IsEditable="True" Width="200" PlaceholderText="Machine" HorizontalAlignment="Right" Margin="5" Name="MachineComboBox" SelectionChanged="MachineComboBox_SelectionChanged" />-->
<TextBox Name="MachineComboBox" Margin="5" PlaceholderText="Machine" HorizontalAlignment="Right" Width="200" TextChanged="MachineComboBox_TextChangedAsync" IsSpellCheckEnabled="False" />
<TeachingTip x:Name="MachineInputTeachingTip" Title="Important" Subtitle="The selected script requires machine input, please provide a target then try again.">
<TeachingTip.IconSource>
<SymbolIconSource Symbol="Download" />
</TeachingTip.IconSource>
</TeachingTip>
<TextBox Name="MultipleMachineInput" Width="200" Height="175" HorizontalAlignment="Right" Margin="5" Visibility="Collapsed" PlaceholderText="Machines (1 per line)" IsSpellCheckEnabled="False" TextWrapping="Wrap" AcceptsReturn="True" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollMode="Auto" TextChanged="MultipleMachineInput_TextChanged" />
<StackPanel Orientation="Horizontal" VerticalAlignment="Top">
<StackPanel>
Expand All @@ -142,7 +147,6 @@

</StackPanel>
</StackPanel>
<!-- TODO: Fix scrollbar issue to prevent slight cutting off of content -->
<ScrollViewer Grid.Row="1" x:Name="ContentFrameScrollViewer" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollMode="Auto" ZoomMode="Enabled" >
<Frame x:Name="contentFrame" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollMode="Auto" Grid.Row="1" />
</ScrollViewer>
Expand Down
5 changes: 3 additions & 2 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ public void EnsureWindowsSystemDispatcherQueueController()
}
}

private void Window_Activated(object sender, WindowActivatedEventArgs args)
private void Window_Activated(object sender, Microsoft.UI.Xaml.WindowActivatedEventArgs args)
{
m_configurationSource.IsInputActive = args.WindowActivationState != WindowActivationState.Deactivated;
}
Expand Down Expand Up @@ -631,6 +631,7 @@ public MainWindow()
}

//Select the first navigation item
//TODO: This will need to be adjusted once Dashboard and All Scripts are available, should this be a setting?
MainNav.SelectedItem = MainNav.MenuItems[1]; //Index 1 because 0 is the "Categories" text header

//We've got to check for updates in the main window due to a WinUI limitation that currently exists
Expand Down Expand Up @@ -666,7 +667,7 @@ private async void CheckForUpdates()
LoadingText.Text = "Downloading update...";
string scriptName = "Updater.ps1";
string scriptPath = Environment.CurrentDirectory + "\\" + scriptName;
LaunchScript(scriptPath, " -InstallPath \"" + Environment.CurrentDirectory + "\" -DownloadURL \"" + updateXMLData.Attribute("link").Value + "\"", "PS5", "None", "false", "true", "true"); //TODO: Should this be moved to run with the integrated host? Probably can't until elevation support is added to Windows App SDK with v1.1
LaunchScript(scriptPath, " -InstallPath \"" + Environment.CurrentDirectory + "\" -DownloadURL \"" + updateXMLData.Attribute("link").Value + "\"", "PS5", "None", "false", "true", "true");
await Task.Run(() => Task.Delay(1000000)); //TODO: This needs fixed, for some reason WaitForExit() isn't working
//TODO: Run LoadingPhrase() on a loop
}
Expand Down

0 comments on commit 02cacf7

Please sign in to comment.