Exemplo n.º 1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                switch (mVersion)
                {
                case PCATData.VERSION.CLIENT:
                    this.Visibility = System.Windows.Visibility.Hidden;
                    FiveElementsIntTest.MainWindow mw =
                        new FiveElementsIntTest.MainWindow(
                            Query.TestConfig.GetTestArrayFromFile(), mVersion);
                    mw.ShowDialog();
                    this.Close();
                    break;

                case PCATData.VERSION.MANAGER:
                    this.Visibility = System.Windows.Visibility.Hidden;
                    (new Query.MainWindow(mVersion)).ShowDialog();
                    this.Close();
                    break;
                }
            }
            catch (Exception ex)
            {
                StreamWriter sw = new StreamWriter(FiveElementsIntTest.FEITStandard.GetExePath() + "exception.txt");
                sw.WriteLine(ex.Message);
                sw.WriteLine(ex.StackTrace);
                sw.WriteLine(ex.Source);
                sw.WriteLine(ex.InnerException.Message);
                sw.Flush();
                sw.Close();
            }
        }
Exemplo n.º 2
0
        private void amStartBtn_Click(object sender, RoutedEventArgs e)
        {
            FiveElementsIntTest.MainWindow mw =
                new FiveElementsIntTest.MainWindow(Query.TestConfig.GetTestArrayFromFile(), mVersion);

            mw.ShowDialog();
        }