mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-06 09:16:37 +08:00
分组,取消分组 ReDo UnDo 整理
This commit is contained in:
@@ -991,13 +991,13 @@
|
||||
<Fluent:Button Margin="5" Header="上移一层" Command="{Binding PageViewModel.DiagramViewModel.BringForwardCommand}" Size="Middle" Icon="/AIStudio.Wpf.DiagramApp;component/Images/BringForward.png"/>
|
||||
<Fluent:Button Margin="5" Header="下移一层" Command="{Binding PageViewModel.DiagramViewModel.SendBackwardCommand}" Size="Middle" Icon="/AIStudio.Wpf.DiagramApp;component/Images/SendBackward.png"/>
|
||||
</Fluent:DropDownButton>
|
||||
<Fluent:DropDownButton Header="组合" Icon="{iconPacks:Material Kind=Group}" Width="50" VerticalAlignment="Top">
|
||||
<Fluent:DropDownButton.LargeIcon>
|
||||
<Fluent:SplitButton Header="组合" Icon="{iconPacks:Material Kind=Group}" Width="50" VerticalAlignment="Top" Command="{Binding PageViewModel.DiagramViewModel.GroupCommand}">
|
||||
<Fluent:SplitButton.LargeIcon>
|
||||
<iconPacks:PackIconMaterial Kind="Group" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Fluent:DropDownButton.LargeIcon>
|
||||
</Fluent:SplitButton.LargeIcon>
|
||||
<Fluent:Button Margin="5" Header="组合" Command="{Binding PageViewModel.DiagramViewModel.GroupCommand}" Size="Middle" Icon="/AIStudio.Wpf.DiagramApp;component/Images/BringForward.png"/>
|
||||
<Fluent:Button Margin="5" Header="取消组合" Command="{Binding PageViewModel.DiagramViewModel.UngroupCommand}" Size="Middle" Icon="/AIStudio.Wpf.DiagramApp;component/Images/SendBackward.png"/>
|
||||
</Fluent:DropDownButton>
|
||||
</Fluent:SplitButton>
|
||||
<Fluent:DropDownButton Header="对齐" Icon="{iconPacks:Material Kind=AlignHorizontalLeft}" Width="50" VerticalAlignment="Top">
|
||||
<Fluent:DropDownButton.LargeIcon>
|
||||
<iconPacks:PackIconMaterial Kind="AlignHorizontalLeft" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
|
||||
@@ -540,7 +540,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
DragObject dragObject = e.Data.GetData(typeof(DragObject)) as DragObject;
|
||||
if (dragObject != null)
|
||||
{
|
||||
_viewModel.ClearSelectedItemsCommand.Execute(null);
|
||||
_viewModel.ClearSelectedItems();
|
||||
Point position = e.GetPosition(this);
|
||||
if (dragObject.DesignerItem is SerializableObject serializableObject)
|
||||
{
|
||||
@@ -587,7 +587,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
foreach (var file in files)
|
||||
{
|
||||
_viewModel.ClearSelectedItemsCommand.Execute(null);
|
||||
_viewModel.ClearSelectedItems();
|
||||
Point position = e.GetPosition(this);
|
||||
ImageItemViewModel itemBase = new ImageItemViewModel();
|
||||
itemBase.Icon = file;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Media;
|
||||
@@ -59,7 +60,7 @@ namespace AIStudio.Wpf.DiagramDesigner.Controls
|
||||
|
||||
designerItems = designerItems.Distinct().ToList();
|
||||
|
||||
DiagramViewModel.DoCommandManager.BeginDo = true;
|
||||
Interlocked.Increment(ref DiagramViewModel.DoCommandManager.BeginDo);
|
||||
foreach (DesignerItemViewModelBase item in designerItems.OfType<DesignerItemViewModelBase>())
|
||||
{
|
||||
item.SetOldValue(item.TopLeft, nameof(item.TopLeft));
|
||||
@@ -76,8 +77,8 @@ namespace AIStudio.Wpf.DiagramDesigner.Controls
|
||||
private void DragThumb_DragCompleted(object sender, DragCompletedEventArgs e)
|
||||
{
|
||||
if (drag == false)
|
||||
{
|
||||
DiagramViewModel.DoCommandManager.BeginDo = false;
|
||||
{
|
||||
Interlocked.Decrement(ref DiagramViewModel.DoCommandManager.BeginDo);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -91,7 +92,7 @@ namespace AIStudio.Wpf.DiagramDesigner.Controls
|
||||
Dictionary<DesignerItemViewModelBase, Tuple<PointBase, PointBase>> infos =
|
||||
designerItems.OfType<DesignerItemViewModelBase>().ToDictionary(p => p,
|
||||
p => new Tuple<PointBase, PointBase>(p.GetOldValue<PointBase>(nameof(p.TopLeft)), p.TopLeft));
|
||||
DiagramViewModel.DoCommandManager.BeginDo = false;
|
||||
Interlocked.Decrement(ref DiagramViewModel.DoCommandManager.BeginDo);
|
||||
DiagramViewModel.DoCommandManager.DoNewCommand(this.ToString(),
|
||||
() => {
|
||||
foreach (var info in infos)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
@@ -35,7 +36,7 @@ namespace AIStudio.Wpf.DiagramDesigner.Controls
|
||||
{
|
||||
designerItems = designerItem.Root.SelectedItems.ToList();
|
||||
|
||||
DiagramViewModel.DoCommandManager.BeginDo = true;
|
||||
Interlocked.Increment(ref DiagramViewModel.DoCommandManager.BeginDo);
|
||||
foreach (DesignerItemViewModelBase item in designerItems.OfType<DesignerItemViewModelBase>())
|
||||
{
|
||||
item.SetOldValue(item.Size, nameof(item.Size));
|
||||
@@ -57,7 +58,7 @@ namespace AIStudio.Wpf.DiagramDesigner.Controls
|
||||
designerItems.OfType<DesignerItemViewModelBase>().ToDictionary(p => p,
|
||||
p => new Tuple<SizeBase, SizeBase>(p.GetOldValue<SizeBase>(nameof(p.Size)), p.Size));
|
||||
|
||||
DiagramViewModel.DoCommandManager.BeginDo = false;
|
||||
Interlocked.Decrement(ref DiagramViewModel.DoCommandManager.BeginDo);
|
||||
DiagramViewModel.DoCommandManager.DoNewCommand(this.ToString(),
|
||||
() => {
|
||||
foreach (var info in infos)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
@@ -42,7 +43,7 @@ namespace AIStudio.Wpf.DiagramDesigner.Controls
|
||||
{
|
||||
designerItems = designerItem.Root.SelectedItems.ToList();
|
||||
|
||||
DiagramViewModel.DoCommandManager.BeginDo = true;
|
||||
Interlocked.Increment(ref DiagramViewModel.DoCommandManager.BeginDo);
|
||||
foreach (DesignerItemViewModelBase item in designerItems.OfType<DesignerItemViewModelBase>())
|
||||
{
|
||||
item.SetOldValue(this.designerItem.Angle, nameof(this.designerItem.Angle));
|
||||
@@ -78,7 +79,7 @@ namespace AIStudio.Wpf.DiagramDesigner.Controls
|
||||
Dictionary<DesignerItemViewModelBase, Tuple<double, double>> infos =
|
||||
designerItems.OfType<DesignerItemViewModelBase>().ToDictionary(p => p,
|
||||
p => new Tuple<double, double>(p.GetOldValue<double>(nameof(p.Angle)), p.Angle));
|
||||
DiagramViewModel.DoCommandManager.BeginDo = false;
|
||||
Interlocked.Decrement(ref DiagramViewModel.DoCommandManager.BeginDo);
|
||||
DiagramViewModel.DoCommandManager.DoNewCommand(this.ToString(),
|
||||
() => {
|
||||
foreach (var info in infos)
|
||||
|
||||
@@ -66,23 +66,13 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
UnDoActionStack = new Stack<Command>();
|
||||
}
|
||||
|
||||
private bool _beginDo;
|
||||
public bool BeginDo
|
||||
{
|
||||
get
|
||||
{
|
||||
return _beginDo;
|
||||
}
|
||||
set
|
||||
{
|
||||
_beginDo = value;
|
||||
}
|
||||
}
|
||||
public int BeginDo;
|
||||
|
||||
|
||||
private bool _undoing;
|
||||
public void DoNewCommand(string name, Action action, Action unDoAction, Action clearAction = null, bool doit = true)
|
||||
{
|
||||
if (BeginDo == true)
|
||||
if (BeginDo > 0)
|
||||
return;
|
||||
if (_undoing == true)
|
||||
return;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</UserControl.Resources>
|
||||
<Grid IsHitTestVisible="{Binding IsHitTestVisible}">
|
||||
<TextBox x:Name="PART_TextBlock"
|
||||
Text="{Binding Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Text="{Binding Text, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
|
||||
Foreground="{Binding FontViewModel.FontColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
FontSize="{Binding FontViewModel.FontSize}"
|
||||
FontFamily="{Binding FontViewModel.FontFamily}"
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
</TextBox>
|
||||
<TextBox x:Name="PART_ShowText"
|
||||
Text="{Binding Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Text="{Binding Text, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
|
||||
Foreground="{Binding FontViewModel.FontColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
IsReadOnly="{Binding IsReadOnlyText}"
|
||||
FontSize="{Binding FontViewModel.FontSize}"
|
||||
|
||||
@@ -75,8 +75,12 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
else if (selectable.IsSelected == false)
|
||||
{
|
||||
BindingExpression binding = PART_ShowText.GetBindingExpression(TextBox.TextProperty);
|
||||
binding.UpdateSource();
|
||||
|
||||
PART_ShowText.Visibility = Visibility.Collapsed;
|
||||
PART_TextBlock.Visibility = Visibility.Visible;
|
||||
|
||||
selectable.IsEditing = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
else
|
||||
{
|
||||
DeleteLabel();
|
||||
ClearLabel();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -825,6 +825,12 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
UpdatePathGeneratorResult();
|
||||
}
|
||||
|
||||
public void RemoveVertex(ConnectorVertexModel vertice)
|
||||
{
|
||||
Vertices.Remove(vertice);
|
||||
UpdatePathGeneratorResult();
|
||||
}
|
||||
|
||||
protected override void ExecuteEditCommand(object param)
|
||||
{
|
||||
AddLabel();
|
||||
@@ -841,7 +847,12 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
label.UpdatePosition(paths);
|
||||
}
|
||||
|
||||
public void DeleteLabel()
|
||||
public void RemoveLabel(ConnectorLabelModel label)
|
||||
{
|
||||
Labels.Remove(label);
|
||||
}
|
||||
|
||||
public void ClearLabel()
|
||||
{
|
||||
Labels?.Clear();
|
||||
}
|
||||
|
||||
@@ -182,14 +182,14 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
protected override void ClearText()
|
||||
{
|
||||
Connector.Labels.Remove(this);
|
||||
Connector.RemoveLabel(this);
|
||||
}
|
||||
|
||||
private void DeleteLabel(object parameter)
|
||||
{
|
||||
if (parameter is ConnectorLabelModel label)
|
||||
{
|
||||
Connector.Labels.Remove(label);
|
||||
Connector.RemoveLabel(label);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
if (parameter is ConnectorVertexModel vertice)
|
||||
{
|
||||
Connector.Vertices.Remove(vertice);
|
||||
Connector.RemoveVertex(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,11 +92,17 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
get; set;
|
||||
} = e => e.KeyboardDevice.Modifiers == ModifierKeys.None && e.Key == Key.Down;
|
||||
|
||||
[Description("Group Keyboard shortcut (CTRL+Shift+G by default)")]
|
||||
[Description("Group Keyboard shortcut (CTRL+G by default)")]
|
||||
public Func<KeyEventArgs, bool> Group
|
||||
{
|
||||
get; set;
|
||||
} = e => e.KeyboardDevice.Modifiers == ModifierKeys.Control && e.Key == Key.G;
|
||||
|
||||
[Description("Ungroup Keyboard shortcut (Shift+G by default)")]
|
||||
public Func<KeyEventArgs, bool> Ungroup
|
||||
{
|
||||
get; set;
|
||||
} = e => e.KeyboardDevice.Modifiers == ModifierKeys.Shift | e.Key == Key.G;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Reactive.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using AIStudio.Wpf.DiagramDesigner.Geometrys;
|
||||
@@ -1195,7 +1196,15 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
if (attr != null && attr.Length != 0)
|
||||
{
|
||||
//加入ReDo
|
||||
DoCommandManager.DoNewCommand(sender.ToString() + e.PropertyName, () => Do(sender, e.PropertyName, valuePropertyChangedEventArgs.NewValue), () => UnDo(sender, e.PropertyName, valuePropertyChangedEventArgs.OldValue), null, false);
|
||||
DoCommandManager.DoNewCommand(sender.ToString() + e.PropertyName,
|
||||
() => {
|
||||
Do(sender, e.PropertyName, valuePropertyChangedEventArgs.NewValue);
|
||||
},
|
||||
() => {
|
||||
UnDo(sender, e.PropertyName, valuePropertyChangedEventArgs.OldValue);
|
||||
},
|
||||
null,
|
||||
false);
|
||||
|
||||
Event?.Invoke(sender, new DiagramEventArgs(valuePropertyChangedEventArgs.PropertyName, valuePropertyChangedEventArgs.NewValue, valuePropertyChangedEventArgs.OldValue, selectable?.Id));
|
||||
}
|
||||
@@ -2480,7 +2489,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
var oldcenter = BoundingRect.Center;
|
||||
foreach (var item in selectedItems.OfType<DesignerItemViewModelBase>())
|
||||
{
|
||||
item.Left = item.Left - oldcenter.X + PageSize.Width / 2;
|
||||
item.Left = item.Left - oldcenter.X + PageSize.Width / 2;
|
||||
item.Top = item.Top - oldcenter.Y + PageSize.Height / 2;
|
||||
}
|
||||
|
||||
@@ -2541,7 +2550,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
foreach (var item in infos)
|
||||
{
|
||||
item.Key.Size = item.Value;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -2695,15 +2704,6 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
items = SelectedItems?.OfType<DesignerItemViewModelBase>().Where(p => p.ParentId == Guid.Empty).ToList();
|
||||
}
|
||||
|
||||
var groups = items.OfType<DesignerItemViewModelBase>().Where(p => p.IsGroup && p.ParentId == Guid.Empty).ToList();
|
||||
|
||||
//解除分组
|
||||
if (groupItem == null && groups.Count > 0)
|
||||
{
|
||||
ExecuteUngroupCommand(groups);
|
||||
return;
|
||||
}
|
||||
|
||||
RectangleBase rect = DiagramViewModelHelper.GetBoundingRectangle(items);
|
||||
|
||||
if (groupItem == null)
|
||||
@@ -2711,16 +2711,24 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
groupItem = new GroupDesignerItemViewModel();
|
||||
}
|
||||
|
||||
Add(groupItem, true);
|
||||
DoCommandManager.DoNewCommand(this.ToString(),
|
||||
() => {
|
||||
Add(groupItem);
|
||||
foreach (DesignerItemViewModelBase item in items)
|
||||
item.ParentId = groupItem.Id;
|
||||
groupItem.Resize();
|
||||
ClearSelectedItems();
|
||||
SelectionService.AddToSelection(groupItem);
|
||||
},
|
||||
() => {
|
||||
Remove(groupItem);
|
||||
foreach (DesignerItemViewModelBase item in items)
|
||||
{
|
||||
item.IsSelected = true;
|
||||
item.ParentId = Guid.Empty;
|
||||
}
|
||||
});
|
||||
|
||||
foreach (DesignerItemViewModelBase item in items)
|
||||
item.ParentId = groupItem.Id;
|
||||
|
||||
groupItem.Resize();
|
||||
|
||||
ClearSelectedItemsCommand.Execute(null);
|
||||
//groupItem.IsSelected = true;
|
||||
SelectionService.AddToSelection(groupItem);
|
||||
}
|
||||
|
||||
private void ExecuteUngroupCommand(object parameter)
|
||||
@@ -2728,22 +2736,45 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
List<DesignerItemViewModelBase> groups;
|
||||
if (parameter is IEnumerable<DesignerItemViewModelBase> para)
|
||||
{
|
||||
groups = para.ToList();
|
||||
groups = para.Where(p => p.IsGroup && p.ParentId == Guid.Empty).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
groups = SelectedItems?.OfType<DesignerItemViewModelBase>().Where(p => p.IsGroup && p.ParentId == Guid.Empty).ToList();
|
||||
}
|
||||
|
||||
Dictionary<DesignerItemViewModelBase, Tuple<Guid, int>> items = new Dictionary<DesignerItemViewModelBase, Tuple<Guid, int>>();
|
||||
foreach (DesignerItemViewModelBase groupRoot in groups)
|
||||
{
|
||||
var children = SelectedItems.OfType<DesignerItemViewModelBase>().Where(p => p.ParentId == groupRoot.Id);
|
||||
foreach (DesignerItemViewModelBase child in children)
|
||||
child.ParentId = Guid.Empty;
|
||||
|
||||
RemoveItemCommand.Execute(groupRoot);
|
||||
UpdateZIndex();
|
||||
items.Add(child, new Tuple<Guid, int>(child.ParentId, child.ZIndex));
|
||||
}
|
||||
|
||||
DoCommandManager.DoNewCommand(this.ToString(),
|
||||
() => {
|
||||
foreach (DesignerItemViewModelBase groupRoot in groups)
|
||||
{
|
||||
Remove(groupRoot);
|
||||
}
|
||||
foreach (var item in items)
|
||||
{
|
||||
item.Key.ParentId = Guid.Empty;
|
||||
}
|
||||
UpdateZIndex();
|
||||
},
|
||||
() => {
|
||||
foreach (DesignerItemViewModelBase groupRoot in groups)
|
||||
{
|
||||
Add(groupRoot);
|
||||
}
|
||||
foreach (var item in items)
|
||||
{
|
||||
item.Key.ParentId = item.Value.Item1;
|
||||
item.Key.ZIndex = item.Value.Item2;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private bool BelongToSameGroup(IGroupable item1, IGroupable item2)
|
||||
@@ -2817,6 +2848,11 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
GroupCommand.Execute(null);
|
||||
return true;
|
||||
}
|
||||
else if (DiagramOption.ShortcutOption.Ungroup(e))
|
||||
{
|
||||
UngroupCommand.Execute(null);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
private bool _isSelected;
|
||||
[Browsable(false)]
|
||||
[CanDo]
|
||||
//[CanDo]
|
||||
public bool IsSelected
|
||||
{
|
||||
get
|
||||
|
||||
@@ -8,6 +8,7 @@ using System.Linq;
|
||||
using System.Security.Policy;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using AIStudio.Wpf.DiagramDesigner;
|
||||
@@ -239,6 +240,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
}
|
||||
|
||||
private bool _isExpanded = true;
|
||||
[CanDo]
|
||||
public bool IsExpanded
|
||||
{
|
||||
get
|
||||
@@ -322,6 +324,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
|
||||
#region 附加信息属性
|
||||
private LinkInfo _linkInfo;
|
||||
[CanDo]
|
||||
public LinkInfo LinkInfo
|
||||
{
|
||||
get
|
||||
@@ -335,6 +338,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
}
|
||||
|
||||
private ImageInfo _imageInfo;
|
||||
[CanDo]
|
||||
public ImageInfo ImageInfo
|
||||
{
|
||||
get
|
||||
@@ -348,6 +352,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
}
|
||||
|
||||
private string _remark;
|
||||
[CanDo]
|
||||
[Browsable(true)]
|
||||
public string Remark
|
||||
{
|
||||
@@ -362,6 +367,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
}
|
||||
|
||||
private double? _priority;
|
||||
[CanDo]
|
||||
public double? Priority
|
||||
{
|
||||
get
|
||||
@@ -375,6 +381,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
}
|
||||
|
||||
private double? _rate;
|
||||
[CanDo]
|
||||
public double? Rate
|
||||
{
|
||||
get
|
||||
@@ -388,6 +395,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
}
|
||||
|
||||
private ObservableCollection<string> _tags;
|
||||
[CanDo]
|
||||
public ObservableCollection<string> Tags
|
||||
{
|
||||
get
|
||||
@@ -568,6 +576,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
{
|
||||
if (GetLevel0Node()?.LayoutUpdating == true) return;
|
||||
|
||||
Interlocked.Increment(ref Root.DoCommandManager.BeginDo);
|
||||
switch (e.PropertyName)
|
||||
{
|
||||
case nameof(Left):
|
||||
@@ -591,6 +600,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
case nameof(ItemWidth):
|
||||
case nameof(ItemHeight):
|
||||
{
|
||||
|
||||
UpdatedLayout();
|
||||
break;
|
||||
}
|
||||
@@ -608,6 +618,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
break;
|
||||
}
|
||||
}
|
||||
Interlocked.Decrement(ref Root.DoCommandManager.BeginDo);
|
||||
}
|
||||
|
||||
protected override void FontViewModel_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user