a lot of work
This commit is contained in:
@@ -11,10 +11,12 @@
|
||||
x:Class="ModpackUpdater.Apps.Manager.Ui.MainWindow"
|
||||
x:DataType="vm:MainWindowViewModel"
|
||||
Title="Minecraft Modpack Manager"
|
||||
Padding="3">
|
||||
Padding="3"
|
||||
Loaded="Window_OnLoaded">
|
||||
|
||||
<Grid
|
||||
RowDefinitions="Auto,*">
|
||||
|
||||
<Menu>
|
||||
<Menu.Items>
|
||||
<MenuItem x:Name="MenuItemWorkspace" Header="Workspace">
|
||||
@@ -29,62 +31,125 @@
|
||||
</MenuItem.Items>
|
||||
</MenuItem>
|
||||
|
||||
<MenuItem x:Name="MenuItemUpdates" Header="Updates">
|
||||
<MenuItem.Items>
|
||||
<MenuItem x:Name="MenuItemCreateUpdate" Header="Create update"/>
|
||||
<MenuItem x:Name="MenuItemRemoveUpdate" Header="Remove update"/>
|
||||
</MenuItem.Items>
|
||||
</MenuItem>
|
||||
|
||||
<MenuItem x:Name="MenuItemTools" Header="Tools"/>
|
||||
</Menu.Items>
|
||||
</Menu>
|
||||
|
||||
<Grid
|
||||
x:Name="GridMain"
|
||||
Grid.Row="1"
|
||||
ColumnDefinitions="Auto,*,*"
|
||||
ColumnDefinitions="300,*,300"
|
||||
Margin="3">
|
||||
|
||||
<TreeView
|
||||
<StackPanel
|
||||
Grid.Column="0"
|
||||
Margin="3"/>
|
||||
Margin="3"
|
||||
Spacing="6">
|
||||
|
||||
<Menu>
|
||||
<Menu.Items>
|
||||
<MenuItem x:Name="MenuItemCreateUpdate" Header="Create" Click="MenuItemCreateUpdate_OnClick"/>
|
||||
<MenuItem x:Name="MenuItemEditUpdate" Header="Edit" Click="MenuItemEditUpdate_OnClick"/>
|
||||
<MenuItem x:Name="MenuItemRemoveUpdate" Header="Remove" Click="MenuItemRemoveUpdate_OnClick"/>
|
||||
</Menu.Items>
|
||||
</Menu>
|
||||
|
||||
<DataGrid
|
||||
x:Name="DataGridActions"
|
||||
<ScrollViewer
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
|
||||
<StackPanel>
|
||||
<TreeView
|
||||
ItemsSource="{Binding CurrentTreeNodes}"
|
||||
SelectedItem="{Binding SelectedTreeNode}">
|
||||
|
||||
<TreeView.ItemTemplate>
|
||||
<TreeDataTemplate
|
||||
ItemsSource="{Binding Nodes}">
|
||||
|
||||
<StackPanel Orientation="Horizontal" Spacing="6">
|
||||
<Image Source="{Binding Image}" Width="16"/>
|
||||
<TextBlock Text="{Binding DisplayText}"/>
|
||||
</StackPanel>
|
||||
</TreeDataTemplate>
|
||||
</TreeView.ItemTemplate>
|
||||
</TreeView>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
Margin="3"
|
||||
ItemsSource="{Binding Actions}"
|
||||
SelectedItem="{Binding SelectedAction}">
|
||||
Spacing="6">
|
||||
|
||||
<ContentControl
|
||||
Content="{Binding SelectedTreeNode}">
|
||||
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Header="Id"
|
||||
Binding="{Binding InheritedId}"/>
|
||||
<ContentControl.DataTemplates>
|
||||
<DataTemplate
|
||||
DataType="vm:ActionSetTreeNode">
|
||||
|
||||
<StackPanel
|
||||
Orientation="Horizontal"
|
||||
Spacing="6">
|
||||
|
||||
<Menu>
|
||||
<Menu.Items>
|
||||
<MenuItem x:Name="MenuItemAddAction" Header="Create" Click="MenuItemAddAction_OnClick"/>
|
||||
<MenuItem x:Name="MenuItemRemoveAction" Header="Remove" Click="MenuItemRemoveAction_OnClick"/>
|
||||
</Menu.Items>
|
||||
</Menu>
|
||||
|
||||
<TextBox
|
||||
Text="{Binding Version}"/>
|
||||
|
||||
<CheckBox
|
||||
Content="Public"
|
||||
IsChecked="{Binding IsPublic}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate
|
||||
DataType="vm:MainWindowTreeNode"/>
|
||||
</ContentControl.DataTemplates>
|
||||
</ContentControl>
|
||||
|
||||
<DataGridTextColumn
|
||||
Header="Side"
|
||||
Binding="{Binding InheritedSide}"/>
|
||||
|
||||
<DataGridTextColumn
|
||||
Header="Update type"
|
||||
Binding="{Binding InheritedUpdateType}"
|
||||
IsVisible="{Binding IsUpdate}"/>
|
||||
|
||||
<DataGridTextColumn
|
||||
Header="Source type"
|
||||
Binding="{Binding InheritedSourceType}"/>
|
||||
|
||||
<DataGridTextColumn
|
||||
Header="Dest path"
|
||||
Binding="{Binding InheritedDestPath}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<DataGrid
|
||||
x:Name="DataGridActions"
|
||||
VerticalAlignment="Stretch"
|
||||
ItemsSource="{Binding CurrentGridRows}"
|
||||
SelectedItem="{Binding SelectedGridRow}">
|
||||
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Header="Id"
|
||||
Binding="{Binding InheritedId}"/>
|
||||
|
||||
<DataGridTextColumn
|
||||
Header="Side"
|
||||
Binding="{Binding InheritedSide}"/>
|
||||
|
||||
<DataGridTextColumn
|
||||
Header="Update type"
|
||||
Binding="{Binding InheritedUpdateType}"
|
||||
IsVisible="{Binding IsUpdate}"/>
|
||||
|
||||
<DataGridTextColumn
|
||||
Header="Source type"
|
||||
Binding="{Binding InheritedSourceType}"/>
|
||||
|
||||
<DataGridTextColumn
|
||||
Header="Dest path"
|
||||
Binding="{Binding InheritedDestPath}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</StackPanel>
|
||||
|
||||
<ScrollViewer
|
||||
x:Name="ScrollViewerInstallAction"
|
||||
Grid.Column="2"
|
||||
Margin="3"
|
||||
DataContext="{Binding SelectedAction}"
|
||||
DataContext="{Binding SelectedGridRow}"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
|
||||
<StackPanel
|
||||
@@ -111,10 +176,10 @@
|
||||
<Label Content="Source type" Target="ComboBoxUpdateActionSourceType"/>
|
||||
<ComboBox
|
||||
x:Name="ComboBoxUpdateActionSourceType"
|
||||
ItemsSource="{x:Static vm:InstallActionViewModel.UpdateActionTypes}"
|
||||
ItemsSource="{x:Static vm:MainWindowGridRow.UpdateActionTypes}"
|
||||
DisplayMemberBinding="{Binding Value}"
|
||||
SelectedValueBinding="{Binding Key}"
|
||||
SelectedValue="{Binding Type}"/>
|
||||
SelectedValue="{Binding UpdateType}"/>
|
||||
|
||||
<!-- Is Directory -->
|
||||
<CheckBox
|
||||
@@ -149,7 +214,7 @@
|
||||
<Label Content="Side" Target="ComboBoxInstallActionSide"/>
|
||||
<ComboBox
|
||||
x:Name="ComboBoxInstallActionSide"
|
||||
ItemsSource="{x:Static vm:InstallActionViewModel.Sides}"
|
||||
ItemsSource="{x:Static vm:MainWindowGridRow.Sides}"
|
||||
DisplayMemberBinding="{Binding Value}"
|
||||
SelectedValueBinding="{Binding Key}"
|
||||
SelectedValue="{Binding Side}"/>
|
||||
@@ -191,7 +256,7 @@
|
||||
<Label Content="Source type" Target="CheckBoxInstallActionSourceType"/>
|
||||
<ComboBox
|
||||
x:Name="CheckBoxInstallActionSourceType"
|
||||
ItemsSource="{x:Static vm:InstallActionViewModel.SourceTypes}"
|
||||
ItemsSource="{x:Static vm:MainWindowGridRow.SourceTypes}"
|
||||
DisplayMemberBinding="{Binding Value}"
|
||||
SelectedValueBinding="{Binding Key}"
|
||||
SelectedValue="{Binding SourceType}"/>
|
||||
|
||||
Reference in New Issue
Block a user