示例#1
0
        private void AddDrive_Click(object sender, RoutedEventArgs e)
        {
            var service = new DriveService();
            var dlg     = new EditDriveServiceWindow(service);

            dlg.Owner = this;
            if (dlg.ShowDialog().GetValueOrDefault())
            {
                _driveServices.Add(service);
                service.SyncPeriod = service.SyncPeriod;// force start
            }
        }
示例#2
0
        private void EditService(DriveService service)
        {
            if (service == null)
            {
                return;
            }

            var dlg = new EditDriveServiceWindow(service);

            dlg.Owner = this;
            if (dlg.ShowDialog().GetValueOrDefault())
            {
                // do nothing
            }
        }