public void InitUI()
        {
            SymbologyCtrl.Clear();

            // 载入系统符号库
            string styleFilePath = getPath(mFilepath) + "\\data\\Symbol\\ESRI.ServerStyle";

            Console.WriteLine("filepath:" + mFilepath);
            Console.WriteLine("StyleFilePath:" + styleFilePath);

            SymbologyCtrl.LoadStyleFile(styleFilePath);
            switch (mEnumMapSurroundType)
            {
            case ArcGisPoisonous.EnumMapSurroundType.NorthArrow:
                SymbologyCtrl.StyleClass = esriSymbologyStyleClass.esriStyleClassNorthArrows;
                mSymbologyStyleClass     = SymbologyCtrl.GetStyleClass(esriSymbologyStyleClass.esriStyleClassNorthArrows);
                break;

            case ArcGisPoisonous.EnumMapSurroundType.ScaleBar:
                SymbologyCtrl.StyleClass = esriSymbologyStyleClass.esriStyleClassScaleBars;
                mSymbologyStyleClass     = SymbologyCtrl.GetStyleClass(esriSymbologyStyleClass.esriStyleClassScaleBars);
                break;
            }
            mSymbologyStyleClass.UnselectItem();
        }
Esempio n. 2
0
        /// <summary>
        /// 加载系统符号样式
        /// </summary>
        /// <param name="symbologyCtrl">符号显示控件</param>
        /// <param name="symbologyStyle">符号样式</param>
        /// <param name="subFolder"></param>
        public static void LoadSymbolStyle(AxSymbologyControl symbologyCtrl, esriSymbologyStyleClass symbologyStyle,
                                           string subFolder = @"Symbol\StyleSymbol\ESRI.ServerStyle")
        {
            symbologyCtrl.Clear();
            string styleFilePath = string.Format(@"{0}\{1}", Application.StartupPath, subFolder);

            //载入系统符号库
            symbologyCtrl.LoadStyleFile(styleFilePath);
            symbologyCtrl.StyleClass = symbologyStyle;
            ISymbologyStyleClass pSymStyleClass = symbologyCtrl.GetStyleClass(symbologyCtrl.StyleClass);

            pSymStyleClass.GetItem(0);
            pSymStyleClass.UnselectItem();
        }
Esempio n. 3
0
        public void InitUI()
        {
            SymbologyCtrl.Clear();
            string StyleFilePath = OperatePageLayout.getPath(filepath) + "\\data2\\ESRI.ServerStyle";//载入系统符号库

            SymbologyCtrl.LoadStyleFile(StyleFilePath);
            switch (_enumMapSurType)
            {
            case Class.EnumType.EnumMapSurroundType.NorthArrow:    //根据选择,载入系统指北针符号库
                SymbologyCtrl.StyleClass = esriSymbologyStyleClass.esriStyleClassNorthArrows;
                pSymStyleClass           = SymbologyCtrl.GetStyleClass(esriSymbologyStyleClass.esriStyleClassNorthArrows);
                break;

            case Class.EnumType.EnumMapSurroundType.ScaleBar:    //根据选择,载入系统比例尺符号库
                SymbologyCtrl.StyleClass = esriSymbologyStyleClass.esriStyleClassScaleBars;
                pSymStyleClass           = SymbologyCtrl.GetStyleClass(esriSymbologyStyleClass.esriStyleClassScaleBars);
                break;
            }
            pSymStyleClass.UnselectItem();
        }
Esempio n. 4
0
        public void InitUI()
        {
            SymbologyCtrl.Clear();
            string StyleFilePath = fpath.stylepath();//载入系统符号库

            SymbologyCtrl.LoadStyleFile(StyleFilePath);
            switch (_enumMapSurType)
            {
            case EnumMapSurroundType.NorthArrow:    //根据选择,载入系统指北针符号库
                SymbologyCtrl.StyleClass = esriSymbologyStyleClass.esriStyleClassNorthArrows;
                pSymStyleClass           = SymbologyCtrl.GetStyleClass(esriSymbologyStyleClass.esriStyleClassNorthArrows);
                break;

            case EnumMapSurroundType.ScaleBar:    //根据选择,载入系统比例尺符号库
                SymbologyCtrl.StyleClass = esriSymbologyStyleClass.esriStyleClassScaleBars;
                pSymStyleClass           = SymbologyCtrl.GetStyleClass(esriSymbologyStyleClass.esriStyleClassScaleBars);
                break;
            }
            pSymStyleClass.UnselectItem();
        }