public MarcoRelayFormularEditForm(MacroRelayPropagationModel model) { InitializeComponent(); m_RelayModel = model; List<string> probCase = new List<string>(); probCase.Add("Case1"); probCase.Add("Case3"); cmbProb.DataSource = probCase; }
private void ParameterSave(MacroRelayPropagationModel relayModel) { if (relayModel == null) return; relayModel.K1 = (float)Math.Round((double)ftbLos.ParameterList[0], 3); relayModel.K2 = (float)Math.Round((double)ftbLos.ParameterList[1], 3); relayModel.K3 = (float)Math.Round((double)ftbNLos.ParameterList[0], 3); relayModel.K4 = (float)Math.Round((double)ftbNLos.ParameterList[1], 3); if (relayModel.SelectCase == 0) { relayModel.K5 = (float)Math.Round((double)ftbProb.ParameterList[0], 3); relayModel.K6 = (float)Math.Round((double)ftbProb.ParameterList[1], 3); relayModel.K7 = (float)Math.Round((double)ftbProb.ParameterList[2], 3); relayModel.K8 = (float)Math.Round((double)ftbProb.ParameterList[3], 3); relayModel.K9 = (float)Math.Round((double)ftbProb.ParameterList[4], 3); } else { relayModel.K10 = (float)Math.Round((double)ftbProb.ParameterList[0], 3); relayModel.K11 = (float)Math.Round((double)ftbProb.ParameterList[1], 3); } }