예제 #1
0
        private static void ShowInformation(InformationMessage message)
        {
            InformationWindow window = new InformationWindow
            {
                DataContext = message.InformationVM
            };

            message.InformationVM.RequestClose += (sender, e) =>
            {
                window.Close();
            };
            window.Closed += (sender, args) =>
            {
                message.Process();
            };
            window.Show();
        }
예제 #2
0
 private static void ShowInformation(InformationMessage message)
 {
     try
     {
         InformationWindow window = new InformationWindow
         {
             DataContext = message.InformationVM,
             Owner       = Application.Current.MainWindow,
         };
         message.InformationVM.RequestClose += (sender, e) =>
         {
             window.Close();
         };
         window.Closed += (sender, args) =>
         {
             message.Process();
         };
         window.Show();
     }
     catch (Exception ex)
     {
         ExceptionUtils.HandleException(ex);
     }
 }