aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/GradientOffsetSlider.xaml
blob: 28d29a727e4431380b30b3f5aefd85839c5d7698 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:Tango.MachineStudio.Common.Resources"
                    xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes">


    <Style x:Key="SliderRepeatButton" TargetType="RepeatButton">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Border  BorderThickness="1" BorderBrush="#8A8A8A" Background="#8A8A8A" Height="3"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="SliderRepeatButton1" TargetType="RepeatButton">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Border SnapsToDevicePixels="True" Background="#7F7F7F"  BorderThickness="1" BorderBrush="#777777" Height="3"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="SliderThumb" TargetType="Thumb">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="Background" Value="Transparent"></Setter>
        <Setter Property="Margin" Value="-11 -20 0 0"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Canvas>
                    <materialDesign:PackIcon Kind="MapMarker" Width="24" Background="Transparent" Height="24" IsHitTestVisible="True" Margin="0 0 0 0" />
                    </Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="Slider"  TargetType="Slider">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Track Grid.Row="1" x:Name="PART_Track"   >
                <Track.DecreaseRepeatButton>
                    <RepeatButton Style="{StaticResource SliderRepeatButton1}"  Command="Slider.DecreaseLarge" />
                </Track.DecreaseRepeatButton>
                <Track.Thumb>
                    <Thumb Style="{StaticResource SliderThumb}"  />
                </Track.Thumb>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Style="{StaticResource SliderRepeatButton}" Command="Slider.IncreaseLarge" />
                </Track.IncreaseRepeatButton>
            </Track>
        </Grid>
    </ControlTemplate>

    <Style x:Key="GradientOffsetSlider" TargetType="Slider">
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Horizontal">
                <Setter Property="MinHeight" Value="21" />
                <Setter Property="MinWidth" Value="104" />
                <Setter Property="Template" Value="{StaticResource Slider}" />
            </Trigger>
        </Style.Triggers>
    </Style>

</ResourceDictionary>
n class="o">= global::Google.Protobuf; using pbc = global::Google.Protobuf.Collections; using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; namespace Tango.PMR.Stubs { /// <summary>Holder for reflection information generated from StubMotorStopResponse.proto</summary> public static partial class StubMotorStopResponseReflection { #region Descriptor /// <summary>File descriptor for StubMotorStopResponse.proto</summary> public static pbr::FileDescriptor Descriptor { get { return descriptor; } } private static pbr::FileDescriptor descriptor; static StubMotorStopResponseReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "ChtTdHViTW90b3JTdG9wUmVzcG9uc2UucHJvdG8SD1RhbmdvLlBNUi5TdHVi", "cyJYChVTdHViTW90b3JTdG9wUmVzcG9uc2USEAoITW90b3JfSUQYASABKA0S", "EgoKTW90X1N0YXR1cxgCIAEoDRILCgNIaVoYAyABKAgSDAoEQlVTWRgEIAEo", "CEIbChljb20udHdpbmUudGFuZ28ucG1yLnN0dWJzYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubMotorStopResponse), global::Tango.PMR.Stubs.StubMotorStopResponse.Parser, new[]{ "MotorID", "MotStatus", "HiZ", "BUSY" }, null, null, null) })); } #endregion } #region Messages public sealed partial class StubMotorStopResponse : pb::IMessage<StubMotorStopResponse> { private static readonly pb::MessageParser<StubMotorStopResponse> _parser = new pb::MessageParser<StubMotorStopResponse>(() => new StubMotorStopResponse()); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<StubMotorStopResponse> Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { get { return global::Tango.PMR.Stubs.StubMotorStopResponseReflection.Descriptor.MessageTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public StubMotorStopResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public StubMotorStopResponse(StubMotorStopResponse other) : this() { motorID_ = other.motorID_; motStatus_ = other.motStatus_; hiZ_ = other.hiZ_; bUSY_ = other.bUSY_; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public StubMotorStopResponse Clone() { return new StubMotorStopResponse(this); } /// <summary>Field number for the "Motor_ID" field.</summary> public const int MotorIDFieldNumber = 1; private uint motorID_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public uint MotorID { get { return motorID_; } set { motorID_ = value; } } /// <summary>Field number for the "Mot_Status" field.</summary> public const int MotStatusFieldNumber = 2; private uint motStatus_; /// <summary> /// Stopped / Acceleration / Deceleration / Constant speed /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public uint MotStatus { get { return motStatus_; } set { motStatus_ = value; } } /// <summary>Field number for the "HiZ" field.</summary> public const int HiZFieldNumber = 3; private bool hiZ_; /// <summary> /// 1 - high impedance state. /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool HiZ { get { return hiZ_; } set { hiZ_ = value; } } /// <summary>Field number for the "BUSY" field.</summary> public const int BUSYFieldNumber = 4; private bool bUSY_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool BUSY { get { return bUSY_; } set { bUSY_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as StubMotorStopResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool Equals(StubMotorStopResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } if (MotorID != other.MotorID) return false; if (MotStatus != other.MotStatus) return false; if (HiZ != other.HiZ) return false; if (BUSY != other.BUSY) return false; return true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (MotorID != 0) hash ^= MotorID.GetHashCode(); if (MotStatus != 0) hash ^= MotStatus.GetHashCode(); if (HiZ != false) hash ^= HiZ.GetHashCode(); if (BUSY != false) hash ^= BUSY.GetHashCode(); return hash; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { if (MotorID != 0) { output.WriteRawTag(8); output.WriteUInt32(MotorID); } if (MotStatus != 0) { output.WriteRawTag(16); output.WriteUInt32(MotStatus); } if (HiZ != false) { output.WriteRawTag(24); output.WriteBool(HiZ); } if (BUSY != false) { output.WriteRawTag(32); output.WriteBool(BUSY); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; if (MotorID != 0) { size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MotorID); } if (MotStatus != 0) { size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MotStatus); } if (HiZ != false) { size += 1 + 1; } if (BUSY != false) { size += 1 + 1; } return size; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(StubMotorStopResponse other) { if (other == null) { return; } if (other.MotorID != 0) { MotorID = other.MotorID; } if (other.MotStatus != 0) { MotStatus = other.MotStatus; } if (other.HiZ != false) { HiZ = other.HiZ; } if (other.BUSY != false) { BUSY = other.BUSY; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { default: input.SkipLastField(); break; case 8: { MotorID = input.ReadUInt32(); break; } case 16: { MotStatus = input.ReadUInt32(); break; } case 24: { HiZ = input.ReadBool(); break; } case 32: { BUSY = input.ReadBool(); break; } } } } } #endregion } #endregion Designer generated code