c# - Creating a new Event with Objects -


This is in C #

So I want to create an event to progress for multiple webbroser controls I am trying. These are all dynamically created as well as progress bars. That's why I can not call it beforehand. What I am doing is passing progress bar through the object array which has run away. It finally happens in the last manner in which I am creating a browser and making me a browser Need The phenomenon of progress change

Here is the code ....

  Private Object [] Runtext (String Restriction Text, Object Tab Control, Name, Object Progressbar, Ink Run Initist, String Testname) {Object [] The Return = Null; If (stopTests == incorrect) {var tabPageBrowser = New Tab Page (); Var Browser = New Webbrowser (); (TabControlName as TabControl). Tab page Add (tab puzzler); TabPageBrowser.Name = tabControlName.ToString (); If (banText == "999999999") {tabPageBrowser.Text = "History"; } Other {tabPageBrowser.Text = testName; } TabPageBrowser.Font = new System.Drawing.Font ("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (0))); Browser. Doc = DocStyle. fill; Browser.Url = new Uri (test strings (run itest, bantext); Browser.Name = tabControlName.ToString (); Browser.ScriptErrorsSuppressed = true; TabPageBrowser.Controls.Add (Browser); Browser. Changing progress + = new web browser progress changing event handler (browser's progress has changed); Try {while (Browser.ReadyState! = WebBrowserReadyState.Complete) {application.DoEvents (); }} Hold {return tap; } IntPtr pHandle = GetCurrentProcess (); SetProcessWorkingSetSize (pHandle, -1, -1); Object [] browser object = new object [2]; Browser object [0] = tab pagebugger; BrowserAbject [1] = Browser; If (BrowserAbject! = Null) {theReturn = BrowserObjects; }} Return return; }  

Now my question is, when I am creating an event, how can I add the "progress side" object so that the event is removed, then I can call it . I am basically creating a single progress bar for the 5+ webbroser controls and adding the progress of both of them together. So for some reason I tried to add this object to the method and it failed me. Please help and thank you !.

  browser. Changed progress = Browser's progress has changed; ... Zero Browser_ProgressChanged (Object Sender, WebBrowser Progress Changes EventArgs e) {if (e.maximum progression> 0) {int prog = (int) (100 * e.CurrentProgress / e.MaximumProgress); ProgressBar1.Value = prog; }} Personal advancement progress bar 1;  

Comments