Example #1
0
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            //判断选择的要素图层
            if (layer == null)
            {
                XtraMessageBox.Show("请选择图层", "提示信息", MessageBoxButtons.OK);
                return;
            }
            IFeatureLayer     mFeatureLayer     = layer as IFeatureLayer;
            IFeatureSelection pFeatureSelection = mFeatureLayer as IFeatureSelection;
            ISelectionSet     pSelectionSet     = pFeatureSelection.SelectionSet;

            if (pSelectionSet.Count == 0)
            {
                XtraMessageBox.Show("请选择要素", "提示信息", MessageBoxButtons.OK);
                return;
            }
            //执行命令
            ICommand mCmd = new SmoothCommand();

            mCmd.OnCreate(axMapControl1.Object);

            (mCmd as SmoothCommand).mLayer      = layer;
            (mCmd as SmoothCommand).pMapControl = axMapControl1;

            axMapControl1.CurrentTool = mCmd as ITool;
        }
Example #2
0
        private void SmoothDialog_Load(object sender, System.EventArgs e)
        {
            if (_firstTimer)
            {
                _firstTimer = false;
                SmoothCommand command = new SmoothCommand();
                _initialFlags  = command.Flags;
                _initialLength = command.Length;
            }

            Flags  = _initialFlags;
            Length = _initialLength;

            _cbImageUnchanged.Checked = (Flags & SmoothCommandFlags.ImageUnchanged) == SmoothCommandFlags.ImageUnchanged;
            _cbFavorLong.Checked      = (Flags & SmoothCommandFlags.FavorLong) == SmoothCommandFlags.FavorLong;

            _numLength.Value = Length;
        }
Example #3
0
 public SmoothTextDialog(SmoothCommand SmoothCommand)
 {
     InitializeComponent();
     _SmoothCommand = SmoothCommand;
     InitializeUI();
 }
Example #4
0
 public SmoothTextDialog()
 {
     InitializeComponent();
     _SmoothCommand = new SmoothCommand();
     InitializeUI();
 }