Esempio n. 1
0
 /// <summary>
 /// Edits the first selected game. Displays game dialog.
 /// </summary>
 void EditGame()
 {
     if( lstGames.SelectedIndices.Count > 0 ) {
         int index = lstGames.SelectedIndices[0];
         GameInfo g = lstGames.Items[index].Tag as GameInfo;
         DlgGame dlg = new DlgGame( gameData, g );
         if( dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK ) {
             OnGameChange( true, true );
             MakeChange( true );
             AddStatus( GlobalStrings.MainForm_EditedGame );
         }
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Adds a new game. Displays the game dialog to the user.
 /// </summary>
 void AddGame()
 {
     DlgGame dlg = new DlgGame( gameData, null );
     if( dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK ) {
         if( ProfileLoaded ) {
             if( currentProfile.IgnoreList.Remove( dlg.Game.Id ) ) {
                 AddStatus( string.Format( GlobalStrings.MainForm_UnignoredGame, dlg.Game.Id ) );
             }
         }
         FullListRefresh(); //overkill. only need to change one cat and one game at most. could be replaced with a cat refresh then adding the game if in ungrouped mode
         MakeChange( true );
         AddStatus( GlobalStrings.MainForm_AddedGame );
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Adds a new game. Displays the game dialog to the user.
 /// </summary>
 void AddGame()
 {
     DlgGame dlg = new DlgGame( gameData, null );
     if( dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK ) {
         if( ProfileLoaded ) {
             if( currentProfile.IgnoreList.Remove( dlg.Game.Id ) ) {
                 AddStatus(string.Format(GlobalStrings.MainForm_UnignoredGame, dlg.Game.Id));
             }
         }
         FillCategoryList();
         FillGameList();
         MakeChange( true );
         AddStatus(GlobalStrings.MainForm_AddedGame);
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Edits the first selected game. Displays game dialog.
 /// </summary>
 void EditGame() {
     if (lstGames.SelectedObjects.Count > 0)
     {
         GameInfo g = tlstGames.SelectedObjects[0];
         DlgGame dlg = new DlgGame( currentProfile.GameData, g );
         if( dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK ) {
             OnGameChange( true );
             MakeChange( true );
             AddStatus( GlobalStrings.MainForm_EditedGame );
         }
     }
 }
Esempio n. 5
0
 /// <summary>
 /// Adds a new game. Displays the game dialog to the user.
 /// </summary>
 void AddGame()
 {
     DlgGame dlg = new DlgGame(currentProfile.GameData, null);
     if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         Cursor.Current = Cursors.WaitCursor;
         if (ProfileLoaded)
         {
             if (currentProfile.IgnoreList.Remove(dlg.Game.Id))
             {
                 AddStatus(string.Format(GlobalStrings.MainForm_UnignoredGame, dlg.Game.Id));
             }
         }
         FullListRefresh();
         MakeChange(true);
         AddStatus(GlobalStrings.MainForm_AddedGame);
         Cursor.Current = Cursors.Default;
     }
 }
Esempio n. 6
0
 /// <summary>
 /// Edits the first selected game. Displays game dialog.
 /// </summary>
 void EditGame()
 {
     if (lstGames.SelectedObjects.Count > 0)
     {
         GameInfo g = tlstGames.SelectedObjects[0];
         DlgGame dlg = new DlgGame(currentProfile.GameData, g);
         if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             Cursor.Current = Cursors.WaitCursor;
             FilterGamelist(false);
             MakeChange(true);
             AddStatus(GlobalStrings.MainForm_EditedGame);
             Cursor.Current = Cursors.Default;
         }
     }
 }