コード例 #1
0
        static void Main()
        {
            Application app = new Application();

            app.Resources.MergedDictionaries.Add(new ResourceDictionary()
            {
                Source = new Uri("pack://*****:*****@"\", @"\\"));
#if DEBUG
            View.SimulationView wnd = new View.SimulationView();
            wnd.DataContext = new ViewModel.SimulationViewModel(path);
            app.Run(wnd);
#else
            try
            {
                var wnd = new View.LoginWindow(path);
                app.Run(wnd);
            }
            catch (Exception ex)
            {
                while (ex.InnerException != null)
                {
                    ex = ex.InnerException;
                }
                MessageBox.Show(ex.Message + Environment.NewLine + ex.StackTrace);
            }
#endif
            Properties.Settings.Default.Save();
        }
コード例 #2
0
        static void Main()
        {
            Application app = new Application();
            app.Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = new Uri("pack://*****:*****@"\", @"\\"));
            #if DEBUG
            View.SimulationView wnd = new View.SimulationView();
            wnd.DataContext = new ViewModel.SimulationViewModel(path);
            app.Run(wnd);
            #else
            try
            {
                var wnd = new View.LoginWindow(path);
                app.Run(wnd);
            }
            catch (Exception ex)
            {
                while (ex.InnerException != null)
                {
                    ex = ex.InnerException;
                }
                MessageBox.Show(ex.Message + Environment.NewLine + ex.StackTrace);
            }
            #endif
            Properties.Settings.Default.Save();
        }