mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-05 08:46:34 +08:00
最近精简代码,有些bug,修复
This commit is contained in:
@@ -356,19 +356,6 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
private bool enabledForSelection = true;
|
||||
public bool EnabledForSelection
|
||||
{
|
||||
get
|
||||
{
|
||||
return enabledForSelection;
|
||||
}
|
||||
set
|
||||
{
|
||||
SetProperty(ref enabledForSelection, value);
|
||||
}
|
||||
}
|
||||
|
||||
private double _left;
|
||||
[CanDo]
|
||||
public double Left
|
||||
|
||||
@@ -1251,7 +1251,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
DoCommandManager.DoNewCommand(this.ToString(),
|
||||
() => {
|
||||
ClearSelectedItems();
|
||||
Add(newitems);
|
||||
Add(newitems, true);
|
||||
},
|
||||
() => {
|
||||
foreach (var item in newitems)
|
||||
|
||||
@@ -78,6 +78,20 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
get; private set;
|
||||
}
|
||||
|
||||
private bool enabledForSelection = true;
|
||||
public bool EnabledForSelection
|
||||
{
|
||||
get
|
||||
{
|
||||
return enabledForSelection;
|
||||
}
|
||||
set
|
||||
{
|
||||
SetProperty(ref enabledForSelection, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private bool _isReadOnlyText = false;
|
||||
public bool IsReadOnlyText
|
||||
{
|
||||
@@ -105,27 +119,12 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
SetProperty(ref _customText, value);
|
||||
}
|
||||
}
|
||||
|
||||
private bool _showText;
|
||||
public bool ShowText
|
||||
{
|
||||
get
|
||||
{
|
||||
return _showText;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!SetProperty(ref _showText, value))
|
||||
{
|
||||
RaisePropertyChanged(nameof(ShowText));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void ClearText()
|
||||
{
|
||||
ShowText = false;
|
||||
|
||||
}
|
||||
|
||||
private void ExecuteSelectItemCommand(object param)
|
||||
@@ -163,8 +162,6 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
if (IsReadOnly == true) return;
|
||||
|
||||
ShowText = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,6 +191,22 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
private bool _showText;
|
||||
public bool ShowText
|
||||
{
|
||||
get
|
||||
{
|
||||
return _showText;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!SetProperty(ref _showText, value))
|
||||
{
|
||||
RaisePropertyChanged(nameof(ShowText));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool _visible = true;
|
||||
public bool Visible
|
||||
{
|
||||
@@ -343,7 +359,6 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected virtual void ClearText()
|
||||
{
|
||||
|
||||
|
||||
@@ -39,13 +39,14 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
base.Init(root, initNew);
|
||||
|
||||
CustomText = true;
|
||||
CustomText = true;
|
||||
}
|
||||
|
||||
protected override void InitNew()
|
||||
{
|
||||
this.ItemWidth = 150;
|
||||
this.ClearConnectors();
|
||||
ShowText = true;
|
||||
}
|
||||
|
||||
private string _watermark = "请输入文本";
|
||||
@@ -60,5 +61,10 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
SetProperty(ref _watermark, value);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void ClearText()
|
||||
{
|
||||
Root.RemoveItemCommand.Execute(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,6 +339,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
void Remove(object parameter);
|
||||
|
||||
void ClearSelectedItems();
|
||||
|
||||
bool ExecuteShortcut(KeyEventArgs e);
|
||||
|
||||
event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
@@ -23,6 +23,11 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
get; set;
|
||||
}
|
||||
|
||||
bool ShowText
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
void AddToSelection(bool selected);
|
||||
|
||||
event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
Reference in New Issue
Block a user