diff options
| author | Mirta <mirta@twine-s.com> | 2019-05-12 13:34:12 +0300 |
|---|---|---|
| committer | Mirta <mirta@twine-s.com> | 2019-05-12 13:34:12 +0300 |
| commit | 843774b4d84769783cf0100ad5a91ce3871c83b1 (patch) | |
| tree | 3323ea585fd8475d3720bb4912b62c86c4a7b0f9 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common | |
| parent | 3043e65ad539455ad2510e402e1c8f2d168577d2 (diff) | |
| parent | 524bc43f07339979eda1c812354a9a2e8e0f7e09 (diff) | |
| download | Tango-843774b4d84769783cf0100ad5a91ce3871c83b1.tar.gz Tango-843774b4d84769783cf0100ad5a91ce3871c83b1.zip | |
MERGE
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common')
9 files changed, 148 insertions, 184 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/IRealTimeGraph.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/IRealTimeGraph.cs deleted file mode 100644 index dcf2cdf81..000000000 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/IRealTimeGraph.cs +++ /dev/null @@ -1,35 +0,0 @@ -using RealTimeGraphEx; -using RealTimeGraphEx.Controllers; -using RealTimeGraphX; -using RealTimeGraphX.WPF.DataSeries; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Tango.MachineStudio.Common.Controls -{ - public interface IRealTimeGraph - { - /// <summary> - /// Gets or sets the name of the sensor. - /// </summary> - String DisplayName { get; set; } - - /// <summary> - /// Gets or sets the tag. - /// </summary> - Object Tag { get; set; } - - /// <summary> - /// Gets or sets the sensor units. - /// </summary> - String DisplayUnits { get; set; } - - /// <summary> - /// Gets or sets the inner graph controller. - /// </summary> - IGraphController<WpfDataSeries> Controller { get; set; } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml deleted file mode 100644 index b5e809a3e..000000000 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml +++ /dev/null @@ -1,65 +0,0 @@ -<UserControl x:Class="Tango.MachineStudio.Common.Controls.RealTimeGraphControl" - 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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" - xmlns:graphEx="clr-namespace:RealTimeGraphEx.FastGraphs;assembly=RealTimeGraphEx" - xmlns:graphX="clr-namespace:RealTimeGraphX.WPF.Surfaces;assembly=RealTimeGraphX.WPF" - xmlns:componentsX="clr-namespace:RealTimeGraphX.WPF.Components;assembly=RealTimeGraphX.WPF" - xmlns:components="clr-namespace:RealTimeGraphEx.Components;assembly=RealTimeGraphEx" - xmlns:converters="clr-namespace:Tango.MachineStudio.Common.Converters" - xmlns:local="clr-namespace:Tango.MachineStudio.Common.Controls" - mc:Ignorable="d" - d:DesignHeight="150" d:DesignWidth="300"> - - <UserControl.Resources> - <ResourceDictionary> - <ResourceDictionary.MergedDictionaries> - <ResourceDictionary Source="../Resources/MaterialDesign.xaml"></ResourceDictionary> - </ResourceDictionary.MergedDictionaries> - </ResourceDictionary> - </UserControl.Resources> - - <Grid > - <Border Background="{DynamicResource graphBackground}" Padding="20" CornerRadius="5" BorderThickness="1" BorderBrush="DodgerBlue"> - <Grid> - <Grid.RowDefinitions> - <RowDefinition Height="41*"/> - <RowDefinition Height="30"/> - </Grid.RowDefinitions> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="55"/> - <ColumnDefinition Width="438*"/> - </Grid.ColumnDefinitions> - - <Border BorderBrush="{StaticResource AccentColorBrush}" Margin="0 1 0 2"> - <componentsX:GraphAxisControl Foreground="DodgerBlue" Orientation="Vertical" FontSize="10" Surface="{Binding ElementName=Graph}" StringFormat="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=StringFormat}" /> - </Border> - <Border Grid.Column="1" BorderThickness="1" BorderBrush="#43A0E7FF" Margin="1 0 0 0"> - <Grid> - - <componentsX:GraphGridLines Foreground="#9B545454" /> - - <graphX:WpfGraphSurface x:Name="Graph" x:FieldModifier="public"> - - </graphX:WpfGraphSurface> - - <Grid> - <Label Style="{StaticResource graphLabel}"> - <StackPanel Orientation="Horizontal"> - <TextBlock Foreground="Gainsboro" FontSize="11" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DisplayName,FallbackValue='Dispenser Motor'}"></TextBlock> - <TextBlock Foreground="Gray" Margin="10 0 0 0" FontSize="11" FontFamily="Sylfaen Regular" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DisplayUnits,FallbackValue='(hz)'}"></TextBlock> - </StackPanel> - </Label> - </Grid> - </Grid> - </Border> - - <Border BorderBrush="{StaticResource AccentColorBrush}" Grid.Row="1" Grid.Column="1" Margin="3 0 2 0"> - <componentsX:GraphAxisControl Foreground="DodgerBlue" Orientation="Horizontal" FontSize="10" Surface="{Binding ElementName=Graph}" StringFormat="hh\:mm\:ss" /> - </Border> - </Grid> - </Border> - </Grid> -</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/WpfGraphControl.cs index f82196fed..68db76cd5 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/WpfGraphControl.cs @@ -1,6 +1,6 @@ -using System; +using RealTimeGraphX; +using System; using System.Collections.Generic; -using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -10,68 +10,79 @@ using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; -using System.Windows.Media.Animation; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -using RealTimeGraphEx; -using RealTimeGraphEx.Controllers; -using RealTimeGraphX; -using RealTimeGraphX.WPF.DataSeries; namespace Tango.MachineStudio.Common.Controls { - /// <summary> - /// Interaction logic for RealTimeGraphControl.xaml - /// </summary> - public partial class RealTimeGraphControl : UserControl, IRealTimeGraph + public class WpfGraphControl : Control { - #region Properties - - public String DisplayName + /// <summary> + /// Gets or sets the graph controller. + /// </summary> + public IGraphController Controller { - get { return (String)GetValue(DisplayNameProperty); } - set { SetValue(DisplayNameProperty, value); } + get { return (IGraphController)GetValue(ControllerProperty); } + set { SetValue(ControllerProperty, value); } } - public static readonly DependencyProperty DisplayNameProperty = - DependencyProperty.Register("DisplayName", typeof(String), typeof(RealTimeGraphControl), new PropertyMetadata(null)); + public static readonly DependencyProperty ControllerProperty = + DependencyProperty.Register("Controller", typeof(IGraphController), typeof(WpfGraphControl), new PropertyMetadata(null)); - public String DisplayUnits - { - get { return (String)GetValue(DisplayUnitsProperty); } - set { SetValue(DisplayUnitsProperty, value); } - } - public static readonly DependencyProperty DisplayUnitsProperty = - DependencyProperty.Register("DisplayUnits", typeof(String), typeof(RealTimeGraphControl), new PropertyMetadata(null)); + /// <summary> + /// Gets or sets the string format of the y-axis. + /// </summary> public String StringFormat { get { return (String)GetValue(StringFormatProperty); } set { SetValue(StringFormatProperty, value); } } public static readonly DependencyProperty StringFormatProperty = - DependencyProperty.Register("StringFormat", typeof(String), typeof(RealTimeGraphControl), new PropertyMetadata("0.0")); + DependencyProperty.Register("StringFormat", typeof(String), typeof(WpfGraphControl), new PropertyMetadata("0.0")); + /// <summary> + /// Gets or sets the display name. + /// </summary> + public String DisplayName + { + get { return (String)GetValue(DisplayNameProperty); } + set { SetValue(DisplayNameProperty, value); } + } + public static readonly DependencyProperty DisplayNameProperty = + DependencyProperty.Register("DisplayName", typeof(String), typeof(WpfGraphControl), new PropertyMetadata(null)); + - public IGraphController<WpfDataSeries> Controller + /// <summary> + /// Gets or sets the display units. + /// </summary> + public String DisplayUnits { - get { return (IGraphController<WpfDataSeries>)GetValue(ControllerProperty); } - set { SetValue(ControllerProperty, value); } + get { return (String)GetValue(DisplayUnitsProperty); } + set { SetValue(DisplayUnitsProperty, value); } } - public static readonly DependencyProperty ControllerProperty = - DependencyProperty.Register("Controller", typeof(IGraphController<WpfDataSeries>), typeof(RealTimeGraphControl), new PropertyMetadata(null,(d,e) => (d as RealTimeGraphControl).OnControllerChanged())); + public static readonly DependencyProperty DisplayUnitsProperty = + DependencyProperty.Register("DisplayUnits", typeof(String), typeof(WpfGraphControl), new PropertyMetadata(null)); - private void OnControllerChanged() + /// <summary> + /// Gets or sets the graph label visibility. + /// </summary> + public Visibility GraphLabelVisibility { - Controller.Output.Output.ConnectOutput(Graph); + get { return (Visibility)GetValue(GraphLabelVisibilityProperty); } + set { SetValue(GraphLabelVisibilityProperty, value); } } + public static readonly DependencyProperty GraphLabelVisibilityProperty = + DependencyProperty.Register("GraphLabelVisibility", typeof(Visibility), typeof(WpfGraphControl), new PropertyMetadata(Visibility.Visible)); - #endregion - public RealTimeGraphControl() + /// <summary> + /// Initializes the <see cref="WpfGraphControl"/> class. + /// </summary> + static WpfGraphControl() { - InitializeComponent(); + DefaultStyleKeyProperty.OverrideMetadata(typeof(WpfGraphControl), new FrameworkPropertyMetadata(typeof(WpfGraphControl))); } } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs index 8347c3144..79c032967 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs @@ -218,7 +218,7 @@ namespace Tango.MachineStudio.Common.EventLogging } } - LogManager.Log("Logging event " + machineEvent.EventType.Name + " - " + machineEvent.Description); + LogManager.Log("Logging event " + machineEvent.EventType.Name); machineEvent.MachineGuid = _application.Machine.Guid; machineEvent.UserGuid = _authentication.CurrentUser.Guid; machineEvent.User = _authentication.CurrentUser; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs index e5fe63d87..0433ff7be 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs @@ -146,7 +146,7 @@ namespace Tango.MachineStudio.Common StudioModulesBounds = new List<StudioModuleBounds>(); Environment = WorkingEnvironment.Remote; DeploymentSlot = DeploymentSlot.DEV; - JobUploadStrategy = JobUploadStrategy.Default; + JobUploadStrategy = JobUploadStrategy.JobDescriptionFile; MaximumCacheTime = TimeSpan.FromMinutes(5); CachingMode = ObservablesContextInMemoryCachingMode.None; } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs index fb5fbc27c..92326f26f 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs @@ -201,8 +201,10 @@ namespace Tango.MachineStudio.Common.Publish using (ZipFile zip = new ZipFile()) { - zip.AddDirectory(Path.Combine(folder, "x86"), "/x86"); - zip.AddDirectory(Path.Combine(folder, "x64"), "/x64"); + foreach (var directory in Directory.GetDirectories(folder)) + { + zip.AddDirectory(directory, $"/{Path.GetFileName(directory)}"); + } var files = Directory.GetFiles(folder, "*.*", SearchOption.TopDirectoryOnly).ToList(); @@ -219,6 +221,7 @@ namespace Tango.MachineStudio.Common.Publish } }; + zip.ParallelDeflateThreshold = -1; zip.Save(tempFile); } 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 2f65fe817..d90d03545 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml @@ -235,39 +235,12 @@ <GradientStop Color="#FF333333" Offset="1"/> </LinearGradientBrush> - <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Key="graphLabelBackground" Opacity="0.7"> - <GradientStop Color="#252525"/> - <GradientStop Color="#FF4E4E4E" Offset="1"/> - </LinearGradientBrush> - <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Key="graphLegendBackground" Opacity="0.7"> - <GradientStop Color="#FF848484"/> - <GradientStop Color="#FF282828" Offset="1"/> - </LinearGradientBrush> <SolidColorBrush Color="#FFF1F1F1" x:Key="topBarBackgroundBrush"></SolidColorBrush> <!--Brushes--> - <!--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}" > - <Label Margin="5 0 0 0" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="12" Content="{Binding}"></Label> - </Border> - </DataTemplate> - </Setter.Value> - </Setter> - </Style.Setters> - </Style> - <!--Graph Label--> + <!--Graph Ticks Template--> 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 3c272892b..897c4f72d 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 @@ -62,6 +62,7 @@ <Reference Include="System" /> <Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> <Reference Include="System.Runtime.Serialization" /> <Reference Include="System.ServiceModel" /> <Reference Include="System.Speech" /> @@ -89,6 +90,7 @@ <Compile Include="Controls\MachineView.xaml.cs"> <DependentUpon>MachineView.xaml</DependentUpon> </Compile> + <Compile Include="Controls\WpfGraphControl.cs" /> <Compile Include="Converters\UserRoleToBooleanConverter.cs" /> <Compile Include="Converters\UserRoleToVisibilityConverter.cs" /> <Compile Include="Web\LoginRequest.cs" /> @@ -102,11 +104,7 @@ <Compile Include="Controls\HiveComboControl.xaml.cs"> <DependentUpon>HiveComboControl.xaml</DependentUpon> </Compile> - <Compile Include="Controls\IRealTimeGraph.cs" /> <Compile Include="Controls\LoadingPanel.cs" /> - <Compile Include="Controls\RealTimeGraphControl.xaml.cs"> - <DependentUpon>RealTimeGraphControl.xaml</DependentUpon> - </Compile> <Compile Include="Controls\TableGrid.cs" /> <Compile Include="Converters\PermissionToVisibilityConverter.cs" /> <None Include="Converters\SecondsToGraphPointsConverter.cs" /> @@ -179,10 +177,6 @@ <Compile Include="Navigation\INavigationManager.cs" /> <Compile Include="Navigation\NavigationView.cs" /> <Compile Include="Notifications\INotificationProvider.cs" /> - <Page Include="Controls\RealTimeGraphControl.xaml"> - <SubType>Designer</SubType> - <Generator>MSBuild:Compile</Generator> - </Page> <Page Include="Resources\GradientOffsetSlider.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> @@ -225,16 +219,12 @@ </None> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\SideChains\RealTimeGraphEx\RealTimeGraphEx.csproj"> - <Project>{b9ae25d6-be35-492f-9079-21a7f3e6f7cc}</Project> - <Name>RealTimeGraphEx</Name> - </ProjectReference> - <ProjectReference Include="..\..\SideChains\RealTimeGraphX.WPF\RealTimeGraphX.WPF.csproj"> - <Project>{99d233c5-fee7-418e-9c25-d4584cb52e28}</Project> + <ProjectReference Include="..\..\SideChains\RealTimeGraphX-master\RealTimeGraphX.WPF\RealTimeGraphX.WPF.csproj"> + <Project>{6b9774f7-960d-438e-ad81-c6b9be328d50}</Project> <Name>RealTimeGraphX.WPF</Name> </ProjectReference> - <ProjectReference Include="..\..\SideChains\RealTimeGraphX\RealTimeGraphX.csproj"> - <Project>{6d55a3b8-46d3-493a-a143-aebd2b98d683}</Project> + <ProjectReference Include="..\..\SideChains\RealTimeGraphX-master\RealTimeGraphX\RealTimeGraphX.csproj"> + <Project>{f13a489c-80ee-4cd0-bdd4-92d959215646}</Project> <Name>RealTimeGraphX</Name> </ProjectReference> <ProjectReference Include="..\..\SideChains\Tango.AutoComplete\Tango.AutoComplete.csproj"> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml index 9cc398753..79245745e 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml @@ -2,6 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:realTimeGraphX="clr-namespace:RealTimeGraphX.WPF;assembly=RealTimeGraphX.WPF" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:local="clr-namespace:Tango.MachineStudio.Common.Controls"> @@ -28,4 +29,90 @@ </Setter.Value> </Setter> </Style> + + <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Key="graphLabelBackground" Opacity="0.7"> + <GradientStop Color="#252525"/> + <GradientStop Color="#FF4E4E4E" Offset="1"/> + </LinearGradientBrush> + + <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Key="graphLegendBackground" Opacity="0.7"> + <GradientStop Color="#FF848484"/> + <GradientStop Color="#FF282828" Offset="1"/> + </LinearGradientBrush> + + <!--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="DodgerBlue" BorderThickness="1" CornerRadius="0 0 30 0" Background="{StaticResource graphLabelBackground}" > + <Label Margin="5 0 0 0" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="12" Content="{Binding}"></Label> + </Border> + </DataTemplate> + </Setter.Value> + </Setter> + </Style.Setters> + </Style> + <!--Graph Label--> + + <Style TargetType="{x:Type local:WpfGraphControl}"> + <Setter Property="BorderThickness" Value="1"></Setter> + <Setter Property="BorderBrush" Value="#FF2E2E2E"></Setter> + <Setter Property="Padding" Value="20 20 30 20"></Setter> + <Setter Property="FontSize" Value="11"></Setter> + <Setter Property="Foreground" Value="DodgerBlue"></Setter> + <Setter Property="Background"> + <Setter.Value> + <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" > + <GradientStop Color="Black"/> + <GradientStop Color="#FF333333" Offset="1"/> + </LinearGradientBrush> + </Setter.Value> + </Setter> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type local:WpfGraphControl}"> + <Border Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}" + CornerRadius="5" + Padding="{TemplateBinding Padding}"> + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="1*"/> + <RowDefinition Height="35"/> + </Grid.RowDefinitions> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="70"/> + <ColumnDefinition Width="1*"/> + </Grid.ColumnDefinitions> + + <Grid Grid.Column="1"> + <realTimeGraphX:WpfGraphGridLines Controller="{TemplateBinding Controller}" Foreground="#FF2E2E2E" /> + <realTimeGraphX:WpfGraphSurface x:Name="surface" Controller="{TemplateBinding Controller}" BorderThickness="1 0 0 1" BorderBrush="{TemplateBinding Foreground}" /> + + <Grid IsHitTestVisible="False" Visibility="{TemplateBinding GraphLabelVisibility}"> + <Label Style="{StaticResource graphLabel}"> + <StackPanel Orientation="Horizontal"> + <TextBlock Foreground="Gainsboro" FontSize="11" VerticalAlignment="Center" Text="{TemplateBinding DisplayName}"></TextBlock> + <TextBlock Foreground="Gray" Margin="10 0 0 0" FontSize="11" FontFamily="Sylfaen Regular" VerticalAlignment="Center" Text="{TemplateBinding DisplayUnits}"></TextBlock> + </StackPanel> + </Label> + </Grid> + </Grid> + + <realTimeGraphX:WpfGraphAxisControl Orientation="Vertical" Controller="{TemplateBinding Controller}" StringFormat="{TemplateBinding StringFormat}" /> + <realTimeGraphX:WpfGraphAxisControl Orientation="Horizontal" Controller="{TemplateBinding Controller}" Grid.Column="1" Grid.Row="1" StringFormat="hh\:mm\:ss"/> + </Grid> + </Border> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> </ResourceDictionary> |
