示例#1
0
        private void ShowSettings()
        {
            SettingsWindow = new Settings((SearcherViewModel)DataContext);
            SettingsWindow.Closing += SettingsWindow_Closing;

            // Position Settings Window
            //!! TODO: This is not a very good code - what happens if MainWindow is too low, or too to the left?
            SettingsWindow.Top = Math.Max(0, Top);
            SettingsWindow.Left = Math.Max(0, Left - SettingsWindow.Width);

            SettingsWindow.Show();
        }
示例#2
0
 private void HideSettings()
 {
     SettingsWindow.Close();
     SettingsWindow = null;
 }
示例#3
0
 private void SettingsWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     SettingsWindow = null;
 }