本文整理汇总了C#中System.ComponentModel.DoWorkEventArgs.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# DoWorkEventArgs.ToString方法的具体用法?C# DoWorkEventArgs.ToString怎么用?C# DoWorkEventArgs.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.ComponentModel.DoWorkEventArgs
的用法示例。
在下文中一共展示了DoWorkEventArgs.ToString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: dowork
private void dowork(object sender, DoWorkEventArgs e)
{
MessageBox.Show(e.ToString());
}
示例2: bw_Status_DoWork
protected override void bw_Status_DoWork(object sender, DoWorkEventArgs e)
{
SA_ProviderStatus saProviderStatus = new SA_ProviderStatus();
try
{
saProviderStatus.TerseStatus = ProviderStatus.Error;
if (File.Exists(this.FilePath))
{
if (this.Content != null)
{
if (this.Content.Rows.Count > 0)
{
saProviderStatus.TerseStatus = ProviderStatus.Ready;
saProviderStatus.VerboseStatus = string.Format("{0} Klar \r\n {1} Jobs klar ", (object) this.filePath, (object) this.Content.Rows.Count);
}
else
saProviderStatus.VerboseStatus = string.Format("{0} Kan ikke læses eller er tom \r\n ", (object) this.filePath, (object) this.Content.Rows.Count);
}
}
else
{
saProviderStatus.VerboseStatus = string.Format("{0} Kan ikke findes \r\n ", (object) this.filePath, (object) this.Content.Rows.Count);
saProviderStatus.TerseStatus = ProviderStatus.Unavailable;
}
}
catch (Exception ex)
{
saProviderStatus.TerseStatus = ProviderStatus.Error;
saProviderStatus.VerboseStatus = string.Format("{0} Kan ikke tilgås \r\n Fejl: {1}", (object) this.filePath, (object) e.ToString());
}
e.Result = (object) saProviderStatus;
}
示例3: bw_Status_DoWork
protected override void bw_Status_DoWork(object sender, DoWorkEventArgs e)
{
SA_StorageStatus st = new SA_StorageStatus(this.Status);
try
{
if (Directory.Exists(this.LocalPath))
{
st.TerseStatus = StorageStatus.Ready;
DriveInfo driveInfo = new DriveInfo(this.LocalPath);
st.VerboseStatus = string.Format("{0} ({1})\r\n {2} fri plads", (object)this.LocalPath, (object)((object)driveInfo.DriveFormat).ToString(), (object)SA_Convert.BytesToPrefixedValue(driveInfo.AvailableFreeSpace));
this.AddProviderStatus(st);
}
else
{
st.TerseStatus = StorageStatus.Unavailable;
st.VerboseStatus = string.Format("{0} Kan ikke findes", (object)this.LocalPath);
}
}
catch (Exception ex)
{
st.TerseStatus = StorageStatus.Error;
st.VerboseStatus = string.Format("{0} Kan ikke tilgås \r\n Fejl: {1}", (object)this.LocalPath, (object)e.ToString());
}
e.Result = (object)st;
}
示例4: worker_DoWork
/* worker_DoWork
* Background worker for TestMatrixScript_Click
* Loops through Matrix Script until "Stop the Script" is clicked
* Then it will run all left entries of the script and then it stops
* Bitmap scrolling is very slow, over ther serial port really slow
* The delay for bitmap scrolling will be ignored
*
*/
void worker_DoWork(object sender, DoWorkEventArgs e)
{
for (int i = 0; i < 1000000; i++)
{
if (abortLoop)
{
abortLoop = false;
break;
}
int startcolumn = 0, endcolumn = X_MAX, startrow = 0, endrow = Y_MAX;
if (TestSerialPort.Checked)
{
if (!serialPort1.IsOpen) { System.Windows.Forms.MessageBox.Show("Please select an COM port first for Serial communication!"); return; }
}
for (int x = 0; x < dataGridView1.RowCount - 1; x++)
{
int randomcolor = rnd.Next(1, 4);
int rowfrontcolor = 0;
if (dataGridView1.Rows[x].Cells[FColorIndex].Value.ToString() == "BLACK") { rowfrontcolor = 0; }
if (dataGridView1.Rows[x].Cells[FColorIndex].Value.ToString() == "GREEN") { rowfrontcolor = 1; }
if (dataGridView1.Rows[x].Cells[FColorIndex].Value.ToString() == "RED") { rowfrontcolor = 2; }
if (dataGridView1.Rows[x].Cells[FColorIndex].Value.ToString() == "ORANGE") { rowfrontcolor = 3; }
if (dataGridView1.Rows[x].Cells[FColorIndex].Value.ToString() == "RANDOMCOLOR") { rowfrontcolor = 4; }
if (dataGridView1.Rows[x].Cells[FColorIndex].Value.ToString() == "RANDOMCOLUMNCOLOR") { rowfrontcolor = 5; }
if (dataGridView1.Rows[x].Cells[FColorIndex].Value.ToString() == "RANDOMLINECOLOR") { rowfrontcolor = 6; }
if (dataGridView1.Rows[x].Cells[FColorIndex].Value.ToString() == "RANDOMREDGREENMULTICOLOR") { rowfrontcolor = 7; }
if (dataGridView1.Rows[x].Cells[FColorIndex].Value.ToString() == "MULTICOLOR") { rowfrontcolor = 8; }
if (dataGridView1.Rows[x].Cells[FColorIndex].Value.ToString() == "RANDOMREDORANGEMULTICOLOR") { rowfrontcolor = 9; }
int rowbackcolor = 0;
if (dataGridView1.Rows[x].Cells[BColorIndex].Value.ToString() == "BLACK") { rowbackcolor = 0; }
if (dataGridView1.Rows[x].Cells[BColorIndex].Value.ToString() == "GREEN") { rowbackcolor = 1; }
if (dataGridView1.Rows[x].Cells[BColorIndex].Value.ToString() == "RED") { rowbackcolor = 2; }
if (dataGridView1.Rows[x].Cells[BColorIndex].Value.ToString() == "ORANGE") { rowbackcolor = 3; }
if (dataGridView1.Rows[x].Cells[BColorIndex].Value.ToString() == "RANDOMCOLOR") { rowbackcolor = 4; }
if (dataGridView1.Rows[x].Cells[BColorIndex].Value.ToString() == "RANDOMCOLUMNCOLOR") { rowbackcolor = 5; }
if (dataGridView1.Rows[x].Cells[BColorIndex].Value.ToString() == "RANDOMLINECOLOR") { rowbackcolor = 6; }
if (dataGridView1.Rows[x].Cells[BColorIndex].Value.ToString() == "RANDOMREDGREENMULTICOLOR") { rowbackcolor = 7; }
if (dataGridView1.Rows[x].Cells[BColorIndex].Value.ToString() == "MULTICOLOR") { rowbackcolor = 8; }
if (dataGridView1.Rows[x].Cells[BColorIndex].Value.ToString() == "RANDOMREDORANGEMULTICOLOR") { rowbackcolor = 9; }
if ((string)dataGridView1.Rows[x].Cells[SFrameIndex].Value == "Draw Each Column/Char")
{
SFrame = "0";
}
else if ((string)dataGridView1.Rows[x].Cells[SFrameIndex].Value == "Send Frame after Bitmap/Text")
{
SFrame = "1";
}
else if ((string)dataGridView1.Rows[x].Cells[SFrameIndex].Value == "Don't Send Frame")
{
SFrame = "2";
}
if ((string)dataGridView1.Rows[x].Cells[BModeIndex].Value == "Bitmap Erase")
{
BMode = "1";
}
else
{
BMode = "0";
}
if (dataGridView1.Rows[x].Cells[ShowTypeIndex].Value.ToString() == "Bitmap" || dataGridView1.Rows[x].Cells[ShowTypeIndex].Value.ToString() == "TextBitmap")
{
if (Convert.ToInt16(dataGridView1.Rows[x].Cells[XCoordIndex].Value) >= 0)
{
startcolumn = 0;
}
else
{
startcolumn = -Convert.ToInt16(dataGridView1.Rows[x].Cells[XCoordIndex].Value);
}
if ((-Convert.ToInt16(dataGridView1.Rows[x].Cells[XCoordIndex].Value) + X_MAX + 1) >= Convert.ToInt16(dataGridView1.Rows[x].Cells[BitWidthIndex].Value))
{
endcolumn = Convert.ToInt16(dataGridView1.Rows[x].Cells[BitWidthIndex].Value);
}
else
{
endcolumn = -Convert.ToInt16(dataGridView1.Rows[x].Cells[XCoordIndex].Value) + X_MAX + 1;
}
if (Convert.ToInt16(dataGridView1.Rows[x].Cells[YCoordIndex].Value) >= 0)
{
startrow = 0;
}
else
{
startrow = -Convert.ToInt16(dataGridView1.Rows[x].Cells[YCoordIndex].Value);
}
if ((startrow + Y_MAX + 1) >= Convert.ToInt16(dataGridView1.Rows[x].Cells[BitHeightIndex].Value))
{
endrow = Convert.ToInt16(dataGridView1.Rows[x].Cells[BitHeightIndex].Value) - startrow;
//.........这里部分代码省略.........
示例5: bw_Status_DoWork
protected override void bw_Status_DoWork(object sender, DoWorkEventArgs e)
{
SA_StorageWorker saStorageWorker = sender as SA_StorageWorker;
string path = this.tmpPath + "\\spaceleft.txt" + this.GetHashCode().ToString();
string resultfile = this.tmpPath + "\\spaceleft_result.txt" + this.GetHashCode().ToString();
SA_StorageStatus st = new SA_StorageStatus(this.Status);
st.TerseStatus = StorageStatus.Error;
try
{
this.VerifySetup(st);
if (st.TerseStatus == StorageStatus.Available)
{
this.Execute("getspace " + path + " " + resultfile).WaitForExit();
string str1 = this.Result(resultfile);
if (str1 == "0")
{
if (File.Exists(path))
{
StreamReader streamReader = new StreamReader(path);
while (!streamReader.EndOfStream)
{
string[] strArray = streamReader.ReadLine().Split(new char[1]
{
':'
});
if (strArray[0].Contains("Max file size"))
this.maxFileSize = Convert.ToInt64(strArray[1].Trim());
else
this.freeSpace = Convert.ToInt64(strArray[1].Trim());
}
st.TerseStatus = StorageStatus.Ready;
SA_StorageStatus saStorageStatus = st;
string str2 = saStorageStatus.VerboseStatus + string.Format("{0} fri plads i permanent lager \r\n {1} fri plads i modtagebuffer", (object) SA_Convert.BytesToPrefixedValue(this.freeSpace), (object) SA_Convert.BytesToPrefixedValue(this.maxFileSize));
saStorageStatus.VerboseStatus = str2;
this.AddProviderStatus(st);
}
}
else
{
st.TerseStatus = StorageStatus.Error;
SA_StorageStatus saStorageStatus = st;
string str2 = saStorageStatus.VerboseStatus + string.Format("{0} returnerer fejl {1} på statusforespørgsel", (object) this.Name, (object) str1);
saStorageStatus.VerboseStatus = str2;
}
}
}
catch (Exception ex)
{
st.TerseStatus = StorageStatus.Error;
st.VerboseStatus = string.Format("{0} Kan ikke tilgås \r\n Fejl: {1}", (object) this.Name, (object) e.ToString());
Program.Events.LogOrNotify(ex);
}
e.Result = (object) st;
}