public BrowserWindow() { InitializeComponent(); WindowSizeInfo.Apply(GlobalData.Settings.BrowserWindowSizeInfo, this); browser.KeyboardHandler = new BrowserKeyboardHandler(browser); }
/// <summary> /// Returns the representation of the <see cref="WindowSizeInfo"/> used for XML serialization. /// </summary> /// <returns>The representation of the <see cref="WindowSizeInfo"/> used for XML serialization.</returns> public WindowSizeInfo ToWindowSizeInfo() { WindowSizeInfo info = new WindowSizeInfo(); info.RestoreBounds = this.RestoreBounds; info.WindowState = this.WindowState; info.RestoreWindowState = this.RestoreWindowState; info.IsFullScreen = this.IsFullScreen; return(info); }
/// <summary> /// Returns a <see cref="WindowSize"/> for the specified <see cref="WindowSizeInfo"/>, or <c>null</c> if the /// specified <see cref="WindowSizeInfo"/> is <c>null</c>. /// </summary> /// <param name="info">A <see cref="WindowSizeInfo"/>.</param> /// <returns>A <see cref="WindowSize"/> for the specified <see cref="WindowSizeInfo"/>, or <c>null</c> if the /// specified <see cref="WindowSizeInfo"/> is <c>null</c>.</returns> public static WindowSize FromWindowSizeInfo(WindowSizeInfo info) { if (info == null) { return(null); } return(new WindowSize( info.RestoreBounds, info.WindowState, info.RestoreWindowState, info.IsFullScreen)); }
private void WindowClosing(object sender, System.ComponentModel.CancelEventArgs e) { if (browser.IsDisposed || _doClose) { browserWindow.WindowState = WindowState.Normal; GlobalData.Settings.BrowserWindowSizeInfo = WindowSizeInfo.GetSizeInfo(this); } else { bool forceClose = GlobalData.Settings.DisableOnBeforeUnloadDialog; browser.GetBrowser().CloseBrowser(forceClose); e.Cancel = true; } }
/// <summary> /// Returns the representation of the <see cref="TimerOptions"/> used for XML serialization. /// </summary> /// <returns>The representation of the <see cref="TimerOptions"/> used for XML serialization.</returns> public TimerOptionsInfo ToTimerOptionsInfo() { return(new TimerOptionsInfo { Title = this.title, AlwaysOnTop = this.alwaysOnTop, LoopTimer = this.loopTimer, PopUpWhenExpired = this.popUpWhenExpired, CloseWhenExpired = this.closeWhenExpired, ColorIdentifier = this.color != null ? this.color.Identifier : null, SoundIdentifier = this.sound != null ? this.sound.Identifier : null, LoopSound = this.loopSound, WindowSize = WindowSizeInfo.FromWindowSize(this.windowSize) }); }
/// <summary> /// Returns the representation of the <see cref="TimerOptions"/> used for XML serialization. /// </summary> /// <returns>The representation of the <see cref="TimerOptions"/> used for XML serialization.</returns> public TimerOptionsInfo ToTimerOptionsInfo() { return(new TimerOptionsInfo { Title = this.title, AlwaysOnTop = this.alwaysOnTop, PromptOnExit = this.promptOnExit, DoNotKeepComputerAwake = this.doNotKeepComputerAwake, ShowTimeElapsed = this.showTimeElapsed, LoopTimer = this.loopTimer, PopUpWhenExpired = this.popUpWhenExpired, CloseWhenExpired = this.closeWhenExpired, ShutDownWhenExpired = this.shutDownWhenExpired, ThemeIdentifier = this.theme?.Identifier, SoundIdentifier = this.sound?.Identifier, LoopSound = this.loopSound, WindowTitleMode = this.windowTitleMode, WindowSize = WindowSizeInfo.FromWindowSize(this.windowSize) }); }
private void WindowClosing(object sender, System.ComponentModel.CancelEventArgs e) { browser.GetBrowser().CloseBrowser(true); window.WindowState = WindowState.Normal; GlobalData.Settings.SwfWindowSizeInfo = WindowSizeInfo.GetSizeInfo(this); }
public SwfPlayerWindow() { InitializeComponent(); WindowSizeInfo.Apply(GlobalData.Settings.SwfWindowSizeInfo, this); }