/// <summary> /// Enables watchdogs /// </summary> private void enableWatchdogs() { if (_windowActiveWatchdog == null) { _windowActiveWatchdog = new WindowActiveWatchdog(this); } }
/// <summary> /// Disables watchdogs /// </summary> private void removeWatchdogs() { if (_windowActiveWatchdog != null) { _windowActiveWatchdog.Dispose(); _windowActiveWatchdog = null; } }
/// <summary> /// Initializes a new instance of the class. /// </summary> public ScreenLockSettingsForm() { InitializeComponent(); _windowActiveWatchdog = new WindowActiveWatchdog(this); _dialogCommon = new DialogCommon(this); if (!_dialogCommon.Initialize()) { Log.Debug("Initialization error"); } initWidgetSettings(); Load += ScreenLockSettingsForm_Load; FormClosing += ScreenLockSettingsForm_FormClosing; }
/// <summary> /// Form has been loaded. Initialize /// </summary> private void ScreenLockSettingsForm_Load(object sender, EventArgs e) { tbPINCode.TextChanged += tbPINCode_TextChanged; tbPINCode.KeyPress += tbPINCode_KeyPress; _dialogCommon.OnLoad(); Invoke(new MethodInvoker(delegate() { _windowActiveWatchdog = new WindowActiveWatchdog(this); })); subscribeToEvents(); _dialogCommon.GetAnimationManager().Start(_dialogCommon.GetRootWidget()); }
/// <summary> /// Form has been loaded. Perform initialization /// </summary> /// <param name="sender">event sender</param> /// <param name="e">event args</param> private void AbbreviationsEditorForm_Load(object sender, EventArgs e) { if (Add) { Windows.SetText(labelTitle, "Add Abbreviation"); var widget = _dialogCommon.GetRootWidget().Finder.FindChild("lblDelete"); if (widget != null) { widget.Enabled = false; } } else { Windows.SetText(labelTitle, "Edit Abbreviation"); } _windowActiveWatchdog = new WindowActiveWatchdog(this); initWidgetSettings(); _dialogCommon.OnLoad(); _dialogCommon.GetAnimationManager().Start(_dialogCommon.GetRootWidget()); }
/// <summary> /// Called when loaded. Create timers, position the window /// <param name="sender">event sender</param> /// <param name="e">event args</param> /// </summary> private void TalkWindowForm_Load(object sender, EventArgs e) { if (_acatFont == null) { var fontFamily = Fonts.Instance.GetFontFamily("ACAT Icon"); if (fontFamily != null) { _acatFont = new Font(fontFamily, labelSpeaker.Font.Size); labelSpeaker.Font = _acatFont; labelClearText.Font = _acatFont; } } setFont(FontSize); updateVolumeStatus(); CenterToScreen(); _windowOverlapWatchdog = new WindowOverlapWatchdog(this); _windowActiveWatchdog = new WindowActiveWatchdog(this); textBox.SelectionStart = textBox.Text.Length; textBox.DeselectAll(); }
/// <summary> /// Form is loaded. Initialize /// </summary> /// <param name="sender">event sender</param> /// <param name="e">event args</param> private void NewFileNameForm_Load(object sender, EventArgs e) { _windowActiveWatchdog = new WindowActiveWatchdog(this); Shown += NewFileNameForm_Shown; textBoxFileName.TextChanged += new EventHandler(textBoxFileName_TextChanged); }
/// <summary> /// Form has been loaded. Initlialize the controls /// on the form /// </summary> private void TextToSpeechSettingsForm_Load(object sender, EventArgs e) { lblVolumeText.Text = _initialVolume.RangeMin + " to " + _initialVolume.RangeMax; lblRateText.Text = _initialRate.RangeMin + " to " + _initialRate.RangeMax; lblPitchText.Text = _initialPitch.RangeMin + " to " + _initialPitch.RangeMax; lblTTSEngineName.Text = Context.AppTTSManager.ActiveEngine.Descriptor.Name; _windowActiveWatchdog = new WindowActiveWatchdog(this); _dialogCommon.OnLoad(); subscribeToEvents(); _dialogCommon.GetAnimationManager().Start(_dialogCommon.GetRootWidget()); }
/// <summary> /// Form has been loaded. Initlialize the controls /// on the form /// </summary> private void TextToSpeechSettingsForm_Load(object sender, EventArgs e) { lblVolumeText.Text = _initialVolume.RangeMin + " - " + _initialVolume.RangeMax; lblRateText.Text = _initialRate.RangeMin + " - " + _initialRate.RangeMax; lblPitchText.Text = _initialPitch.RangeMin + " - " + _initialPitch.RangeMax; lblTTSEngineName.Text = Context.AppTTSManager.ActiveEngine.Descriptor.Name; _windowActiveWatchdog = new WindowActiveWatchdog(this); _dialogCommon.OnLoad(); subscribeToEvents(); Windows.SetText(label1, label1.Text); Windows.SetText(lblTTSEngineName, lblTTSEngineName.Text); Windows.SetText(lblVolume, lblVolume.Text); Windows.SetText(lblSpeed, lblSpeed.Text); Windows.SetText(lblPitch, lblPitch.Text); Windows.SetText(lblVoice, lblVoice.Text); Windows.SetText(lblInstalledVoices, lblInstalledVoices.Text); _dialogCommon.GetAnimationManager().Start(_dialogCommon.GetRootWidget()); selectInstalledVoiceRow(); }