public FormDepth(CDepthParameters P) { InitializeComponent(); this.Text = m_stTitle; m_r = P; MeanTextBox.Text = "" + P.gauss.mean; StdTextBox.Text = "" + P.gauss.std; MaxTextBox.Text = "" + P.randm.max; VectorTextBox.Text = P.vectorMdl.vector.ConvertToString(); StepTextBox.Text = "" + P.vectorMdl.step.ConvertToString(); GaussGroupBox.Enabled = false; RndGroupBox.Enabled = false; VectorGroupBox.Enabled = false; if(P.type == MODELTYPE.GAUSSIAN) GaussGroupBox.Enabled = true; else if(P.type == MODELTYPE.RANDOM) RndGroupBox.Enabled = true; else if(P.type == MODELTYPE.MATRIX) VectorGroupBox.Enabled = true; RefreshButton.Enabled = false; OkButton.Enabled = true; m_initializing = false; }
//--------------// // Class Methods //--------------// public CDepthParameters GetCopy() { CDepthParameters c = new CDepthParameters(); c.m_gauss = m_gauss.GetCopy(); c.m_randm = m_randm.GetCopy(); c.m_vectorMdl = m_vectorMdl.GetCopy(); c.m_modelType = m_modelType; switch(m_modelType) { case MODELTYPE.GAUSSIAN: c.m_base = c.m_gauss; break; case MODELTYPE.RANDOM: c.m_base = c.m_randm; break; case MODELTYPE.MATRIX: c.m_base = c.m_vectorMdl; break; } return c; }