Example #1
0
 public static SyncEngine Instance()
 {
     if (instance == null)
     {
         instance = new SyncEngine();
     }
     return(instance);
 }
Example #2
0
        void ThreadMonitor(SyncEngine.TypeThread type, SyncEngine.StatusCode sc, String status)
        {
            if (type == SyncEngine.TypeThread.SYNC)
            {
                this.Dispatcher.Invoke(() =>
                {
                    if (sc == SyncEngine.StatusCode.WORKING)
                    {
                        this.sync.Content = "Stop Sync";
                        this.sync.Name = "StopSync";
                        this.sync.IsEnabled = false;
                        this.errorBox.Content = status;
                    }
                    else if (sc == SyncEngine.StatusCode.SUCCESS)
                    {
                        this.errorBox.Content = "Synced";
                        buildGraphic();
                        this.sync.Content = "Start Sync";
                        this.sync.Name = "StartSync";
                        this.sync.IsEnabled = true;
                        this.errorBox.Content = status;
                    }
                    else
                    {
                        this.sync.Content = "Start Sync";
                        this.sync.Name = "StartSync";
                        this.sync.IsEnabled = true;
                        this.errorBox.Content = status;
                    }

                });
            }
        }
Example #3
0
 public static SyncEngine Instance()
 {
     if (instance == null)
     {
         instance = new SyncEngine();
     }
     return instance;
 }
Example #4
0
        void ThreadMonitor(SyncEngine.TypeThread type, SyncEngine.StatusCode sc, String status)
        {
            if (type == SyncEngine.TypeThread.SYNC)
            {
                if (sc == SyncEngine.StatusCode.WORKING)
                {
                    this.syncItem.Name = "StopSync";
                    this.syncItem.Text = "Stop Sync";
                    this.messageItem.Text = status;

                }
                else
                {
                    this.syncItem.Name = "StartSync";
                    this.syncItem.Text = "Start Sync";
                    this.messageItem.Text = status;
                }
            }
        }