Пример #1
0
        void AddEmptyPlansToList(ICadastralFabric Fabric, IFIDSet EmptyPlansFIDSet, dlgEmptyPlansList EmptyPlansList)
        {
            ITable         pPlansTable = Fabric.get_CadastralTable(esriCadastralFabricTable.esriCFTPlans);
            CheckedListBox list        = EmptyPlansList.checkedListBox1;
            IArray         array       = new ArrayClass();

            for (int idx = 0; idx <= (EmptyPlansFIDSet.Count() - 1); idx++)
            {
                // Add the name of the plan to the list
                Int32 i_x;
                Int32 iPlanName;
                iPlanName = pPlansTable.FindField("NAME");
                EmptyPlansFIDSet.Next(out i_x);
                array.Add(i_x);
                string sPlanName = (string)pPlansTable.GetRow(i_x).get_Value(iPlanName);
                list.Items.Add(sPlanName, true);
            }
            // Bind array of plan ids with the list
            list.Tag = (object)array;
            if (list.Items.Count > 0)
            {
                EmptyPlansList.checkedListBox1_SelectedValueChanged(null, null);
            }
        }
 void AddEmptyPlansToList(ICadastralFabric Fabric, IFIDSet EmptyPlansFIDSet, dlgEmptyPlansList EmptyPlansList)
 {
     ITable pPlansTable = Fabric.get_CadastralTable(esriCadastralFabricTable.esriCFTPlans);
       CheckedListBox list = EmptyPlansList.checkedListBox1;
       IArray array = new ArrayClass();
       for (int idx = 0; idx <= (EmptyPlansFIDSet.Count() - 1); idx++)
       {
     // Add the name of the plan to the list
     Int32 i_x;
     Int32 iPlanName;
     iPlanName = pPlansTable.FindField("NAME");
     EmptyPlansFIDSet.Next(out i_x);
     array.Add(i_x);
     string sPlanName = (string)pPlansTable.GetRow(i_x).get_Value(iPlanName);
     list.Items.Add(sPlanName, true);
       }
       // Bind array of plan ids with the list
       list.Tag = (object)array;
       if(list.Items.Count>0)
     EmptyPlansList.checkedListBox1_SelectedValueChanged(null, null);
 }