コード例 #1
0
        /// <summary>
        /// 漫游
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolStripButton_Pan_Click(object sender, EventArgs e)
        {
            ITool    tool    = new PanTool();
            ICommand command = tool as ICommand;

            command.OnCreate(axMapControl2);
            axMapControl2.CurrentTool = tool;
        }
コード例 #2
0
ファイル: MainFrm.cs プロジェクト: xiaojunbeyond/RGEOS
        private void tspPan_Click(object sender, EventArgs e)
        {
            HookHelper mHook = HookHelper.Instance();
            ICommand   pCmd  = new PanTool();

            pCmd.OnCreate(mHook);
            mHook.MapControl.CurrentTool = pCmd as ITool;
        }
コード例 #3
0
 private void InitPanTool()
 {
     _panTool = new PanTool();
     _panTool.SetCanvas(this);
     _panTool.SetWaiting();
     this.MouseMove += _panTool.CanvasTool_MouseMove;
     this.MouseDown += _panTool.CanvasTool_MouseDown;
     this.MouseUp   += _panTool.CanvasTool_MouseUp;
 }
コード例 #4
0
        /// <summary>
        ///     Creates the tiling controller.
        /// </summary>
        /// <param name="tiling">The tiling.</param>
        /// <returns></returns>
        private TilingController CreateTilingController([NotNull] Tiling tiling)
        {
            Debug.Assert(tiling != null, "tiling != null");

            TilingController tc = new TilingController(tiling, this);

            tc.EditLine.OptionsChanged += TilingController_EditLineTool_OptionsChanged;
            tc.EditLine.ChangeLineOption.ValueChanged += v => _changeLineTypeCmb.SelectedItem = v;
            _changeLineTypeCmb.SelectedItem            = tc.EditLine.ChangeLineOption.Value;

            tc.StyleManagerChanged += (sender, args) => IsDirty = true;
            tc.CurrentToolChanged  += controller_CurrentToolChanged;
            _panTool        = new PanTool(tc, this);
            _selectTileTool = new SelectTileTool(tc);

            _toolBtns.Add(_panTool, _panToolBtn);

            UpdateTools();

            return(tc);
        }
コード例 #5
0
 public void SetPanTool()
 {
     Tool = new PanTool(this, CustomCursorFactory.OpenHandGrabCursor);
 }
コード例 #6
0
ファイル: Main.cs プロジェクト: billings7/EscherTilier
        /// <summary>
        ///     Creates the tiling controller.
        /// </summary>
        /// <param name="tiling">The tiling.</param>
        /// <returns></returns>
        private TilingController CreateTilingController([NotNull] Tiling tiling)
        {
            Debug.Assert(tiling != null, "tiling != null");

            TilingController tc = new TilingController(tiling, this);

            tc.EditLine.OptionsChanged += TilingController_EditLineTool_OptionsChanged;
            tc.EditLine.ChangeLineOption.ValueChanged += v => _changeLineTypeCmb.SelectedItem = v;
            _changeLineTypeCmb.SelectedItem = tc.EditLine.ChangeLineOption.Value;

            tc.StyleManagerChanged += (sender, args) => IsDirty = true;
            tc.CurrentToolChanged += controller_CurrentToolChanged;
            _panTool = new PanTool(tc, this);
            _selectTileTool = new SelectTileTool(tc);

            _toolBtns.Add(_panTool, _panToolBtn);

            UpdateTools();

            return tc;
        }