Inheritance: MahApps.Metro.Controls.MetroWindow
示例#1
0
/*
		private void ImportFromErogeTimer_Click(object sender, RoutedEventArgs e)
		{
			OpenFileDialog openFileDialog1 = new OpenFileDialog();
			openFileDialog1.Multiselect = false;
			openFileDialog1.Filter = "ErogeTimerXMLFile(*.xml)|*.xml";
			openFileDialog1.FilterIndex = 1;
			if (openFileDialog1.ShowDialog() == true)
			{
				string dataPath = openFileDialog1.FileName;
				ErogeNode[] erogeList = null;
				try
				{
					System.Xml.Serialization.XmlSerializer serializer2 = new System.Xml.Serialization.XmlSerializer(typeof(ErogeNode[]));
					System.IO.StreamReader sr = new System.IO.StreamReader(dataPath);
					erogeList = (ErogeNode[])serializer2.Deserialize(sr);
					sr.Close();
				}
				catch
				{
				}
				if (erogeList != null)
				{
					foreach (ErogeNode i in erogeList)
					{
						GameExecutionInfo game = new GameExecutionInfo(i.Title, i.Path);
						game.TotalPlayTime = i.Time;
						items.Add(game);
					}
				}
				UpdateStatus();
				OnPropertyChanged("ItemCount");
			}
		}*/

		private void PlayTimeStatistic_Click(object sender, RoutedEventArgs e)
		{
			try
			{
				Dialog.PlayTimeStatisticDialog pd = new Dialog.PlayTimeStatisticDialog(Utility.userDBPath);
				pd.Owner = this;
				if (pd.ShowDialog() == true)
				{
				}
			}
			catch (Exception a)
			{
				MessageBox.Show(a.Message);
			}

		}