work
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:ModpackUpdater.Apps.Manager.Ui"
|
||||
xmlns:vm="clr-namespace:ModpackUpdater.Apps.Manager.Ui.Models"
|
||||
xmlns:pilz="https://git.pilzinsel64.de/pilz-framework/pilz"
|
||||
xmlns:symbols="clr-namespace:Pilz.UI.Symbols;assembly=Pilz.UI"
|
||||
xmlns:mainWindow="clr-namespace:ModpackUpdater.Apps.Manager.Ui.Models.MainWindow"
|
||||
xmlns:langRes="clr-namespace:ModpackUpdater.Apps.Manager.LangRes"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="ModpackUpdater.Apps.Manager.Ui.MainWindow"
|
||||
x:DataType="mainWindow:MainWindowViewModel"
|
||||
@@ -32,18 +32,18 @@
|
||||
<!-- Button: Workspace -->
|
||||
<pilz:ImageButton
|
||||
x:Name="ButtonWorkspace"
|
||||
Text="Workspace"
|
||||
Text="{x:Static langRes:GeneralLangRes.Workspace}"
|
||||
Background="Transparent">
|
||||
|
||||
<pilz:ImageButton.Flyout>
|
||||
<MenuFlyout>
|
||||
<MenuFlyout.Items>
|
||||
<MenuItem x:Name="MenuItemWorkspacePreferences" Header="Workspace _preferences"/>
|
||||
<MenuItem x:Name="MenuItemSaveWorkspace" Header="_Save workspace" HotKey="Ctrl+S"/>
|
||||
<MenuItem x:Name="MenuItemWorkspacePreferences" Header="{x:Static langRes:GeneralLangRes.WorkspacePreferences}"/>
|
||||
<MenuItem x:Name="MenuItemSaveWorkspace" Header="{x:Static langRes:GeneralLangRes.SaveWorkspace}" HotKey="Ctrl+S"/>
|
||||
<Separator/>
|
||||
<MenuItem x:Name="MenuItemNewWorkspace" Header="_New workspace"/>
|
||||
<MenuItem x:Name="MenuItemNewWorkspace" Header="{x:Static langRes:GeneralLangRes.NewWorkspace}"/>
|
||||
<Separator/>
|
||||
<MenuItem x:Name="MenuItemRecentWorkspaces" Header="_Recent workspaces"/>
|
||||
<MenuItem x:Name="MenuItemRecentWorkspaces" Header="{x:Static langRes:GeneralLangRes.RecentWorkspaces}"/>
|
||||
</MenuFlyout.Items>
|
||||
</MenuFlyout>
|
||||
</pilz:ImageButton.Flyout>
|
||||
@@ -52,14 +52,14 @@
|
||||
<!-- Button: Update -->
|
||||
<pilz:ImageButton
|
||||
x:Name="ButtonUpdate"
|
||||
Text="Update"
|
||||
Text="{x:Static langRes:GeneralLangRes.Update}"
|
||||
Background="Transparent">
|
||||
|
||||
<pilz:ImageButton.Flyout>
|
||||
<MenuFlyout>
|
||||
<MenuFlyout.Items>
|
||||
<MenuItem x:Name="MenuItemCreateUpdate" Header="_Create update" Click="MenuItemCreateUpdate_OnClick"/>
|
||||
<MenuItem x:Name="MenuItemRemoveUpdate" Header="_Remove update" Click="MenuItemRemoveUpdate_OnClick"/>
|
||||
<MenuItem x:Name="MenuItemCreateUpdate" Header="{x:Static langRes:GeneralLangRes.CreateUpdate}" Click="MenuItemCreateUpdate_OnClick"/>
|
||||
<MenuItem x:Name="MenuItemRemoveUpdate" Header="{x:Static langRes:GeneralLangRes.RemoveUpdate}" Click="MenuItemRemoveUpdate_OnClick"/>
|
||||
</MenuFlyout.Items>
|
||||
</MenuFlyout>
|
||||
</pilz:ImageButton.Flyout>
|
||||
@@ -68,7 +68,7 @@
|
||||
<!-- Button: Tools -->
|
||||
<pilz:ImageButton
|
||||
x:Name="ButtonTools"
|
||||
Text="Tools"
|
||||
Text="{x:Static langRes:GeneralLangRes.Tools}"
|
||||
Background="Transparent"/>
|
||||
</StackPanel>
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
<!-- Button: Add action -->
|
||||
<pilz:ImageButton
|
||||
x:Name="ButtonAddAction"
|
||||
Text="Add"
|
||||
Text="{x:Static langRes:GeneralLangRes.Add}"
|
||||
ImageSource="{x:Static local:MainWindow.ButtonImageAddAction}"
|
||||
Background="Transparent"
|
||||
Click="ButtonAddAction_OnClick"/>
|
||||
@@ -123,7 +123,7 @@
|
||||
<!-- Button: Remove action -->
|
||||
<pilz:ImageButton
|
||||
x:Name="ButtonRemoveAction"
|
||||
Text="Remove"
|
||||
Text="{x:Static langRes:GeneralLangRes.Remove}"
|
||||
ImageSource="{x:Static local:MainWindow.ButtonImageRemoveAction}"
|
||||
Background="Transparent"
|
||||
Click="ButtonRemoveAction_OnClick"/>
|
||||
@@ -137,7 +137,7 @@
|
||||
<!-- CheckBox: Is public -->
|
||||
<CheckBox
|
||||
Margin="3, 0, 3, 0"
|
||||
Content="Public"
|
||||
Content="{x:Static langRes:GeneralLangRes.Public}"
|
||||
IsChecked="{Binding IsPublic}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
@@ -158,24 +158,24 @@
|
||||
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Header="Id"
|
||||
Header="{x:Static langRes:GeneralLangRes.Id}"
|
||||
Binding="{Binding InheritedId}"/>
|
||||
|
||||
<DataGridTextColumn
|
||||
Header="Side"
|
||||
Header="{x:Static langRes:GeneralLangRes.Side}"
|
||||
Binding="{Binding InheritedSide}"/>
|
||||
|
||||
<DataGridTextColumn
|
||||
Header="Update type"
|
||||
Header="{x:Static langRes:GeneralLangRes.UpdateType}"
|
||||
Binding="{Binding InheritedUpdateType}"
|
||||
IsVisible="{Binding IsUpdate}"/>
|
||||
|
||||
<DataGridTextColumn
|
||||
Header="Source type"
|
||||
Header="{x:Static langRes:GeneralLangRes.SourceType}"
|
||||
Binding="{Binding InheritedSourceType}"/>
|
||||
|
||||
<DataGridTextColumn
|
||||
Header="Dest path"
|
||||
Header="{x:Static langRes:GeneralLangRes.DestinationPath}"
|
||||
Binding="{Binding InheritedDestPath}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
@@ -206,18 +206,18 @@
|
||||
Spacing="6">
|
||||
|
||||
<Image x:Name="ImageUpdate" Width="{x:Static symbols:SymbolGlobals.DefaultImageMediumSize}"/>
|
||||
<TextBlock Text="Update" FontSize="{x:Static symbols:SymbolGlobals.DefaultImageMediumSize}"/>
|
||||
<TextBlock Text="{x:Static langRes:GeneralLangRes.Update}" FontSize="{x:Static symbols:SymbolGlobals.DefaultImageMediumSize}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Inherit from -->
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Inherit from" Target="TextBoxUpdateActionInheritFrom"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.InheritFrom}" Target="TextBoxUpdateActionInheritFrom"/>
|
||||
<TextBox
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
x:Name="TextBoxUpdateActionInheritFrom"
|
||||
Text="{Binding InheritFrom}"/>
|
||||
|
||||
<!-- Update type -->
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="Update type" Target="ComboBoxUpdateActionSourceType"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.UpdateType}" Target="ComboBoxUpdateActionSourceType"/>
|
||||
<ComboBox
|
||||
Grid.Row="2" Grid.Column="1"
|
||||
x:Name="ComboBoxUpdateActionSourceType"
|
||||
@@ -227,7 +227,7 @@
|
||||
SelectedValue="{Binding UpdateType}"/>
|
||||
|
||||
<!-- Source path -->
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="Source path" Target="TextBoxInstallActionSourcePath"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.SourcePath}" Target="TextBoxInstallActionSourcePath"/>
|
||||
<TextBox
|
||||
Grid.Row="3" Grid.Column="1"
|
||||
x:Name="TextBoxInstallActionSourcePath"
|
||||
@@ -236,7 +236,7 @@
|
||||
<!-- Is Directory -->
|
||||
<CheckBox Grid.Row="4" Grid.Column="1"
|
||||
x:Name="CheckBoxUpdateActionIsDir"
|
||||
Content="Is Directory"
|
||||
Content="{x:Static langRes:GeneralLangRes.IsDirectory}"
|
||||
IsChecked="{Binding IsDirectory}"/>
|
||||
</Grid>
|
||||
|
||||
@@ -256,25 +256,25 @@
|
||||
<Image
|
||||
x:Name="ImageGeneral"
|
||||
Width="{x:Static symbols:SymbolGlobals.DefaultImageMediumSize}"/>
|
||||
<TextBlock Text="General" FontSize="20"/>
|
||||
<TextBlock Text="{x:Static langRes:GeneralLangRes.General}" FontSize="20"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Id -->
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Id" Target="TextBoxInstallActionId"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.Id}" Target="TextBoxInstallActionId"/>
|
||||
<TextBox
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
x:Name="TextBoxInstallActionId"
|
||||
Text="{Binding Id}"/>
|
||||
|
||||
<!-- Name -->
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="Name" Target="TextBoxInstallActionName"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.Name}" Target="TextBoxInstallActionName"/>
|
||||
<TextBox
|
||||
Grid.Row="2" Grid.Column="1"
|
||||
x:Name="TextBoxInstallActionName"
|
||||
Text="{Binding Name}"/>
|
||||
|
||||
<!-- Side -->
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="Side" Target="ComboBoxInstallActionSide"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.Side}" Target="ComboBoxInstallActionSide"/>
|
||||
<ComboBox
|
||||
Grid.Row="3" Grid.Column="1"
|
||||
x:Name="ComboBoxInstallActionSide"
|
||||
@@ -287,7 +287,7 @@
|
||||
<CheckBox
|
||||
Grid.Row="4" Grid.Column="1"
|
||||
x:Name="CheckBoxInstallActionIsExtra"
|
||||
Content="Is Extra"
|
||||
Content="{x:Static langRes:GeneralLangRes.IsExtra}"
|
||||
IsChecked="{Binding IsExtra}"/>
|
||||
</Grid>
|
||||
|
||||
@@ -307,11 +307,11 @@
|
||||
<Image
|
||||
x:Name="ImageDestination"
|
||||
Width="{x:Static symbols:SymbolGlobals.DefaultImageMediumSize}"/>
|
||||
<TextBlock Text="Destination" FontSize="20"/>
|
||||
<TextBlock Text="{x:Static langRes:GeneralLangRes.Destination}" FontSize="20"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Destination path -->
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Destination path" Target="TextBoxInstallDestPath"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.DestinationPath}" Target="TextBoxInstallDestPath"/>
|
||||
<TextBox
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
x:Name="TextBoxInstallDestPath"
|
||||
@@ -334,11 +334,11 @@
|
||||
<Image
|
||||
x:Name="ImageSource"
|
||||
Width="{x:Static symbols:SymbolGlobals.DefaultImageMediumSize}"/>
|
||||
<TextBlock Text="Source" FontSize="20"/>
|
||||
<TextBlock Text="{x:Static langRes:GeneralLangRes.Source}" FontSize="20"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Source types -->
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Source type" Target="CheckBoxInstallActionSourceType"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.SourceType}" Target="CheckBoxInstallActionSourceType"/>
|
||||
<ComboBox
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
x:Name="CheckBoxInstallActionSourceType"
|
||||
@@ -350,38 +350,38 @@
|
||||
<!-- Is Zip -->
|
||||
<CheckBox Grid.Row="2" Grid.Column="1"
|
||||
x:Name="CheckBoxInstallActionIsZip"
|
||||
Content="Is Zip archive"
|
||||
Content="{x:Static langRes:GeneralLangRes.IsZipArchive}"
|
||||
IsChecked="{Binding IsZip}"/>
|
||||
|
||||
<!-- Source owner -->
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="Source owner" Target="TextBoxInstallActionSourceOwner"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.SourceOwner}" Target="TextBoxInstallActionSourceOwner"/>
|
||||
<TextBox
|
||||
Grid.Row="3" Grid.Column="1"
|
||||
x:Name="TextBoxInstallActionSourceOwner"
|
||||
Text="{Binding SourceOwner}"/>
|
||||
|
||||
<!-- Source name -->
|
||||
<Label Grid.Row="4" Grid.Column="0" Content="Source name" Target="TextBoxInstallActionSourceName"/>
|
||||
<Label Grid.Row="4" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.SourceName}" Target="TextBoxInstallActionSourceName"/>
|
||||
<TextBox
|
||||
Grid.Row="4" Grid.Column="1"
|
||||
x:Name="TextBoxInstallActionSourceName"
|
||||
Text="{Binding SourceName}"/>
|
||||
|
||||
<!-- Source RegEx -->
|
||||
<Label Grid.Row="5" Grid.Column="0" Content="Source RegEx" Target="TextBoxInstallActionSourceRegEx"/>
|
||||
<Label Grid.Row="5" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.SourceRegex}" Target="TextBoxInstallActionSourceRegEx"/>
|
||||
<TextBox
|
||||
Grid.Row="5" Grid.Column="1"
|
||||
x:Name="TextBoxInstallActionSourceRegEx"
|
||||
Text="{Binding SourceRegex}"/>
|
||||
|
||||
<!-- Source url -->
|
||||
<Label Grid.Row="6" Grid.Column="0" Content="Source URL" Target="TextBoxInstallActionSourceUrl"/>
|
||||
<Label Grid.Row="6" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.SourceUrl}" Target="TextBoxInstallActionSourceUrl"/>
|
||||
<TextBox
|
||||
Grid.Row="6" Grid.Column="1"
|
||||
x:Name="TextBoxInstallActionSourceUrl" Text="{Binding SourceUrl}"/>
|
||||
|
||||
<!-- Zip archive path -->
|
||||
<Label Grid.Row="7" Grid.Column="0" Content="ZIP archive path" Target="TextBoxInstallActionZipArchivePath"/>
|
||||
<Label Grid.Row="7" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.ZipArchivePath}" Target="TextBoxInstallActionZipArchivePath"/>
|
||||
<TextBox
|
||||
Grid.Row="7" Grid.Column="1"
|
||||
x:Name="TextBoxInstallActionZipArchivePath"
|
||||
@@ -405,11 +405,11 @@
|
||||
<Image
|
||||
x:Name="ImageMetadata"
|
||||
Width="{x:Static symbols:SymbolGlobals.DefaultImageMediumSize}"/>
|
||||
<TextBlock Text="Metadata" FontSize="20"/>
|
||||
<TextBlock Text="{x:Static langRes:GeneralLangRes.Metadata}" FontSize="20"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Website -->
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Website" Target="TextBoxInstallActionWebsite"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.Website}" Target="TextBoxInstallActionWebsite"/>
|
||||
<TextBox
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
x:Name="TextBoxInstallActionWebsite"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using ModpackUpdater.Apps.Manager.Api.Model;
|
||||
using ModpackUpdater.Apps.Manager.LangRes;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace ModpackUpdater.Apps.Manager.Ui.Models.MainWindow;
|
||||
@@ -37,7 +38,7 @@ public class MainWindowViewModel : INotifyPropertyChanged
|
||||
currentTreeNodes =
|
||||
[
|
||||
new ActionSetTreeNode(currentWorkspace.InstallInfos),
|
||||
new SimpleMainWindowTreeNode("Updates")
|
||||
new SimpleMainWindowTreeNode(GeneralLangRes.Updates)
|
||||
{
|
||||
Image = AppGlobals.Symbols.GetImageSource(AppSymbols.update_done),
|
||||
Nodes = [.. currentWorkspace.UpdateInfos.Updates.Select(n => new ActionSetTreeNode(n))],
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:dialogs="https://git.pilzinsel64.de/pilz-framework/pilz"
|
||||
xmlns:updatesCollectorViewMode="clr-namespace:ModpackUpdater.Apps.Manager.Ui.Models.UpdatesCollectorViewMode"
|
||||
xmlns:langRes="clr-namespace:ModpackUpdater.Apps.Manager.LangRes"
|
||||
mc:Ignorable="d"
|
||||
d:DesignWidth="600"
|
||||
d:DesignHeight="450"
|
||||
@@ -69,7 +70,7 @@
|
||||
Grid.Column="3"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Content="Remove"
|
||||
Content="{x:Static langRes:GeneralLangRes.Remove}"
|
||||
Click="ButtonRemoveUpdate_Click"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
Reference in New Issue
Block a user