mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-20 08:26:36 +08:00
项目结构调整
This commit is contained in:
71
Extensions/AIStudio.Wpf.Mind/Controls/NodeDTSWindow.xaml.cs
Normal file
71
Extensions/AIStudio.Wpf.Mind/Controls/NodeDTSWindow.xaml.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using System.Windows;
|
||||
using AIStudio.Wpf.DiagramDesigner;
|
||||
|
||||
namespace AIStudio.Wpf.Mind.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// NodeDTSWindow.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class NodeDTSWindow : Window
|
||||
{
|
||||
public NodeDTSWindow(string title, string content)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
var viewmodel = new NodeDTSWindowViewModel();
|
||||
viewmodel.Title = title;
|
||||
viewmodel.Content = content;
|
||||
|
||||
this.DataContext = viewmodel;
|
||||
}
|
||||
|
||||
public string ContentString
|
||||
{
|
||||
get
|
||||
{
|
||||
return (this.DataContext as NodeDTSWindowViewModel).Content;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnOK_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.DialogResult = true;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.DialogResult = false;
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
|
||||
public class NodeDTSWindowViewModel : BindableBase
|
||||
{
|
||||
private string _title;
|
||||
public string Title
|
||||
{
|
||||
get
|
||||
{
|
||||
return _title;
|
||||
}
|
||||
set
|
||||
{
|
||||
SetProperty(ref _title, value);
|
||||
}
|
||||
}
|
||||
|
||||
private string _content;
|
||||
public string Content
|
||||
{
|
||||
get
|
||||
{
|
||||
return _content;
|
||||
}
|
||||
set
|
||||
{
|
||||
SetProperty(ref _content, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user