示例#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 );
         }
     }
 }
示例#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 );
     }
 }
 /// <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);
     }
 }
示例#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 );
         }
     }
 }
示例#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;
     }
 }
示例#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;
         }
     }
 }