/// <summary> /// Enable watchdogs to keep this window in focus /// </summary> private void enableWatchdogs() { if (_windowActiveWatchdog == null) { _windowActiveWatchdog = new WindowActiveWatchdog(this); } }
/// <summary> /// Form has been loaded. Perform initialization /// </summary> /// <param name="sender">event sender</param> /// <param name="e">event args</param> private void PhraseEditorForm_Load(object sender, EventArgs e) { Text = R.GetString("PhraseEditor"); labelPhrase.Text = R.GetString("Phrase") + ":"; float currentAspectRatio = (float)ClientSize.Height / ClientSize.Width; if (_designTimeAspectRatio != 0.0f && currentAspectRatio != _designTimeAspectRatio) { ClientSize = new System.Drawing.Size(ClientSize.Width, (int)(_designTimeAspectRatio * ClientSize.Width)); } PhraseSpeakAgent.Instance.EvtCommandEnabled += Instance_EvtCommandEnabled; textBoxPhrase.TextChanged += TextBoxPhrase_TextChanged; textBoxPhrase.KeyDown += TextBoxPhrase_KeyDown; _windowActiveWatchdog = new WindowActiveWatchdog(this); initWidgetSettings(); _dialogCommon.OnLoad(); buttonOKWidget = _dialogCommon.RootWidget.Finder.FindChild(buttonOK.Handle); updateUI(); PanelCommon.AnimationManager.Start(PanelCommon.RootWidget); }
private void PhraseListEditForm_Load(object sender, EventArgs e) { float currentAspectRatio = (float)ClientSize.Height / ClientSize.Width; if (_designTimeAspectRatio != 0.0f && currentAspectRatio != _designTimeAspectRatio) { ClientSize = new System.Drawing.Size(ClientSize.Width, (int)(_designTimeAspectRatio * ClientSize.Width)); } Text = R.GetString("EditPhrases"); labelFavoritePhrase.Text = "* " + R.GetString("FavoritePhrase"); _phrases = Phrases.Load(); foreach (var phrase in _phrases.PhraseList) { phraseAdd(phrase); } listBoxPhrases.Focus(); if (listBoxPhrases.Items.Count > 0) { listBoxPhrases.SelectedIndex = 0; } _windowActiveWatchdog = new WindowActiveWatchdog(this); _dialogCommon.OnLoad(); PanelCommon.AnimationManager.Start(PanelCommon.RootWidget); }
/// <summary> /// Form has been loaded /// </summary> void AlternatePronunciationDataForm_Load(object sender, EventArgs e) { Log.Debug("Entering..."); _windowActiveWatchdog = new WindowActiveWatchdog(this); _dialogCommon.OnLoad(); _dialogCommon.GetAnimationManager().Start(_dialogCommon.GetRootWidget()); // populate listview from xml config file ImportPronunciationIntoListView(listViewAP, true); // select the first item by default const int DEFAULT_INITIAL_LISTVIEW_POSITION = 0; if (listViewAP.Items.Count > 0) { listViewAP.Items[DEFAULT_INITIAL_LISTVIEW_POSITION].Selected = true; // DEFAULT_INITIAL_LISTVIEW_POSITION; } else { Log.Debug("did not load any items!"); } listViewAP.AllowColumnReorder = false; listViewAP.AllowDrop = false; listViewAP.MultiSelect = false; listViewAP.FullRowSelect = true; setButtonStates(); }
/// <summary> /// Disables watchdogs /// </summary> private void removeWatchdogs() { if (_windowActiveWatchdog != null) { _windowActiveWatchdog.Dispose(); _windowActiveWatchdog = null; } }
/// <summary> /// Form has been loaded /// </summary> void AsterScreenTemplateForm_Load(object sender, EventArgs e) { _windowActiveWatchdog = new WindowActiveWatchdog(this); initWidgetSettings(); _dialogCommon.OnLoad(); _dialogCommon.GetAnimationManager().Start(_dialogCommon.GetRootWidget()); }
/// <summary> /// Initializes a new instance of the class. /// </summary> public ScreenLockSettingsForm() { InitializeComponent(); _windowActiveWatchdog = new WindowActiveWatchdog(this); Load += ScreenLockSettingsForm_Load; FormClosing += ScreenLockSettingsForm_FormClosing; }
/// <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) { populateFormText(); lblVolumeText.Text = String.Format(R.GetString("RangeFromTo"), _initialVolume.RangeMin, _initialVolume.RangeMax); lblRateText.Text = String.Format(R.GetString("RangeFromTo"), _initialRate.RangeMin, _initialRate.RangeMax); lblPitchText.Text = String.Format(R.GetString("RangeFromTo"), _initialPitch.RangeMin, _initialPitch.RangeMax); lblTTSEngineName.Text = Context.AppTTSManager.ActiveEngine.Descriptor.Name; _windowActiveWatchdog = new WindowActiveWatchdog(this); _dialogCommon.OnLoad(); subscribeToEvents(); PanelCommon.AnimationManager.Start(PanelCommon.RootWidget); }
/// <summary> /// Form has been loaded. Initialize /// </summary> private void MuteScreenSettingsForm_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 is loaded. Initialize /// </summary> /// <param name="sender">event sender</param> /// <param name="e">event args</param> private void NewFileNameForm_Load(object sender, EventArgs e) { float currentAspectRatio = (float)ClientSize.Height / ClientSize.Width; if (_designTimeAspectRatio != 0.0f && currentAspectRatio != _designTimeAspectRatio) { ClientSize = new Size(ClientSize.Width, (int)(_designTimeAspectRatio * ClientSize.Width)); } label1.Text = R.GetString(label1.Text); label2.Text = R.GetString(label2.Text); toolStripStatusLabel1.Text = R.GetString(this.toolStripStatusLabel1.Text); _windowActiveWatchdog = new WindowActiveWatchdog(this); Shown += NewFileNameForm_Shown; textBoxFileName.TextChanged += textBoxFileName_TextChanged; }
/// <summary> /// Initializes a new instance of the class. /// </summary> public MuteScreenSettingsForm() { InitializeComponent(); _windowActiveWatchdog = new WindowActiveWatchdog(this); _dialogCommon = new DialogCommon(this); if (!_dialogCommon.Initialize()) { Log.Debug("Initialization error"); } initWidgetSettings(); Load += MuteScreenSettingsForm_Load; FormClosing += MuteScreenSettingsForm_FormClosing; }
/// <summary> /// Form has been loaded. Initialize /// </summary> private void ScreenLockSettingsForm_Load(object sender, EventArgs e) { populateFormText(); tbPINCode.TextChanged += tbPINCode_TextChanged; tbPINCode.KeyPress += textBoxPinCode_KeyPress; _dialogCommon.OnLoad(); Invoke(new MethodInvoker(delegate { _windowActiveWatchdog = new WindowActiveWatchdog(this); })); subscribeToEvents(); PanelCommon.AnimationManager.Start(PanelCommon.RootWidget); }
/// <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 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/Delete Abbreviation"); } _windowActiveWatchdog = new WindowActiveWatchdog(this); initWidgetSettings(); _dialogCommon.OnLoad(); _dialogCommon.GetAnimationManager().Start(_dialogCommon.GetRootWidget()); }
private void removeWatchdogs() { if (_windowActiveWatchdog != null) { _windowActiveWatchdog.Dispose(); _windowActiveWatchdog = null; } }
private void enableWatchdogs() { if (_windowActiveWatchdog == null) { _windowActiveWatchdog = new WindowActiveWatchdog(this); } }
/// <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); }