123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- using System;
- using System.ComponentModel;
- using System.Diagnostics;
- using System.Windows.Controls;
- using System.Windows.Threading;
- namespace PackageUploader
- {
-
-
-
- public partial class WinMFMUploadProcress :INotifyPropertyChanged
- {
- private double m_ProgressLeft;
- public WinMFMUploadProcress()
- {
- InitializeComponent();
- m_ProgressLeft=Canvas.GetLeft(progressBar);
- this.DataContext = this;
-
-
- }
- private string m_FloorName;
- public string FloorName
- {
- get { return m_FloorName; }
- set
- {
- m_FloorName = value;
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("FloorName"));
- }
- }
- private string m_LabelPath;
- public string LabelPath
- {
- get { return m_LabelPath; }
- set
- {
- m_LabelPath = value;
- PropertyChanged?.Invoke(this,new PropertyChangedEventArgs("LabelPath"));
- }
- }
- private string m_Present;
- public string Present
- {
- get { return m_Present; }
- set
- {
- m_Present = value;
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Present"));
- }
- }
-
-
-
-
-
-
-
-
- public int Count { get; set; }
- public int Cur { get; set; }
- public event PropertyChangedEventHandler PropertyChanged;
- public void Update(string currentData)
- {
-
-
- this.Dispatcher.Invoke(() => { lblpresent.Content = currentData + "%"; }, DispatcherPriority.Background);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- private static DispatcherOperationCallback exitFrameCallback = new DispatcherOperationCallback(ExitFrame);
- private static Object ExitFrame(Object state)
- {
- DispatcherFrame frame = state as
- DispatcherFrame;
- frame.Continue = false;
- return null;
- }
- }
- }
|