コード例 #1
0
        public void SyncWithServer()
        {
            foreach (UIElement each in Items)
            {
                if (each is BackgroundSyncMonitor)
                {
                    Items.Remove(each);
                    break;
                }
            }

            syncMonitor = new BackgroundSyncMonitor();
            syncMonitor.SyncCompleted += syncMonitor_SyncCompleted;
            Items.Insert(1, syncMonitor);
        }
コード例 #2
0
        private static void ExecutedShowSendReceiveProgressCommand(object sender, ExecutedRoutedEventArgs e)
        {
            if (BackgroundSyncDialog.LastUsedSyncDialog != null)
            {
                BackgroundSyncDialog.LastUsedSyncDialog.WindowState = WindowState.Normal;
                BackgroundSyncDialog.LastUsedSyncDialog.Activate();
                return;
            }

            BackgroundSyncMonitor syncMonitor = FindWindow(sender).statusStrip.SyncMonitor;

            if (syncMonitor == null)
            {
                return;
            }

            BackgroundSyncDialog.LastUsedSyncDialog         = new BackgroundSyncDialog(syncMonitor, SyncHelper.LastUsedSyncHelper);
            BackgroundSyncDialog.LastUsedSyncDialog.Closed += LastUsedSyncDialog_Closed;
            BackgroundSyncDialog.LastUsedSyncDialog.Owner   = Window.GetWindow(syncMonitor);
            BackgroundSyncDialog.LastUsedSyncDialog.FastShow();
        }