Click here to Skip to main content
15,881,812 members
Home / Discussions / C#
   

C#

 
AnswerRe: Threading/GIF animation Pin
N a v a n e e t h9-Feb-13 0:17
N a v a n e e t h9-Feb-13 0:17 
GeneralRe: Threading/GIF animation Pin
Amlanjyoti Saikia9-Feb-13 1:24
Amlanjyoti Saikia9-Feb-13 1:24 
AnswerRe: Threading/GIF animation Pin
Eddy Vluggen9-Feb-13 0:17
professionalEddy Vluggen9-Feb-13 0:17 
GeneralRe: Threading/GIF animation Pin
Amlanjyoti Saikia9-Feb-13 1:53
Amlanjyoti Saikia9-Feb-13 1:53 
AnswerRe: Threading/GIF animation [Solved] Pin
Dave Kreskowiak9-Feb-13 3:44
mveDave Kreskowiak9-Feb-13 3:44 
GeneralRe: Threading/GIF animation [Solved] Pin
Amlanjyoti Saikia1-Mar-13 19:20
Amlanjyoti Saikia1-Mar-13 19:20 
GeneralRe: Threading/GIF animation [Solved] Pin
Dave Kreskowiak2-Mar-13 3:56
mveDave Kreskowiak2-Mar-13 3:56 
AnswerRe: Threading/GIF animation [Solved] [Updated Code] Pin
Amlanjyoti Saikia1-Mar-13 19:21
Amlanjyoti Saikia1-Mar-13 19:21 
My code was absolutely stupid and unnecessarily complicated. Brain fart...

This is the new code sample for anyone interested.

C#
public class MainForm
{
WaitForm waitForm;

MainForm()
{
//Initializations
backgorundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bWorkerCompletedHandler_AllReports);
}

button1_ClickEventHandler(object sender, EventArgs e)
{
  waitForm = new Waitform;
  waitform.Show();
  backgroundWorker1.DoWork += new DoWorkEventHandler(bWorkerHandler_Option1);
  backgroundWorker1.RunWorkerAsync(ReportCategory1Object);
}

void bWorkerHandler_Option1(object sender, DoWorkEventArgs e)
{
//do boring stuff with e.Argument.
Foo(e.Argument);
}

button2_ClickEventHandler(object sender, EventArgs e)
{
  waitForm = new Waitform;
  waitform.Show();
  backgroundWorker1.DoWork += new DoWorkEventHandler(bWorkerHandler_Option2);
  backgroundWorker1.RunWorkerAsync(ReportCategory2Object);
}

void bWorkerHandler_Option2(object sender, DoWorkEventArgs e)
{
//do more boring stuff with e.Argument.
Bar(e.Argument);
}

void bWorkerCompletedHandler_AllReports(object sender, RunWorkerCompletedEventArgs e)
{
  backgroundWorker1 = new BackgroundWorker(); //Shortcut to detach the DoWorkEvents. There are a lot of DoWorkEvents.
  backgorundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bWorkerCompletedHandler_AllReports);
  waitForm.Close();
  //View report and cleanup stuff...
}

void Foo(object Something)
{
//Do Something
}

void Bar(object AnotherThing)
{
//Do Anotherthing
}
}

Questionhow to access the stream of the ip camera via c# using Aforge Pin
Glendonz8-Feb-13 22:56
Glendonz8-Feb-13 22:56 
AnswerRe: how to access the stream of the ip camera via c# using Aforge Pin
OriginalGriff8-Feb-13 23:04
mveOriginalGriff8-Feb-13 23:04 
GeneralRe: how to access the stream of the ip camera via c# using Aforge Pin
Glendonz13-Feb-13 19:31
Glendonz13-Feb-13 19:31 
Questionproperty of network base software? Pin
Edalat_20118-Feb-13 21:00
Edalat_20118-Feb-13 21:00 
AnswerRe: property of network base software? Pin
Richard MacCutchan8-Feb-13 23:01
mveRichard MacCutchan8-Feb-13 23:01 
GeneralRe: property of network base software? Pin
Edalat_20119-Feb-13 3:28
Edalat_20119-Feb-13 3:28 
GeneralRe: property of network base software? Pin
Dave Kreskowiak9-Feb-13 3:38
mveDave Kreskowiak9-Feb-13 3:38 
QuestionHow to import data from OpenOffice to DataTable/DataSet Pin
devchina8-Feb-13 19:43
devchina8-Feb-13 19:43 
AnswerRe: How to import data from OpenOffice to DataTable/DataSet Pin
Richard MacCutchan8-Feb-13 23:00
mveRichard MacCutchan8-Feb-13 23:00 
GeneralRe: How to import data from OpenOffice to DataTable/DataSet Pin
devchina8-Feb-13 23:15
devchina8-Feb-13 23:15 
GeneralRe: How to import data from OpenOffice to DataTable/DataSet Pin
Richard MacCutchan8-Feb-13 23:42
mveRichard MacCutchan8-Feb-13 23:42 
GeneralRe: How to import data from OpenOffice to DataTable/DataSet Pin
Dave Kreskowiak9-Feb-13 3:36
mveDave Kreskowiak9-Feb-13 3:36 
QuestionShapefile Creations Pin
devchina8-Feb-13 17:52
devchina8-Feb-13 17:52 
AnswerRe: Shapefile Creations Pin
Dave Kreskowiak8-Feb-13 18:29
mveDave Kreskowiak8-Feb-13 18:29 
GeneralRe: Shapefile Creations Pin
devchina8-Feb-13 18:38
devchina8-Feb-13 18:38 
GeneralRe: Shapefile Creations Pin
Dave Kreskowiak9-Feb-13 3:33
mveDave Kreskowiak9-Feb-13 3:33 
QuestionCross threaded operations Pin
MAW308-Feb-13 11:23
MAW308-Feb-13 11:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.