aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2019-11-28 10:44:56 +0200
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2019-11-28 10:44:56 +0200
commit6fe4ca9ac3847955d44dd94479d65a3284661808 (patch)
treed7e78d5b66590446e959603504e479cc2a6de54f /Software/Visual_Studio/Tango.Touch
parentfcc0cb38248c6115f8f1883ca6cebc4c376c486d (diff)
downloadTango-6fe4ca9ac3847955d44dd94479d65a3284661808.tar.gz
Tango-6fe4ca9ac3847955d44dd94479d65a3284661808.zip
Fixed bug with job title length too long to display.
Added job name length validation job entity. Implemented TouchRadioButton. Related Work Items: #1449
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchRadioButton.cs18
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchRadioButton.xaml41
-rw-r--r--Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj7
-rw-r--r--Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml1
4 files changed, 66 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchRadioButton.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchRadioButton.cs
new file mode 100644
index 000000000..88fd4906d
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchRadioButton.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+using System.Windows;
+
+namespace Tango.Touch.Controls
+{
+ public class TouchRadioButton : RadioButton
+ {
+ static TouchRadioButton()
+ {
+ DefaultStyleKeyProperty.OverrideMetadata(typeof(TouchRadioButton), new FrameworkPropertyMetadata(typeof(TouchRadioButton)));
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchRadioButton.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchRadioButton.xaml
new file mode 100644
index 000000000..e854f9fcb
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchRadioButton.xaml
@@ -0,0 +1,41 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:components="clr-namespace:Tango.Touch.Components"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:fa="http://schemas.fontawesome.io/icons/"
+ xmlns:local="clr-namespace:Tango.Touch.Controls">
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="../Resources/Colors.xaml" />
+ <ResourceDictionary>
+ <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
+ </ResourceDictionary>
+ </ResourceDictionary.MergedDictionaries>
+ <Style TargetType="{x:Type local:TouchRadioButton}">
+ <Setter Property="Background" Value="Transparent"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
+ <Setter Property="BorderThickness" Value="1"></Setter>
+ <Setter Property="BorderBrush" Value="{StaticResource TangoGrayBrush}"></Setter>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
+ <Setter Property="MinHeight" Value="40"></Setter>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type local:TouchRadioButton}">
+ <Border Padding="{TemplateBinding Padding}" Background="Transparent">
+ <components:Ripple RippleBrush="{StaticResource TangoRippleDarkBrush}" RippleFactor="20" >
+ <BulletDecorator Background="Transparent" VerticalAlignment="Center">
+ <BulletDecorator.Bullet>
+ <Grid Width="30" Height="30">
+ <Ellipse x:Name="Ellipse_Border" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1"/>
+ <Ellipse Margin="8" x:Name="CheckMark" Fill="{TemplateBinding Foreground}" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:TouchRadioButton},Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}"/>
+ </Grid>
+ </BulletDecorator.Bullet>
+ <ContentPresenter TextElement.Foreground="{StaticResource TangoDarkForegroundBrush}" Margin="10 0 0 0" VerticalAlignment="Center" Content="{TemplateBinding Content}"></ContentPresenter>
+ </BulletDecorator>
+ </components:Ripple>
+ </Border>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+</ResourceDictionary> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj b/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj
index 60817f8f8..60488e80d 100644
--- a/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj
+++ b/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj
@@ -86,6 +86,7 @@
<Compile Include="Controls\TouchNativeListBox.cs" />
<Compile Include="Controls\TouchNumericTextBox.cs" />
<Compile Include="Controls\TouchProgressBar.cs" />
+ <Compile Include="Controls\TouchRadioButton.cs" />
<Compile Include="Controls\TouchRingProgress.cs" />
<Compile Include="Controls\TouchSimpleDataGrid.cs" />
<Compile Include="Controls\TouchSlider.cs" />
@@ -214,6 +215,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="Controls\TouchRadioButton.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Controls\TouchRingProgress.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -410,7 +415,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml b/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml
index f5b8f3caa..69494d87b 100644
--- a/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml
@@ -28,6 +28,7 @@
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchTextBox.xaml" />
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchListBox.xaml" />
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchCheckBox.xaml" />
+ <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchRadioButton.xaml" />
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchComboBox.xaml" />
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchExpander.xaml" />
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchToggleSlider.xaml" />