This commit is contained in:
艾竹
2022-12-12 22:33:17 +08:00
parent 02f428d61a
commit 4b798f75a0
60 changed files with 330 additions and 277 deletions

View File

@@ -1,10 +1,4 @@
using AIStudio.Wpf.DiagramHelper.Commands;
using AIStudio.Wpf.DiagramHelper.Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Windows.Input;
using AIStudio.Wpf.DiagramDesigner;
using AIStudio.Wpf.DiagramDesigner;
namespace AIStudio.Wpf.SFC.ViewModels
{
@@ -14,8 +8,21 @@ namespace AIStudio.Wpf.SFC.ViewModels
/// the popup to be cancelled without applying any changes to the calling ViewModel
/// whos data will be updated if the PopupWindow.xaml window is closed successfully
/// </summary>
public class SFCActionNodeData : TitleBindableBase
public class SFCActionNodeData : BindableBase
{
private string _title;
public string Title
{
get
{
return _title;
}
set
{
SetProperty(ref _title, value);
}
}
public SFCActionNodeData(LinkPoint linkPoint, string expression)
{
Title = "输出动作";

View File

@@ -1,7 +1,4 @@
using AIStudio.Wpf.DiagramHelper.Commands;
using AIStudio.Wpf.DiagramHelper.Models;
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Windows.Input;
using AIStudio.Wpf.DiagramDesigner;
@@ -14,8 +11,20 @@ namespace AIStudio.Wpf.SFC.ViewModels
/// the popup to be cancelled without applying any changes to the calling ViewModel
/// whos data will be updated if the PopupWindow.xaml window is closed successfully
/// </summary>
public class SFCConditionNodeData : TitleBindableBase
public class SFCConditionNodeData : BindableBase
{
private string _title;
public string Title
{
get
{
return _title;
}
set
{
SetProperty(ref _title, value);
}
}
public SFCConditionNodeData(IEnumerable<LinkPoint> linkPoint, string expression)
{
Title = "转移条件";
@@ -54,7 +63,7 @@ namespace AIStudio.Wpf.SFC.ViewModels
{
get
{
return this._addCommand ?? (this._addCommand = new DelegateCommand<object>(para => this.AddExecuted(para)));
return this._addCommand ?? (this._addCommand = new SimpleCommand(para => { return true; }, para => this.AddExecuted(para)));
}
}
@@ -63,7 +72,7 @@ namespace AIStudio.Wpf.SFC.ViewModels
{
get
{
return this._deleteCommand ?? (this._deleteCommand = new DelegateCommand<object>(para => this.DeleteExecuted(para)));
return this._deleteCommand ?? (this._deleteCommand = new SimpleCommand(para => { return true; }, para => this.DeleteExecuted(para)));
}
}

View File

@@ -4,8 +4,7 @@ using System.ComponentModel;
using System.Linq;
using System.Windows.Media;
using AIStudio.Wpf.DiagramDesigner;
using AIStudio.Wpf.DiagramHelper;
using AIStudio.Wpf.DiagramHelper.Services;
using AIStudio.Wpf.DiagramDesigner.Services;
using AIStudio.Wpf.SFC.Models;
namespace AIStudio.Wpf.SFC.ViewModels

View File

@@ -1,13 +1,22 @@
using AIStudio.Wpf.DiagramHelper.Models;
using System;
using System.Collections.Generic;
using System.Text;
using AIStudio.Wpf.DiagramDesigner;
using AIStudio.Wpf.DiagramDesigner;
namespace AIStudio.Wpf.SFC.ViewModels
{
public class Simulate_SolenoidViewModelData : TitleBindableBase
public class Simulate_SolenoidViewModelData : BindableBase
{
private string _title;
public string Title
{
get
{
return _title;
}
set
{
SetProperty(ref _title, value);
}
}
public Simulate_SolenoidViewModelData(LinkPoint dILinkPoint, LinkPoint dOLinkPoint)
{
Title = "阀门";

View File

@@ -1,13 +1,22 @@
using AIStudio.Wpf.DiagramHelper.Models;
using System;
using System.Collections.Generic;
using System.Text;
using AIStudio.Wpf.DiagramDesigner;
using AIStudio.Wpf.DiagramDesigner;
namespace AIStudio.Wpf.SFC.ViewModels
{
public class Simulate_TankViewModelData : TitleBindableBase
public class Simulate_TankViewModelData : BindableBase
{
private string _title;
public string Title
{
get
{
return _title;
}
set
{
SetProperty(ref _title, value);
}
}
public Simulate_TankViewModelData(LinkPoint linkPoint)
{
Title = "容器";