Ejemplo n.º 1
0
 private void showArchiveWindow()
 {
     try
     {
         archiveWindow = new ArchiveWindow();
         archiveWindow.Show();
         System.Windows.Threading.Dispatcher.Run();
     } catch { }
 }
Ejemplo n.º 2
0
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (MessageBox.Show("Закрыть ?","Вопрос",MessageBoxButton.YesNo)==MessageBoxResult.Yes)
            {
                try
                {
                    bdEditorWindow.Close();
                    bdEditorWindow = null;
                    myThrArchive = null;
                }
                catch
                {
                    
                }
                try
                {
                    archiveWindow.Dispatcher.Invoke(delegate
                    {
                        archiveWindow.Close();
                        archiveWindow = null;
                    });
                }
                catch
                {

                }
                var ps = Settings.Default;
                ps.Top = Top;
                ps.Left = Left;
                ps.Save();
            }
            else
            {
                e.Cancel = true;
            }
        }