Interaction logic for addGameFromESID.xaml
상속: MahApps.Metro.Controls.MetroWindow
예제 #1
0
        /*	private void MWindow_Closing(object sender, CancelEventArgs e)
         *  {
         *      ExportXML(Utility.strSourcePath + @"data.xml");
         *  }*/
        #endregion

        #region MenuRegion
        private void AddGameFromESID_Click(object sender, RoutedEventArgs e)
        {
            Dialogs.AddGameFromESIDDialog ad = new Dialogs.AddGameFromESIDDialog();
            ad.Owner = this;
            if (ad.ShowDialog() == true)
            {
                GameExecutionInfo i = new GameExecutionInfo(ad.Value);
                items.Add(i);
                db.InsertOrReplaceGame(i);

                UpdateStatus();
                OnPropertyChanged("ItemCount");
            }
        }
예제 #2
0
	/*	private void MWindow_Closing(object sender, CancelEventArgs e)
		{
			ExportXML(Utility.strSourcePath + @"data.xml");
		}*/
		#endregion

		# region MenuRegion
		private void AddGameFromESID_Click(object sender, RoutedEventArgs e)
		{
			Dialogs.AddGameFromESIDDialog ad = new Dialogs.AddGameFromESIDDialog();
			ad.Owner = this;
			if (ad.ShowDialog() == true)
			{
				GameExecutionInfo i = new GameExecutionInfo(ad.Value);
				items.Add(i);
				db.InsertOrReplaceGame(i);

				UpdateStatus();
				OnPropertyChanged("ItemCount");
			}

		}