コード例 #1
0
ファイル: RootBlock.cs プロジェクト: orb1t/StructuredEditor
 public void Redraw()
 {
     if (MyRootControl != null)
     {
         MyRootControl.Redraw();
     }
 }
コード例 #2
0
        /* TODO ERROR: Skipped RegionDirectiveTrivia */
        public object GetView(ViewTechnology technology)
        {
            var monmenustrip = new ContextMenuStrip();

            _rootView = new MyRootControl(this);
            return(_rootView);
        }
コード例 #3
0
        protected override void OnMouseUp(MouseWithKeysEventArgs e)
        {
            if (e.Handled == true)
            {
                return;
            }

            bool shouldShowPopupMenu = e.IsRightButtonPressed;

            using (Redrawer r = new Redrawer(Root))
            {
                if (DragState != null)
                {
                    if (DragState.Result != null)
                    {
                        DragState.Query.ShouldCopyInsteadOfMove = e.IsCtrlPressed;
                        DragState.Result.DropTargetContainer.AcceptBlocks(
                            DragState.Query,
                            DragState.Result);
                        shouldShowPopupMenu = false;
                        e.Handled           = true;
                    }
                    else
                    {
                        if (DragState.DragStarted)
                        {
                            shouldShowPopupMenu = false;
                            e.Handled           = true;
                        }
                    }
                    DragState = null;
                }

                if (shouldShowPopupMenu && e.IsRightButtonPressed)
                {
                    Block rightClicked = FindBlockAtPoint(e.X, e.Y);
                    if (rightClicked != null &&
                        rightClicked.Menu != null &&
                        rightClicked.MyControl.HitTest(e.X, e.Y))
                    {
                        if (rightClicked.CanGetFocus)
                        {
                            rightClicked.SetFocus();
                        }
                        MyRootControl.ShowPopupMenu(rightClicked.Menu, e.Location);
                        e.Handled = true;
                    }
                }
            }
        }
コード例 #4
0
		public object GetView(System.ComponentModel.Design.ViewTechnology technology)
		{
			_rootView = new MyRootControl(this);
			return _rootView;
		}
コード例 #5
0
 public object GetView(System.ComponentModel.Design.ViewTechnology technology)
 {
     _rootView = new MyRootControl(this);
     return(_rootView);
 }