Exemplo n.º 1
0
        //[STAThread]
        //public static void Main(params string[] args)
        //{
        //    Window window = Bootstrapper.BootstrapShell();
        //    window.Title = "StoryTeller";



        //    var application = new Application();

        //    Uri resourceLocater = new Uri("/StoryTellerUI;component/ExpressionLight.xaml", UriKind.Relative);
        //    Application.LoadComponent(resourceLocater);


        //    application.DispatcherUnhandledException += application_DispatcherUnhandledException;

        //    application.Run(window);
        //}

        private static void application_DispatcherUnhandledException(object sender,
                                                                     DispatcherUnhandledExceptionEventArgs e)
        {
            var errorMessage = new ErrorMessage
            {
                ErrorText = e.Exception.ToString()
            };

            errorMessage.ShowDialog();
        }
Exemplo n.º 2
0
        private static void application_DispatcherUnhandledException(object sender,
            DispatcherUnhandledExceptionEventArgs e)
        {
            var errorMessage = new ErrorMessage
            {
                ErrorText = e.Exception.ToString()
            };

            errorMessage.ShowDialog();
        }
Exemplo n.º 3
0
        private static void application_DispatcherUnhandledException(object sender,
            DispatcherUnhandledExceptionEventArgs e)
        {
            ObjectFactory.GetInstance<IEventAggregator>().SendMessage(new ForceEnvironmentRecycle());

            var errorMessage = new ErrorMessage
            {
                ErrorText = e.Exception.ToString()
            };

            errorMessage.ShowDialog();

            e.Handled = true;
        }