예제 #1
0
        public MainWindow(SyncCore syncCore)
        {
            InitializeComponent();

            MaxHeight = SystemParameters.MaximizedPrimaryScreenHeight;
            MaxWidth  = SystemParameters.MaximizedPrimaryScreenWidth;

            core = syncCore;

            Settings.LoadAddSettings();

            Settings.LoadSyncTasks();
            Tasks_ListView.ItemsSource = Settings.SyncTasks;

            StatusBar.ProgressBar       = ProgressBar;
            StatusBar.ProgressTextBlock = ProgressTextBlock;
            StatusBar.MessageTextBlock  = MessageTextBlock;
            StatusBar.QuotaTextBlock    = Quota_TextBox;
            StatusBar.CloseStreamButton = CloseStream_Button;
            StatusBar.StopSyncButton    = StopSync_Button;

            UserServer_TextBlock.Text = Settings.UserServer;

            ShowRootDir();

            timerController = new SyncTimerController(syncCore);
            timerController.Start();

            docViewer.Document = Settings.LoadHelp();
        }
예제 #2
0
        public SyncTimerController(SyncCore syncCore)
        {
            this.syncCore = syncCore;

            controlTimer.Interval = interval;
            controlTimer.Tick    += new EventHandler(controlTimer_Tick);
        }
예제 #3
0
        public CreateTaskDialog(SyncCore syncCore, SyncTask syncTask) : this(syncCore)
        {
            localPaths.AddRange(syncTask.LocalPaths);
            selectedUri = syncTask.ServerDirectoryUri;
            backupCount = syncTask.BackupCount;
            syncTimer   = syncTask.SyncTimer;

            LocalPaths_ListBox.Items.Refresh();
            SelectedDirName_TexBlock.Text = syncTask.ServerDirName;
            backupCount = syncTask.BackupCount;
        }
예제 #4
0
        public CreateTaskDialog(SyncCore syncCore)
        {
            InitializeComponent();

            MaxHeight = SystemParameters.MaximizedPrimaryScreenHeight;
            MaxWidth  = SystemParameters.MaximizedPrimaryScreenWidth;

            backupCount = 0;
            syncTimer   = new SyncTimer();
            core        = syncCore;
            localPaths  = new List <string>();
            LocalPaths_ListBox.ItemsSource = localPaths;
            ShowRootDir();
        }
예제 #5
0
 internal static void StopSync(SyncCore syncCore)
 {
     syncCore.StopSync();
     CloseStream();
     HideStopSyncButton();
 }