DiagramOption LayoutOption 参数整理

This commit is contained in:
kwai
2023-05-11 19:14:39 +08:00
parent 2045c5e45c
commit f995722828
51 changed files with 589 additions and 637 deletions

View File

@@ -106,24 +106,24 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
}
}
private bool _showGrid;
public bool ShowGrid
{
get
{
return _showGrid;
}
set
{
if (SetProperty(ref _showGrid, value))
{
foreach (var item in DiagramViewModels)
{
item.ShowGrid = _showGrid;
}
}
}
}
//private bool _showGrid;
//public bool ShowGrid
//{
// get
// {
// return _showGrid;
// }
// set
// {
// if (SetProperty(ref _showGrid, value))
// {
// foreach (var item in DiagramViewModels)
// {
// item.DiagramOption.LayoutOption.ShowGrid = _showGrid;
// }
// }
// }
//}
public DiagramType DiagramType
{
@@ -369,18 +369,18 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
List<DiagramViewModel> viewModels = new List<DiagramViewModel>();
foreach (var diagramItem in diagramDocument.DiagramItems)
{
{
var viewModel = GetDiagramViewModel(diagramItem.Name, diagramItem.DiagramType, false);
viewModel.ShowGrid = diagramItem.ShowGrid;
viewModel.PhysicalGridCellSize = diagramItem.PhysicalGridCellSize;
viewModel.CellHorizontalAlignment = diagramItem.CellHorizontalAlignment;
viewModel.CellVerticalAlignment = diagramItem.CellVerticalAlignment;
viewModel.PageSizeOrientation = diagramItem.PageSizeOrientation;
viewModel.PhysicalPageSize = diagramItem.PhysicalPageSize;
viewModel.PageSizeType = diagramItem.PageSizeType;
viewModel.PhysicalGridMarginSize = diagramItem.PhysicalGridMarginSize;
viewModel.GridColor = diagramItem.GridColor;
viewModel.AllowDrop = diagramItem.AllowDrop;
viewModel.DiagramOption.LayoutOption.ShowGrid = diagramItem.ShowGrid;
viewModel.DiagramOption.LayoutOption.PhysicalGridCellSize = diagramItem.PhysicalGridCellSize;
viewModel.DiagramOption.LayoutOption.CellHorizontalAlignment = diagramItem.CellHorizontalAlignment;
viewModel.DiagramOption.LayoutOption.CellVerticalAlignment = diagramItem.CellVerticalAlignment;
viewModel.DiagramOption.LayoutOption.PageSizeOrientation = diagramItem.PageSizeOrientation;
viewModel.DiagramOption.LayoutOption.PhysicalPageSize = diagramItem.PhysicalPageSize;
viewModel.DiagramOption.LayoutOption.PageSizeType = diagramItem.PageSizeType;
viewModel.DiagramOption.LayoutOption.PhysicalGridMarginSize = diagramItem.PhysicalGridMarginSize;
viewModel.DiagramOption.LayoutOption.GridColor = diagramItem.GridColor;
viewModel.DiagramOption.LayoutOption.AllowDrop = diagramItem.AllowDrop;
foreach (var diagramItemData in diagramItem.DesignerItems)
{