diff options
| author | Roy <roy.mail.net@gmail.com> | 2017-12-22 13:28:53 +0200 |
|---|---|---|
| committer | Roy <roy.mail.net@gmail.com> | 2017-12-22 13:28:53 +0200 |
| commit | 6091da506db1083f6ca707c24e509ca3470f6a73 (patch) | |
| tree | b6d87616e70e8035762aedab4271aeee4955f3a2 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common | |
| parent | 9989238711695810324960c82b1bd85fc67c570e (diff) | |
| download | Tango-6091da506db1083f6ca707c24e509ca3470f6a73.tar.gz Tango-6091da506db1083f6ca707c24e509ca3470f6a73.zip | |
Implemented Remote To Local File Synchronization.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common')
3 files changed, 118 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml index 482e852d6..58bb9ef34 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml @@ -1,5 +1,7 @@ <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:converters="clr-namespace:MaterialDesignThemes.Wpf.Converters;assembly=MaterialDesignThemes.Wpf" + xmlns:editors="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete" xmlns:local="clr-namespace:Tango.MachineStudio.Common.Resources"> <ResourceDictionary.MergedDictionaries> <!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! --> @@ -61,5 +63,116 @@ <SolidColorBrush x:Key="IdealForegroundDisabledBrush" Color="{DynamicResource Primary500}" Opacity="0.4" /> </ResourceDictionary> + <!--Styles--> + <ResourceDictionary> + + <BooleanToVisibilityConverter x:Key="BoolToVisConverter" /> + <converters:TextFieldHintVisibilityConverter x:Key="TextFieldHintVisibilityConverter" /> + + <Style TargetType="editors:AutoCompleteTextBox" > + <Setter Property="Focusable" Value="True" /> + <Setter Property="BorderThickness" Value="0 0 0 1"/> + <Setter Property="BorderBrush" Value="{DynamicResource MaterialDesignTextBoxBorder}" /> + <Setter Property="Background" Value="Transparent"/> + <!--<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>--> + <Setter Property="HorizontalContentAlignment" Value="Left"/> + <Setter Property="VerticalContentAlignment" Value="Top"/> + <Setter Property="FocusVisualStyle" Value="{x:Null}"/> + <Setter Property="AllowDrop" Value="true"/> + <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/> + <Setter Property="Stylus.IsFlicksEnabled" Value="False"/> + <Setter Property="Validation.ErrorTemplate" Value="{DynamicResource MaterialDesignValidationErrorTemplate}"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type editors:AutoCompleteTextBox}"> + <Grid> + <DockPanel> + <ContentPresenter ContentSource="Icon" + x:Name="PART_Icon" + Visibility="{TemplateBinding IconVisibility}" /> + <Grid> + <TextBlock x:Name="PART_Watermark" + Text="{TemplateBinding Watermark}" + Visibility="Collapsed" + VerticalAlignment="Center" + HorizontalAlignment="Left" + Focusable="False" + Foreground="Gray" + Margin="3,0" /> + <TextBox x:Name="PART_Editor" + Focusable="True" + HorizontalAlignment="Stretch" + VerticalAlignment="Center" + Style="{StaticResource ResourceKey=MaterialDesignTextBox}" + MaxLength="{Binding Path=MaxLength, RelativeSource={RelativeSource Mode=TemplatedParent}, Mode=TwoWay}" + CharacterCasing="{Binding Path=CharacterCasing, RelativeSource={RelativeSource Mode=TemplatedParent}, Mode=TwoWay}" + Text="{Binding Path=Text, RelativeSource={RelativeSource Mode=TemplatedParent}, Mode=TwoWay}" /> + </Grid> + </DockPanel> + <Popup x:Name="PART_Popup" + IsOpen="{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource Mode=TemplatedParent},Mode=TwoWay}" + Width="{TemplateBinding ActualWidth}" + HorizontalOffset="0" + MinHeight="25" + MaxHeight="600" + AllowsTransparency="True" + PopupAnimation="Slide" + Focusable="False"> + <Border Background="White" + BorderThickness="1" + BorderBrush="#BDBDBD" + CornerRadius="0" + Padding="2"> + <Grid> + <ListBox x:Name="PART_Selector" + ItemTemplate="{TemplateBinding ItemTemplate}" + ItemTemplateSelector="{TemplateBinding ItemTemplateSelector}" + Focusable="False" + BorderThickness="0" + MaxHeight="{Binding Path=MaxPopupHeight, RelativeSource={RelativeSource Mode=TemplatedParent},Mode=TwoWay}" + ScrollViewer.HorizontalScrollBarVisibility="Auto" + ScrollViewer.VerticalScrollBarVisibility="Auto" + > + </ListBox> + <Border Visibility="{Binding Path=IsLoading, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource ResourceKey=BoolToVisConverter}}"> + <ContentPresenter ContentSource="LoadingContent"/> + </Border> + </Grid> + </Border> + </Popup> + + </Grid> + <!--</Border>--> + <ControlTemplate.Triggers> + <Trigger Property="Text" + Value="" + SourceName="PART_Editor"> + <Setter Property="Visibility" + Value="Visible" + TargetName="PART_Watermark" /> + </Trigger> + <Trigger Property="IconPlacement" + Value="Left"> + <Setter Property="DockPanel.Dock" + Value="Left" + TargetName="PART_Icon" /> + </Trigger> + <Trigger Property="IconPlacement" + Value="Right"> + <Setter Property="DockPanel.Dock" + Value="Right" + TargetName="PART_Icon" /> + </Trigger> + <Trigger Property="Validation.HasError" Value="True"> + <Setter Property="BorderBrush" + Value="Red"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + </ResourceDictionary> + </ResourceDictionary.MergedDictionaries> </ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs index 0ee27fbf6..740c257b9 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs @@ -8,6 +8,7 @@ namespace Tango.MachineStudio.Common.StudioApplication { public interface IStudioApplicationManager { + bool IsShuttingDown { get;} void ShutDown(); } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj index 70962a2f7..32466e45a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj @@ -126,6 +126,10 @@ </None> </ItemGroup> <ItemGroup> + <ProjectReference Include="..\..\SideChains\Tango.AutoComplete\Tango.AutoComplete.csproj"> + <Project>{bb2abb74-ba58-4812-83aa-ec8171f42df4}</Project> + <Name>Tango.AutoComplete</Name> + </ProjectReference> <ProjectReference Include="..\..\Tango.Core\Tango.Core.csproj"> <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> <Name>Tango.Core</Name> |
