aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Resources/GraphEx.xaml126
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs16
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml2
5 files changed, 39 insertions, 137 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Resources/GraphEx.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Resources/GraphEx.xaml
deleted file mode 100644
index a44a8191c..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Resources/GraphEx.xaml
+++ /dev/null
@@ -1,126 +0,0 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:sys="clr-namespace:System;assembly=mscorlib"
- xmlns:local="clr-namespace:Tango.MachineStudio.Developer.Resources">
-
- <FontFamily x:Key="FontName">Segoe UI</FontFamily>
- <FontFamily x:Key="NotesFont">Lucida Console</FontFamily>
-
- <sys:Double x:Key="ExtraExtraLargeFontSize">28</sys:Double>
- <sys:Double x:Key="ExtraLargeFontSize">26</sys:Double>
- <sys:Double x:Key="LargeFontSize">20</sys:Double>
- <sys:Double x:Key="MediumFontSize">16</sys:Double>
- <sys:Double x:Key="SmallFontSize">14</sys:Double>
- <sys:Double x:Key="MiniFontSize">12</sys:Double>
- <sys:Double x:Key="TinyFontSize">9</sys:Double>
-
- <!--Colors-->
- <Color x:Key="borderColor">Silver</Color>
- <Color x:Key="graphGridLinesColor">#FFE9E9E9</Color>
- <Color x:Key="graphsMarkerColor">Gray</Color>
- <Color x:Key="materialColor">#03A9F4</Color>
-
-
- <!--Brushes-->
- <SolidColorBrush x:Key="borderBrush" Color="{StaticResource borderColor}"></SolidColorBrush>
- <SolidColorBrush x:Key="graphGridLinesBrush" Color="{StaticResource graphGridLinesColor}"></SolidColorBrush>
- <SolidColorBrush x:Key="BlackBrush" Color="#545454"></SolidColorBrush>
-
- <SolidColorBrush x:Key="graphGridLinesLightBrush" Color="{StaticResource graphGridLinesColor}"></SolidColorBrush>
- <SolidColorBrush x:Key="graphGridLinesDarkBrush" Color="#FF2E2E2E"></SolidColorBrush>
-
- <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Key="graphBackgroundLight">
- <GradientStop Color="White"/>
- <GradientStop Color="#FFE9E9E9" Offset="1"/>
- </LinearGradientBrush>
-
- <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Key="graphBackgroundDark">
- <GradientStop Color="Black"/>
- <GradientStop Color="#FF333333" Offset="1"/>
- </LinearGradientBrush>
-
- <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Key="graphBackground">
- <GradientStop Color="White"/>
- <GradientStop Color="#FFE9E9E9" Offset="1"/>
- </LinearGradientBrush>
-
- <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Key="graphLabelBackground" Opacity="0.7">
- <GradientStop Color="White"/>
- <GradientStop Color="#FFD9D9D9" Offset="1"/>
- </LinearGradientBrush>
-
- <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Key="graphLegendBackground" Opacity="0.7">
- <GradientStop Color="#FFE9E9E9"/>
- <GradientStop Color="#FFBDBDBD" Offset="1"/>
- </LinearGradientBrush>
-
- <SolidColorBrush Color="#FFF1F1F1" x:Key="topBarBackgroundBrush"></SolidColorBrush>
-
- <!--Navigation Link Button-->
- <Style x:Key="LinkButton" TargetType="Button">
- <Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <TextBlock FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}">
- <ContentPresenter /></TextBlock>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Setter Property="Foreground" Value="{StaticResource BlackBrush}" />
- <Style.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Opacity" Value="0.5"></Setter>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter Property="Foreground" Value="{StaticResource AccentColorBrush}" />
- </Trigger>
- <EventTrigger RoutedEvent="TouchUp">
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Foreground.Color" Duration="0" To="{StaticResource BlackColor}"></ColorAnimation>
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger>
- </Style.Triggers>
- </Style>
- <!--Navigation Link Button-->
-
-
- <!--Graph Label-->
- <Style x:Key="graphLabel" TargetType="Label">
- <Style.Setters>
- <Setter Property="IsHitTestVisible" Value="False"></Setter>
- <Setter Property="Margin" Value="-1 -1 0 0"></Setter>
- <Setter Property="HorizontalAlignment" Value="Left"></Setter>
- <Setter Property="VerticalAlignment" Value="Top"></Setter>
- <Setter Property="Padding" Value="0"></Setter>
- <Setter Property="ContentTemplate">
- <Setter.Value>
- <DataTemplate>
- <Border Width="Auto" Padding="0 0 20 0" Height="25" BorderBrush="{StaticResource AccentColorBrush}" BorderThickness="1" CornerRadius="0 0 30 0" Background="{StaticResource graphLabelBackground}" >
- <TextBlock Margin="5 0 0 0" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="{StaticResource TinyFontSize}" Text="{Binding}"></TextBlock>
- </Border>
- </DataTemplate>
- </Setter.Value>
- </Setter>
- </Style.Setters>
- </Style>
- <!--Graph Label-->
-
-
- <!--Graph Ticks Template-->
- <DataTemplate x:Key="graphTicksTemplate">
- <Ellipse Width="3" Height="3" Margin="0 0 0 0" Fill="{StaticResource AccentColorBrush}"></Ellipse>
- </DataTemplate>
- <!--Graph Ticks Template-->
-
- <DataTemplate x:Key="graphTooltipTemplate">
- <Border CornerRadius="5" BorderThickness="1" BorderBrush="White" Padding="8" MinWidth="50" Margin="20 0 20 0">
- <Border.Background>
- <SolidColorBrush Color="Black" Opacity="0.5"></SolidColorBrush>
- </Border.Background>
- <TextBlock Foreground="White" FontSize="10" HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding StringFormat='0.000'}"></TextBlock>
- </Border>
- </DataTemplate>
-</ResourceDictionary> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj
index 364b8573a..dd3f25074 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj
@@ -136,10 +136,6 @@
<Compile Include="Views\RunningJobView.xaml.cs">
<DependentUpon>RunningJobView.xaml</DependentUpon>
</Compile>
- <Page Include="Resources\GraphEx.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
<Page Include="Views\MainView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
index 4467b1f28..e9867d202 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
@@ -34,6 +34,13 @@
<Setter Property="Margin" Value="2" />
</Style>
+ <ResourceDictionary x:Key="SelectAllTextBoxResource">
+ <Style TargetType="TextBox">
+ <EventSetter Event="GotFocus" Handler="TextBox_GotFocus"></EventSetter>
+ <EventSetter Event="MouseDown" Handler="TextBox_PreviewMouseUp"></EventSetter>
+ </Style>
+ </ResourceDictionary>
+
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />
<converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter>
@@ -59,6 +66,7 @@
<localConverters:OneToPercentConverter x:Key="OneToPercentConverter"/>
<converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" />
<converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" />
+ <converters:IsNotConverter x:Key="IsNotConverter" />
<ObjectDataProvider x:Key="dispenserDivisions" MethodName="GetValues" ObjectType="{x:Type sys:Enum}">
@@ -474,7 +482,7 @@
</Grid>
-
+
</StackPanel>
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal" Margin="0 40 40 0">
@@ -617,13 +625,13 @@
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
- <ContentControl Style="{StaticResource numberBorder}" Width="60" Height="60" Margin="10 0 0 0">
+ <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Width="60" Height="60" Margin="10 0 0 0">
<ContentControl.Foreground>
<SolidColorBrush Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
</ContentControl.Foreground>
- <mahapps:NumericUpDown FontSize="16" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.0" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <mahapps:NumericUpDown FontSize="16" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.00" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
<mahapps:NumericUpDown.Resources>
- <Style TargetType="TextBox"/>
+ <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource>
</mahapps:NumericUpDown.Resources>
</mahapps:NumericUpDown>
</ContentControl>
@@ -969,6 +977,16 @@
<DataTrigger Binding="{Binding DispenserStepDivision}" Value="{x:Static dispensing:DispenserStepDivisions.Auto}">
<Setter Property="Content" Value="Auto"></Setter>
</DataTrigger>
+ <DataTrigger Binding="{Binding DispenserStepDivision,Converter={StaticResource IsNotConverter},ConverterParameter={x:Static dispensing:DispenserStepDivisions.Auto}}" Value="True">
+ <Setter Property="Content">
+ <Setter.Value>
+ <TextBlock>
+ <Run Text="{Binding PulsePerSecond,Mode=OneWay,StringFormat='0.0'}"></Run>
+ <Run Text="(pulse)" FontSize="9" Foreground="Gray"></Run>
+ </TextBlock>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
</Style.Triggers>
</Style>
</Label.Style>
@@ -1217,7 +1235,7 @@
<TextBox materialDesign:HintAssist.Hint="Table Name" DockPanel.Dock="Top" Text="{Binding Name}"></TextBox>
<WrapPanel Orientation="Vertical" Margin="0 5 0 0">
<WrapPanel.Resources>
- <Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
+ <Style TargetType="TextBlock">
<Setter Property="FontSize" Value="10"></Setter>
<Setter Property="Foreground" Value="#7A7A7A"></Setter>
<Setter Property="Margin" Value="0 5 0 5"></Setter>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs
index 27ea3cae8..5e8a72378 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs
@@ -1,4 +1,5 @@
-using System;
+using MahApps.Metro.Controls;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -133,5 +134,18 @@ namespace Tango.MachineStudio.Developer.Views
{
_vm.OnDropSegment(e.Draggable.DataContext as Segment, e.Droppable.DataContext as Segment);
}
+
+
+ private async void TextBox_GotFocus(object sender, RoutedEventArgs e)
+ {
+ await Task.Delay(200);
+ TextBox txtBox = sender as TextBox;
+ txtBox.SelectAll();
+ }
+
+ private void TextBox_PreviewMouseUp(object sender, MouseButtonEventArgs e)
+ {
+ e.Handled = true;
+ }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml
index fcb730de7..5403ef8a7 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml
@@ -80,7 +80,7 @@
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 0 10 0">
<materialDesign:PackIcon Kind="Magnify" Width="26" Height="26"/>
- <TextBox Width="300" materialDesign:HintAssist.Hint="Search" Text="{Binding JobFilter,UpdateSourceTrigger=PropertyChanged}"></TextBox>
+ <TextBox Width="300" materialDesign:HintAssist.Hint="Search name, user, length..." Text="{Binding JobFilter,UpdateSourceTrigger=PropertyChanged}"></TextBox>
</StackPanel>
</Grid>