本文整理汇总了C#中ParameterizedThreadStart.BeginInvoke方法的典型用法代码示例。如果您正苦于以下问题:C# ParameterizedThreadStart.BeginInvoke方法的具体用法?C# ParameterizedThreadStart.BeginInvoke怎么用?C# ParameterizedThreadStart.BeginInvoke使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParameterizedThreadStart
的用法示例。
在下文中一共展示了ParameterizedThreadStart.BeginInvoke方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: chkdsk_Click
private void chkdsk_Click(object sender, EventArgs e)
{
//docmd("chkdsk.exe", disk + ":");
ParameterizedThreadStart p = new ParameterizedThreadStart(docmd2);
IAsyncResult i=p.BeginInvoke(new string[] { "chkdsk", disk + ":" }, null, null);
//p.EndInvoke(i);
}
示例2: ClientListener
public ClientListener()
: base()
{
listener_async = new AsyncCallback(AsyncResult_listener);
listener_start = new ParameterizedThreadStart(Listener);
listener_start.BeginInvoke(this, listener_async, this);
listener = new Thread(listener_start);
base.Start();
}
示例3: SetupAsync
public void SetupAsync()
{
if (IsTreeBusy) return;
this.toolBar1.Enabled = false;
this.Text = "MyMeta Browser (" + DefaultSettings.Instance.DbDriver + ")";
static_rootNode = new TreeNode();
this.MyTree.BeginUpdate();
this.MyTree.Nodes.Clear();
this.MyTree.Nodes.Add(loadingNode);
this.MyTree.EndUpdate();
this.MyTree.Invalidate();
loadingNode.ImageIndex = 26;
loadingNode.SelectedImageIndex = loadingNode.ImageIndex;
this.MyTree.Invalidate();
timerIconAnimate.Start();
// RESET MYMETA!
StaticMyMeta = null;
AsyncLoadInfo ali = new AsyncLoadInfo();
ali.RootNode = static_rootNode;
ali.ShowSystemEntities = this.chkSystem.Checked;
ali.Error = string.Empty;
this.Invalidate();
this.Refresh();
ParameterizedThreadStart ts = new ParameterizedThreadStart(SetupAndBuildNodeTree);
asyncres = ts.BeginInvoke(ali, new AsyncCallback(SetupAsyncCompleted), null);
}
示例4: ExecuteScripts
public void ExecuteScripts(IEnumerable<Script> scripts)
{
IsExecuting = true;
ExecutionDelegate = ExecuteScriptsInternal;
ExecutionDelegate.BeginInvoke(scripts, ExecuteScriptsCallback, null);
}