Beispiel #1
0
        private void DxfExportDiagram(string fileName,
                                      ICanvas canvas,
                                      bool shortenStart,
                                      bool shortenEnd,
                                      DxfAcadVer version,
                                      DiagramTable table)
        {
            string model = ModelEditor.GenerateDiagram(canvas, null, canvas.GetProperties());

            string dxf = DxfGenerate(model, shortenStart, shortenEnd, version, table);

            DxfSave(fileName, dxf);
        }
Beispiel #2
0
        private void GetHistory_Click(object sender, RoutedEventArgs e)
        {
            var history = Editor.Context.CurrentCanvas.GetTag() as UndoRedo;

            if (history == null)
            {
                return;
            }

            ListHistory.Items.Clear();
            int index = 0;

            foreach (var model in history.Undo.Reverse())
            {
                AddHistoryItem(index, model);
                index++;
            }

            var current = ModelEditor.GenerateDiagram(Editor.Context.CurrentCanvas, null, Editor.Context.CurrentCanvas.GetProperties());

            AddHistoryItem(index, current);
        }