public void setMethod(MorphTypes op) { VP_Morphology Morphology = (VP_Morphology)testcase; Morphology.method = op; bMethodFreezed = true; }
private void dlgMorphology_Load(object sender, EventArgs e) { int idx = 0; if (bMethodFreezed) { VP_Morphology Morphology = (VP_Morphology)testcase; listOP.Items.Add(Enum.GetName(typeof(MorphTypes), Morphology.method)); listOP.Enabled = false; } else { foreach (String n in Enum.GetNames(typeof(MorphTypes))) { int v = listOP.Items.Add(n); if (n == "Open") { idx = v; } } } listOP.SelectedIndex = idx; foreach (String n in Enum.GetNames(typeof(MorphShapes))) { int v = listMorphShape.Items.Add(n); if (n == "Rect") { idx = v; } } listMorphShape.SelectedIndex = idx; foreach (String n in Enum.GetNames(typeof(BorderTypes))) { int v = listBorderType.Items.Add(n); if (n == "Constant") { idx = v; } } listBorderType.SelectedIndex = idx; txtKSize_Width.Text = "3"; txtKSize_Height.Text = "3"; txtAnchor_X.Text = "-1"; txtAnchor_Y.Text = "-1"; txtIteration.Text = "1"; }
public dlgMorphology() { InitializeComponent(); testcase = new VP_Morphology(); bMethodFreezed = false; }