コード例 #1
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);
        }
コード例 #2
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;
        }