Exemplo n.º 1
0
        private async void InitializeUIDefaults()
        {
            IAutoDetection detect = new AutoDetection();

            sysdetails = await detect.DetectAsync();

            //About
            InitializeAboutListView();

            //ProgressBars
            HideProgressbar();

            //Setting Tab
            CBO cbo = new CBO();

            mtcboBRtype.DataSource    = new BindingSource(cbo.GetBRTypes(), null);
            mtcboBRtype.DisplayMember = "Key";
            mtcboBRtype.ValueMember   = "Value";
            mtcboBRtype.SelectedIndex = 0;

            mtcboLogtype.DataSource    = new BindingSource(cbo.GetLogTypes(), null);
            mtcboLogtype.DisplayMember = "Key";
            mtcboLogtype.ValueMember   = "Value";
            mtcboLogtype.SelectedIndex = 0;

            mtTbResUtilization.Value = 2;
            SetResoureUtlizationLevel(mtTbResUtilization.Value);

            mtAutoProfileDetect.Checked     = true;
            mtbtnSettingUserProfile.Enabled = false;

            mtAutoProfilePathDetect.Checked     = true;
            mtbtnSettingUserProfilePath.Enabled = false;

            mtAutoSaveSharedDevices.Checked = true;

            mtTbLogOption.Checked = true;

            mtTbAIOverride.Checked = true;

            //Backup Tab
            UIMessages msg = new UIMessages();

            BackupResponseLabelWarning(msg.Show(5));
            InitializeBackupListView();

            //Restore Tab
            RestoreResponseLabelWarning(msg.Show(5));
            InitializeRestoreListView();


            //User ID Textbox
            mttxtboxUserID.UseCustomBackColor = true;
            mttxtboxUserID.UseCustomForeColor = true;

            mttxtboxUserID.BackColor = Color.FromArgb(252, 252, 252);
            mttxtboxUserID.ForeColor = Color.FromArgb(69, 69, 69);
            mttxtboxUserID.Text      = Environment.UserName.ToUpper();

            //Main UI
            mtbtnBackup.Enabled   = false;
            mtbtnRestore.Visible  = false;
            mtbtnRestore.Enabled  = false;
            mtbtnCancel.Enabled   = false;
            mtTabctrl.SelectedTab = mtPagebackup;

            EnableTabPage(mtPagerestore, true);
            EnableTabPage(mtPagesettings, true);
            EnableTabPage(mtPagebackup, true);

            lstViewDefaultPaths.ForeColor = Color.LimeGreen;
            lstViewDefaultPaths.BackColor = Color.FromArgb(48, 48, 48);
            lbldefaultPaths.ForeColor     = Color.White;
            lbldefaultPaths.BackColor     = Color.FromArgb(109, 84, 249);
            mtdefaultReslbl.Text          = "";


            lbldefaultPaths.Text = "Default Assigned Paths (These will be used as target paths for backup / restore)";
            mtdefaultReslbl.UseCustomBackColor = true;
            mtdefaultReslbl.UseCustomForeColor = true;
            mtdefaultReslbl.ForeColor          = Color.White;
            mtdefaultReslbl.BackColor          = Color.FromArgb(211, 159, 23);
            mtdefaultReslbl.Text = "Pre-Defined paths for Backup && Restore operations.";
        }