Exemple #1
0
        private void InsertAndGate(ICanvas canvas, PointEx point)
        {
            Editor.Snapshot(canvas, true);

            var element = Insert.AndGate(canvas,
                                         point != null ? point : InsertPointGate, Editor.Context.DiagramCreator, Editor.Context.EnableSnap);

            Editor.SelectOneElement(element, true);
        }
        private void InsertAndGate_Click(object sender, RoutedEventArgs e)
        {
            var canvas = Editor.Context.CurrentCanvas;

            Editor.Snapshot(canvas, true);

            var point = new PointEx(Editor.Context.RightClick.X, Editor.Context.RightClick.Y);

            Insert.AndGate(canvas, point, Editor.Context.DiagramCreator, Editor.Context.EnableSnap);

            Editor.Context.LastInsert    = Constants.TagElementAndGate;
            Editor.Context.SkipLeftClick = false;
        }