public void CheckBackupTimes()
        {
            _backupTimeChecker = new BackupTimeChecker(_cases, _backupService);

            Thread.Sleep(100); //The TimeChecker has a timer which need some time,
            //otherwise the test will fail
            Assert.IsNotEmpty(_backupTimeChecker.BackupsAreDue);
        }
Ejemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();
            CaseGrid.LoadingRow       += CaseGridOnLoadingRow;
            CaseGrid.SelectionChanged += (sender, args) => { SelectedBackup = CaseGrid.SelectedItem as BackupCase; };

            // Load Backup List
            LoadBackupList();


            //StartWithWindows();

            InitNotifyIcon();

            // Bind Iteration Type Combobox
            cbIterationType.Items.Clear();
            var values = Enum.GetValues(typeof(IterationType));

            IterationTypeList = new List <IterationType>();
            foreach (IterationType value in values)
            {
                IterationTypeList.Add(value);
            }
            cbIterationType.ItemsSource   = IterationTypeList;
            cbIterationType.SelectedIndex = 0;


            // Init Timer to Backup

            // DataGrid Binding
            DataGridBinding();
            CaseGrid.SelectedIndex = 0;

            //Version Label
            if (ApplicationDeployment.IsNetworkDeployed)
            {
                lblVersion.Content = $"Version: {ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString(4)}";
            }

            // Tray Icon
            // _notifyIcon.Text = @"Easy Backup";
            //notifyIcon.Icon = this.Icon;
            // _notifyIcon.Visible = true;


            TimeChecker = new BackupTimeChecker(_caseList.ToList(), _backupService);
        }