Beispiel #1
0
        private void btnExecute_Click(object sender, EventArgs e)
        {
            string smpFtrNm     = cmbSampleFeatureClass.Text;
            string mapFld       = cmbMap.Text;
            string refFld       = cmbRef.Text;
            string wght         = cmbWeight.Text;
            double alpha        = System.Convert.ToDouble(nudAlpha.Value);
            string outModelPath = txtOutputPath.Text;

            if (outModelPath == null || outModelPath == "")
            {
                MessageBox.Show("You must select an output model", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (wght != null && wght != "")
            {
                WEIGHT = wght;
            }
            if (smpFtrNm == null || smpFtrNm == "")
            {
                MessageBox.Show("You must select a feature Class", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (mapFld == null || mapFld == "")
            {
                MessageBox.Show("You must select a map field", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (refFld == null || refFld == "")
            {
                MessageBox.Show("You must select a Reference field", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            this.Visible = false;
            ITable ftrCls = ftrDic[smpFtrNm];

            Statistics.dataGeneralConfusionMatirx aa = new Statistics.dataGeneralConfusionMatirx(ftrCls, refFld, mapFld);
            if (WEIGHT != "")
            {
                aa.WeightFeild = WEIGHT;
            }
            aa.writeXTable(outModelPath);
            aa.getReport(alpha);
            this.Close();
        }
        private void btnExecute_Click(object sender, EventArgs e)
        {
            string smpFtrNm = cmbSampleFeatureClass.Text;
            string mapFld = cmbMap.Text;
            string refFld = cmbRef.Text;
            string wght = cmbWeight.Text;
            double alpha = System.Convert.ToDouble(nudAlpha.Value);
            string outModelPath = txtOutputPath.Text;
            if (outModelPath == null || outModelPath == "")
            {
                MessageBox.Show("You must select an output model", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (wght != null && wght != "")
            {
                WEIGHT = wght;
            }
            if (smpFtrNm == null || smpFtrNm == "")
            {
                MessageBox.Show("You must select a feature Class", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (mapFld == null || mapFld == "")
            {
                MessageBox.Show("You must select a map field", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (refFld == null || refFld == "")
            {
                MessageBox.Show("You must select a Reference field", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            this.Visible = false;
            ITable ftrCls = ftrDic[smpFtrNm];
            Statistics.dataGeneralConfusionMatirx aa = new Statistics.dataGeneralConfusionMatirx(ftrCls,refFld,mapFld);
            if (WEIGHT != "")
            {
                aa.WeightFeild = WEIGHT;
            }
            aa.writeXTable(outModelPath);
            aa.getReport(alpha);
            this.Close();
        }