Here are the examples of the csharp api class System.Windows.Forms.Control.BeginInvoke(System.Delegate, params object[]) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
200 Examples
0
1. Example
View licenseprotected void InvokeLayout() { // We want a layout to occur but not until the message loop // is spun. So this will happen before any painting because // paint messages only occur when the message queue is empty. if (IsHandleCreated && !IsDisposed) BeginInvoke(_layoutCall); }
0
2. Example
View licenseprotected void InvokeLayout() { // We want a layout to occur but not until the message loop // is spun. So this will happen before any painting because // paint messages only occur when the message queue is empty. BeginInvoke(_layoutCall); }
0
3. Example
View licensevoid BindingComboBox_SelectedIndexChanged(object sender, EventArgs e) { if(IndexSelectedChanged != null) this.BeginInvoke(IndexSelectedChanged, sender, e); }
0
4. Example
View licenseprivate void SqlServerDlg_Load(object sender, EventArgs e) { // FillList(); this.BeginInvoke(new Delegate_FillList(FillList)); }
0
5. Example
View licensepublic static void BeginSelectItem(Control control, ListViewItem item) { control.BeginInvoke(new Action<ListViewItem>( (o) => { o.Selected = true; o.EnsureVisible(); }), item); }
0
6. Example
View licenseprivate void LoginDlg_Load(object sender, System.EventArgs e) { if (textBox_comment.Text == "") textBox_comment.Visible = false; this.BeginInvoke(new Delegate_SetFocus(SetFocus)); }
0
7. Example
View licenseprivate void KernelCfgFileDialog_Load(object sender, EventArgs e) { this.Changed = false; this.BeginInvoke(new Action(FocusEdit)); }
0
8. Example
View licenseprivate void ObjectViewerDialog_Load(object sender, EventArgs e) { if (string.IsNullOrEmpty(this.Url) == false) this.BeginInvoke(new Action<string>(Navigate), this.Url); }
0
9. Example
View licenseinternal void EndCatch() { Delegate_EndCatch d = new Delegate_EndCatch(_endCatch); this.BeginInvoke(d); }
0
10. Example
View licenseinternal void EndCatch() { Delegate_EndCatch d = new Delegate_EndCatch(_endCatch); this.BeginInvoke(d); }
0
11. Example
View licensepublic void BeginShowValueList( int nCurLine, int nCaretPosition, int nLineChars, string strCurLine) { this.nCurLine = nCurLine; object[] pList = { nCaretPosition, nLineChars, strCurLine }; this.BeginInvoke(new Delegate_ShowValueList(ShowValueList), pList); }
0
12. Example
View licenseprivate void GetDbNameDlg_Load(object sender, EventArgs e) { // ???????? if (this.m_strDbType == "biblio") { if (Program.MainForm != null && Program.MainForm.BiblioDbProperties != null) { for (int i = 0; i < Program.MainForm.BiblioDbProperties.Count; i++) { this.listBox_biblioDbNames.Items.Add(Program.MainForm.BiblioDbProperties[i].DbName); } } } else if (this.m_strDbType == "reader") { if (Program.MainForm != null && Program.MainForm.ReaderDbNames != null) { for (int i = 0; i < Program.MainForm.ReaderDbNames.Length; i++) { this.listBox_biblioDbNames.Items.Add(Program.MainForm.ReaderDbNames[i]); } } } // ???? if (String.IsNullOrEmpty(this.DbName) == false) { this.listBox_biblioDbNames.SelectedItem = this.DbName; this.BeginInvoke(new Action(EnsureSelectedLineVisible)); } if (this.EnableNotAsk == true) this.checkBox_notAsk.Enabled = true; if (this.AutoClose == true) API.PostMessage(this.Handle, WM_AUTO_CLOSE, 0, 0); }
0
13. Example
View licenseprivate void GetMergeStyleDialog_Load(object sender, EventArgs e) { this.BeginInvoke(new Action(AutoSet)); }
0
14. Example
View licenseprivate void BiblioDupDialog_Load(object sender, EventArgs e) { this.BeginInvoke(new Action(FillBrowseList)); }
0
15. Example
View licenseprivate void comboBox_quickSetTimeRange_SelectedIndexChanged(object sender, EventArgs e) { if (this.IsHandleCreated == false) return; Delegate_QuickSetTimeRange d = new Delegate_QuickSetTimeRange(QuickSetTimeRange); this.BeginInvoke(d, new object[] { sender }); }
0
16. Example
View licensepublic void Beep(FingerprintServer server, int nCount) { if (this.InvokeRequired) { _Beep d = new _Beep(Beep); this.BeginInvoke(d, new object[] { server, nCount }); } else { if (m_bBeep == true) server.Beep(nCount); } }
0
17. Example
View licensepublic void Light(FingerprintServer server, string strColor) { if (this.InvokeRequired) { _Light d = new _Light(Light); this.BeginInvoke(d, new object[] { server, strColor }); } else { server.Light(strColor); } }
0
18. Example
View licenseprivate void UpdateProgress ( string Message ) { if (InvokeRequired) { BeginInvoke(new Action<string>(UpdateProgress), Message); return; } ProgressText.Text = Message; }
0
0
20. Example
View licenseprivate void labelCancelAll_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { try { if (InvokeRequired) { BeginInvoke(new LinkLabelLinkClickedEventHandler(labelCancelAll_LinkClicked), new[] {sender, e}); return; } for (int i = 0; i < panelBody.Controls.Count; i++) { var stateControl = panelBody.Controls[i] as StateControl; if (stateControl != null) { stateControl.Cancel(); } } } catch (Exception exception) { Log.Error(exception, false); } }
0
21. Example
View licensepublic void State_FinishedStream(DriveProxy.API.DriveService.State sender, API.DriveService.Stream stream) { try { if (InvokeRequired) { BeginInvoke(new DriveProxy.API.DriveService.State.StreamHandler(State_FinishedStream), new object[] {sender, stream}); return; } for (int i = 0; i < panelBody.Controls.Count; i++) { var stateControl = panelBody.Controls[i] as StateControl; if (stateControl != null) { if (stateControl.Stream == stream) { if (stream.Failed) { _hasError = true; } break; } } } } catch (Exception exception) { Log.Error(exception, false); } }
0
22. Example
View licenseprivate void EnableGoButton(bool enabled) { if (m_formClosing) return; if (InvokeRequired) { BeginInvoke(new Action<bool>(EnableGoButton), enabled); } else { buttonGo.Enabled = enabled; } }
0
23. Example
View licenseprivate void UpdateProgressBar(int value) { if (m_formClosing) return; if (InvokeRequired) { BeginInvoke(new Action<int>(UpdateProgressBar), value); } else { if (value < progressBar.Minimum) value = progressBar.Minimum; if (value > progressBar.Maximum) progressBar.Maximum = value; progressBar.Value = value; } }
0
24. Example
View licenseprivate void SetProgressMaximum(int maximum) { if (m_formClosing) return; if (InvokeRequired) { BeginInvoke(new Action<int>(SetProgressMaximum), maximum); } else { progressBar.Maximum = maximum; } }
0
25. Example
View licenseprivate void EnableGoButton(bool enabled) { if (m_formClosing) return; if (InvokeRequired) { BeginInvoke(new Action<bool>(EnableGoButton), enabled); } else { if (!m_operationStarted) buttonGo.Enabled = enabled; } }
0
26. Example
View licenseprivate void UpdateProgressBar(int value) { if (m_formClosing) return; if (InvokeRequired) { BeginInvoke(new Action<int>(UpdateProgressBar), value); } else { progressBar.Value = value; } }
0
27. Example
View licenseprivate void SetProgressMaximum(int maximum) { if (m_formClosing) return; if (InvokeRequired) { BeginInvoke(new Action<int>(SetProgressMaximum), maximum); } else { progressBar.Maximum = maximum; } }
0
28. Example
View licenseprivate void UpdateInstanceName(string instanceName) { if (m_formClosing) return; if (InvokeRequired) { BeginInvoke(new Action<string>(UpdateInstanceName), instanceName); } else { textBoxInstanceName.Text = instanceName; } }
0
29. Example
View licenseprivate void BeginUpdateListItemState(ListViewItem item,string text) { UpdatePatchingMessageDelegate upmd = new UpdatePatchingMessageDelegate(UpdatePatchingMessage); this.BeginInvoke(upmd, item, text); }
0
30. Example
View licensevoid bco_DiscoverDevicesComplete(object sender, DiscoverDevicesEventArgs e) { var dlgt = new EventHandler<DiscoverDevicesEventArgs>(UpdateCompleted); lvDevices.BeginInvoke(dlgt, this, e); // var bco = (BluetoothComponent)e.UserState; bco.Dispose(); }
0
31. Example
View licenseprotected void BalanceHandler(object sender, PacketReceivedEventArgs e) { Packet packet = e.Packet; string value = ((MoneyBalanceReplyPacket)packet).MoneyData.MoneyBalance.ToString(); this.BeginInvoke(new StringParamInvoker(UpdateBalance), new object[] { value }); }
0
32. Example
View licenseprivate void DirPeopleHandler(object sender, PacketReceivedEventArgs e) { Packet packet = e.Packet; DirPeopleReplyPacket reply = (DirPeopleReplyPacket)packet; foreach (DirPeopleReplyPacket.QueryRepliesBlock block in reply.QueryReplies) { ListViewItem listItem = new ListViewItem(new string[] { Utils.BytesToString(block.FirstName) + " " + Utils.BytesToString(block.LastName), (block.Online ? "Yes" : "No"), block.AgentID.ToString() }); this.BeginInvoke(new ListViewItemParamInvoker(AddFindItem), new object[] { listItem }); } }
0
33. Example
View licensevoid InitWizForm_DocumentReady(object sender, Awesomium.Core.UrlEventArgs e) { w/n ..... /n //View Source file for more details /n }
0
34. Example
View licensepublic void InvalidateSafe() { var listBox = ListBox; if(listBox != null) { if(listBox.InvokeRequired) { Action<CustomListBoxItem> action = listBox.InvalidateItem; listBox.BeginInvoke(action, new object[] { this }); } else { listBox.InvalidateItem(this); } } }
0
35. Example
View licensepublic void InvalidateSubItemSafe(int id) { var listBox = ListBox; if(listBox != null && IsPresented) { if(listBox.InvokeRequired) { Action<CustomListBoxItem, int> action = listBox.InvalidateSubItem; listBox.BeginInvoke(action, this, id); } else { listBox.InvalidateSubItem(this, id); } } }
0
36. Example
View licensepublic void SetAction(string action) { if(!IsDisposed) { if(InvokeRequired) { try { BeginInvoke(new Action<string>(SetAction), action); } catch(ObjectDisposedException) { } } else { _lblAction.Text = action; } } }
0
37. Example
View licenseprivate void OnCurrentProgressChanged(object sender, EventArgs e) { if(InvokeRequired) { BeginInvoke(new EventHandler(OnCurrentProgressChanged), sender, e); } else { _updateProgress.Value = _monitor.CurrentProgress; } }
0
38. Example
View licenseprivate void OnMaximumProgressChanged(object sender, EventArgs e) { if(InvokeRequired) { BeginInvoke(new EventHandler(OnMaximumProgressChanged), sender, e); } else { _updateProgress.Maximum = _monitor.MaximumProgress; } }
0
39. Example
View licenseprivate void OnStageChanged(object sender, EventArgs e) { if(InvokeRequired) { BeginInvoke(new EventHandler(OnStageChanged), sender, e); } else { _lblStage.Text = _monitor.Stage; } }
0
40. Example
View licenseprivate void OnCanCancelChanged(object sender, EventArgs e) { if(InvokeRequired) { BeginInvoke(new EventHandler(OnCanCancelChanged), sender, e); } else { if(!_monitor.CancelRequested) { _btnCancel.Enabled = _monitor.CanCancel; } } }
0
41. Example
View licenseprotected override void Write(LogEventInfo logEvent) { RichTextBoxRowColoringRule matchingRule = null; foreach (RichTextBoxRowColoringRule rr in this.RowColoringRules) { if (rr.CheckCondition(logEvent)) { matchingRule = rr; break; } } if (this.UseDefaultRowColoringRules && matchingRule == null) { foreach (RichTextBoxRowColoringRule rr in DefaultRowColoringRules) { if (rr.CheckCondition(logEvent)) { matchingRule = rr; break; } } } if (matchingRule == null) { matchingRule = RichTextBoxRowColoringRule.Default; } string logMessage = this.Layout.Render(logEvent); this.TargetRichTextBox.BeginInvoke(new DelSendTheMessageToRichTextBox(this.SendTheMessageToRichTextBox), new object[] { logMessage, matchingRule }); }
0
42. Example
View licenseprivate void ReadTibiaCastFilesCallback(IAsyncResult ar) { if (InvokeRequired) { BeginInvoke(new Action<IAsyncResult>(ReadTibiaCastFilesCallback), ar); return; } var tile = map.Tiles.FirstOrDefault(); if (tile != null && miniMap.CenterLocation == null) miniMap.CenterLocation = tile.Location; miniMap.EndUpdate(); }
0
43. Example
View licenseprivate void m_InvokeOnNewSearched(InterfaceSearchedFile file, int searchID) { this.BeginInvoke(new SearchEvent(m_OnNewSearched),new object[] {file,searchID}); }
0
44. Example
View licenseprivate void m_InvokeOnModifiedSearched(InterfaceSearchedFile file, int searchID) { this.BeginInvoke(new SearchEvent(m_OnModifiedSearched),new object[] {file,searchID}); }
0
45. Example
View licenseprivate void m_InvokeOnEndSearch(int searchID) { this.BeginInvoke(new EndSearchEvent(m_OnEndSearch),new object[] {searchID}); }
0
46. Example
View licensepublic void OnLog(Constants.Log importance,string strMsg) { this.BeginInvoke(logDelegate,new object[] {this,importance,strMsg}); }
0
47. Example
View licensevoid hidden_Unload(object sender, EventArgs e) { this.BeginInvoke(on_hidden_unload, sender, e, this); }
0
48. Example
View licensevoid LogMouseMove(object sender, MouseMoveEventArgs e) { this.BeginInvoke(ControlLogMouseMoveChanges, hidden, this, sender, e); }
0
49. Example
View licensevoid LogMouseWheelChanged(object sender, MouseWheelEventArgs e) { this.BeginInvoke(ControlLogMouseWheelChanges, hidden, this, sender, e); }
0
50. Example
View licensevoid LogMouseButtonDown(object sender, MouseButtonEventArgs e) { this.BeginInvoke(ControlLogMouseKeyDown, hidden, this, sender, e); }