protected virtual void OnUpgradeSpeedChanged(SpeedChangedArgs speedChangedArgs) { this.UpgradeSpeedChanged?.Invoke(this, speedChangedArgs); }
protected virtual void OnDownloadSpeedChanged(SpeedChangedArgs speedChangedArgs) { this.DownloadSpeedChanged?.Invoke(this, speedChangedArgs); }
private void p_OutputDataReceived(object sender, DataReceivedEventArgs e) { StreamWriter sw = new StreamWriter("log.log", true); sw.WriteLine(e.Data); sw.Close(); if (!running == false) { if (program == MinerProgram.poclbm) { if (e.Data.Contains(" ")) { string[] split = e.Data.Split(' '); if (e.Data.Length != 0) { if (e.Data.Length != 60) { if (e.Data.Contains("khash")) { SpeedChangedArgs a = new SpeedChangedArgs(); a.CurrentSpeed = split[0]; a.TabIndex = TabIndex; this.SpeedChanged(this, a); } else if (e.Data.Contains("new block")) { System.Net.WebClient s = new System.Net.WebClient(); Stream ss = s.OpenRead("http://blockexplorer.com/q/getblockcount"); StreamReader sr = new StreamReader(ss); int t; bool b = int.TryParse(sr.ReadLine().ToString(), out t); if(b) BLOCKID = t; NewBlockArgs a = new NewBlockArgs(); BLOCKID++; a.BlockID = BLOCKID; a.TabIndex = TabIndex; this.NewBlock(this, a); } else if (e.Data.Contains("accepted")) { AcceptedShareArgs a = new AcceptedShareArgs(); a.TabIndex = TabIndex; ASHARES++; a.Accepted = ASHARES; this.AcceptedShare(this, a); } else if (e.Data.Contains("invalid")) { StaleShareArgs a = new StaleShareArgs(); SSHARES++; a.Stale = SSHARES; a.TabIndex = TabIndex; this.StaleShare(this, a); } else if ((e.Data.ToLower().Contains("rpc")) && (e.Data.ToLower().Contains("problem"))) { FailOverArgs a = new FailOverArgs(); a.nick = nickname; a.framerate = f; a.device = d; a.worksize = w; a.vectors = v; a.pooluser = pu; a.poolpass = pp; a.phost = ph; a.TabPage = TabIndex; a.pool = pool; a.mp = program; this.FailOver(this, a); } else { ErrorArgs a = new ErrorArgs(); this.Error(this, a); } } } } } } }