예제 #1
0
        public void SelectGlyphCreatorInteractor(string modelElementMethod)
        {
            UIGlyphCreater creator = new UIGlyphCreater(this, modelElementMethod);

            creator.GlyphCreated += new MurphyPA.H2D.TestApp.UIGlyphCreater.GlyphCreatedHandler(creator_GlyphCreated);
            _InteractionHandler   = creator;
        }
예제 #2
0
        public void MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            if (_Model.Header.ReadOnly)
            {
                return;
            }

            IGlyph createdGlyph = InternalMouseUp(sender, e);

            // set this for keys interactor parent class.
            _LastSelectedGlyph = createdGlyph;

            if (_Mover == null)
            {
                _Mover = new UIGlyphMoveAndReparent(_Context);
            }

            if (createdGlyph != null)
            {
                DoGlyphCreated(createdGlyph);
            }

            if (_IsDirectionalGlyph)
            {
                System.Windows.Forms.MouseEventArgs estart = CreateMouseEventArgs(e, _SelectorBand.StartPoint);
                _Mover.MouseDown(sender, estart);
                _Mover.MouseUp(sender, estart);

                System.Windows.Forms.MouseEventArgs eend = CreateMouseEventArgs(e, _SelectorBand.EndPoint);
                _Mover.MouseDown(sender, eend);
                _Mover.MouseUp(sender, eend);
            }
            else
            {
                System.Windows.Forms.MouseEventArgs estart = CreateMouseEventArgs(e, _SelectorBand.SelectionBand.Location);
                _Mover.MouseDown(sender, estart);
                _Mover.MouseUp(sender, estart);
            }

            _Model.DeSelectAllGlyphs();
            _Context.SelectGlyph(createdGlyph);
            _Context.RefreshView();

            _SelectorBand.MouseUp(sender, e);
        }
 private void bandButton_Click(object sender, System.EventArgs e)
 {
     _InteractionHandler = new UIGlyphGroupSelector (this);
     UnselectElementRadioButtons ();
     RefreshView ();
 }
 protected void SelectMoveInteractor()
 {
     _InteractionHandler = new UIGlyphMoveAndReparent (this);
     UnselectElementRadioButtons ();
     this.drawingPanel.Cursor = Cursors.Arrow;
 }
 public void ClearModel()
 {
     if (AppForm () != null)
     {
         AppForm ().ClearExecutionModelTabs ();
     }
     _InteractionHandler = null;
     _Model = new DiagramModel ();
     _LastFileName = null;
     SelectMoveInteractor ();
 }
 private void setModelElement(string modelElementMethod)
 {
     UIGlyphCreater creator = new UIGlyphCreater (this, modelElementMethod);
     creator.GlyphCreated += new MurphyPA.H2D.TestApp.UIGlyphCreater.GlyphCreatedHandler(creator_GlyphCreated);
     _InteractionHandler = creator;
     this.drawingPanel.Cursor = Cursors.Cross;
 }
예제 #7
0
 public void SelectBandInteractor()
 {
     _InteractionHandler = new UIGlyphGroupSelector(this);
     DoInteractionHandlerChange(_InteractionHandler);
 }
예제 #8
0
 public void SelectMoveInteractor()
 {
     _InteractionHandler = new UIGlyphMoveAndReparent(this);
     DoInteractionHandlerChange(_InteractionHandler);
 }
예제 #9
0
 protected void DoInteractionHandlerChange(IUIInteractionHandler interactionHandler)
 {
     RaiseInteractionHandlerChange(InteractionHandlerChange, interactionHandler);
 }
예제 #10
0
 protected void RaiseInteractionHandlerChange(InteractionHandlerChangeHandler handler, IUIInteractionHandler interactionHandler)
 {
     if (handler != null)
     {
         handler(this, interactionHandler);
     }
 }