aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-06-24 18:39:34 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-06-24 18:39:34 +0300
commit545f603c873cd026faf5560dae83da947f0a02a6 (patch)
tree8022cfdbe21c6aefd68e0c7994d756e611183ef8 /Software/Visual_Studio/PPC
parenta34ee775bfe3001f562627963a4472e7df8e30b0 (diff)
downloadTango-545f603c873cd026faf5560dae83da947f0a02a6.tar.gz
Tango-545f603c873cd026faf5560dae83da947f0a02a6.zip
Working on PPC!!!!!!
Diffstat (limited to 'Software/Visual_Studio/PPC')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml100
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml1
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs4
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj32
4 files changed, 132 insertions, 5 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml
index a7cc548dc..d66005016 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml
@@ -9,6 +9,8 @@
xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard;assembly=Tango.Touch"
xmlns:global="clr-namespace:Tango.PPC.Jobs"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
xmlns:local="clr-namespace:Tango.PPC.Jobs.Views"
mc:Ignorable="d"
d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:JobViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.JobViewVM}">
@@ -20,6 +22,11 @@
<Style TargetType="FrameworkElement" x:Key="Level2Container">
<Setter Property="Margin" Value="80 30 60 0"></Setter>
</Style>
+ <Style TargetType="FrameworkElement" x:Key="Level2ContainerExtraMargin">
+ <Setter Property="Margin" Value="80 40 60 0"></Setter>
+ </Style>
+
+ <converters:SegmentToBrushConverter x:Key="SegmentToBrushConverter" />
</UserControl.Resources>
<Grid Background="{StaticResource TangoMidBackgroundBrush}">
@@ -108,6 +115,99 @@
<touch:TouchComboBox Margin="20 0 0 0" ItemsSource="{Binding ColorSpaces}" SelectedItem="{Binding Job.ColorSpace}" DisplayMemberPath="Name" Title="Select Color Catalog/Space" />
</DockPanel>
+ <DockPanel LastChildFill="False" Style="{StaticResource Level2ContainerExtraMargin}" Height="40">
+ <StackPanel DockPanel.Dock="Left" Orientation="Horizontal">
+ <touch:TouchToggleIconButton x:Name="toggle_small_list" IsChecked="{Binding ElementName=toggle_large_list,Path=IsChecked,Mode=OneWay,Converter={StaticResource BooleanInverseConverter}}" DockPanel.Dock="Right" Icon="List" CheckedIcon="List" Padding="8" CornerRadius="20" />
+ <Rectangle HorizontalAlignment="Left" Stroke="{StaticResource TangoDividerBrush}" Margin="10 8" />
+ <touch:TouchToggleIconButton x:Name="toggle_large_list" IsChecked="{Binding ElementName=toggle_small_list,Path=IsChecked,Mode=OneWay,Converter={StaticResource BooleanInverseConverter}}" DockPanel.Dock="Right" Icon="ThList" CheckedIcon="ThList" Padding="8" CornerRadius="20" />
+ </StackPanel>
+
+ <touch:TouchToggleIconButton DockPanel.Dock="Right" Icon="Pencil" CheckedIcon="Pencil" Padding="8" CornerRadius="20" />
+ </DockPanel>
+
+ <ItemsControl Style="{StaticResource Level2Container}" ItemsSource="{Binding Job.Segments}">
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Border Margin="0 0 0 15" CornerRadius="8" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="1" BorderBrush="{StaticResource TangoGrayBrush}">
+ <Border.Style>
+ <Style TargetType="Border">
+ <Setter Property="Height" Value="163"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding ElementName=toggle_small_list,Path=IsChecked}" Value="True">
+ <Setter Property="Height" Value="74"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.5" Color="{StaticResource TangoDropShadowColor}" BlurRadius="10" ShadowDepth="15" />
+ </Border.Effect>
+
+ <DockPanel>
+ <Border DockPanel.Dock="Left" CornerRadius="8 0 0 8" Background="{Binding SegmentBrush}">
+ <Border.Style>
+ <Style TargetType="Border">
+ <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding ElementName=toggle_small_list,Path=IsChecked}" Value="True">
+ <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight,Converter={StaticResource MathOperatorConverter},ConverterParameter='*2'}"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
+ </Border>
+
+ <Grid>
+ <DockPanel Margin="30 0" VerticalAlignment="Center">
+ <TextBlock DockPanel.Dock="Top" FontSize="{StaticResource TangoTitleFontSize}">
+ <Run>Segment #</Run>
+ <Run Text="{Binding SegmentIndex,Mode=OneWay}"></Run>
+ </TextBlock>
+
+ <StackPanel Margin="0 30 0 0" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="300" Visibility="{Binding ElementName=toggle_large_list,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <DockPanel LastChildFill="False">
+ <TextBlock VerticalAlignment="Center" DockPanel.Dock="Left" Text="Color code:"></TextBlock>
+
+ <Grid DockPanel.Dock="Right" DataContext="{Binding BrushStops[0]}">
+ <ContentControl Focusable="False" FocusVisualStyle="{x:Null}" d:DataContext="{d:DesignInstance Type=entities:BrushStop, IsDesignTimeCreatable=False}" Content="{Binding}" Width="180">
+ <ContentControl.Style>
+ <Style TargetType="ContentControl">
+ <Setter Property="ContentTemplate" Value="{x:Null}"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Job.ColorSpace.Name}" Value="RGB">
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
+ <UniformGrid Rows="1" Columns="3">
+ <touch:TouchTextBox Margin="2 0" HorizontalContentAlignment="Center" Text="{Binding Red,UpdateSourceTrigger=PropertyChanged}" keyboard:KeyboardView.Container="{Binding ElementName=Container}" />
+ <touch:TouchTextBox Margin="2 0" HorizontalContentAlignment="Center" Text="{Binding Green,UpdateSourceTrigger=PropertyChanged}" keyboard:KeyboardView.Container="{Binding ElementName=Container}" />
+ <touch:TouchTextBox Margin="2 0" HorizontalContentAlignment="Center" Text="{Binding Blue,UpdateSourceTrigger=PropertyChanged}" keyboard:KeyboardView.Container="{Binding ElementName=Container}" />
+ </UniformGrid>
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ContentControl.Style>
+ </ContentControl>
+ </Grid>
+ </DockPanel>
+ <DockPanel LastChildFill="False" Margin="0 20 0 0">
+ <TextBlock VerticalAlignment="Center" DockPanel.Dock="Left" Text="Length (m):"></TextBlock>
+ <touch:TouchTextBox Width="180" DockPanel.Dock="Right" Text="{Binding Length,StringFormat=0.0}" />
+ </DockPanel>
+ </StackPanel>
+ </DockPanel>
+
+ <TextBlock HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 0 50 0" Text="{Binding Length,StringFormat={}{0:N1} m}"></TextBlock>
+ </Grid>
+ </DockPanel>
+ </Border>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+
<StackPanel HorizontalAlignment="Right" Style="{StaticResource Level2Container}" Orientation="Horizontal">
<touch:TouchButton Command="{Binding AddSolidSegmentCommand}" FontWeight="Normal" RippleBrush="{StaticResource TangoRippleDarkBrush}" FontSize="{StaticResource TangoDefaultFontSize}" EnableDropShadow="False" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="170" CornerRadius="20" Padding="0 10" Background="Transparent" BorderThickness="2" BorderBrush="{StaticResource TangoPrimaryAccentBrush}">
<StackPanel Orientation="Horizontal">
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml
index 37e2d8074..2629c6a14 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml
@@ -25,6 +25,7 @@
<converters:BooleanInverseConverter x:Key="BooleanInverseConverter" />
<converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />
<converters:DateTimeUTCToShortDateConverter x:Key="DateTimeUTCToShortDateConverter" />
+ <converters:MathOperatorConverter x:Key="MathOperatorConverter" />
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs
index 554bd704c..c8dc68291 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs
@@ -118,12 +118,12 @@ namespace Tango.PPC.UI.PPCApplication
// DataBaseSettings.DefaultDataSource = Path.Combine(PathHelper.GetUserTangoFolder(), "DB", "Tango.db");
//#endif
- CoreSettings.DefaultDataBaseSource = Path.Combine(PathHelper.GetUserTangoFolder(), "DB", "Tango.db");
+ CoreSettings.DefaultDataBaseSource = Path.Combine(PathHelper.GetUserTangoFolder(), "DB", "Tango.mdf");
if (!File.Exists(CoreSettings.DefaultDataBaseSource))
{
Directory.CreateDirectory(Path.GetDirectoryName(CoreSettings.DefaultDataBaseSource));
- File.Copy(Path.Combine(PathHelper.GetStartupPath(), "DB", "Tango.db"), CoreSettings.DefaultDataBaseSource);
+ File.Copy(Path.Combine(PathHelper.GetStartupPath(), "DB", "Tango.mdf"), CoreSettings.DefaultDataBaseSource);
}
var settings = SettingsManager.Default.GetOrCreate<PPCSettings>(); ;
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj
index d4c2bb037..c42924d2d 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj
@@ -15,6 +15,21 @@
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -189,8 +204,8 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
- <Content Include="..\..\..\DB\Tango.db">
- <Link>DB\Tango.db</Link>
+ <Content Include="..\..\..\DB\PPC\Tango.mdf">
+ <Link>DB\Tango.mdf</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="packages.config" />
@@ -278,7 +293,18 @@
<ItemGroup>
<Resource Include="Images\MessageBox Icons\information.png" />
</ItemGroup>
- <ItemGroup />
+ <ItemGroup>
+ <BootstrapperPackage Include=".NETFramework,Version=v4.6">
+ <Visible>False</Visible>
+ <ProductName>Microsoft .NET Framework 4.6 %28x86 and x64%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">