public CurveMonitor(int tunnelId, string tunnelName, UnderMessageWindow mainW) { InitializeComponent(); this.tunnelId = tunnelId; mainWin = mainW; Text += "-" + tunnelName; // 清空datagridview _dgvData.Rows.Clear(); // 清空曲线1的fastline tChartM.Series[0].Clear(); // 清空曲线2的fastline tChartT2.Series[0].Clear(); // 清空曲线3的fastline tChartN.Series[0].Clear(); // 根据巷道编号获取探头信息 Object[] probes = Probe.FindAllByTunnelId(this.tunnelId); cbxSensors.Items.AddRange(probes); cbxSensors.DisplayMember = "ProbeName"; cbxSensors.ValueMember = "ProbeId"; cbxSensors.SelectedIndex = -1; // 获取T2传感器的Id _T2Id = Probe.GetT2Id(tunnelId); }
public SetDefaultValue(UnderMessageWindow form) { InitializeComponent(); _superForm = form; DataBindUtil.LoadTeam(cboTeamName); DataBindUtil.LoadWorkTime(cboWorkTime, rbtn38.Checked ? Const_MS.WORK_GROUP_ID_38 : Const_MS.WORK_GROUP_ID_46); if (WorkingTimeDefault.FindFirst().DefaultWorkTimeGroupId == Const_MS.WORK_GROUP_ID_38) { rbtn38.Checked = true; } else { rbtn46.Checked = true; } cboWorkTime.Text = DataBindUtil.JudgeWorkTimeNow(rbtn38.Checked ? Const_MS.WORK_TIME_38 : Const_MS.WORK_TIME_46); }
private void btnSure_Click(object sender, EventArgs e) { var status = false; var userName = tbPeople.Text; var password = tbCode.Text; //验证帐号密码是否正确 if (LoginSuccess(userName, password)) { status = true; Hide(); var a = new UnderMessageWindow(); a.ShowDialog(); } else { Alert.alert(Const.USER_NAME_OR_PWD_ERROR_MSG, Const.LOGIN_FAILED_TITLE, MessageBoxButtons.OK, MessageBoxIcon.Error); } }