Logo Search packages:      
Sourcecode: yahtzeesharp version File versions  Download package

virtual void YahtzeeSharp::dlgOpen::OnBtnOpenClicked ( object  sender,
System.EventArgs  e 
) [inline, protected, virtual]

Set the game we are looking to open returns the values needed to open a game and destoys the existing form.

Definition at line 279 of file dlgOpen.cs.

            {
                  try
                        {
                              TreeModel model;
                              TreeIter mIter;
                              if(gvOpen.Selection.GetSelected (out model, out mIter)) 
                              {
                                    this.strPlayerName = gvOpen.Model.GetValue(mIter, 1).ToString();
                                    intGameNumber = int.Parse(gvOpen.Model.GetValue(mIter, 0).ToString());
                                    this.Respond(Gtk.ResponseType.Ok);  
                                    this.Hide();
                              }                                   
                  }
                   catch(System.Exception ex)
                        {
                              frmError eForm = new frmError(ex.ToString());
                              eForm.Show();
                        }
            }

Generated by  Doxygen 1.6.0   Back to index