aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Transport/RequestReceivedEventArgs.cs
blob: b7a406fd614344d6cef4fe7a163bc66f64b8732b (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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.PMR.Common;

namespace Tango.Transport
{
    public class RequestReceivedEventArgs
    {
        public MessageContainer Container { get; set; }
        public bool Handled { get; set; }

        public RequestReceivedEventArgs()
        {

        }

        public RequestReceivedEventArgs(MessageContainer container) : this()
        {
            Container = container;
        }
    }
}
"nc">TouchRingProgress : ProgressBar { private SharedUI.Shapes.Arc _arc; public double RingThickness { get { return (double)GetValue(RingThicknessProperty); } set { SetValue(RingThicknessProperty, value); } } public static readonly DependencyProperty RingThicknessProperty = DependencyProperty.Register("RingThickness", typeof(double), typeof(TouchRingProgress), new PropertyMetadata(3.0)); static TouchRingProgress() { DefaultStyleKeyProperty.OverrideMetadata(typeof(TouchRingProgress), new FrameworkPropertyMetadata(typeof(TouchRingProgress))); } public override void OnApplyTemplate() { base.OnApplyTemplate(); _arc = GetTemplateChild("PART_Arc") as SharedUI.Shapes.Arc; SetArc(); } protected override void OnValueChanged(double oldValue, double newValue) { base.OnValueChanged(oldValue, newValue); SetArc(); } protected override void OnMaximumChanged(double oldMaximum, double newMaximum) { base.OnMaximumChanged(oldMaximum, newMaximum); SetArc(); } private void SetArc() { if (_arc != null) { _arc.StartAngle = 359.999 * (Minimum / (Maximum - Minimum)); _arc.EndAngle = 359.999 * (Value / (Maximum - Minimum)); } } } }