aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-12-30 18:18:27 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-12-30 18:18:27 +0200
commit62abc03d76ecfd8ab16ffefe6a4f6a7b94f62203 (patch)
tree58a7ce6bc30d7e049bf2b4c1aa272306796350eb /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls
parent80221695b6c6fd48f7a3e2e70850e68788560b31 (diff)
parent71e6a3ec2197eba8b5e1b295914653426064f745 (diff)
downloadTango-62abc03d76ecfd8ab16ffefe6a4f6a7b94f62203.tar.gz
Tango-62abc03d76ecfd8ab16ffefe6a4f6a7b94f62203.zip
BAD MERGE.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobSummeryViewer.xaml131
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobSummeryViewer.xaml.cs56
2 files changed, 0 insertions, 187 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobSummeryViewer.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobSummeryViewer.xaml
deleted file mode 100644
index eeb25dc83..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobSummeryViewer.xaml
+++ /dev/null
@@ -1,131 +0,0 @@
-<UserControl x:Class="Tango.MachineStudio.Developer.Controls.JobSummeryViewer"
- 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:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL"
- 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.MachineStudio.Developer.Controls"
- mc:Ignorable="d"
- d:DesignHeight="60" d:DesignWidth="500" Height="38" d:DataContext="{d:DesignInstance Type=entities:Job, IsDesignTimeCreatable=False}" x:Name="control">
-
- <UserControl.Resources>
- <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
- <converters:SegmentLengthToWidthConverter x:Key="SegmentLengthToWidthConverter" />
- <converters:SmallerThanToBooleanConverter x:Key="SmallerThanToBooleanConverter" />
- <converters:WidthHeightToRectConverter x:Key="WidthHeightToRectConverter" />
-
- </UserControl.Resources>
-
-
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="1*" />
- </Grid.RowDefinitions>
-
- <ItemsControl ClipToBounds="False" ItemsSource="{Binding EffectiveSegments,IsAsync=True}" Visibility="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DisplayMarkers,Converter={StaticResource BooleanToVisibilityConverter}}">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel Orientation="Horizontal" ClipToBounds="False"></StackPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid x:Name="grid">
- <Grid.Width>
- <MultiBinding Converter="{StaticResource SegmentLengthToWidthConverter}">
- <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.Length"></Binding>
- <Binding RelativeSource="{RelativeSource AncestorType=ItemsControl}" Path="ActualWidth"></Binding>
- <Binding Path="LengthWithFactor"></Binding>
- </MultiBinding>
- </Grid.Width>
-
- <TextBlock HorizontalAlignment="Center" FontSize="10">
- <TextBlock.Style>
- <Style TargetType="TextBlock">
- <Setter Property="Visibility" Value="Visible"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding ElementName=grid,Path=ActualWidth,Converter={StaticResource SmallerThanToBooleanConverter},ConverterParameter=20}" Value="True">
- <Setter Property="Visibility" Value="Collapsed"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </TextBlock.Style>
- <Run Text="{Binding LengthWithFactor,Mode=OneWay,StringFormat=N0,IsAsync=True}"></Run><Run Text="m"></Run>
- </TextBlock>
- </Grid>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
-
- <Border Grid.Row="1" x:Name="brush_border" ClipToBounds="False" CornerRadius="10" Margin="0 5 0 0">
- <Border.Clip>
- <RectangleGeometry RadiusX="10" RadiusY="10">
- <RectangleGeometry.Rect>
- <MultiBinding Converter="{StaticResource WidthHeightToRectConverter}">
- <Binding ElementName="brush_border" Path="ActualWidth" />
- <Binding ElementName="brush_border" Path="ActualHeight" />
- </MultiBinding>
- </RectangleGeometry.Rect>
- </RectangleGeometry>
- </Border.Clip>
- <!--<Border.Background>
- --><!--<ImageBrush ImageSource="../Images/JobView/transparent_small.jpg" Stretch="None" TileMode="Tile" AlignmentX="Left" ViewportUnits="Absolute" Viewport="0,0,94,30" />--><!--
- </Border.Background>-->
- <Grid>
- <ItemsControl ClipToBounds="False" ItemsSource="{Binding EffectiveSegments,IsAsync=True}">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel Orientation="Horizontal" ClipToBounds="False"></StackPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid>
- <Grid.Width>
- <MultiBinding Converter="{StaticResource SegmentLengthToWidthConverter}">
- <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.Length"></Binding>
- <Binding RelativeSource="{RelativeSource AncestorType=ItemsControl}" Path="ActualWidth"></Binding>
- <Binding Path="LengthWithFactor"></Binding>
- </MultiBinding>
- </Grid.Width>
- <Rectangle Fill="{Binding SegmentBrush}"></Rectangle>
- </Grid>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
-
- <Rectangle Stroke="{StaticResource GrayBrush}" StrokeThickness="1" StrokeDashArray="5 5 5 5" RadiusX="8" RadiusY="8" />
- </Grid>
- </Border>
- </Grid>
-
- <Grid Grid.Column="1" VerticalAlignment="Bottom">
- <Grid.Style>
- <Style TargetType="Grid">
- <Setter Property="Visibility" Value="Collapsed"></Setter>
- <Style.Triggers>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding JobType}" Value="{x:Static enumerations:JobTypes.Embroidery}" />
- <Condition Binding="{Binding ElementName=control,Path=IsActive}" Value="False" />
- </MultiDataTrigger.Conditions>
- <Setter Property="Visibility" Value="Visible"></Setter>
- </MultiDataTrigger>
- </Style.Triggers>
- </Style>
- </Grid.Style>
-
- <TextBlock Margin="10 0 0 -2" VerticalAlignment="Center" FontSize="16">
- <Run Text="x"></Run><Run Text="{Binding NumberOfUnits}"></Run>
- </TextBlock>
- </Grid>
- </Grid>
-</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobSummeryViewer.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobSummeryViewer.xaml.cs
deleted file mode 100644
index daa0d30cf..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobSummeryViewer.xaml.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-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;
-using Tango.BL.Entities;
-
-namespace Tango.MachineStudio.Developer.Controls
-{
- /// <summary>
- /// Represents a <see cref="Job"/> summary viewer control.
- /// </summary>
- /// <seealso cref="System.Windows.Controls.UserControl" />
- /// <seealso cref="System.Windows.Markup.IComponentConnector" />
- public partial class JobSummeryViewer : UserControl
- {
- /// <summary>
- /// Maybe not necessary!
- /// </summary>
- public bool IsActive
- {
- get { return (bool)GetValue(IsActiveProperty); }
- set { SetValue(IsActiveProperty, value); }
- }
- public static readonly DependencyProperty IsActiveProperty =
- DependencyProperty.Register("IsActive", typeof(bool), typeof(JobSummeryViewer), new PropertyMetadata(false));
-
- /// <summary>
- /// Gets or sets a value indicating whether to display summery markers.
- /// </summary>
- public bool DisplayMarkers
- {
- get { return (bool)GetValue(DisplayMarkersProperty); }
- set { SetValue(DisplayMarkersProperty, value); }
- }
- public static readonly DependencyProperty DisplayMarkersProperty =
- DependencyProperty.Register("DisplayMarkers", typeof(bool), typeof(JobSummeryViewer), new PropertyMetadata(true));
-
- /// <summary>
- /// Initializes a new instance of the <see cref="JobSummeryViewer"/> class.
- /// </summary>
- public JobSummeryViewer()
- {
- InitializeComponent();
- }
- }
-}