fix/no-patch-folder-check #4
@ -4,42 +4,47 @@
|
|||||||
<Design.PreviewWith>
|
<Design.PreviewWith>
|
||||||
<Border Padding="20" Background="{StaticResource AKI_Background_Light}">
|
<Border Padding="20" Background="{StaticResource AKI_Background_Light}">
|
||||||
<!-- Add Controls for Previewer Here -->
|
<!-- Add Controls for Previewer Here -->
|
||||||
<StackPanel Background="{StaticResource AKI_Background_Light}" Spacing="15" Margin="10">
|
<StackPanel Background="{StaticResource AKI_Background_Light}" Spacing="15" Margin="10">
|
||||||
<cc:TitleBar Title="Title Bar Text"/>
|
<cc:TitleBar Title="Title Bar Text"/>
|
||||||
<Label Content="Normal label"/>
|
<Label Content="Normal label"/>
|
||||||
<Label Content="Yellow label" Classes="yellow"/>
|
<Label Content="Yellow label" Classes="yellow"/>
|
||||||
<Label Content="Blue label" Classes="dark"/>
|
<TextBlock Text="Yellow textblock" Classes="yellow"/>
|
||||||
<ProgressBar Value="40"/>
|
<Label Content="Blue label" Classes="dark"/>
|
||||||
<Separator Height="1"/>
|
<ProgressBar Value="40"/>
|
||||||
<ProgressBar Value="60" Classes="done"/>
|
<Separator Height="1"/>
|
||||||
</StackPanel>
|
<ProgressBar Value="60" Classes="done"/>
|
||||||
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</Design.PreviewWith>
|
</Design.PreviewWith>
|
||||||
|
|
||||||
<!-- Add Styles Here -->
|
<!-- Add Styles Here -->
|
||||||
|
|
||||||
<Style Selector="cc|TitleBar">
|
<Style Selector="cc|TitleBar">
|
||||||
<Setter Property="Background" Value="{StaticResource AKI_Background_Dark}"/>
|
<Setter Property="Background" Value="{StaticResource AKI_Background_Dark}"/>
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_Foreground_Light}"/>
|
<Setter Property="Foreground" Value="{StaticResource AKI_Foreground_Light}"/>
|
||||||
<Setter Property="XButtonForeground" Value="{StaticResource AKI_Brush_DarkGrayBlue}"/>
|
<Setter Property="XButtonForeground" Value="{StaticResource AKI_Brush_DarkGrayBlue}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="TextBlock.yellow">
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource AKI_Brush_Yellow}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="Label">
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource AKI_Foreground_Light}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Label">
|
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_Foreground_Light}"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style Selector="Label.yellow">
|
<Style Selector="Label.yellow">
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_Brush_Yellow}"/>
|
<Setter Property="Foreground" Value="{StaticResource AKI_Brush_Yellow}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Label.dark">
|
<Style Selector="Label.dark">
|
||||||
<Setter Property="Foreground" Value="DimGray"/>
|
<Setter Property="Foreground" Value="DimGray"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="ProgressBar">
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource AKI_Brush_Yellow}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<Style Selector="ProgressBar">
|
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_Brush_Yellow}"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style Selector="ProgressBar.done">
|
<Style Selector="ProgressBar.done">
|
||||||
<Setter Property="Foreground" Value="Green"/>
|
<Setter Property="Foreground" Value="Green"/>
|
||||||
<Setter Property="Transitions">
|
<Setter Property="Transitions">
|
||||||
@ -65,7 +70,7 @@
|
|||||||
</Style.Animations>
|
</Style.Animations>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Separator">
|
<Style Selector="Separator">
|
||||||
<Setter Property="Background" Value="{StaticResource AKI_Background_Dark}"/>
|
<Setter Property="Background" Value="{StaticResource AKI_Background_Dark}"/>
|
||||||
</Style>
|
</Style>
|
||||||
</Styles>
|
</Styles>
|
||||||
|
@ -24,8 +24,7 @@ namespace PatchClient
|
|||||||
return AppBuilder.Configure<App>()
|
return AppBuilder.Configure<App>()
|
||||||
.UseReactiveUI()
|
.UseReactiveUI()
|
||||||
.UsePlatformDetect()
|
.UsePlatformDetect()
|
||||||
.LogToTrace()
|
.LogToTrace();
|
||||||
.UseReactiveUI();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using Avalonia;
|
using Avalonia.Threading;
|
||||||
using Avalonia.Threading;
|
|
||||||
using PatchClient.Models;
|
using PatchClient.Models;
|
||||||
using PatcherUtils;
|
using PatcherUtils;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
@ -45,44 +44,16 @@ namespace PatchClient.ViewModels
|
|||||||
{
|
{
|
||||||
this.WhenActivated((CompositeDisposable disposables) =>
|
this.WhenActivated((CompositeDisposable disposables) =>
|
||||||
{
|
{
|
||||||
//Test();
|
if(!Directory.Exists(LazyOperations.PatchFolder))
|
||||||
|
{
|
||||||
|
NavigateTo(new MessageViewModel(HostScreen, $"{LazyOperations.PatchFolder} folder is missing. Please copy it to\n'{Environment.CurrentDirectory}'\nand try patching again."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
RunPatcher();
|
RunPatcher();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A dumb testing method to see if things look right. Obsolete is used more like a warning here.
|
|
||||||
/// </summary>
|
|
||||||
[Obsolete]
|
|
||||||
private void Test()
|
|
||||||
{
|
|
||||||
Task.Run(async () =>
|
|
||||||
{
|
|
||||||
LineItem x = new LineItem("test 1", 30);
|
|
||||||
LineItem xx = new LineItem("test 2", 100);
|
|
||||||
LineItem xxx = new LineItem("test 3", 70);
|
|
||||||
|
|
||||||
LineItems.Add(new LineItemProgress(x));
|
|
||||||
LineItems.Add(new LineItemProgress(xx));
|
|
||||||
LineItems.Add(new LineItemProgress(xxx));
|
|
||||||
|
|
||||||
for (int i = 0; i <= 100; i++)
|
|
||||||
{
|
|
||||||
System.Threading.Thread.Sleep(20);
|
|
||||||
PatchPercent = i;
|
|
||||||
ProgressMessage = $"Patching @ {i}%";
|
|
||||||
|
|
||||||
foreach (var item in LineItems)
|
|
||||||
{
|
|
||||||
item.UpdateProgress(item.Total - i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
await NavigateToWithDelay(new MessageViewModel(HostScreen, "Test Complete"), 400);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void RunPatcher()
|
private void RunPatcher()
|
||||||
{
|
{
|
||||||
Task.Run(async() =>
|
Task.Run(async() =>
|
||||||
|
@ -11,10 +11,11 @@
|
|||||||
|
|
||||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||||
<Label Content="You can close this window"
|
<Label Content="You can close this window"
|
||||||
FontSize="12" FontWeight="SemiBold"/>
|
FontSize="12" FontWeight="SemiBold"
|
||||||
<Label Content="{Binding InfoText}"
|
|
||||||
Classes="yellow"
|
|
||||||
/>
|
/>
|
||||||
|
<TextBlock Text="{Binding InfoText}" TextWrapping="Wrap"
|
||||||
|
Classes="yellow"
|
||||||
|
/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
@ -24,8 +24,7 @@ namespace PatchGenerator
|
|||||||
return AppBuilder.Configure<App>()
|
return AppBuilder.Configure<App>()
|
||||||
.UseReactiveUI()
|
.UseReactiveUI()
|
||||||
.UsePlatformDetect()
|
.UsePlatformDetect()
|
||||||
.LogToTrace()
|
.LogToTrace();
|
||||||
.UseReactiveUI();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user