Exemple #1
0
        public override bool EnableNext()
        {
            if (CheckForUpdatesInProgress || _backgroundWorker.IsBusy)
            {
                return(false);
            }

            if (IsInAutomatedUpdatesMode)
            {
                return(true);
            }

            if (downloadUpdateRadioButton.Checked)
            {
                if (dataGridViewPatches.SelectedRows.Count == 1)
                {
                    DataGridViewExRow row = (DataGridViewExRow)dataGridViewPatches.SelectedRows[0];
                    if (row.Enabled)
                    {
                        return(true);
                    }
                }
            }
            else if (selectFromDiskRadioButton.Checked)
            {
                if (WizardHelpers.IsValidFile(FilePath, out _))
                {
                    return(true);
                }
            }

            return(false);
        }
Exemple #2
0
        public override bool EnableNext()
        {
            if (CheckForUpdatesInProgress)
            {
                return(false);
            }

            if (IsInAutomatedUpdatesMode)
            {
                return(true);
            }

            if (downloadUpdateRadioButton.Checked)
            {
                if (dataGridViewPatches.SelectedRows.Count == 1)
                {
                    DataGridViewExRow row = (DataGridViewExRow)dataGridViewPatches.SelectedRows[0];
                    if (row.Enabled)
                    {
                        return(true);
                    }
                }
            }
            else if (selectFromDiskRadioButton.Checked)
            {
                if (isValidFile(fileNameTextBox.Text))
                {
                    return(true);
                }
            }
            return(false);
        }
 public override bool EnableNext()
 {
     if (dataGridViewPatches.SelectedRows.Count == 1)
     {
         DataGridViewExRow row = (DataGridViewExRow)dataGridViewPatches.SelectedRows[0];
         if (row.Enabled)
         {
             return(true);
         }
     }
     return(false);
 }
Exemple #4
0
        private DataGridViewExRow CreateRow(string Key, string Value)
        {
            if (!String.IsNullOrEmpty(Key))
            {
                Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
            }
            DataGridViewExRow r = new DataGridViewExRow();

            r.CreateCells(dataGridViewEx1);
            r.Cells[0].Value = Key;
            r.Cells[1].Value = Value;
            return(r);
        }
Exemple #5
0
        public void AddEntry(string Key, string Value)
        {
            if (!String.IsNullOrEmpty(Key))
            {
                Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
            }
            DataGridViewExRow r = new DataGridViewExRow();

            r.CreateCells(dataGridViewEx1);
            r.Cells[0].Value = Key;
            r.Cells[1].Value = Value;
            AddRow(r);
        }
Exemple #6
0
        public void AddEntry(string Key, string Value, IEnumerable <ToolStripMenuItem> contextMenuItems)
        {
            if (!String.IsNullOrEmpty(Key))
            {
                Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
            }
            DataGridViewExRow r = new DataGridViewExRow();

            r.CreateCells(dataGridViewEx1);
            r.Cells[0].Value = Key;
            r.Cells[1].Value = Value;
            r.Tag            = contextMenuItems;
            AddRow(r);
        }
Exemple #7
0
        public void AddEntry(string Key, string Value, Color fontColor)
        {
            if (!String.IsNullOrEmpty(Key))
            {
                Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
            }
            DataGridViewExRow r = new DataGridViewExRow();

            r.CreateCells(dataGridViewEx1);
            r.Cells[0].Value           = Key;
            r.Cells[1].Value           = Value;
            r.Cells[1].Style.ForeColor = fontColor;
            AddRow(r);
            dataGridViewEx1.DefaultCellStyle = new DataGridViewCellStyle();
        }
Exemple #8
0
        public void AddEntry(string Key, FolderListItem Value, IEnumerable <ToolStripMenuItem> contextMenuItems)
        {
            // Special case for folders: CA-33311

            if (!String.IsNullOrEmpty(Key))
            {
                Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
            }
            DataGridViewExRow r = new DataGridViewExRow();

            r.Cells.Add(new DataGridViewTextBoxCell());
            r.Cells[0].Value = Key;
            r.Cells.Add(new FolderCell(Value));
            r.Tag = contextMenuItems;
            AddRow(r);
        }
Exemple #9
0
        internal void AddEntryLink(string Key, string Value, List <ToolStripMenuItem> contextMenuItems, Action action)
        {
            if (!String.IsNullOrEmpty(Key))
            {
                Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
            }
            DataGridViewExRow r = new DataGridViewExRow();

            r.CreateCells(dataGridViewEx1);
            r.Cells[0].Value = Key;
            r.Cells[1]       = new DataGridViewLinkCell();
            r.Cells[1].Value = Value;
            r.Cells[1].Tag   = action;
            r.Tag            = contextMenuItems;
            AddRow(r);
        }
Exemple #10
0
 internal void AddEntryLink(string Key, string Value, IEnumerable<ToolStripMenuItem> contextMenuItems, Action action)
 {
     if (!String.IsNullOrEmpty(Key))
         Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
     DataGridViewExRow r = new DataGridViewExRow();
     r.CreateCells(dataGridViewEx1);
     r.Cells[0].Value = Key;
     r.Cells[1] = new DataGridViewLinkCell();
     r.Cells[1].Value = Value;
     r.Cells[1].Tag = action;
     r.Tag = contextMenuItems;
     AddRow(r);
 }
Exemple #11
0
        public void AddEntry(string Key, FolderListItem Value, IEnumerable<ToolStripMenuItem> contextMenuItems)
        {
            // Special case for folders: CA-33311

            if (!String.IsNullOrEmpty(Key))
                Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
            DataGridViewExRow r = new DataGridViewExRow();
            r.Cells.Add(new DataGridViewTextBoxCell());
            r.Cells[0].Value = Key;
            r.Cells.Add(new FolderCell(Value));
            r.Tag = contextMenuItems;
            AddRow(r);
        }
Exemple #12
0
 public void AddEntry(string Key, string Value, IEnumerable<ToolStripMenuItem> contextMenuItems, Color fontColor)
 {
     if (!String.IsNullOrEmpty(Key))
         Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
     DataGridViewExRow r = new DataGridViewExRow();
     r.CreateCells(dataGridViewEx1);
     r.Cells[0].Value = Key;
     r.Cells[1].Value = Value;
     r.Cells[1].Style.ForeColor = fontColor;
     r.Tag = contextMenuItems;
     AddRow(r);
     dataGridViewEx1.DefaultCellStyle = new DataGridViewCellStyle();
 }
Exemple #13
0
 public void AddEntry(string Key, string Value)
 {
     if (!String.IsNullOrEmpty(Key))
         Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
     DataGridViewExRow r = new DataGridViewExRow();
     r.CreateCells(dataGridViewEx1);
     r.Cells[0].Value = Key;
     r.Cells[1].Value = Value;
     AddRow(r);
 }
Exemple #14
0
 public void AddEntry(string Key, string Value, List<ToolStripMenuItem> contextMenuItems)
 {
     if (!String.IsNullOrEmpty(Key))
         Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
     DataGridViewExRow r = new DataGridViewExRow();
     r.CreateCells(dataGridViewEx1);
     r.Cells[0].Value = Key;
     r.Cells[1].Value = Value;
     r.Tag = contextMenuItems;
     AddRow(r);
 }
Exemple #15
0
 private DataGridViewExRow CreateRow(string Key, string Value)
 {
     if (!String.IsNullOrEmpty(Key))
         Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
     DataGridViewExRow r = new DataGridViewExRow();
     r.CreateCells(dataGridViewEx1);
     r.Cells[0].Value = Key;
     r.Cells[1].Value = Value;
     return r;
 }