| ofs | hex dump | ascii |
|---|
| 0000 | 21 3c 61 72 63 68 3e 0a 2f 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 31 34 33 30 39 37 39 33 | !<arch>./...............14309793 |
| 0020 | 39 32 20 20 20 20 20 20 20 20 20 20 20 20 20 20 30 20 20 20 20 20 20 20 38 39 36 20 20 20 20 20 | 92..............0.......896..... |
| 0040 | 20 20 60 0a 00 00 00 21 00 00 07 8a 00 00 09 ac 00 00 0a e0 00 00 10 1c 00 00 10 1c 00 00 0d 82 | ..`....!........................ |
| 0060 | 00 00 0d 82 00 00 0d 14 00 00 0d 14 00 00 0d f0 00 00 0d f0 00 00 0c 9c 00 00 0c 9c 00 00 11 62 | ...............................b |
| 0080 | 00 00 11 62 00 00 0e 64 00 00 0e 64 00 00 0e d0 00 00 0e d0 00 00 0f 40 00 00 0f 40 00 00 12 3a | ...b...d...d...........@...@...: |
| 00a0 | 00 00 12 3a 00 00 10 84 00 00 10 84 00 00 11 ce 00 00 11 ce 00 00 0f aa 00 00 0f aa 00 00 0c 2e | ...:............................ |
| 00c0 | 00 00 0c 2e 00 00 10 f4 00 00 10 f4 5f 5f 49 4d 50 4f 52 54 5f 44 45 53 43 52 49 50 54 4f 52 5f | ............__IMPORT_DESCRIPTOR_ |
| 00e0 | 6c 6d 64 66 75 00 5f 5f 4e 55 4c 4c 5f 49 4d 50 4f 52 54 5f 44 45 53 43 52 49 50 54 4f 52 00 7f | lmdfu.__NULL_IMPORT_DESCRIPTOR.. |
| 0100 | 6c 6d 64 66 75 5f 4e 55 4c 4c 5f 54 48 55 4e 4b 5f 44 41 54 41 00 5f 4c 4d 44 46 55 49 6e 69 74 | lmdfu_NULL_THUNK_DATA._LMDFUInit |
| 0120 | 40 30 00 5f 5f 69 6d 70 5f 5f 4c 4d 44 46 55 49 6e 69 74 40 30 00 5f 4c 4d 44 46 55 44 65 76 69 | @0.__imp__LMDFUInit@0._LMDFUDevi |
| 0140 | 63 65 4f 70 65 6e 40 31 32 00 5f 5f 69 6d 70 5f 5f 4c 4d 44 46 55 44 65 76 69 63 65 4f 70 65 6e | ceOpen@12.__imp__LMDFUDeviceOpen |
| 0160 | 40 31 32 00 5f 4c 4d 44 46 55 44 65 76 69 63 65 43 6c 6f 73 65 40 38 00 5f 5f 69 6d 70 5f 5f 4c | @12._LMDFUDeviceClose@8.__imp__L |
| 0180 | 4d 44 46 55 44 65 76 69 63 65 43 6c 6f 73 65 40 38 00 5f 4c 4d 44 46 55 44 65 76 69 63 65 53 74 | MDFUDeviceClose@8._LMDFUDeviceSt |
| 01a0 | 72 69 6e 67 47 65 74 40 32 30 00 5f 5f 69 6d 70 5f 5f 4c 4d 44 46 55 44 65 76 69 63 65 53 74 72 | ringGet@20.__imp__LMDFUDeviceStr |
| 01c0 | 69 6e 67 47 65 74 40 32 30 00 5f 4c 4d 44 46 55 44 65 76 69 63 65 41 53 43 49 49 53 74 72 69 6e | ingGet@20._LMDFUDeviceASCIIStrin |
| 01e0 | 67 47 65 74 40 31 36 00 5f 5f 69 6d 70 5f 5f 4using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Threading;
using Tango.Integration.ExternalBridge;
using Tango.PMR.Integration;
using Tango.SharedUI;
namespace Tango.PPC.UI.Dialogs
{
public class SafetyLevelOperationsConfirmationViewVM : DialogViewVM
{
private DispatcherTimer _timer;
private int _maxSeconds;
public int MaxSeconds
{
get { return _maxSeconds; }
set { _maxSeconds = value; RaisePropertyChangedAuto(); }
}
private int _secondsRemaining;
public int SecondsRemaining
{
get { return _secondsRemaining; }
set { _secondsRemaining = value; RaisePropertyChangedAuto(); }
}
private ExternalBridgeClientConnectedEventArgs _connection;
/// <summary>
/// Gets or sets the last client connection event arguments.
/// </summary>
public ExternalBridgeClientConnectedEventArgs Connection
{
get { return _connection; }
set { _connection = value; RaisePropertyChangedAuto(); }
}
public SafetyLevelOperationsConfirmationViewVM(ExternalBridgeClientConnectedEventArgs connection)
{
Connection = connection;
MaxSeconds = 30;
SecondsRemaining = 30;
_timer = new DispatcherTimer(DispatcherPriority.Background, Application.Current.Dispatcher);
_timer.Interval = TimeSpan.FromMilliseconds(800);
_timer.Tick += _timer_Tick;
}
public override void OnShow()
{
base.OnShow();
_timer.Start();
}
protected override void Accept()
{
_timer.Stop();
base.Accept();
}
protected override void Cancel()
{
_timer.Stop();
base.Cancel();
}
private void _timer_Tick(object sender, EventArgs e)
{
SecondsRemaining--;
if (SecondsRemaining == 0)
{
Cancel();
}
}
}
}
|