Esempio n. 1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            TextWriterTraceListener writer = new TextWriterTraceListener(System.Console.Out);
            //Debug.Listeners.Add(writer);

            string        executingAssemblyName = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
            TraceListener listener = new TextWriterTraceListener(executingAssemblyName + ".log", executingAssemblyName);

            Trace.Listeners.Add(listener);

            Trace.TraceInformation("Application Startup");

            FrameworkElement.LanguageProperty.OverrideMetadata(
                typeof(FrameworkElement),
                new FrameworkPropertyMetadata(System.Windows.Markup.XmlLanguage.GetLanguage(System.Globalization.CultureInfo.CurrentCulture.IetfLanguageTag)));

            //Views.StartWindow wnd = new Views.StartWindow();
            //wnd.Show();

            Views.SESIndicationsWindow wnd = new Views.SESIndicationsWindow();

            ViewModel.SESIndicationsViewModel mainVm = new ViewModel.SESIndicationsViewModel(wnd);

            wnd.DataContext = mainVm;

            wnd.Loaded += (_, __) => Configuration.Instance.LoadData(() => mainVm.Init());

            wnd.Show();
        }
        private void ShowSESIndications(object sender, RoutedEventArgs e)
        {
            SESIndicationsWindow wnd = new SESIndicationsWindow();

            wnd.Owner       = this;
            wnd.DataContext = new ViewModel.SESIndicationsViewModel(wnd);
            wnd.Show();
        }