diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch')
4 files changed, 362 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchPanelEurekaNoKeyboard.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchPanelEurekaNoKeyboard.cs new file mode 100644 index 000000000..75dcba67f --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchPanelEurekaNoKeyboard.cs @@ -0,0 +1,25 @@ +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; + +namespace Tango.Touch.Controls +{ + public class TouchPanelEurekaNoKeyboard : TouchPanelEureka + { + static TouchPanelEurekaNoKeyboard() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(TouchPanelEurekaNoKeyboard), new FrameworkPropertyMetadata(typeof(TouchPanelEurekaNoKeyboard))); + } + } +} diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchPanelEurekaNoKeyboard.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchPanelEurekaNoKeyboard.xaml new file mode 100644 index 000000000..e25e96e60 --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchPanelEurekaNoKeyboard.xaml @@ -0,0 +1,330 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard" + xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" + xmlns:local="clr-namespace:Tango.Touch.Controls"> + + <ResourceDictionary.MergedDictionaries> + <ResourceDictionary Source="../Resources/Colors.xaml" /> + <ResourceDictionary Source="../Resources/Fonts.xaml" /> + <ResourceDictionary Source="../Styles/TouchButton.xaml" /> + <ResourceDictionary Source="../Styles/TouchIconButton.xaml" /> + + <ResourceDictionary> + <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" /> + <converters:NullObjectToBooleanConverter x:Key="NullObjectToBooleanConverter" /> + </ResourceDictionary> + </ResourceDictionary.MergedDictionaries> + + <Style x:Key="TangoMessageBoxTitle" TargetType="TextBlock"> + <Setter Property="FontSize" Value="{StaticResource TangoMessageBoxTitleFontSize}"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter> + </Style> + + <Style TargetType="local:TouchPanelEurekaNoKeyboard"> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="local:TouchPanelEurekaNoKeyboard"> + <Border Background="{TemplateBinding Background}"> + <Grid> + <!--<keyboard:KeyboardView>--> + <Grid> + + <DockPanel> + <ContentControl DockPanel.Dock="Top" Content="{TemplateBinding TaskBarElement}"></ContentControl> + + <!--Notification Bar--> + <!--<local:TouchNotificationBar NotificationBarVisibility="{TemplateBinding NotificationBarVisibility}" NotificationTemplate="{TemplateBinding NotificationTemplate}" HasNotifications="{TemplateBinding HasNotifications}" Notifications="{TemplateBinding Notifications}" ItemExpandedPropertyPath="{TemplateBinding ItemExpandedPropertyPath}">--> + <Grid> + <!--Content--> + <ContentPresenter Content="{TemplateBinding Content}" /> + </Grid> + <!--</local:TouchNotificationBar>--> + </DockPanel> + + <!--Dialogs--> + <Grid> + <Grid.Style> + <Style TargetType="Grid"> + <!--<Setter Property="Opacity" Value="0"></Setter>--> + <Setter Property="Visibility" Value="Hidden"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RelativeSource={RelativeSource TemplatedParent},Path=HasDialog}" Value="True"> + <Setter Property="Visibility" Value="Visible"></Setter> + <!--<DataTrigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation To="1" Storyboard.TargetProperty="Opacity" Duration="00:00:0.2" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.EnterActions>--> + </DataTrigger> + </Style.Triggers> + </Style> + </Grid.Style> + + <Grid Background="{StaticResource TangoPanelMaskBrushLight}" x:Name="PART_gridDialogsMask"> + <!--<i:Interaction.Triggers> + <i:EventTrigger EventName="MouseUp"> + <i:InvokeCommandAction Command="{Binding RelativeSource={RelativeSource TemplatedParent},Path=CurrentDialog.DataContext.CloseCommand}" /> + </i:EventTrigger> + </i:Interaction.Triggers>--> + </Grid> + + <Border x:Name="PART_dialogBorder" Background="{StaticResource TangoPrimaryBackgroundBrush}" CornerRadius="5" Padding="10" HorizontalAlignment="Center" VerticalAlignment="Center"> + <Border.Effect> + <DropShadowEffect Color="Gainsboro" BlurRadius="10" /> + </Border.Effect> + + <ContentPresenter Content="{Binding RelativeSource={RelativeSource TemplatedParent},Path=CurrentDialog}" /> + </Border> + </Grid> + + <!--Combo Box PopUp--> + <Grid Background="{StaticResource TangoPanelMaskBrushLight}" x:Name="PART_combobox_grid"> + <Grid.Style> + <Style TargetType="Grid"> + <Setter Property="Opacity" Value="0"></Setter> + <Setter Property="Visibility" Value="Hidden"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RelativeSource={RelativeSource TemplatedParent},Path=CurrentComboBox,Converter={StaticResource NullObjectToBooleanConverter}}" Value="True"> + <Setter Property="Visibility" Value="Visible"></Setter> + <DataTrigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation To="1" Storyboard.TargetProperty="Opacity" Duration="00:00:0.2" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.EnterActions> + </DataTrigger> + </Style.Triggers> + </Style> + </Grid.Style> + + <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent},Path=CurrentComboBox}" VerticalAlignment="Center" HorizontalAlignment="Center"> + <Border Background="{StaticResource TangoPrimaryBackgroundBrush}" CornerRadius="5" Margin="10"> + <Border.Effect> + <DropShadowEffect BlurRadius="10" /> + </Border.Effect> + + <Grid ClipToBounds="True"> + <DockPanel> + <Grid DockPanel.Dock="Top"> + <Border CornerRadius="5 5 0 0" Background="{StaticResource TangoPopupTitleBackgroundBrush}" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0 0 0 1" Padding="30"> + <TextBlock DockPanel.Dock="Top" Text="{Binding Title}" FontSize="{StaticResource TangoComboBoxTitleFontSize}" FontWeight="SemiBold"></TextBlock> + </Border> + <local:TouchIconButton x:Name="PART_comboboxCloseButton" Background="Transparent" Padding="35" Style="{StaticResource TangoRoundTouchIconButton}" Command="{Binding CloseCommand}" CommandParameter="{Binding}" HorizontalAlignment="Right" MaxHeight="90" Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}" Icon="Close" Foreground="{StaticResource TangoDarkForegroundBrush}" Opacity="0.5" /> + </Grid> + <local:TouchListBox x:Name="PART_ComboBoxList" Width="{Binding MinPopupWidth}" Height="{Binding MinPopupHeight}" ItemSelectedCommand="{Binding RelativeSource={RelativeSource AncestorType=local:TouchPanel},Path=ComboBoxPickedCommand}" ItemsSource="{Binding ItemsSource}" SelectedItem="{Binding SelectedItem,Mode=TwoWay}" SelectionMode="None" ItemTemplate="{Binding ItemTemplate}" ValuePath="{Binding ValuePath}" VerticalAlignment="Top" > + + </local:TouchListBox> + </DockPanel> + </Grid> + </Border> + </Grid> + </Grid> + + <!--Date Picker--> + <Grid Background="{StaticResource TangoPanelMaskBrushLight}" x:Name="PART_datepicker_grid"> + <Grid.Style> + <Style TargetType="Grid"> + <Setter Property="Opacity" Value="0"></Setter> + <Setter Property="Visibility" Value="Hidden"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RelativeSource={RelativeSource TemplatedParent},Path=CurrentDatePicker,Converter={StaticResource NullObjectToBooleanConverter}}" Value="True"> + <Setter Property="Visibility" Value="Visible"></Setter> + <DataTrigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation To="1" Storyboard.TargetProperty="Opacity" Duration="00:00:0.2" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.EnterActions> + </DataTrigger> + </Style.Triggers> + </Style> + </Grid.Style> + + <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent},Path=CurrentDatePicker}" VerticalAlignment="Center" HorizontalAlignment="Center"> + <Border Background="{StaticResource TangoPrimaryBackgroundBrush}" CornerRadius="5" Margin="10" HorizontalAlignment="Center" VerticalAlignment="Center"> + <Border.Effect> + <DropShadowEffect BlurRadius="10" /> + </Border.Effect> + + <DockPanel> + <StackPanel Margin="0 40 0 10" DockPanel.Dock="Bottom" HorizontalAlignment="Right" Orientation="Horizontal"> + <local:TouchButton Command="{Binding RelativeSource={RelativeSource TemplatedParent},Path=CancelDateCommand}" Width="120" Margin="2 0" Style="{StaticResource TangoMessageBoxButton}">CANCEL</local:TouchButton> + <local:TouchButton Command="{Binding RelativeSource={RelativeSource TemplatedParent},Path=DateSelectedCommand}" Width="120" Margin="2 0" Style="{StaticResource TangoMessageBoxButton}">OK</local:TouchButton> + </StackPanel> + + <Viewbox Width="470" Stretch="Uniform"> + <local:TouchCalendar Width="370" x:Name="PART_calendar" Focusable="False" + SelectedDate="{Binding RelativeSource={RelativeSource TemplatedParent},Path=CurrentDatePicker.SelectedDate,Mode=OneWay}" + DisplayDateStart="{Binding RelativeSource={RelativeSource TemplatedParent},Path=CurrentDatePicker.DisplayDateStart,Mode=OneWay}" + DisplayDateEnd="{Binding RelativeSource={RelativeSource TemplatedParent},Path=CurrentDatePicker.DisplayDateEnd,Mode=OneWay}"/> + </Viewbox> + </DockPanel> + </Border> + </Grid> + </Grid> + + <!--Messages--> + <Grid Background="{StaticResource TangoPanelMaskBrushLight}"> + <Grid.Style> + <Style TargetType="Grid"> + <!--<Setter Property="Opacity" Value="0"></Setter>--> + <Setter Property="Visibility" Value="Hidden"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RelativeSource={RelativeSource TemplatedParent},Path=HasMessageBox}" Value="True"> + <Setter Property="Visibility" Value="Visible"></Setter> + <!--<DataTrigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation To="1" Storyboard.TargetProperty="Opacity" Duration="00:00:0.2" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.EnterActions>--> + </DataTrigger> + </Style.Triggers> + </Style> + </Grid.Style> + + <Grid Height="400" Margin="20" RenderTransformOrigin="0.5,0.5"> + <Grid.Style> + <Style TargetType="Grid"> + <Setter Property="RenderTransform"> + <Setter.Value> + <ScaleTransform ScaleX="0" ScaleY="0" /> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RelativeSource={RelativeSource TemplatedParent},Path=HasMessageBox}" Value="True"> + <DataTrigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" From="0" To="1" Duration="00:00:0.1" /> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="00:00:0.1" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.EnterActions> + <DataTrigger.ExitActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" From="1" To="0" Duration="00:00:0.1" /> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="00:00:0.1" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.ExitActions> + </DataTrigger> + </Style.Triggers> + </Style> + </Grid.Style> + + <Border DataContext="{Binding RelativeSource={RelativeSource TemplatedParent},Path=CurrentMessageBox}" Background="{StaticResource TangoPrimaryBackgroundBrush}" CornerRadius="5" Margin="10"> + <Border.Effect> + <DropShadowEffect BlurRadius="10" /> + </Border.Effect> + <Grid ClipToBounds="True"> + <DockPanel> + <Grid DockPanel.Dock="Top"> + <Border CornerRadius="5 5 0 0" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0 0 0 1" Padding="30" Background="{Binding HeaderBrush}"> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> + <local:TouchIcon Width="24" Height="24" Icon="{Binding Icon}" Margin="0 0 20 0" Foreground="{Binding Brush}" /> + <TextBlock Text="{Binding Title}" FontSize="{StaticResource TangoMessageBoxTitleFontSize}" FontWeight="Normal"></TextBlock> + </StackPanel> + </Border> + <local:TouchIconButton Background="Transparent" Padding="35" Style="{StaticResource TangoRoundTouchIconButton}" Command="{Binding CloseCommand}" CommandParameter="{Binding}" HorizontalAlignment="Right" MaxHeight="90" Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}" Icon="Close" Foreground="{StaticResource TangoDarkForegroundBrush}" Opacity="0.5" /> + </Grid> + + <StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom" HorizontalAlignment="Center" Height="50" Margin="0 0 0 40"> + <local:TouchButton x:Name="btnCancel" FontWeight="Normal" CornerRadius="25" Width="220" FontSize="{StaticResource TangoMessageBoxButtonFontSize}" Margin="0 0 30 0" Style="{StaticResource TangoHollowButton}" Command="{Binding CloseCommand}" Visibility="{Binding HasCancel,Converter={StaticResource BooleanToVisibilityConverter}}">CANCEL</local:TouchButton> + <local:TouchButton x:Name="btnOK" FontWeight="Normal" Width="220" CornerRadius="25" FontSize="{StaticResource TangoMessageBoxButtonFontSize}" Margin="30 0 0 0" Style="{StaticResource TangoHollowButton}" Command="{Binding OKCommand}">OK</local:TouchButton> + </StackPanel> + + <TextBlock FontSize="{StaticResource TangoMessageBoxMessageFontSize}" Text="{Binding Message}" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap" Margin="10 0"></TextBlock> + + </DockPanel> + </Grid> + </Border> + </Grid> + </Grid> + + <!--Busy--> + <Grid Background="{StaticResource TangoPanelMaskBrushLight}"> + <Grid.Style> + <Style TargetType="Grid"> + <Setter Property="Visibility" Value="Hidden"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RelativeSource={RelativeSource TemplatedParent},Path=IsBusy}" Value="True"> + <Setter Property="Visibility" Value="Visible"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Grid.Style> + + <Grid MinHeight="390" Margin="20" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center"> + <Grid.Style> + <Style TargetType="Grid"> + <Setter Property="RenderTransform"> + <Setter.Value> + <ScaleTransform ScaleX="0" ScaleY="0" /> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RelativeSource={RelativeSource TemplatedParent},Path=IsBusy}" Value="True"> + <DataTrigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" From="0" To="1" Duration="00:00:0.1" /> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="00:00:0.1" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.EnterActions> + <DataTrigger.ExitActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" From="1" To="0" Duration="00:00:0.1" /> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="00:00:0.1" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.ExitActions> + </DataTrigger> + </Style.Triggers> + </Style> + </Grid.Style> + + <Border Background="{StaticResource TangoPrimaryBackgroundBrush}" CornerRadius="5" Margin="10"> + <Border.Effect> + <DropShadowEffect BlurRadius="10" /> + </Border.Effect> + <Grid ClipToBounds="True"> + <DockPanel> + <Grid DockPanel.Dock="Top"> + <Border CornerRadius="5 5 0 0" Background="{StaticResource TangoPopupTitleBackgroundBrush}" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0 0 0 1" Padding="30"> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> + <local:TouchIcon Width="24" Height="24" Icon="ProgressClock" Margin="0 0 20 0" Foreground="{StaticResource TangoPrimaryAccentBrush}" /> + <TextBlock Text="Working" FontSize="{StaticResource TangoMessageBoxTitleFontSize}" FontWeight="Normal"></TextBlock> + </StackPanel> + </Border> + </Grid> + + <local:TouchBusyIndicator DockPanel.Dock="Bottom" Margin="0 0 0 40" IsIndeterminate="{Binding RelativeSource={RelativeSource TemplatedParent},Path=IsBusy}" Width="100" Height="100"></local:TouchBusyIndicator> + + <TextBlock FontSize="{StaticResource TangoMessageBoxMessageFontSize}" Text="{Binding RelativeSource={RelativeSource TemplatedParent},Path=BusyMessage}" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap"></TextBlock> + </DockPanel> + </Grid> + </Border> + </Grid> + </Grid> + </Grid> + <!--</keyboard:KeyboardView>--> + </Grid> + </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 1096ec112..e9145b27c 100644 --- a/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj +++ b/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj @@ -72,6 +72,7 @@ <Compile Include="Controls\TouchCalendar.cs" /> <Compile Include="Controls\TouchCheckBox.cs" /> <Compile Include="Controls\TouchClickableControl.cs" /> + <Compile Include="Controls\TouchPanelEurekaNoKeyboard.cs" /> <Compile Include="Controls\TouchPanelEureka.cs" /> <Compile Include="TouchColorPickerControls\MultiRangeSlider.cs" /> <Compile Include="TouchColorPickerControls\TouchSliderThreeThumbs.cs" /> @@ -149,6 +150,10 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="Controls\TouchPanelEurekaNoKeyboard.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> <Page Include="Controls\TouchPanelEureka.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> @@ -502,7 +507,7 @@ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> + <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> </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 8b49ccc6b..0f9e77059 100644 --- a/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml +++ b/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml @@ -67,6 +67,7 @@ <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchPanel.xaml" /> <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchPanelEureka.xaml" /> + <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchPanelEurekaNoKeyboard.xaml" /> <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/TouchColorPickerControls/TouchColorPickerSlider.xaml"/> <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/TouchColorPickerControls/TouchColorPickerControl.xaml"/> <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/TouchColorPickerControls/TouchColorPickerHSBControl.xaml"/> |
