コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            DataTable newAttTable = new DataTable("NewAttTable");

            newAttTable.Columns.Add("TimFeatureName");
            newAttTable.Columns.Add("OldAttName");
            DataRow r;

            r    = newAttTable.NewRow();
            r[0] = "Head1";

            if (this.comboBox_Head.Text == null)
            {
                MessageBox.Show("Please select an attribute for Head", "Error", MessageBoxButtons.RetryCancel);
            }
            else
            {
                r[1] = this.comboBox_Head.Text;
            }

            newAttTable.Rows.Add(r);
            r = newAttTable.NewRow();

            r[0] = "Name";

            if (this.comboBox_Name.Text == null)
            {
                MessageBox.Show("Please select an attribute for Name", "Error", MessageBoxButtons.RetryCancel);
            }
            else
            {
                r[1] = this.comboBox_Name.Text;
            }
            newAttTable.Rows.Add(r);
            string newShapefileName = ArcTimUtilities.createTimShapefile(shpFileName, newAttTable, "hls");

            ArcTimUtilities.addNewShapefile(m_app, newShapefileName);
            this.Hide();
        }
コード例 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            DataTable newAttTable = new DataTable("NewAttTable");

            newAttTable.Columns.Add("TimFeatureName");
            newAttTable.Columns.Add("OldAttName");
            DataRow r;

            r    = newAttTable.NewRow();
            r[0] = "Flow";

            if (this.comboBox_Flow.Text == null)
            {
                MessageBox.Show("Please select an attribute for Flow", "Error", MessageBoxButtons.RetryCancel);
            }
            else
            {
                r[1] = this.comboBox_Flow.Text;
            }

            newAttTable.Rows.Add(r);
            r = newAttTable.NewRow();

            r[0] = "Radius";

            if (this.comboBox_Radius.Text == null)
            {
                MessageBox.Show("Please select an attribute for Radius", "Error", MessageBoxButtons.RetryCancel);
            }
            else
            {
                r[1] = this.comboBox_Radius.Text;
            }
            newAttTable.Rows.Add(r);
            r = newAttTable.NewRow();

            r[0] = "Name";

            if (this.comboBox_Name.Text == null)
            {
                MessageBox.Show("Please select an attribute for Name", "Error", MessageBoxButtons.RetryCancel);
            }
            else
            {
                r[1] = this.comboBox_Name.Text;
            }
            newAttTable.Rows.Add(r);
            r = newAttTable.NewRow();

            r[0] = "NumberOfLayers";

            if (this.textBox1.Text == null)
            {
                MessageBox.Show("Please enter the number of layers", "Error", MessageBoxButtons.RetryCancel);
            }
            else
            {
                r[1] = this.textBox1.Text;
            }
            newAttTable.Rows.Add(r);
            string newShapefileName = ArcTimUtilities.createTimShapefile(shpFileName, newAttTable, "well");

            ArcTimUtilities.addNewShapefile(m_app, newShapefileName);
            this.Hide();
        }