Example #1
0
        private ISymbol[] CreateSymbols()
        {
            IColorRamp pColorRamp = (cmbColorRamp.SelectedItem as DevComponents.Editors.ComboItem).Tag as IColorRamp;
            bool       bCreateRamp;

            pColorRamp.Size = levelInput.Value <= 1 ? 2 : levelInput.Value;
            pColorRamp.CreateRamp(out bCreateRamp);
            IEnumColors enumColors = pColorRamp.Colors;

            enumColors.Reset();

            ISymbol[] symbols = new ISymbol[levelInput.Value];
            ESRI.ArcGIS.esriSystem.IObjectCopy copy = new ESRI.ArcGIS.esriSystem.ObjectCopyClass();
            for (int i = 0; i < levelInput.Value; i++)
            {
                symbols[i] = copy.Copy(labelPreviewFore.Tag) as ISymbol;
                IColor pColor = enumColors.Next();
                if (pColor == null)
                {
                    enumColors.Reset();
                    enumColors.Next();
                }
                ModuleCommon.ChangeSymbolColor(symbols[i], pColor);
            }
            return(symbols);
        }
Example #2
0
        //yjl20110826 add
        private ISymbol[] CreateSymbols(int count)
        {
            IColorRamp pColorRamp = (cmbColorRamp.SelectedItem as DevComponents.Editors.ComboItem).Tag as IColorRamp;
            bool       bCreateRamp;

            pColorRamp.Size = count <= 1 ? 2 : count;
            pColorRamp.CreateRamp(out bCreateRamp);
            IEnumColors enumColors = pColorRamp.Colors;

            enumColors.Reset();
            ESRI.ArcGIS.esriSystem.IObjectCopy copy = new ESRI.ArcGIS.esriSystem.ObjectCopyClass();
            ISymbol[] symbols   = new ISymbol[count];
            ISymbol   tmpSymbol = ModuleCommon.CreateSymbol(m_SymbologyStyleClass);

            for (int i = 0; i < count; i++)
            {
                symbols[i] = copy.Copy(tmpSymbol) as ISymbol;
                IColor pColor = enumColors.Next();
                if (pColor == null)
                {
                    enumColors.Reset();
                    enumColors.Next();
                }
                ModuleCommon.ChangeSymbolColor(symbols[i], pColor);
            }
            return(symbols);
        }
Example #3
0
        private void RefreshSymbol()
        {//ˢзûºÅÑùʽ
            if (flag)
            {
                return;
            }
            ESRI.ArcGIS.esriSystem.IObjectCopy copy = new ESRI.ArcGIS.esriSystem.ObjectCopyClass();
            listAddField.SmallImageList.Images.Clear();

            for (int i = 0; i < listAllField.Items.Count; i++)
            {
                ISymbol pSymbol = copy.Copy(labelPreviewBack.Tag) as ISymbol;
                IColor  pColor  = ModuleCommon.GetColor(listAllField.Items[i].Tag as ISymbol);
                ModuleCommon.ChangeSymbolColor(pSymbol, pColor);
                listAllField.Items[i].Tag = pSymbol;
            }

            for (int i = 0; i < listAddField.Items.Count; i++)
            {
                ISymbol pSymbol = copy.Copy(labelPreviewBack.Tag) as ISymbol;
                IColor  pColor  = ModuleCommon.GetColor(listAddField.Items[i].Tag as ISymbol);
                ModuleCommon.ChangeSymbolColor(pSymbol, pColor);
                listAddField.Items[i].Tag = pSymbol;
                listAddField.SmallImageList.Images.Add(listAddField.Items[i].Name.Replace("Item", "Symbol"),
                                                       ModuleCommon.Symbol2Picture(pSymbol, ModuleCommon.ImageWidth, ModuleCommon.ImageHeight));
                listAddField.Items[i].ImageKey = listAddField.Items[i].Name.Replace("Item", "Symbol");
                listAddField.Refresh();
            }
        }
Example #4
0
        private ISymbol[] CreateSymbols()
        {
            double sizeInterval = (maxSizeInput.Value - minSizeInput.Value) / levelInput.Value;

            ISymbol[] symbols = new ISymbol[levelInput.Value];
            ESRI.ArcGIS.esriSystem.IObjectCopy copy = new ESRI.ArcGIS.esriSystem.ObjectCopyClass();
            for (int i = 0; i < levelInput.Value; i++)
            {
                double size = minSizeInput.Value + sizeInterval * i;
                symbols[i] = copy.Copy(labelPreviewFore.Tag) as ISymbol;
                ModuleCommon.ChangeSymbolSize(symbols[i], size);
            }
            return(symbols);
        }
Example #5
0
        private ISymbol[] CreateSymbols()
        {
            double sizeInterval = (m_MaxSize.DataValue - m_MinSize.DataValue) / m_SizeLevel.DataValue;

            ISymbol[] symbols = new ISymbol[m_SizeLevel.DataValue];
            ESRI.ArcGIS.esriSystem.IObjectCopy copy = new ESRI.ArcGIS.esriSystem.ObjectCopyClass();
            for (int i = 0; i < m_SizeLevel.DataValue; i++)
            {
                double size = m_MinSize.DataValue + sizeInterval * i;
                symbols[i] = copy.Copy(m_ForeSymbol.DataValue) as ISymbol;
                ModuleCommon.ChangeSymbolSize(symbols[i], size);
            }
            return(symbols);
        }
Example #6
0
 private void RefreshSymbol()
 {//刷新符号样式
     if (flag)
     {
         return;
     }
     ESRI.ArcGIS.esriSystem.IObjectCopy copy = new ESRI.ArcGIS.esriSystem.ObjectCopyClass();
     listValueItem.SmallImageList.Images.Clear();
     for (int i = 0; i < listValueItem.Items.Count; i++)
     {
         ISymbol pSymbol = copy.Copy(labelPreviewFore.Tag) as ISymbol;
         double  size    = ModuleCommon.GetSymbolSize(listValueItem.Items[i].Tag as ISymbol);
         ModuleCommon.ChangeSymbolSize(pSymbol, size);
         listValueItem.Items[i].Tag = pSymbol;
         listValueItem.SmallImageList.Images.Add(listValueItem.Items[i].Name.Replace("Item", "Symbol"),
                                                 ModuleCommon.Symbol2Picture(pSymbol, ModuleCommon.ImageWidth, ModuleCommon.ImageHeight));
         listValueItem.Items[i].ImageKey = listValueItem.Items[i].Name.Replace("Item", "Symbol");
     }
     listValueItem.Refresh();
 }