Exemple #1
0
 private void axSymbologyControl1_OnItemSelected(object sender, ESRI.ArcGIS.Controls.ISymbologyControlEvents_OnItemSelectedEvent e)
 {
     //Get the selected item
     m_styleGalleryItem = axSymbologyControl1.GetStyleClass(axSymbologyControl1.StyleClass).GetSelectedItem();
     //enable ok button
     button1.Enabled = true;
 }
Exemple #2
0
        private void axSymbologyControl1_OnItemSelected(object sender, ESRI.ArcGIS.Controls.ISymbologyControlEvents_OnItemSelectedEvent e)
        {
            IStyleGalleryItem styleGalleryItem = (IStyleGalleryItem)e.styleGalleryItem;

            //Get the frame containing the focus map
            IFrameProperties frameProperties = (IFrameProperties)axPageLayoutControl1.GraphicsContainer.FindFrame(axPageLayoutControl1.ActiveView.FocusMap);

            if (styleGalleryItem.Item is IBackground)
            {
                //Set the frame's background
                frameProperties.Background = (IBackground)styleGalleryItem.Item;
            }
            else if (styleGalleryItem.Item is IBorder)
            {
                //Set the frame's border
                frameProperties.Border = (IBorder)styleGalleryItem.Item;
            }
            else if (styleGalleryItem.Item is IShadow)
            {
                //Set the frame's shadow
                frameProperties.Shadow = (IShadow)styleGalleryItem.Item;
            }

            //Refresh the PageLayoutControl
            axPageLayoutControl1.Refresh(esriViewDrawPhase.esriViewBackground, null, null);
        }
Exemple #3
0
        private void axSymbologyControl1_OnItemSelected(object sender, ESRI.ArcGIS.Controls.ISymbologyControlEvents_OnItemSelectedEvent e)
        {
            IStyleGalleryItem styleGalleryItem = (IStyleGalleryItem)e.styleGalleryItem;

            if (styleGalleryItem.Item is IMarkerSymbol)
            {
                //Set the default marker symbol
                m_graphicProperties.MarkerSymbol = (IMarkerSymbol)styleGalleryItem.Item;
            }
            else if (styleGalleryItem.Item is ILineSymbol)
            {
                //Set the default line symbol
                m_graphicProperties.LineSymbol = (ILineSymbol)styleGalleryItem.Item;
            }
            else if (styleGalleryItem.Item is IFillSymbol)
            {
                //Set the default fill symbol
                m_graphicProperties.FillSymbol = (IFillSymbol)styleGalleryItem.Item;
            }
            else if (styleGalleryItem.Item is ITextSymbol)
            {
                //Set the default text symbol
                m_graphicProperties.TextSymbol = (ITextSymbol)styleGalleryItem.Item;
            }
        }
 //.................................................
 //.................................................
 //.................................................
 private void axSymbologyControl1_OnItemSelected(object sender,
                                                 ESRI.ArcGIS.Controls.ISymbologyControlEvents_OnItemSelectedEvent e)
 {
     _wasmodified          = true;
     _displayModified      = true;
     lblColorRampName.Text = SelectedColorRampName;
     //Get the selected item
     m_styleGalleryItem     = (IStyleGalleryItem)e.styleGalleryItem;
     _selectedcolorrampname = m_styleGalleryItem.Name;
 }
Exemple #5
0
        private void axSymbologyControl1_OnItemSelected(object sender, ESRI.ArcGIS.Controls.ISymbologyControlEvents_OnItemSelectedEvent e)
        {
            m_styleGalleryItem = e.styleGalleryItem as IStyleGalleryItem;

            //预览被选择的样式项
            PreviewImage();

            //更新大小属性控件的值
            this.symbolSize.Value = Convert.ToDecimal(GetSizeFromSymbol(m_styleGalleryItem.Item as ISymbol));
            //更新颜色控件的颜色
        }
Exemple #6
0
        private void axSymbologyControl1_OnItemSelected(object sender, ESRI.ArcGIS.Controls.ISymbologyControlEvents_OnItemSelectedEvent e)
        {
            m_styleGalleryItem = e.styleGalleryItem as IStyleGalleryItem;

            //更新颜色控件的颜色
            btnFillColor.BackColor = GetColorFromItem(m_styleGalleryItem.Item);

            //更新大小属性控件的值
            this.symbolSize.Value = Convert.ToDecimal(GetSizeFromItem(m_styleGalleryItem.Item));

            PreviewImage();
        }
        private void axSymbologyControl1_OnItemSelected(object sender, ESRI.ArcGIS.Controls.ISymbologyControlEvents_OnItemSelectedEvent e)
        {
            m_styleGalleryItem = e.styleGalleryItem as IStyleGalleryItem;

            //更新单位控件值
            cmbxUnit.SelectedIndex = GetUnitIndexFromItem(m_styleGalleryItem.Item);

            //更改文本字体和大小控件的值
            cmbxTextFont.SelectedIndex = cmbxTextFont.FindString(GetTextFontFromItem(m_styleGalleryItem.Item).Name);
            cmbxTextSize.Text          = GetTextSizeFromItem(m_styleGalleryItem.Item).ToString();

            //更新文本颜色控件的值
            btnTextColor.BackColor = GetTextColorFromItem(m_styleGalleryItem.Item);

            //更新条块大小和颜色控件的值
            cmbxSymbolSize.Text      = GetTextSizeFromItem(m_styleGalleryItem.Item).ToString();
            btnSymbolColor.BackColor = GetSymbolColorFromItem(m_styleGalleryItem.Item);

            PreviewImage();
        }
Exemple #8
0
 private void axSymbologyControl1_OnItemSelected(object sender, ESRI.ArcGIS.Controls.ISymbologyControlEvents_OnItemSelectedEvent e)
 {
     //Get the selected item
     m_styleGalleryItem = (IStyleGalleryItem)e.styleGalleryItem;
 }
Exemple #9
0
 private void axSymbologyControl1_OnItemSelected(object sender, ESRI.ArcGIS.Controls.ISymbologyControlEvents_OnItemSelectedEvent e)
 {
     pStyleGalleryItem = (IStyleGalleryItem)e.styleGalleryItem;
     this.PreviewImage();
 }
Exemple #10
0
 private void Ctrl_Symbology_OnItemSelected(object sender, ESRI.ArcGIS.Controls.ISymbologyControlEvents_OnItemSelectedEvent e)
 {
     m_pStyleGalleryItem = (IStyleGalleryItem)e.styleGalleryItem;
 }