Exemplo n.º 1
0
 private void ManageMods_OnChangeSetChanged(IEnumerable <ModChange> changeset)
 {
     if (changeset != null && changeset.Any())
     {
         tabController.ShowTab("ChangesetTabPage", 1, false);
         UpdateChangesDialog(changeset.ToList());
         auditRecommendationsMenuItem.Enabled = false;
     }
     else
     {
         tabController.HideTab("ChangesetTabPage");
         Wait.RetryEnabled = false;
         auditRecommendationsMenuItem.Enabled = true;
     }
 }
Exemplo n.º 2
0
        private void ModList_CellValueChanged(object sender, DataGridViewCellEventArgs e)
        {
            if (mainModList.ModFilter == GUIModFilter.Incompatible)
            {
                return;
            }
            var grid         = sender as DataGridView;
            var row          = grid.Rows[e.RowIndex];
            var columnIndex  = e.ColumnIndex;
            var gridViewCell = row.Cells[columnIndex];

            if (columnIndex < 2)
            {
                var checkbox = (DataGridViewCheckBoxCell)gridViewCell;

                if (columnIndex == 0)
                {
                    ((GUIMod)row.Tag).IsInstallChecked = (bool)checkbox.Value;
                }
                else if (columnIndex == 1)
                {
                    ((GUIMod)row.Tag).IsUpgradeChecked = (bool)checkbox.Value;
                }
            }
            var changeset = mainModList.ComputeChangeSetFromModList(RegistryManager.Instance(CurrentInstance).registry, CurrentInstance);


            if (changeset != null && changeset.Any())
            {
                UpdateChangesDialog(changeset, m_InstallWorker);
                m_TabController.ShowTab("ChangesetTabPage", 1, false);
                ApplyToolButton.Enabled = true;
            }
            else
            {
                m_TabController.HideTab("ChangesetTabPage");
                ApplyToolButton.Enabled = false;
            }

            if (e.RowIndex < 0 || columnIndex < 0)
            {
                return;
            }


            if (gridViewCell is DataGridViewLinkCell)
            {
                var cell = gridViewCell as DataGridViewLinkCell;
                Process.Start(cell.Value.ToString());
            }

            ModList.EndEdit();
        }
Exemplo n.º 3
0
 private void ChangeSetUpdated()
 {
     if (ChangeSet != null && ChangeSet.Any())
     {
         UpdateChangesDialog(ChangeSet.ToList(), installWorker);
         tabController.ShowTab("ChangesetTabPage", 1, false);
         ApplyToolButton.Enabled = true;
     }
     else
     {
         tabController.HideTab("ChangesetTabPage");
         ApplyToolButton.Enabled = false;
     }
 }
Exemplo n.º 4
0
        private void ModList_CellValueChanged(object sender, DataGridViewCellEventArgs e)
        {
            if (m_ModFilter == GUIModFilter.Incompatible)
            {
                return;
            }

            var changeset = ComputeChangeSetFromModList();

            if (changeset != null && changeset.Any())
            {
                UpdateChangesDialog(changeset, m_InstallWorker);
                m_TabController.ShowTab("ChangesetTabPage", 1, false);
                ApplyToolButton.Enabled = true;
            }
            else
            {
                m_TabController.HideTab("ChangesetTabPage");
                ApplyToolButton.Enabled = false;
            }

            if (e == null)
            {
                return;
            }

            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }

            if (ModList.Rows[e.RowIndex].Cells[e.ColumnIndex] is DataGridViewLinkCell)
            {
                var cell = ModList.Rows[e.RowIndex].Cells[e.ColumnIndex] as DataGridViewLinkCell;
                Process.Start(cell.Value.ToString());
            }

            ModList.EndEdit();
        }