当前位置: 首页>>代码示例>>C#>>正文


C# IEditorService类代码示例

本文整理汇总了C#中IEditorService的典型用法代码示例。如果您正苦于以下问题:C# IEditorService类的具体用法?C# IEditorService怎么用?C# IEditorService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IEditorService类属于命名空间,在下文中一共展示了IEditorService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Bind

        public override void Bind(IEditorService service)
        {
            _edSvc = service;
            _edSvc.RegisterCustomNotifier(this);
            _sym = (ISimpleSymbolDefinition)_edSvc.GetEditedResource();
            _rbox = _sym.ResizeBox;
            try
            {
                _init = true;

                chkEnableResizeBox.Checked = (_rbox != null);
                grpResizeBox.Enabled = chkEnableResizeBox.Checked;

                if (_rbox == null)
                    _rbox = _sym.CreateResizeBox();

                symGrowControl.Items = SymbolField.GetItems<GrowControl>();

                symGrowControl.Bind(_rbox, "GrowControl");
                symHeight.Bind(_rbox, "SizeY");
                symWidth.Bind(_rbox, "SizeX");
                symXCoord.Bind(_rbox, "PositionX");
                symYCoord.Bind(_rbox, "PositionY");
            }
            finally
            {
                _init = false;
            }
        }
开发者ID:kanbang,项目名称:Colt,代码行数:29,代码来源:AdvancedSettingsCtrl.cs

示例2: Bind

        /// <summary>
        /// Sets the initial state of this editor and sets up any databinding
        /// within such that user interface changes will propagate back to the
        /// model.
        /// </summary>
        /// <param name="service"></param>
        public override void Bind(IEditorService service)
        {
            _edSvc = service;
            _map = _edSvc.GetEditedResource() as IMapDefinition;
            _map.SetExtentsFromFirstAddedLayer = true;

            mapSettingsCtrl.Bind(service);
            mapLayersCtrl.Bind(service);

            var mp2 = _map as IMapDefinition2;
            if (mp2 != null)
            {
                this.Controls.Remove(mapSettingsCtrl);
                this.Controls.Remove(mapLayersCtrl);

                var wm = new WatermarkCollectionEditorCtrl(service, mp2);
                wm.Dock = DockStyle.Fill;

                this.Controls.Add(wm);
                this.Controls.Add(mapLayersCtrl);
                this.Controls.Add(mapSettingsCtrl);
            }

            mapLayersCtrl.RequestLayerOpen += new OpenLayerEventHandler(OnRequestLayerOpen);
        }
开发者ID:kanbang,项目名称:Colt,代码行数:31,代码来源:MapDefinitionEditorCtrl.cs

示例3: Bind

 public override void Bind(IEditorService service)
 {
     _service = service;
     _service.RegisterCustomNotifier(this);
     _fs = (IFeatureSource)_service.GetEditedResource();
     InitDefaults();
 }
开发者ID:kanbang,项目名称:Colt,代码行数:7,代码来源:CompositeFileCtrl.cs

示例4: RasterDefinitionCtrl

        public RasterDefinitionCtrl(WmsConfigurationDocument config, RasterWmsItem item, IEditorService edsvc)
        {
            InitializeComponent();
            cmbBackground.ResetColors();
            _config = config;

            _fs = (IFeatureSource)edsvc.GetEditedResource();
            _item = item;
            _edsvc = edsvc;

            txtImageFormat.Text = item.ImageFormat;
            chkTransparent.Checked = item.IsTransparent;
            cmbBackground.CurrentColor = item.BackgroundColor;
            txtElevation.Text = item.ElevationDimension;
            txtEpsg.Text = item.SpatialContextName;
            txtTime.Text = item.Time;

            txtImageFormat.TextChanged += (s, e) => { item.ImageFormat = txtImageFormat.Text; };
            chkTransparent.CheckedChanged += (s, e) => { item.IsTransparent = chkTransparent.Checked; };
            cmbBackground.SelectedIndexChanged += (s, e) => { item.BackgroundColor = cmbBackground.CurrentColor; };
            txtElevation.TextChanged += (s, e) => { item.ElevationDimension = txtElevation.Text; };
            txtEpsg.TextChanged += (s, e) => { item.SpatialContextName = txtEpsg.Text; };
            txtTime.TextChanged += (s, e) => { item.Time = txtTime.Text; };

            List<string> names = new List<string>();
            foreach (var layer in item.Layers)
            {
                names.Add(layer.Name);
            }
            txtLayers.Lines = names.ToArray();
            lnkUpdate.Enabled = false;
        }
开发者ID:kanbang,项目名称:Colt,代码行数:32,代码来源:RasterDefinitionCtrl.cs

示例5: Bind

        public override void Bind(IEditorService service)
        {
            _edsvc = service;
            _edsvc.RegisterCustomNotifier(this);

            try
            {
                _fsvc = (IFusionService)_edsvc.GetService((int)ServiceType.Fusion);
                _baseUrl = service.GetCustomProperty("BaseUrl").ToString(); //NOXLATE

                if (!_baseUrl.EndsWith("/")) //NOXLATE
                    _baseUrl += "/"; //NOXLATE
            }
            catch
            {
                throw new NotSupportedException(Strings.IncompatibleConnection);
            }

            _edsvc.Saved += OnSaved;
            _flexLayout = (IApplicationDefinition)service.GetEditedResource();

            TextBoxBinder.BindText(txtTemplateUrl, _flexLayout, "TemplateUrl"); //NOXLATE
            TextBoxBinder.BindText(txtTitle, _flexLayout, "Title"); //NOXLATE
            var templates = _fsvc.GetApplicationTemplates();
            InitializeTemplateList(templates);

            GeneratePreviewUrl();
        }
开发者ID:kanbang,项目名称:Colt,代码行数:28,代码来源:FlexLayoutSettingsCtrl.cs

示例6: ElevationDialog

        public ElevationDialog(IEditorService edSvc, IVectorScaleRange2 vsr2, string featureSourceId, ClassDefinition clsDef, string provider)
        {
            InitializeComponent();

            _edSvc = edSvc;
            _vsr2 = vsr2;
            _clsDef = clsDef;
            _provider = provider;
            _featureSourceId = featureSourceId;

            cmbUnits.DataSource = Enum.GetValues(typeof(LengthUnitType));
            cmbZOffsetType.DataSource = Enum.GetValues(typeof(ElevationTypeType));

            _elSettings = vsr2.ElevationSettings;
            grpSettings.Enabled = (_elSettings != null);
            chkEnabled.Checked = (_elSettings != null);

            if (_elSettings == null)
                _elSettings = vsr2.Create("0", "0", ElevationTypeType.RelativeToGround, LengthUnitType.Meters); //NOXLATE

            try
            {
                _init = true;

                txtZExtrusion.Text = _elSettings.ZExtrusion;
                txtZOffset.Text = _elSettings.ZOffset;
                cmbUnits.SelectedItem = _elSettings.Unit;
                cmbZOffsetType.SelectedItem = _elSettings.ZOffsetType;
            }
            finally
            {
                _init = false;
            }
        }
开发者ID:kanbang,项目名称:Colt,代码行数:34,代码来源:ElevationDialog.cs

示例7: FontStyleEditor

        public FontStyleEditor(IEditorService editor, ClassDefinition schema, string featureSource)
            : this()
        {
            m_editor = editor;
            m_schema = schema;

            var fs = (IFeatureSource)editor.ResourceService.GetResource(featureSource);

            _factory = (ILayerElementFactory)editor.GetEditedResource();

            m_providername = fs.Provider;
            m_featureSource = featureSource;

            propertyCombo.Items.Clear();
            foreach (var col in m_schema.Properties)
            {
                if (col.Type == PropertyDefinitionType.Data)
                    propertyCombo.Items.Add(col.Name);
            }
            propertyCombo.Items.Add(Strings.ExpressionItem);

            fontCombo.Items.Clear();
            foreach (FontFamily f in new System.Drawing.Text.InstalledFontCollection().Families)
                fontCombo.Items.Add(f.Name);
        }
开发者ID:kanbang,项目名称:Colt,代码行数:25,代码来源:FontStyleEditor.cs

示例8: Bind

        public override void Bind(IEditorService service)
        {
            _edSvc = service;
            _edSvc.RegisterCustomNotifier(this);
            _wm = (IWatermarkDefinition)service.GetEditedResource();

            NumericBinder.BindValueChanged(numRotation, _wm.Appearance, "Rotation");
            NumericBinder.BindValueChanged(numTransparency, _wm.Appearance, "Transparency");

            if (_wm.Position.Type == PositionType.Tile)
                _tile = (ITilePosition)_wm.Position;
            else if (_wm.Position.Type == PositionType.XY)
                _xy = (IXYPosition)_wm.Position;

            if (_tile == null)
            {
                _tile = _wm.CreateTilePosition();
                rdXY.Checked = true;
            }
            else if (_xy == null)
            {
                _xy = _wm.CreateXYPosition();
                rdTile.Checked = true;
            }
        }
开发者ID:kanbang,项目名称:Colt,代码行数:25,代码来源:WatermarkSettingsCtrl.cs

示例9: Bind

        /// <summary>
        /// Binds the specified service.
        /// </summary>
        /// <param name="service">The service.</param>
        public override void Bind(IEditorService service)
        {
            _fs = service.GetEditedResource() as IFeatureSource;
            service.RegisterCustomNotifier(this);
            Debug.Assert(_fs != null);

            CollapsiblePanel panel = FsEditorMap.GetPanel(_fs.Provider);
            var b = panel as IEditorBindable;
            if (b != null)
                b.Bind(service);

            panel.Dock = DockStyle.Top;

            var ov = new CoordSysOverrideCtrl();
            ov.Bind(service);

            ov.Dock = DockStyle.Top;

            var ext = new ExtensionsCtrl();
            ext.Bind(service);

            ext.Dock = DockStyle.Top;

            this.Controls.Add(ext);
            this.Controls.Add(ov);
            this.Controls.Add(panel);
        }
开发者ID:kanbang,项目名称:Colt,代码行数:31,代码来源:FeatureSourceEditorCtrl.cs

示例10: Bind

        public override void Bind(IEditorService service)
        {
            _init = true;
            try
            {
                _edsvc = service;
                _edsvc.RegisterCustomNotifier(this);
                _rl = (IRasterLayerDefinition)((ILayerDefinition)service.GetEditedResource()).SubLayer;

                _activeRange = _rl.GetScaleRangeAt(0);
                _colorStyle = _activeRange.ColorStyle;

                _backgroundColor = _colorStyle.GetColorRuleAt(0);
                _foregroundColor = _colorStyle.GetColorRuleAt(1);

                txtVisibleFrom.Text = (_activeRange.MinScale.HasValue ? _activeRange.MinScale.Value : 0).ToString();
                txtRebuildFactor.Text = _activeRange.RebuildFactor.ToString();
                cmbVisibleTo.Text = (_activeRange.MaxScale.HasValue ? _activeRange.MaxScale.Value.ToString() : Strings.Infinity);

                string fg = _foregroundColor.Color.GetValue();
                string bg = _backgroundColor.Color.GetValue();

                if (!string.IsNullOrEmpty(fg))
                    cmbForegroundColor.CurrentColor = Utility.ParseHTMLColor(fg);
                if (!string.IsNullOrEmpty(bg))
                    cmbBackgroundColor.CurrentColor = Utility.ParseHTMLColor(bg);
            }
            finally
            {
                _init = false;
            }
        }
开发者ID:kanbang,项目名称:Colt,代码行数:32,代码来源:RasterLayerVisibilitySectionCtrl.cs

示例11: Bind

        public override void Bind(IEditorService service)
        {
            _edsvc = service;
            _edsvc.RegisterCustomNotifier(this);

            _parent = service.GetEditedResource() as ILayerDefinition;
            Debug.Assert(_parent != null);

            _vl = _parent.SubLayer as IVectorLayerDefinition;
            Debug.Assert(_vl != null);

            if (service.IsNew)
            {
                //Let's try to auto-assign a feature class
                string[] classNames = _edsvc.FeatureService.GetClassNames(_vl.ResourceId, null);
                if (classNames.Length == 1) //Only one class in this Feature Source
                {
                    var clsDef = _edsvc.FeatureService.GetClassDefinition(_vl.ResourceId, classNames[0]);
                    if (!string.IsNullOrEmpty(clsDef.DefaultGeometryPropertyName)) //It has a default geometry
                    {
                        _vl.FeatureName = classNames[0];
                        _vl.Geometry = clsDef.DefaultGeometryPropertyName;
                    }
                }
            }

            _props = new List<INameStringPair>(_vl.PropertyMapping);
            //Modifying the visibility constitutes a change in the resource
            //_props.ListChanged += OnPropertyListChanged;
            PopulatePropertyList();
            _vl.PropertyChanged += OnVectorLayerPropertyChanged;
        }
开发者ID:kanbang,项目名称:Colt,代码行数:32,代码来源:LayerPropertiesSectionCtrl.cs

示例12: WatermarkInstanceEditorDialog

 public WatermarkInstanceEditorDialog(IEditorService service, IWatermark watermark)
 {
     InitializeComponent();
     _ed = new WatermarkInstanceEditor(service, watermark);
     _ed.Dock = DockStyle.Fill;
     panel1.Controls.Add(_ed);
 }
开发者ID:kanbang,项目名称:Colt,代码行数:7,代码来源:WatermarkInstanceEditorDialog.cs

示例13: WmsAdvancedConfigurationDialog

        public WmsAdvancedConfigurationDialog(IEditorService service)
        {
            InitializeComponent();
            grdSpatialContexts.AutoGenerateColumns = false;
            _service = service;
            _fs = (IFeatureSource)_service.GetEditedResource();
            txtFeatureServer.Text = _fs.GetConnectionProperty("FeatureServer"); //NOXLATE
            string xml = _fs.GetConfigurationContent();
            if (!string.IsNullOrEmpty(xml))
            {
                try
                {
                    _config = (WmsConfigurationDocument)ConfigurationDocument.LoadXml(xml);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(string.Format(Strings.ErrorLoadingWmsConfig, ex.Message), Strings.TitleError, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    MakeDefaultDocument();
                }
            }
            else
            {
                MakeDefaultDocument();
            }

            lstFeatureClasses.DataSource = _config.RasterOverrides;
            grdSpatialContexts.DataSource = _config.SpatialContexts;
        }
开发者ID:kanbang,项目名称:Colt,代码行数:28,代码来源:WmsAdvancedConfigurationDialog.cs

示例14: Bind

        public override void Bind(IEditorService service)
        {
            cmbBgColor.ResetColors();
            service.RegisterCustomNotifier(this);
            _layout = (IPrintLayout)service.GetEditedResource();

            //ColorComboBox requires custom databinding
            cmbBgColor.CurrentColor = _layout.PageProperties.BackgroundColor;
            cmbBgColor.SelectedIndexChanged += (sender, e) =>
            {
                _layout.PageProperties.BackgroundColor = cmbBgColor.CurrentColor;
            };
            _layout.LayoutProperties.PropertyChanged += (sender, e) =>
            {
                OnResourceChanged();
            };

            CheckBoxBinder.BindChecked(chkCustomLogos, _layout.LayoutProperties, "ShowCustomLogos");
            CheckBoxBinder.BindChecked(chkCustomText, _layout.LayoutProperties, "ShowCustomText");
            CheckBoxBinder.BindChecked(chkDateTime, _layout.LayoutProperties, "ShowDateTime");
            CheckBoxBinder.BindChecked(chkLegend, _layout.LayoutProperties, "ShowLegend");
            CheckBoxBinder.BindChecked(chkNorthArrow, _layout.LayoutProperties, "ShowNorthArrow");
            CheckBoxBinder.BindChecked(chkScaleBar, _layout.LayoutProperties, "ShowScaleBar");
            CheckBoxBinder.BindChecked(chkTitle, _layout.LayoutProperties, "ShowTitle");
            CheckBoxBinder.BindChecked(chkURL, _layout.LayoutProperties, "ShowURL");
        }
开发者ID:kanbang,项目名称:Colt,代码行数:26,代码来源:PrintPagePropertiesSectionCtrl.cs

示例15: Bind

        /// <summary>
        /// Sets the initial state of this editor and sets up any databinding
        /// within such that user interface changes will propagate back to the
        /// model.
        /// </summary>
        /// <param name="service"></param>
        public override void Bind(IEditorService service)
        {
            _edsvc = service;
            _vl = (IVectorLayerDefinition)((ILayerDefinition)service.GetEditedResource()).SubLayer;

            service.RegisterCustomNotifier(this);
            resSettings.Bind(service);
            layerProperties.Bind(service);
            layerStyles.Bind(service);

            //Add watermark component if supported
            var sl2 = _vl as ISubLayerDefinition2;
            if (sl2 != null)
            {
                this.Controls.Remove(resSettings);
                this.Controls.Remove(layerProperties);
                this.Controls.Remove(layerStyles);

                var wm = new WatermarkCollectionEditorCtrl(service, sl2);
                wm.Dock = DockStyle.Top;

                this.Controls.Add(wm);
                this.Controls.Add(layerStyles);
                this.Controls.Add(layerProperties);
                this.Controls.Add(resSettings);
            }
        }
开发者ID:kanbang,项目名称:Colt,代码行数:33,代码来源:VectorLayerEditorCtrl.cs


注:本文中的IEditorService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。