コード例 #1
0
ファイル: FeatLyrFrm.cs プロジェクト: QingleCheng/WindowDemo
        private void btnSingleSymbol_Click(object sender, EventArgs e)
        {
            SymbolSelectorFrm SingleSymbolSelctor = new SymbolSelectorFrm(null, this.pLayer);

            if (SingleSymbolSelctor.ShowDialog() == DialogResult.OK)
            {
                this.btnSingleSymbol.BackgroundImage = SingleSymbolSelctor.pSymbolImage;
                this.singleSymbol = SingleSymbolSelctor.pSymbol;
            }
        }
コード例 #2
0
ファイル: FeatLyrFrm.cs プロジェクト: QingleCheng/WindowDemo
        private void btnSelectionSymbol_Click(object sender, EventArgs e)
        {
            SymbolSelectorFrm selectionSymbolSelectorFrm = new SymbolSelectorFrm(null, this.pLayer);

            if (selectionSymbolSelectorFrm.ShowDialog() == DialogResult.OK)
            {
                this.rbnSelectionSymbol.Checked         = true;
                this.btnSelectionSymbol.BackgroundImage = selectionSymbolSelectorFrm.pSymbolImage;
                this.selectionSymbol = selectionSymbolSelectorFrm.pSymbol;
            }
        }
コード例 #3
0
ファイル: MainFrm.cs プロジェクト: hijushen/WindowDemo
 private void axTOCControl_OnMouseDown(object sender, ITOCControlEvents_OnMouseDownEvent e)
 {
     esriTOCControlItem itemType = esriTOCControlItem.esriTOCControlItemNone;
     IBasicMap basicMap = null;
     ILayer layer = null;
     object unk = null;
     object data = null;
     //this.axTOCControl.GetSelectedItem(ref itemType, ref basicMap, ref layer, ref unk, ref data);
     this.axTOCControl.HitTest(e.x,e.y,ref itemType, ref basicMap, ref layer, ref unk, ref data);
     if (e.button == 2)
     {
         //switch (itemType)
         //{
         //    case esriTOCControlItem.esriTOCControlItemNone:
         //        MessageBox.Show("None");
         //        break;
         //    case esriTOCControlItem.esriTOCControlItemMap:
         //        MessageBox.Show("Map\n" + basicMap.Name);
         //        break;
         //    case esriTOCControlItem.esriTOCControlItemLayer:
         //        MessageBox.Show("Layer\n" + layer.Name);
         //        break;
         //    case esriTOCControlItem.esriTOCControlItemLegendClass:
         //        MessageBox.Show("Legend\n" + ((ILegendGroup)unk).get_Class((int)data).Description + "\n" + ((ILegendGroup)unk).get_Class((int)data).Label);
         //        break;
         //    case esriTOCControlItem.esriTOCControlItemHeading:
         //        MessageBox.Show("Heading\n" + ((ILegendGroup)unk).Heading);
         //        break;
         //}
         switch (itemType)
         {
             case esriTOCControlItem.esriTOCControlItemLayer:
                 this.TOCRightLayer = layer;
                 this.contextMenuTOCFeatureLyr.Show(this.axTOCControl, e.x, e.y);
                 break;
             case esriTOCControlItem.esriTOCControlItemMap:
                 this.contextMenuTOCMap.Show(this.axTOCControl, e.x, e.y);
                 break;
         }
     }
     if (e.button == 1)
     {
         switch (itemType)
         {
             case esriTOCControlItem.esriTOCControlItemLegendClass:
                 ILegendClass pLegendClass = ((ILegendGroup)unk).get_Class((int)data);
                 SymbolSelectorFrm newSymbolSelectorFrm = new SymbolSelectorFrm(pLegendClass, layer);
                 if (newSymbolSelectorFrm.ShowDialog() == DialogResult.OK)
                 {
                     this.mainMapControl.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);
                     pLegendClass.Symbol = newSymbolSelectorFrm.pSymbol;
                     this.axTOCControl.Update();
                 }
                 break;
         }
     }
 }
コード例 #4
0
ファイル: FeatLyrFrm.cs プロジェクト: hijushen/WindowDemo
 private void btnSingleSymbol_Click(object sender, EventArgs e)
 {
     SymbolSelectorFrm SingleSymbolSelctor = new SymbolSelectorFrm(null, this.pLayer);
     if (SingleSymbolSelctor.ShowDialog() == DialogResult.OK)
     {
         this.btnSingleSymbol.BackgroundImage = SingleSymbolSelctor.pSymbolImage;
         this.singleSymbol = SingleSymbolSelctor.pSymbol;
     }
 }
コード例 #5
0
ファイル: FeatLyrFrm.cs プロジェクト: hijushen/WindowDemo
 private void btnSelectionSymbol_Click(object sender, EventArgs e)
 {
     SymbolSelectorFrm selectionSymbolSelectorFrm = new SymbolSelectorFrm(null, this.pLayer);
     if (selectionSymbolSelectorFrm.ShowDialog() == DialogResult.OK)
     {
         this.rbnSelectionSymbol.Checked = true;
         this.btnSelectionSymbol.BackgroundImage = selectionSymbolSelectorFrm.pSymbolImage;
         this.selectionSymbol = selectionSymbolSelectorFrm.pSymbol;
     }
 }