/// <summary> /// Durch den Anwender angeforderte Umschaltung des Vollbildmodus. /// </summary> private void ProcessFullScreen() { // Change Properties.Settings.Default.FullScreen = !Properties.Settings.Default.FullScreen; Properties.Settings.Default.Save(); // Attach to viewer IOSDSite osd = (IOSDSite)theViewer; // Hide any overlay osd.Hide(); // Put us in position SetBounds(); }
/// <summary> /// Zeigt die Einstellungen der Anwendung an. /// </summary> /// <param name="viewer">Die zugehörige Darstellungsinstanz.</param> private bool ShowGlobalOptions(IViewerSite viewer) { // Show configuration dialog using (ShowCursor()) using (ProgramSettings dialog = new ProgramSettings(viewer)) if (DialogResult.OK == dialog.ShowDialog(this)) { // Update Properties.Settings.Default.Save(); // Change priority Process.GetCurrentProcess().PriorityClass = Properties.Settings.Default.Priority; // Done on first call if (null == viewer) { return(true); } // Load mode ProgramSettings.ChangeTypes changeType = dialog.ChangeType; // Update if (ProgramSettings.ChangeTypes.Picture == changeType) { if (!viewer.CanRestartGraph) { changeType = ProgramSettings.ChangeTypes.Application; } } // Check mode switch (changeType) { case ProgramSettings.ChangeTypes.Application: { // Report to user MessageBox.Show(this, Properties.Resources.RequireRestart, Properties.Resources.OptionGlobalSettings); // We can do no more break; } case ProgramSettings.ChangeTypes.Picture: { // Switch off OSD IOSDSite osd = (IOSDSite)theViewer; osd.Hide(); // Restart picture viewer.Restart(); // Done break; } } // Accepted return(true); } // Not accepted return(false); }