本文整理汇总了C#中System.ComponentModel.RunWorkerCompletedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# RunWorkerCompletedEventArgs类的具体用法?C# RunWorkerCompletedEventArgs怎么用?C# RunWorkerCompletedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RunWorkerCompletedEventArgs类属于System.ComponentModel命名空间,在下文中一共展示了RunWorkerCompletedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Document_readFileComplete
private void Document_readFileComplete(object sender, RunWorkerCompletedEventArgs e)
{
scintilla.Text = e.Result as string;
m_lastWriteTime = System.IO.File.GetLastWriteTime(m_host.CurrentFileInEditor);
m_watcher.EnableRaisingEvents = true;
this.Enabled = true;
}
示例2: bw_RunWorkerCompleted
private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e){
this.DataContext = e.Result;
this._espera.Hide();
var r = datagrid1.CurrentContext.Items.Count;
}
示例3: backroungWorker_RunWorkerCompleted
void backroungWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
lstParentsHome.ItemsSource = logs;
dbc.Dispose();
popup.IsOpen = false;
}
示例4: clusterThread_RunWorkerCompleted
private void clusterThread_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
if ((!e.Cancelled) && (e.Result != null))
{
Dictionary<int, Cluster> result = e.Result as Dictionary<int, Cluster>;
if (result != null)
{
FeatureCollection clusters = new FeatureCollection();
int num = 0;
foreach (int num2 in result.Keys)
{
if (result.ContainsKey(num2))
num = Math.Max(result[num2].Count, num);
}
foreach (int num3 in result.Keys)
{
if (result.ContainsKey(num3) && result[num3].Features.Count == 1)
{
clusters.Add(result[num3].Features[0]);
}
else if (result.ContainsKey(num3))
{
Feature item = this.OnCreateFeature(result[num3].Features, new GeoPoint(result[num3].X, result[num3].Y), num);
item.DisableToolTip = true;
item.SetValue(Clusterer.ClusterProperty, result[num3].Features);
clusters.Add(item);
}
}
base.OnClusteringCompleted(clusters);
}
}
}
示例5: backgroundWorker1_RunWorkerCompleted
// finish
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
// End
MessageBox.Show("ダウンロードが完了しました。");
DialogResult = DialogResult.OK;
Close();
}
示例6: adbCommand_RunWorkerCompleted
private void adbCommand_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
try
{
if (AndroidLib.Selector == "sideload")
{
sideloadROMButton.Enabled = true;
MessageBox.Show(
openFileDialog1.SafeFileName +
@" has been successfully sideloaded! The ZIP will now automatically begin to flash on your phone.",
@"Hurray for ADB Sideload!", MessageBoxButtons.OK,
MessageBoxIcon.Information);
}
if (AndroidLib.Selector == "pullFile")
{
pullFilesButton.Enabled = true;
MessageBox.Show(
saveFileDialog1.FileName + @" has been successfully pulled!",
@"File Pull Successful!", MessageBoxButtons.OK,
MessageBoxIcon.Information);
}
}
catch (Exception ex)
{
MessageBox.Show(
@"An error has occured! A log file has been placed in the Logs folder within the Data folder. Please send the file to WindyCityRockr or post the file in the toolkit thread.",
@"Houston, we have a problem!", MessageBoxButtons.OK, MessageBoxIcon.Error);
string fileDateTime = DateTime.Now.ToString("MMddyyyy") + "_" + DateTime.Now.ToString("HHmmss");
var file = new StreamWriter("./Data/Logs/" + fileDateTime + ".txt");
file.WriteLine(ex);
file.Close();
}
}
示例7: backgroundWorker1_RunWorkerCompleted
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
buttonCancel.Visible = false;
progressBar1.Visible = false;
cur = dmp.ChooseCurriculum();
for (int j = 1; j < 6; j++)
{
DataTable dt = new DataTable();
dt.DefaultView.AllowDelete = false;
dt.DefaultView.AllowEdit = false;
dt.DefaultView.AllowNew = false;
DataColumn sütun;
DataRow satır;
foreach (Classroom item in cur.ClassroomList)
{
sütun = new DataColumn(item.Name);
dt.Columns.Add(sütun);
}
for (int i = 9; i < 17; i++)
{
satır = dt.NewRow();
foreach (Classroom item in cur.ClassroomList)
{
foreach (Schedule item2 in item.scheduleList)
{
if (i >= item2.startHour && i < item2.endHour && item2.whichDay == j)
{
satır[item.Name] += " + " + item2.section.SectionCourse.Name + "-sec " + item2.section.Name;
}
}
}
dt.Rows.Add(satır);
}
switch (j)
{
case 1:
dgw_mon_curri.DataSource = dt;
break;
case 2:
dgw_tues_curri.DataSource = dt;
break;
case 3:
dgw_wed_curri.DataSource = dt;
break;
case 4:
dgw_thur_curri.DataSource = dt;
break;
case 5:
dgw_fri_curri.DataSource = dt;
break;
default:
break;
}
}
CB_prof_list.DataSource = cur.ProfessorList;
progressBar1.Visible = false;
}
示例8: BlipDrawn
internal void BlipDrawn(object sender, RunWorkerCompletedEventArgs completedEventArgs)
{
var results = completedEventArgs.Result as DrawerResults;
if (results == null) return;
//lock (results.Blip.BlipObject)
//{
if (results.Exists)
{
results.Blip.Location = results.Location;
results.Blip.Refresh();
return;
}
Controls.Add(results.Blip);
if (results.Blip.BlipObject is INamed)
{
//tp.SetToolTip(results.Blip, ((INamed) results.Blip.BlipObject).Name);
}
if (results.Blip.BlipObject.IsMe)
{
results.Blip.BringToFront();
}
//}
}
示例9: CompleteWork
private void CompleteWork(object sender, RunWorkerCompletedEventArgs e)
{
if (this != null)
{
this.Close();
}
}
示例10: backgroundWorker1_RunWorkerCompleted
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
try
{
FloorPageResult result = e.Result as FloorPageResult;
if (result == null)
{
panelLoading.Visible = false;
MessageBox.Show("请求失败,请重试!");
return;
}
if (result.Code == (int)Constant.ResultCodeEnum.Error)
{
panelLoading.Visible = false;
MessageBox.Show(result.Message);
return;
}
dataGridView1.AutoGenerateColumns = false;
dataGridView1.DataSource = result.Data.Data;
pageControl1.SetPage(result.Data);
}
catch (Exception ex)
{
LogHelper.WriteException(ex);
}
finally
{
panelLoading.Visible = false;
}
}
示例11: upload_UploadFileCompletedToDo
private void upload_UploadFileCompletedToDo(object sender, RunWorkerCompletedEventArgs e)
{
if (e.Error != null)
{
//ShowResultInProgressBar(false, e);
_status.Host.Ui.ShowMsgInStatusBar(e.Error.Message);
}
else if (e.Result is bool)
{
string msg = string.Empty;
if (!(bool)e.Result)
{
msg = "Failed to upload file";
}
else
{
msg = "Upload file succeed";
}
_status.Host.Ui.ShowMsgInStatusBar(msg);
_status.Host.Ui.ShowMsgInAppDialog(msg);
//ShowResultInProgressBar(true, e);
//RefreshAllFiles(GetCurrentDirPath());
_status.FileManager.GetFileTree(_status.CurrentDirPath);
}
}
示例12: bizPalbackgroundWorker_RunWorkerCompleted
private void bizPalbackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
gridTimeLine.DataSource = e.Result as List<LibBizPal.Article>;
this.btnMyTL.Enabled = true;
this.btnPublicTL.Enabled = true;
}
示例13: DBBackgroundWorker_RunWorkerCompleted
void DBBackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
if (db != null)
{
viewModel.SelectedDatabase = db;
}
}
示例14: load_done
private void load_done(object sender, RunWorkerCompletedEventArgs e)
{
MainWindow m = new MainWindow();
status.Content = "Finished!";
m.Show();
this.Close();
}
示例15: loader_RunWorkerCompleted
void loader_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() => {
PI.IsVisible = false;
PI.IsIndeterminate = false;
});
}