/// <summary> /// 工站测试 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button2_Click(object sender, EventArgs e) { string[] stationNames = JFHubCenter.Instance.InitorManager.GetIDs(typeof(IJFStation)); if (null == stationNames || 0 == stationNames.Length) { MessageBox.Show("系统中没有工站"); return; } IJFStation station = JFHubCenter.Instance.InitorManager.GetInitor(stationNames[0]) as IJFStation; Form stationForm = station.GenForm(); if (null != stationForm) { stationForm.Show(); } }
private void baseTestToolStripMenuItem_Click(object sender, EventArgs e) { if (null == _station) { return; } Form fm = _station.GenForm(); fm.ShowDialog(); //if(typeof(JFStationBase).IsAssignableFrom(_station.GetType())) //{ // FormStationBaseDebug fm = new FormStationBaseDebug(); // fm.SetStation(_station as JFStationBase); // fm.ShowDialog(); //} }