Exemplo n.º 1
0
 private void DGVSaveFiles_CurrentCellDirtyStateChanged(object sender, EventArgs e)
 {
     if (DGVSaveFiles.IsCurrentCellDirty)
     {
         DGVSaveFiles.CommitEdit(DataGridViewDataErrorContexts.Commit);
     }
 }
Exemplo n.º 2
0
        private void ImportCurrentSave()
        {
            string Path = CurrentConfig.GetPath(ComboBoxSelectGame.Text);

            if (Path == "")
            {
                SetGameSaveLocation(ComboBoxSelectGame.Text);
                Path = CurrentConfig.GetPath(ComboBoxSelectGame.Text);
            }
            CopyFile(CurrentConfig.GetPath(ComboBoxSelectGame.Text), CurrentSubDirectory());
            GetFileNames();

            DGVSaveFiles.ClearSelection();
            DateTime Latest   = new DateTime(1999, 1, 1);
            int      RowIndex = 0;

            foreach (DataGridViewRow Row in DGVSaveFiles.Rows)
            {
                if (Convert.ToDateTime(Row.Cells[1].Value) > Latest)
                {
                    Latest   = Convert.ToDateTime(Row.Cells[1].Value);
                    RowIndex = Row.Index;
                }
            }

            DGVSaveFiles.CurrentCell = DGVSaveFiles.Rows[RowIndex].Cells[0];
        }