Exemplo n.º 1
0
 public FormSymbologySelector(FormMainOperation formMainOperation, esriSymbologyStyleClass esriSymbologyStyleClass)
 {
     InitializeComponent();
     m_FrmMainOper             = formMainOperation;
     Ctrl_Symbology.StyleClass = esriSymbologyStyleClass;
     Ctrl_Symbology.Refresh();
 }
Exemplo n.º 2
0
 public FormQuery(FormMainOperation formMainOperation)
 {
     InitializeComponent();
     m_FrmMainOper = formMainOperation;
     m_pCurMap     = m_FrmMainOper(OperationType.GetMap) as IMap;
     for (int i = 0; i < m_pCurMap.LayerCount; i++)
     {
         ILayer pCurLayer = m_pCurMap.get_Layer(i);
         if (pCurLayer is GroupLayer)
         {
             ICompositeLayer curComLayer = pCurLayer as ICompositeLayer;
             for (int j = 0; j < curComLayer.Count; j++)
             {
                 CbBox_TargetLayer.Items.Add(curComLayer.get_Layer(j).Name);
                 CbBox_SourceLayer.Items.Add(curComLayer.get_Layer(j).Name);
             }
         }
         else
         {
             CbBox_TargetLayer.Items.Add(m_pCurMap.get_Layer(i).Name);
             CbBox_SourceLayer.Items.Add(m_pCurMap.get_Layer(i).Name);
         }
     }
     if (CbBox_TargetLayer.Items.Count > 0)
     {
         pSelectedFeatureLayer           = m_pCurMap.get_Layer(0) as IFeatureLayer;
         CbBox_TargetLayer.SelectedIndex = 0;
         CbBox_SourceLayer.SelectedIndex = 0;
     }
     CbBox_SelectionSetOperationType.SelectedIndex = 0;
 }
Exemplo n.º 3
0
 public FormSymbology(FormMainOperation frmMainOperation)
 {
     InitializeComponent();
     frmMainOper = frmMainOperation;
     m_pTarLayer = frmMainOper(OperationType.GetSelectedLayer) as ILayer;
     m_pTarMap   = frmMainOper(OperationType.GetMap) as IMap;
     m_pTarScene = frmMainOper(OperationType.GetScene) as IScene;
     if (m_pTarLayer is IRasterLayer)
     {
         ILayer pCurLayer;
         for (int i = 0; i < m_pTarScene.LayerCount; i++)
         {
             pCurLayer = m_pTarScene.Layer[i];
             if (pCurLayer is IRasterLayer)
             {
                 CbBoxBaseLayer.Items.Add(pCurLayer.Name);
             }
         }
         if (CbBoxBaseLayer.Items.Count != 0)
         {
             CbBoxBaseLayer.SelectedIndex = 0;
         }
     }
     else
     {
         m_pFillColor    = Tool_.PutRGB(255, 255, 255);
         m_pOutlineColor = Tool_.PutRGB(255, 255, 255);
         #region 获取图层所有的字段,放入comboBox
         for (int i = 0; i < m_pTarFeatureLayer.FeatureClass.Fields.FieldCount; i++)
         {
             string fieldName = m_pTarFeatureLayer.FeatureClass.Fields.get_Field(i).Name;
             if (fieldName.ToUpper() != "SHAPE" && fieldName.ToUpper() != "FID")
             {
                 comboBox1.Items.Add(m_pTarFeatureLayer.FeatureClass.Fields.get_Field(i).Name);
             }
         }
         if (comboBox1.Items.Count != 0)
         {
             comboBox1.SelectedIndex = 0;
         }
         #endregion
     }
     if ((int)frmMainOper(OperationType.GetViewIndex) == 2)
     {
         Ctrl_Tab.TabPages[0].Dispose();
     }
     else
     {
         Ctrl_Tab.TabPages[1].Dispose();
     }
 }