Beispiel #1
0
        private void CatoTemplateApplySelect_Load(object sender, EventArgs e)
        {
            CartoTemplateTableStruct struct2 = new CartoTemplateTableStruct();
            ITable table = AppConfigInfo.OpenTable(struct2.TableName);

            if (table != null)
            {
                ICursor  o     = table.Search(null, false);
                IRow     row   = o.NextRow();
                string[] items = new string[2];
                while (row != null)
                {
                    CartoTemplateData data = new CartoTemplateData(row);
                    items[0] = data.Name;
                    items[1] = data.Description;
                    ListViewItem item = new ListViewItem(items)
                    {
                        Tag = data
                    };
                    this.listView1.Items.Add(item);
                    row = o.NextRow();
                }
                ComReleaser.ReleaseCOMObject(o);
                o = null;
            }
        }
Beispiel #2
0
        public CartoTemplateData(IRow irow_1)
        {
            this.irow_0   = null;
            this.string_0 = "";
            this.double_0 = 0.0;
            this.double_1 = 0.0;
            this.double_2 = 0.0;
            this.string_1 = "";
            this.string_2 = "";
            this.double_3 = 0.1;
            this.double_4 = 0.1;
            this.double_5 = 100.0;
            this.double_6 = 100.0;
            this.double_7 = 0.1;
            this.double_8 = 10.0;
            this.string_3 = "";
            this.irow_0   = irow_1;
            CartoTemplateTableStruct struct2 = new CartoTemplateTableStruct();
            ITable table = irow_1.Table;

            this.string_0 = irow_1.get_Value(table.FindField(struct2.NameFieldName)).ToString();
            this.string_1 = irow_1.get_Value(table.FindField(struct2.DescriptionFieldName)).ToString();
            this.string_2 = this.method_0(irow_1.get_Value(table.FindField(struct2.TuKuoInfoFieldName)));
            try
            {
                this.double_0 = double.Parse(irow_1.get_Value(table.FindField(struct2.ScaleFieldName)).ToString());
            }
            catch
            {
            }
            try
            {
                this.double_1 = double.Parse(irow_1.get_Value(table.FindField(struct2.WidthFieldName)).ToString());
                this.double_2 = double.Parse(irow_1.get_Value(table.FindField(struct2.HeightFieldName)).ToString());
            }
            catch
            {
            }
            this.string_3 = this.method_0(irow_1.get_Value(table.FindField(struct2.LegendInfoFieldName)));
            try
            {
                this.double_3 = double.Parse(irow_1.get_Value(table.FindField(struct2.InOutDistFieldName)).ToString());
            }
            catch
            {
            }
            try
            {
                this.double_7 = double.Parse(irow_1.get_Value(table.FindField(struct2.OutBorderWidthFieldName)).ToString());
            }
            catch
            {
            }
            try
            {
                this.double_8 = double.Parse(irow_1.get_Value(table.FindField(struct2.StartCoodinateMultipleFieldName)).ToString());
            }
            catch
            {
            }
            try
            {
                this.double_5 = double.Parse(irow_1.get_Value(table.FindField(struct2.XIntervalFieldName)).ToString());
            }
            catch
            {
            }
            try
            {
                this.double_6 = double.Parse(irow_1.get_Value(table.FindField(struct2.YIntervalFieldName)).ToString());
            }
            catch
            {
            }
            try
            {
                this.double_4 = double.Parse(irow_1.get_Value(table.FindField(struct2.TitleDistFieldName)).ToString());
            }
            catch
            {
            }
        }