Added checking for updates
This commit is contained in:
parent
cc15863e81
commit
5ec6525257
19 changed files with 1231 additions and 100 deletions
110
MainWindow.xaml
110
MainWindow.xaml
|
|
@ -1,7 +1,9 @@
|
|||
<Window x:Class="MossyUpdater.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="MossyUpdater" Height="331" Width="500">
|
||||
xmlns:local="clr-namespace:MossyUpdater"
|
||||
Title="MossyUpdater" Height="450" Width="550" MinHeight="400" MinWidth="500" ResizeMode="CanResize"
|
||||
Icon="pack://application:,,,/MossyUpdater;component/favicon.ico">
|
||||
<Grid Margin="10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
|
|
@ -13,32 +15,38 @@
|
|||
<RowDefinition Height="Auto"/>
|
||||
<!-- 3: filename -->
|
||||
<RowDefinition Height="Auto"/>
|
||||
<!-- 4: download button -->
|
||||
<!-- 4: update status -->
|
||||
<RowDefinition Height="Auto"/>
|
||||
<!-- 5: status text -->
|
||||
<!-- 5: download buttons -->
|
||||
<RowDefinition Height="Auto"/>
|
||||
<!-- 6: progress bar -->
|
||||
<RowDefinition Height="Auto"/>
|
||||
<!-- 7: status text -->
|
||||
<RowDefinition Height="*"/>
|
||||
<!-- 6: image (fills rest) -->
|
||||
<!-- 8: image (fills rest) -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 0 -->
|
||||
<TextBlock Text="MosswartMassacre URL to DLL:" Grid.Row="0" Margin="0,0,0,5"/>
|
||||
|
||||
<!-- 1 -->
|
||||
<TextBox x:Name="UrlTextBox"
|
||||
Grid.Row="1"
|
||||
<TextBox Grid.Row="1"
|
||||
Height="25"
|
||||
Margin="0,0,0,10"
|
||||
Text="https://git.snakedesert.se/SawatoMosswartsEnjoyersClub/MosswartMassacre/raw/branch/spawn-detection/MosswartMassacre/bin/Release/MosswartMassacre.dll"/>
|
||||
Text="{Binding Url, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsEnabled="{Binding CanInteract}"/>
|
||||
|
||||
<!-- 2 -->
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="0,0,0,10">
|
||||
<TextBox x:Name="FolderTextBox"
|
||||
Width="350"
|
||||
<TextBox Width="350"
|
||||
Height="25"
|
||||
Margin="0,0,5,0"/>
|
||||
Margin="0,0,5,0"
|
||||
Text="{Binding Folder, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsEnabled="{Binding CanInteract}"/>
|
||||
<Button Content="Browse"
|
||||
Width="75"
|
||||
Click="Browse_Click"/>
|
||||
Command="{Binding BrowseCommand}"
|
||||
IsEnabled="{Binding CanInteract}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- 3 -->
|
||||
|
|
@ -46,31 +54,71 @@
|
|||
<TextBlock Text="Filename:"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,5,0"/>
|
||||
<TextBox x:Name="FilenameTextBox"
|
||||
Width="200"
|
||||
Text="MosswartMassacre.dll"/>
|
||||
<TextBox Width="200"
|
||||
Text="{Binding Filename, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsEnabled="{Binding CanInteract}"/>
|
||||
<Button Content="Check Updates"
|
||||
Width="100"
|
||||
Margin="10,0,0,0"
|
||||
Command="{Binding CheckUpdatesCommand}"
|
||||
IsEnabled="{Binding CanInteract}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- 4 -->
|
||||
<StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Content="Download & Unblock"
|
||||
Width="150"
|
||||
Click="Download_Click"/>
|
||||
</StackPanel>
|
||||
<TextBlock Grid.Row="4"
|
||||
Text="{Binding UpdateStatus}"
|
||||
Margin="0,0,0,10"/>
|
||||
|
||||
<!-- 5 -->
|
||||
<TextBlock x:Name="StatusTextBlock"
|
||||
Grid.Row="5"
|
||||
Margin="0,10,0,10"
|
||||
Foreground="Green"/>
|
||||
<StackPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,0,10">
|
||||
<Button Content="Download & Unblock"
|
||||
Width="150"
|
||||
Margin="0,0,10,0"
|
||||
Command="{Binding DownloadCommand}"/>
|
||||
<Button Content="Cancel"
|
||||
Width="75"
|
||||
Command="{Binding CancelCommand}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- 6: your image as embedded Resource -->
|
||||
<Image Grid.Row="6"
|
||||
Source="pack://application:,,,/MossyUpdater;component/Mosswart_Mask_Live.png"
|
||||
Stretch="Uniform"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
Margin="0,10,0,0"
|
||||
Height="100"/>
|
||||
<!-- 6 -->
|
||||
<ProgressBar Grid.Row="6"
|
||||
Height="20"
|
||||
Margin="0,0,0,10"
|
||||
Value="{Binding ProgressValue}"/>
|
||||
|
||||
<!-- 7 -->
|
||||
<TextBlock Grid.Row="7"
|
||||
Text="{Binding StatusMessage}"
|
||||
Margin="0,0,0,10"
|
||||
TextWrapping="Wrap"
|
||||
Foreground="{Binding StatusColor}"/>
|
||||
|
||||
<!-- 8: Quote display with image -->
|
||||
<Grid Grid.Row="8" Margin="0,10,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Quote -->
|
||||
<TextBlock Grid.Row="0"
|
||||
Text="{Binding CurrentQuote}"
|
||||
Opacity="{Binding QuoteOpacity}"
|
||||
TextWrapping="Wrap"
|
||||
FontStyle="Italic"
|
||||
FontSize="12"
|
||||
Foreground="DarkSlateGray"
|
||||
HorizontalAlignment="Center"
|
||||
TextAlignment="Center"
|
||||
Margin="10,0,10,10"/>
|
||||
|
||||
<!-- Image -->
|
||||
<Image Grid.Row="1"
|
||||
Source="pack://application:,,,/MossyUpdater;component/Mosswart_Mask_Live.png"
|
||||
Stretch="Uniform"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
MaxHeight="100"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue