static void Main(string[] args) { websocket w = new websocket(); w.CreateUniqueSession(); Console.ReadLine(); }
private void OpenOrderUI(int s) { try { UpLoad upload = new UpLoad(mWebsocket); if (Form1.dic_upLoad.Count > 0) { foreach (KeyValuePair <string, UpLoad> kv in Form1.dic_upLoad)//关闭其他窗口并移除 { kv.Value.Close(); kv.Value.Dispose(); websocket w = new websocket(); UpLoad u = new UpLoad(w); Form1.dic_upLoad.TryRemove(kv.Key, out u); } } string str = ""; Form1.dic_upLoad.TryAdd(str, upload); upload.Show(); } catch (Exception ex) { IniHelper.WriteLog(ex); return; } }
public thread_fsw2(string type, string path, websocket mWebsocket) { this.path = path; this.type = type; this.mWebsocket = mWebsocket; mIni = new IniHelper(); mIni.ImportHelper(System.Environment.CurrentDirectory + "\\Param.ini"); }
public UpLoad(websocket mWebsocket) { InitializeComponent(); dt1 = new DataTable(); dt2 = new DataTable(); this.mWebsocket = mWebsocket; mIni.ImportHelper(System.Environment.CurrentDirectory + "\\Param.ini"); }
public RAM() { InitializeComponent(); w = new websocket("localhost", "12001"); w.CreateUniqueSession(); System.Threading.Thread.Sleep(2000); w.RAMData += w_RAMData; }
/// <summary> /// 打开订单新窗口 /// </summary> /// <param name="orderid"></param> private void OpenUpload(string orderid) { UpLoad upload = new UpLoad(mWebsocket); if (Form1.dic_upLoad.Count > 0) { foreach (KeyValuePair <string, UpLoad> kv in Form1.dic_upLoad)//关闭其他窗口并移除 { kv.Value.Close(); kv.Value.Dispose(); websocket w = new websocket(); UpLoad u = new UpLoad(w); Form1.dic_upLoad.TryRemove(kv.Key, out u); } } Form1.dic_upLoad.TryAdd(orderid, upload); upload.Show(); }
/// <summary> /// F5刷新网页 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void gHook_KeyDown(object sender, KeyEventArgs e) { if (this.ContainsFocus) { if (e.KeyValue == 116) { wb.GetBrowser().Reload(); } else if (e.KeyValue == 117) { try { UpLoad upload = new UpLoad(mWebsocket); if (Form1.dic_upLoad.Count > 0) { foreach (KeyValuePair <string, UpLoad> kv in Form1.dic_upLoad)//关闭其他窗口并移除 { kv.Value.Close(); kv.Value.Dispose(); websocket w = new websocket(); UpLoad u = new UpLoad(w); Form1.dic_upLoad.TryRemove(kv.Key, out u); } } string str = ""; Form1.dic_upLoad.TryAdd(str, upload); upload.Show(); } catch (Exception ex) { IniHelper.WriteLog(ex); return; } } } }
//Start Monitoring private void btnStart_Click(object sender, EventArgs e) { w = new websocket("localhost", "12001"); w.CreateUniqueSession(); System.Threading.Thread.Sleep(2000); w.DiskData += w_DiskData; getDiskData(); //perfCountObj = new PerfCounterHD(Environment.MachineName); //perfCountObj = new PerfCounterHD(hostListComboBox.SelectedItem.ToString()); //diskDataValues.HostName = hostListComboBox.SelectedItem.ToString(); btnStop.Enabled = true; btnStart.Enabled = false; lblTransMax.Text = "0.0"; stopwatch.Start(); // ready the clock this.enableButtons(true); timer = new Timer { Enabled = true, Interval = 1000 }; timer.Tick += t_Tick; }
public check_thread(string dir, string type, websocket mWebsocket) { this.dir = dir; this.type = type; this.mWebsocket = mWebsocket; }
public ConnectToClient() { InitializeComponent(); client = new websocket("localhost", "12001"); }