Finished installer design.

This commit is contained in:
Greg
2022-05-14 12:36:24 -06:00
parent 74be2c9562
commit dc3e1353ca
8 changed files with 9 additions and 181 deletions
@@ -11,7 +11,7 @@
<UserControl.Resources>
<!-- Dumb but it works... -->
<Style x:Key="NextStyle"
<Style x:Key="InstallStyle"
TargetType="Button"
BasedOn="{StaticResource {x:Type Button}}">
@@ -65,6 +65,8 @@
Margin="30 30 30 0"
Height="190"
IsReadOnly="True"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto"
Name="LicenseText"
Loaded="LicenseText_Loaded"/>
@@ -96,11 +98,11 @@
<simpleControls:SimpleButton HorizontalAlignment="Right"
VerticalAlignment="Center"
Grid.Column="1" Grid.Row="1"
Content="Next" x:Name="Next"
Content="Install" x:Name="Install"
Width="75" Height="26"
Margin="0 0 8 0"
Style="{StaticResource NextStyle}"
Click="Next_Click"/>
Style="{StaticResource InstallStyle}"
Click="Install_Click"/>
</StackPanel>
</Grid>
</Border>
@@ -24,10 +24,11 @@ namespace SetupBA.MVVM.View
dc.MainVM.CurrentView = dc.MainVM.InitialVM;
}
private void Next_Click(object sender, RoutedEventArgs e)
private void Install_Click(object sender, RoutedEventArgs e)
{
var dc = DataContext as LicenseViewModel;
dc.MainVM.CurrentView = dc.MainVM.LocationVM;
dc.MainVM.InstallExecute();
dc.MainVM.CurrentView = dc.MainVM.InstallVM;
}
private void LicenseText_Loaded(object sender, RoutedEventArgs e)
@@ -1,97 +0,0 @@
<UserControl x:Class="SetupBA.MVVM.View.LocationView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SetupBA.MVVM.View"
xmlns:skins="clr-namespace:SimpleUI.Skins;assembly=SimpleUI"
xmlns:simpleControls="clr-namespace:SimpleUI.Controls;assembly=SimpleUI"
mc:Ignorable="d"
Width="580" Height="380">
<Border>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<!-- Main View Area -->
<StackPanel Orientation="Vertical">
<!-- Title Text -->
<Grid>
<Rectangle Height="80"
Fill="#b04b4b"/>
<TextBlock Text="Location"
FontSize="22"
FontWeight="Bold"
TextWrapping="Wrap"
Foreground="White"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Grid>
<!-- Content Area. -->
<Grid Height="250">
<StackPanel VerticalAlignment="Center">
<!-- Description. -->
<TextBlock Text="Please select where you would like to install Orbis Suite:"
FontSize="18"
TextWrapping="Wrap"
TextAlignment="Center"
Foreground="White"
HorizontalAlignment="Center"
Margin="30 0 30 25"/>
<!-- Selection -->
<Grid Margin="30 0">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="70"/>
</Grid.ColumnDefinitions>
<simpleControls:SimpleTextBox Margin="0 0 15 0"
Height="25"
VerticalContentAlignment="Center"
Text="Test"/>
<simpleControls:SimpleButton Content="Browse"
Grid.Column="1"
Height="25"/>
</Grid>
</StackPanel>
</Grid>
</StackPanel>
<!-- Button Area -->
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Right"
Grid.Row="1"
Margin="0 0 10 10">
<!-- Back -->
<simpleControls:SimpleButton HorizontalAlignment="Right"
VerticalAlignment="Center"
Grid.Column="1" Grid.Row="1"
Content="Back" x:Name="Back"
Width="75" Height="26"
Margin="0 0 8 0" Click="Back_Click"/>
<!-- Install -->
<simpleControls:SimpleButton HorizontalAlignment="Right"
VerticalAlignment="Center"
Grid.Column="1" Grid.Row="1"
Content="Install" x:Name="Install"
Width="75" Height="26"
Margin="0 0 8 0"
Click="Install_Click"/>
</StackPanel>
</Grid>
</Border>
</UserControl>
@@ -1,43 +0,0 @@
using Microsoft.Tools.WindowsInstallerXml.Bootstrapper;
using SetupBA.MVVM.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace SetupBA.MVVM.View
{
/// <summary>
/// Interaction logic for LocationView.xaml
/// </summary>
public partial class LocationView : UserControl
{
public LocationView()
{
InitializeComponent();
}
private void Back_Click(object sender, RoutedEventArgs e)
{
var dc = DataContext as LocationViewModel;
dc.MainVM.CurrentView = dc.MainVM.LicenseVM;
}
private void Install_Click(object sender, RoutedEventArgs e)
{
var dc = DataContext as LocationViewModel;
dc.MainVM.InstallExecute();
dc.MainVM.CurrentView = dc.MainVM.InstallVM;
}
}
}
@@ -35,12 +35,6 @@
<ContentControl Content="{StaticResource LicenseViewKey}" />
</DataTemplate>
<!-- Location View -->
<view:LocationView x:Key="LocationViewKey"/>
<DataTemplate DataType="{x:Type viewModel:LocationViewModel}">
<ContentControl Content="{StaticResource LocationViewKey}" />
</DataTemplate>
<!-- Install View -->
<view:InstallView x:Key="InstallViewKey"/>
<DataTemplate DataType="{x:Type viewModel:InstallViewModel}">
@@ -1,19 +0,0 @@
using Microsoft.Toolkit.Mvvm.Input;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SetupBA.MVVM.ViewModel
{
public class LocationViewModel
{
public LocationViewModel(MainViewModel mainViewModel)
{
MainVM = mainViewModel;
}
public MainViewModel MainVM { get; set; }
}
}
@@ -24,7 +24,6 @@ namespace SetupBA.MVVM.ViewModel
// View Models.
InitialVM = new InitialViewModel(this);
LicenseVM = new LicenseViewModel(this);
LocationVM = new LocationViewModel(this);
InstallVM = new InstallViewModel(this);
SummaryVM = new SummaryViewModel(this);
@@ -43,7 +42,6 @@ namespace SetupBA.MVVM.ViewModel
// View Models
public InitialViewModel InitialVM { get; set; }
public LicenseViewModel LicenseVM { get; set; }
public LocationViewModel LocationVM { get; set; }
public InstallViewModel InstallVM { get; set; }
public SummaryViewModel SummaryVM { get; set; }
-8
View File
@@ -94,9 +94,6 @@
<Compile Include="MVVM\View\LicenseView.xaml.cs">
<DependentUpon>LicenseView.xaml</DependentUpon>
</Compile>
<Compile Include="MVVM\View\LocationView.xaml.cs">
<DependentUpon>LocationView.xaml</DependentUpon>
</Compile>
<Compile Include="MVVM\View\MainView.xaml.cs">
<DependentUpon>MainView.xaml</DependentUpon>
</Compile>
@@ -104,7 +101,6 @@
<Compile Include="MVVM\ViewModel\InitialViewModel.cs" />
<Compile Include="MVVM\ViewModel\InstallViewModel.cs" />
<Compile Include="MVVM\ViewModel\LicenseViewModel.cs" />
<Compile Include="MVVM\ViewModel\LocationViewModel.cs" />
<Compile Include="MVVM\ViewModel\SummaryViewModel.cs" />
<Compile Include="MVVM\View\SummaryView.xaml.cs">
<DependentUpon>SummaryView.xaml</DependentUpon>
@@ -125,10 +121,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MVVM\View\LocationView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MVVM\View\MainView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>