Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 9f1d585b authored by Harald Martini's avatar Harald Martini
Browse files

Updated Main View, and button templates

parent 8d4decc9
No related branches found
No related tags found
No related merge requests found
Showing
with 264 additions and 212 deletions
......@@ -8,11 +8,11 @@
<!-- Add new ResourceDictionaries here-->
<ResourceDictionary Source="Resources/ViewModelBindings.xaml"/>
<ResourceDictionary Source="Resources/Converter.xaml"/>
<ResourceDictionary Source="Resources/GlobalStyles.xaml"/>
<ResourceDictionary Source="Resources/Colors.xaml"/>
<ResourceDictionary Source="Resources\Styles\ButtonStyles.xaml"/>
<ResourceDictionary Source="Resources/Styles/GlobalStyles.xaml"/>
<ResourceDictionary Source="Resources/Styles/Colors.xaml"/>
<ResourceDictionary Source="Resources/Styles/ButtonStyles.xaml"/>
<ResourceDictionary Source="DataGridStyles.xaml"/>
<ResourceDictionary Source="ButtonTemplates.xaml"/>
<ResourceDictionary Source="ButtonStyles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
......
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
</ResourceDictionary>
\ No newline at end of file
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:VECTO3GUI2020" xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2">
<Style x:Key="ColumnHeaderGripperStyle" TargetType="{x:Type Thumb}">
<Setter Property="Width" Value="8"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Cursor" Value="SizeWE"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="JobListDataGridHeaderStyle" TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
<Grid>
<Themes:DataGridHeaderBorder BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" IsClickable="{TemplateBinding CanUserSort}" IsPressed="{TemplateBinding IsPressed}" IsHovered="{TemplateBinding IsMouseOver}" Padding="{TemplateBinding Padding}" SortDirection="{TemplateBinding SortDirection}" SeparatorBrush="{TemplateBinding SeparatorBrush}" SeparatorVisibility="{TemplateBinding SeparatorVisibility}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Themes:DataGridHeaderBorder>
<Thumb x:Name="PART_LeftHeaderGripper" HorizontalAlignment="Left" Style="{StaticResource ColumnHeaderGripperStyle}"/>
<Thumb x:Name="PART_RightHeaderGripper" HorizontalAlignment="Right" Style="{StaticResource ColumnHeaderGripperStyle}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Padding" Value="4 0 0 0"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Background" Value="White"/>
</Style>
<Style x:Key="DataGridCellStyle1" TargetType="{x:Type DataGridCell}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{StaticResource ButtonHightlightColor}"/>
<!-- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/> -->
<Setter Property="Foreground" Value="Black"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static DataGrid.FocusBorderBrushKey}}"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="true"/>
<Condition Property="Selector.IsSelectionActive" Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}}"/>
</MultiTrigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>
\ No newline at end of file
......@@ -4,7 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:VECTO3GUI2020"
xmlns:Implementation="clr-namespace:VECTO3GUI2020.ViewModel.Implementation" x:Class="VECTO3GUI2020.MainWindow"
xmlns:Implementation="clr-namespace:VECTO3GUI2020.ViewModel.Implementation" d:DataContext="{d:DesignInstance Type=Implementation:MainWindowViewModel}" x:Class="VECTO3GUI2020.MainWindow"
mc:Ignorable="d"
Title="Vecto" Height="450" Width="820"
WindowStartupLocation="CenterScreen">
......@@ -16,23 +16,24 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="20"/>
<RowDefinition Height="40"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" Margin="0,0,0,0">
<Grid Grid.Row="0">
<StackPanel Orientation="Vertical">
<Menu IsMainMenu="True">
<MenuItem Header="File" VerticalAlignment="Center">
<MenuItem Header="File" VerticalAlignment="Stretch">
<MenuItem Header="Settings" Command="{Binding OpenSettings}"/>
<MenuItem Header="New File" Command="{Binding NewInterimFile}"/>
<MenuItem Header="Open File" Command="{Binding AddJob}"/>
</MenuItem>
</Menu>
</StackPanel>
</Grid>
<Grid Grid.Row="1" Margin="0,0,0,0">
<Grid Grid.Row="1" Margin="0,4,0,0">
<ContentControl Content="{Binding CurrentViewModelTop}"/>
</Grid>
......
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="ListViewStyle" TargetType="ListView">
<Setter Property="Background" Value="DimGray"/>
<Setter Property="Foreground" Value="White" />
</Style>
<SolidColorBrush x:Key="Button.Static.Background" Color="#FFDFFFFA"/>
<SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
<SolidColorBrush x:Key="Button.Static.Border" Color="#FF02888B"/>
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/>
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/>
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
<SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
<SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
<ControlTemplate x:Key="MainViewButtonStyle" TargetType="{x:Type ButtonBase}">
<Border x:Name="border" SnapsToDevicePixels="True" BorderBrush="{DynamicResource AccentColorButton}" BorderThickness="2" Background="{DynamicResource Button.Static.Background}">
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="Button.IsDefaulted" Value="True">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="#FF2C628B"/>
</Trigger>
<Trigger Property="ToggleButton.IsChecked" Value="True">
<Setter Property="Background" TargetName="border" Value="#FFBCDDEE"/>
<Setter Property="BorderBrush" TargetName="border" Value="#FF245A83"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" TargetName="border" Value="#FFF4F4F4"/>
<Setter Property="BorderBrush" TargetName="border" Value="#FFADB2B5"/>
<!--Setter Property="Foreground" Value="#FF838383"/-->
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<Style x:Key="FocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="MainViewButton" TargetType="{x:Type Button}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border" BorderBrush="#FF1E716A" BorderThickness="{TemplateBinding BorderThickness}" Background="White" SnapsToDevicePixels="true">
<Border.OpacityMask>
<RadialGradientBrush>
<GradientStop Color="Black" Offset="0.133"/>
<GradientStop Color="White" Offset="0.6"/>
</RadialGradientBrush>
</Border.OpacityMask>
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsDefaulted" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="LabelStyleSubView" TargetType="{x:Type Label}">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Top"/>
<Setter Property="FontWeight" Value="DemiBold"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Label}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
\ No newline at end of file
......@@ -15,7 +15,7 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border" BorderBrush="{DynamicResource AccentColorButton}" BorderThickness="0,0,0,1" Background="White" SnapsToDevicePixels="true" Width="80" Height="30">
<Border x:Name="border" BorderBrush="{DynamicResource AccentColorButton}" BorderThickness="0,0,0,1" Background="White" SnapsToDevicePixels="true" Width="Auto" Height="30">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualStateGroup.Transitions>
......@@ -34,12 +34,12 @@
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource MultiStageButtonMouseOverBackGround}"/>
<Setter Property="Background" TargetName="border" Value="{StaticResource ButtonHightlightColor}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource AccentColorButton}"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
<Setter Property="Background" TargetName="border" Value="{StaticResource ButtonHightlightPressedColor}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource AccentColorButton}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
......
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:VECTO3GUI2020">
<SolidColorBrush x:Key="AccentColorButton" Color="#FF10796B"/>
<Color x:Key="SystemAccentColor">
</Color>
<SolidColorBrush x:Key="AccentColorButton" Color="{x:Static SystemParameters.WindowGlassColor}"/>
<!-- <SolidColorBrush x:Key="AccentColorButton" Color="#FF10796B"/>-->
<Color x:Key="ButtonBackgroundColor">White</Color>
<LinearGradientBrush x:Key="ButtonBackgroundBrush" EndPoint="0,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="1"/>
<GradientStop Color="{DynamicResource ButtonBackgroundColor}" Offset="0.187"/>
<GradientStop Color="#FF494949" Offset="0.906"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="ButtonHightlightColor" Opacity="0.3"
Color="{Binding Color, Source={StaticResource AccentColorButton}, Mode=OneWay}" />
<SolidColorBrush x:Key="ButtonHightlightPressedColor" Opacity="0.4"
Color="{Binding Color, Source={StaticResource AccentColorButton}, Mode=OneWay}" />
</ResourceDictionary>
\ No newline at end of file
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="ListViewStyle" TargetType="ListView">
<Setter Property="Background" Value="DimGray"/>
<Setter Property="Foreground" Value="White" />
</Style>
<SolidColorBrush x:Key="Button.Static.Background" Color="#FFDFFFFA"/>
<SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
<SolidColorBrush x:Key="Button.Static.Border" Color="#FF02888B"/>
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/>
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/>
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
<SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
<SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
<SolidColorBrush x:Key="TextBox.Static.Border" Color="#FFABAdB3"/>
<SolidColorBrush x:Key="TextBox.MouseOver.Border" Color="#FF7EB4EA"/>
<SolidColorBrush x:Key="TextBox.Focus.Border" Color="#FF569DE5"/>
<Style x:Key="TextBoxStyle1" TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
<Setter Property="BorderBrush" Value="{StaticResource TextBox.Static.Border}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="AllowDrop" Value="true"/>
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
<ScrollViewer x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Opacity" TargetName="border" Value="0.56"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource ButtonHightlightColor}"/>
<!--<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource TextBox.MouseOver.Border}"/>-->
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource ButtonHightlightColor}"/>
<!--<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource TextBox.Focus.Border}"/>-->
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsInactiveSelectionHighlightEnabled" Value="true"/>
<Condition Property="IsSelectionActive" Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
</MultiTrigger>
</Style.Triggers>
</Style>
</ResourceDictionary>
\ No newline at end of file
......@@ -50,7 +50,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\Icon2.ico</ApplicationIcon>
<ApplicationIcon>Resources\Icons\Icon2.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
......@@ -384,17 +384,13 @@
<Compile Include="Views\XMLViewer.xaml.cs">
<DependentUpon>XMLViewer.xaml</DependentUpon>
</Compile>
<Page Include="ButtonStyles.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ButtonTemplates.xaml">
<Page Include="DataGridStyles.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="DataGridStyles.xaml">
<SubType>Designer</SubType>
<Page Include="Resources\Styles\ButtonStyles.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Resources\Colors.xaml">
<Page Include="Resources\Styles\Colors.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
......@@ -414,7 +410,7 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Resources\GlobalStyles.xaml">
<Page Include="Resources\Styles\GlobalStyles.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
......@@ -650,7 +646,7 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\Icon2.ico" />
<Resource Include="Resources\Icons\Icon2.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VectoCommon\VectoCommon\VectoCommon.csproj">
......@@ -667,7 +663,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\folderpicker.ico" />
<Resource Include="Resources\Icons\folderpicker.ico" />
</ItemGroup>
<ItemGroup>
<Folder Include="Model\Multistage\" />
......
......@@ -278,25 +278,29 @@ namespace VECTO3GUI2020.ViewModel.Implementation
string filename = e.Argument as string;
Debug.Assert(filename != null);
//TODO: update usage of GetDocumentType;
// //Loading the file
//try {
// var xElement = new System.Xml.XmlDocument();
// xElement.Load(filename);
// var documentType = XMLHelper.GetDocumentType(xElement.);
// if (documentType == null) {
// Debug.WriteLine("Unknown Document Type");
// e.Cancel = true;
// return;
// }
// var result = _documentViewModelFactory.CreateDocumentViewModel((XmlDocumentType)documentType, filename);
// e.Result = result;
//} catch (Exception) {
// e.Cancel = true;
// throw;
//}
}
//TODO: update usage of GetDocumentType;
//Loading the file
try
{
var xElement = new System.Xml.XmlDocument();
xElement.Load(filename);
var documentType = XMLHelper.GetDocumentType(xElement?.DocumentElement?.LocalName);
if (documentType == null)
{
Debug.WriteLine("Unknown Document Type");
e.Cancel = true;
return;
}
var result = _documentViewModelFactory.CreateDocumentViewModel((XmlDocumentType)documentType, filename);
e.Result = result;
}
catch (Exception)
{
e.Cancel = true;
throw;
}
}
void fileworker_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
......
......@@ -4,29 +4,36 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:VECTO3GUI2020.Views"
xmlns:converter="clr-namespace:VECTO3GUI2020.Helper.Converter"
xmlns:converter="clr-namespace:VECTO3GUI2020.Helper.Converter" xmlns:implementation="clr-namespace:VECTO3GUI2020.ViewModel.Implementation" d:DataContext="{d:DesignInstance Type=implementation:JobListViewModel}"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
d:DesignHeight="450" d:DesignWidth="1000">
<Grid Background="Azure">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition MinWidth="140" Width="1*"/>
<ColumnDefinition Name="MiddleColumn" Width="6*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition MinWidth="140" Width="1*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<StackPanel>
<Button Template="{DynamicResource MainViewButtonStyle}">Simulieren</Button>
<Button Command="{Binding moveJobUp}" Template="{DynamicResource MainViewButtonStyle}"
<Border BorderBrush="Transparent" BorderThickness="1">
<Grid>
<StackPanel HorizontalAlignment="Stretch">
<Button HorizontalAlignment="Stretch"
Style="{StaticResource MultiStageButtonStyle1}" >Simulation</Button>
<Button HorizontalAlignment="Stretch"
Style="{StaticResource MultiStageButtonStyle1}"
Command="{Binding moveJobUp}"
CommandParameter="{Binding ElementName=JobDataGrid, Path=SelectedItem}">Up</Button>
<Button Command="{Binding moveJobDown}" Template="{DynamicResource MainViewButtonStyle}"
<Button HorizontalAlignment="Stretch"
Style="{StaticResource MultiStageButtonStyle1}"
Command="{Binding moveJobDown}"
CommandParameter="{Binding ElementName=JobDataGrid, Path=SelectedItem}">Down</Button>
</StackPanel>
</Grid>
</StackPanel>
</Grid>
</Border>
<Grid Grid.Column="1">
<StackPanel Margin="2 0 2 0">
<Border BorderBrush="{StaticResource AccentColorButton}" BorderThickness="1">
<StackPanel VerticalAlignment="Stretch">
<DataGrid ItemsSource="{Binding Jobs}"
Name="JobDataGrid"
HorizontalAlignment="Stretch"
......@@ -34,16 +41,23 @@
CanUserReorderColumns="False"
AutoGenerateColumns="False"
SelectionMode="Single"
BorderThickness="0"
GridLinesVisibility="Horizontal"
HorizontalScrollBarVisibility="Disabled" RowHeaderWidth="0"
GridLinesVisibility="None"
HorizontalScrollBarVisibility="Disabled"
RowHeaderWidth="0"
ColumnHeaderHeight="30"
VerticalAlignment="Stretch"
VerticalContentAlignment="Stretch"
BorderThickness="0"
ColumnHeaderStyle="{StaticResource JobListDataGridHeaderStyle}"
Height="Auto"
RowHeight="30"
AlternatingRowBackground="LightGray" CellStyle="{DynamicResource DataGridCellStyle1}"
>
<DataGrid.Columns>
<DataGridTextColumn Header="Name" Binding="{Binding DocumentName}" Width="1*"/>
<DataGridTextColumn Header="Type" Binding="{Binding DocumentType}" Width="1*"/>
</DataGrid.Columns>
<DataGrid.RowDetailsTemplate>
<DataGrid.Columns>
<DataGridTextColumn Header="Name" Binding="{Binding DocumentName}" Width="1*"></DataGridTextColumn>
<DataGridTextColumn Header="Type" Binding="{Binding DocumentType}" Width="1*"></DataGridTextColumn>
</DataGrid.Columns>
<DataGrid.RowDetailsTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical">
<Label Content="Filename"/>
......@@ -61,16 +75,27 @@
</DataGrid>
<Label Content="Loading . . ." Visibility="{Binding IsLoading, Converter={StaticResource BooleanToVisibilityConverter}}"/>
</StackPanel>
</Border>
</Grid>
<Grid Grid.Column="2">
<StackPanel>
<Button Command="{Binding AddJob}" Template="{DynamicResource MainViewButtonStyle}">OpenFile</Button>
<Button Command="{Binding EditJob}" Template="{DynamicResource MainViewButtonStyle}"
CommandParameter="{Binding ElementName=JobDataGrid, Path=SelectedItem}" Style="{DynamicResource MainViewButton}">EditFile</Button>
<Button Command="{Binding NewManufacturingStageFile}" Template="{DynamicResource MainViewButtonStyle}">New Multistage File</Button>
<Button Command="{Binding RemoveJob}" Template="{DynamicResource MainViewButtonStyle}"
<Border BorderBrush="Transparent" BorderThickness="1">
<StackPanel >
<Button HorizontalAlignment="Stretch"
Style="{StaticResource MultiStageButtonStyle1}"
Command="{Binding AddJob}">OpenFile</Button>
<Button HorizontalAlignment="Stretch"
Style="{StaticResource MultiStageButtonStyle1}"
Command="{Binding EditJob}"
CommandParameter="{Binding ElementName=JobDataGrid, Path=SelectedItem}">EditFile</Button>
<Button HorizontalAlignment="Stretch"
Style="{StaticResource MultiStageButtonStyle1}"
Command="{Binding NewManufacturingStageFile}">New Multistage File</Button>
<Button HorizontalAlignment="Stretch"
Style="{StaticResource MultiStageButtonStyle1}"
Command="{Binding RemoveJob}"
CommandParameter="{Binding ElementName=JobDataGrid, Path=SelectedItem}">DeleteFile</Button>
</StackPanel>
</StackPanel>
</Border>
</Grid>
</Grid>
</UserControl>
......@@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:VECTO3GUI2020.Views.Multistage.CustomControls"
mc:Ignorable="d"
d:DesignHeight="30" d:DesignWidth="800" Name="filepickercustomcontrol" MinHeight="40" MaxHeight="30">
d:DesignHeight="30" d:DesignWidth="800" Name="filepickercustomcontrol" MinHeight="40">
<Grid Margin="4" VerticalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
......@@ -15,9 +15,9 @@
<ColumnDefinition Width="30px"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBox VerticalContentAlignment="Center" Padding="4" Margin = "0 0 0 0" IsReadOnly="True"
Text="{Binding Text, ElementName=filepickercustomcontrol}" HorizontalAlignment="Stretch"/>
Text="{Binding Text, ElementName=filepickercustomcontrol}" HorizontalAlignment="Stretch" TextWrapping="Wrap"/>
<Button Padding="4" Margin="4 0 0 0" Grid.Column="1" Command="{Binding Command, ElementName=filepickercustomcontrol}">
<Image Source="../../../Resources/folderpicker.ico">
<Image Source="../../../Resources/Icons/folderpicker.ico">
</Image>
</Button>
</Grid>
......
......@@ -16,11 +16,11 @@
</Grid.ColumnDefinitions>
</Grid>
<DockPanel Grid.Row="1" LastChildFill="False" DockPanel.Dock="Top" >
<Button DockPanel.Dock="Left" Style="{DynamicResource MultiStageButtonStyle1}"
<Button Width="100" DockPanel.Dock="Left" Style="{DynamicResource MultiStageButtonStyle1}"
Margin="4" Command="{Binding SwitchComponentViewCommand}" CommandParameter="Vehicle">Vehicle</Button>
<Button DockPanel.Dock="Left" Style="{DynamicResource MultiStageButtonStyle1}"
<Button Width="100" DockPanel.Dock="Left" Style="{DynamicResource MultiStageButtonStyle1}"
Margin="4" Command="{Binding SwitchComponentViewCommand}" CommandParameter="Airdrag">Airdrag</Button>
<Button DockPanel.Dock="Left" Style="{DynamicResource MultiStageButtonStyle1}"
<Button Width="100" DockPanel.Dock="Left" Style="{DynamicResource MultiStageButtonStyle1}"
Margin="4" Command="{Binding SwitchComponentViewCommand}" CommandParameter="Auxiliaries">Auxiliaries</Button>
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment