Commit e7566570 by liulongfei

1. 整型数字编辑

2. 二元值编辑
3. 三元值编辑
4. 富文本编辑
parent 2b34d5ba
...@@ -21,16 +21,6 @@ namespace VIZ.Package.Domain ...@@ -21,16 +21,6 @@ namespace VIZ.Package.Domain
public string FieldName { get; set; } public string FieldName { get; set; }
/// <summary> /// <summary>
/// 宽度
/// </summary>
public GridColumnWidth Width { get; set; } = new GridColumnWidth(1, GridColumnUnitType.Star);
/// <summary>
/// 最小宽度
/// </summary>
public double MinWidth { get; set; } = 120;
/// <summary>
/// 头部 /// 头部
/// </summary> /// </summary>
public object Header { get; set; } public object Header { get; set; }
......
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace VIZ.Package.Module.Resource
{
/// <summary>
/// 富文本到文本转化器
/// </summary>
public class RichText2TextConverter : IValueConverter
{
/// <summary>
/// 富文本左侧
/// </summary>
public const string RICH_TEXT_LEFT = "<fo:wrapper xmlns:fo=\"http://www.w3.org/1999/XSL/Format\"><![CDATA[";
/// <summary>
/// 富文本右侧
/// </summary>
public const string RICH_TEXT_RIGHT = "]]></fo:wrapper>";
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
string text = value?.ToString();
if (string.IsNullOrWhiteSpace(text))
return text;
text = text.Replace(RICH_TEXT_LEFT, string.Empty);
text = text.Replace(RICH_TEXT_RIGHT, string.Empty);
return text;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
string text = value?.ToString();
if (string.IsNullOrWhiteSpace(text))
return text;
return $"{RICH_TEXT_LEFT}{text}{RICH_TEXT_RIGHT}";
}
}
}
...@@ -83,6 +83,7 @@ ...@@ -83,6 +83,7 @@
</Page> </Page>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Converter\RichText2TextConverter.cs" />
<Compile Include="Converter\RowHandleConverter.cs" /> <Compile Include="Converter\RowHandleConverter.cs" />
<Compile Include="Properties\AssemblyInfo.cs"> <Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
......
<UserControl x:Class="VIZ.Package.Module.BooleanEditPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage"
xmlns:resource="clr-namespace:VIZ.Package.Module.Resource;assembly=VIZ.Package.Module.Resource"
xmlns:local="clr-namespace:VIZ.Package.Module"
d:DataContext="{d:DesignInstance Type=local:BooleanEditPanelModel}"
d:Background="White"
mc:Ignorable="d"
d:DesignHeight="50" d:DesignWidth="400">
<Grid VerticalAlignment="Top" Margin="0,20,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="值:" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
<dxe:CheckEdit VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="1"
Margin="20,0,0,0"
EditValue="{Binding Path=EditValue,Mode=TwoWay}"></dxe:CheckEdit>
</Grid>
</UserControl>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VIZ.Framework.Core;
namespace VIZ.Package.Module
{
/// <summary>
/// BooleanEditPanel.xaml 的交互逻辑
/// </summary>
public partial class BooleanEditPanel : UserControl
{
public BooleanEditPanel()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, new BooleanEditPanelModel());
}
}
}
using LiteDB.Engine;
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
using VIZ.Package.Domain;
using VIZ.Package.Service;
namespace VIZ.Package.Module
{
/// <summary>
/// Bool类型编辑面板模型
/// </summary>
public class BooleanEditPanelModel : EditPanelModelBase
{
// ============================================================
// Property
// ============================================================
#region EditValue -- 编辑值
private bool editValue;
/// <summary>
/// 编辑值
/// </summary>
public bool EditValue
{
get { return editValue; }
set
{
editValue = value;
this.RaisePropertyChanged(nameof(EditValue));
this.OnEditValueChanged();
}
}
#endregion
// ============================================================
// Message
// ============================================================
// ============================================================
// Public Function
// ============================================================
/// <summary>
/// 更新
/// </summary>
/// <param name="controlObject">控制对象</param>
/// <param name="controlField">控制字段</param>
public override void Update(ControlObjectModel controlObject, ControlFieldNodeModel controlField)
{
base.Update(controlObject, controlField);
this.IsSendToPreview = false;
string str = controlField?.Value?.ToString().Trim();
if (!bool.TryParse(str, out bool value))
{
value = str == "1";
}
this.EditValue = value;
this.IsSendToPreview = true;
}
/// <summary>
/// 更新动态数据
/// </summary>
/// <param name="listCellEdit">列单元格编辑器</param>
/// <param name="columnDefinition">列定义</param>
/// <param name="rowHandle">行号</param>
/// <param name="row">行数据</param>
public override void UpdateDynamic(ListCellEditBase listCellEdit, GridColumnDefinition columnDefinition, int rowHandle, ExpandoObject row)
{
base.UpdateDynamic(listCellEdit, columnDefinition, rowHandle, row);
IDictionary<string, object> dic = row as IDictionary<string, object>;
this.IsSendToPreview = false;
string str = dic?[columnDefinition.FieldName]?.ToString().Trim();
if (!bool.TryParse(str, out bool value))
{
value = str == "1";
}
this.EditValue = value;
this.IsSendToPreview = true;
}
// ============================================================
// Private Function
// ============================================================
/// <summary>
/// 值改变时触发
/// </summary>
private void OnEditValueChanged()
{
// 不需要向预览发送值
if (!this.IsSendToPreview)
return;
// 没有预览连接
if (ApplicationDomainEx.PreviewConn == null)
return;
// 没有控制对象或控制字段
if (this.ControlObject == null || this.ControlField == null)
return;
// 正常模式编辑
if (this.FieldEditMode == FieldEditMode.Normal)
{
this.ControlField.Value = this.EditValue ? "1" : "0";
this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier,
this.ControlField.Value);
return;
}
// 没有列信息或行数据
if (this.ColumnDefinition == null || this.Row == null)
return;
// 动态模式编辑
if (this.FieldEditMode == FieldEditMode.Dynamic)
{
IDictionary<string, object> dic = this.Row as IDictionary<string, object>;
dic[this.ColumnDefinition.FieldName] = this.EditValue ? "1" : "0";
this.ListCellEdit.UpdateEditValue(this.ColumnDefinition, this.RowHandle, this.Row);
return;
}
}
}
}
<UserControl x:Class="VIZ.Package.Module.DupletEditPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage"
xmlns:common="clr-namespace:VIZ.Package.Common;assembly=VIZ.Package.Common"
xmlns:resource="clr-namespace:VIZ.Package.Module.Resource;assembly=VIZ.Package.Module.Resource"
xmlns:local="clr-namespace:VIZ.Package.Module"
d:DataContext="{d:DesignInstance Type=local:DupletEditPanelModel}"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" MaxHeight="60"></RowDefinition>
<RowDefinition Height="*" MaxHeight="60"></RowDefinition>
<RowDefinition Height="*" MaxHeight="60"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60"></ColumnDefinition>
<ColumnDefinition Width="*" MaxWidth="200"></ColumnDefinition>
<ColumnDefinition Width="*" MaxWidth="200"></ColumnDefinition>
</Grid.ColumnDefinitions>
<!-- 值编辑 -->
<TextBlock Text="X:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="0"></TextBlock>
<common:LeftRightTextEdit Grid.Row="0" Grid.Column="1" Height="30" MaskType="Numeric"
EditValue="{Binding Path=X,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit>
<TextBlock Text="Y:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="1"></TextBlock>
<common:LeftRightTextEdit Grid.Row="1" Grid.Column="1" Height="30" MaskType="Numeric"
EditValue="{Binding Path=Y,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit>
<!-- 编辑模式 -->
<RadioButton Grid.Row="0" Grid.Column="2" Content="Single" Margin="50,0,0,0"
IsChecked="True">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="Checked" Command="{Binding Path=EditModeChangedCommand}"
CommandParameter="{x:Static local:DupletEditPanelMode.Single}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
</RadioButton>
<RadioButton Grid.Row="1" Grid.Column="2" Content="Locked" Margin="50,0,0,0">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="Checked" Command="{Binding Path=EditModeChangedCommand}"
CommandParameter="{x:Static local:DupletEditPanelMode.Locked}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
</RadioButton>
<RadioButton Grid.Row="2" Grid.Column="2" Content="Propotional" Margin="50,0,0,0">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="Checked" Command="{Binding Path=EditModeChangedCommand}"
CommandParameter="{x:Static local:DupletEditPanelMode.Propotional}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
</RadioButton>
</Grid>
</UserControl>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VIZ.Framework.Core;
namespace VIZ.Package.Module
{
/// <summary>
/// DupletEditPanel.xaml 的交互逻辑
/// </summary>
public partial class DupletEditPanel : UserControl
{
public DupletEditPanel()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, new DupletEditPanelModel());
}
}
}
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
using VIZ.Package.Domain;
using VIZ.Package.Service;
namespace VIZ.Package.Module
{
/// <summary>
/// 二元值编辑面板模型
/// </summary>
public class DupletEditPanelModel : EditPanelModelBase
{
public DupletEditPanelModel()
{
// 初始化命令
this.InitCommand();
}
/// <summary>
/// 初始化命令
/// </summary>
private void InitCommand()
{
this.EditModeChangedCommand = new VCommand<DupletEditPanelMode>(this.EditModeChanged);
}
// ============================================================
// Field
// ============================================================
/// <summary>
/// 是否正在执行更新值
/// </summary>
private bool isInExecuteUpdateValue;
// ============================================================
// Property
// ============================================================
#region Text -- 文本
private string text;
/// <summary>
/// 文本
/// </summary>
public string Text
{
get { return text; }
set
{
text = value;
this.RaisePropertyChanged(nameof(Text));
this.OnTextChanged();
}
}
#endregion
#region EditMode -- 编辑模式
private DupletEditPanelMode editMode = DupletEditPanelMode.Single;
/// <summary>
/// 编辑模式
/// </summary>
public DupletEditPanelMode EditMode
{
get { return editMode; }
set
{
editMode = value;
this.RaisePropertyChanged(nameof(EditMode));
if (value == DupletEditPanelMode.Propotional)
{
this.old_x = this.X;
this.old_y = this.Y;
}
}
}
#endregion
#region X -- X
/// <summary>
/// 记录按照百分比改变值时的初始值
/// </summary>
private double old_x;
private double x;
/// <summary>
/// X值
/// </summary>
public double X
{
get { return x; }
set
{
x = value;
this.RaisePropertyChanged(nameof(X));
this.UpdateValue(DupletEditPanelValue.X);
}
}
#endregion
#region Y -- Y
/// <summary>
/// 记录按照百分比改变值时的初始值
/// </summary>
private double old_y;
private double y;
/// <summary>
/// Y值
/// </summary>
public double Y
{
get { return y; }
set
{
y = value;
this.RaisePropertyChanged(nameof(Y));
this.UpdateValue(DupletEditPanelValue.Y);
}
}
#endregion
// ============================================================
// Command
// ============================================================
#region EditModeChangedCommand -- 编辑模式改变命令
/// <summary>
/// 编辑模式改变命令
/// </summary>
public VCommand<DupletEditPanelMode> EditModeChangedCommand { get; set; }
/// <summary>
/// 编辑模式改变
/// </summary>
/// <param name="editMode">编辑模式</param>
private void EditModeChanged(DupletEditPanelMode editMode)
{
this.EditMode = editMode;
}
#endregion
// ============================================================
// Public Function
// ============================================================
/// <summary>
/// 更新
/// </summary>
/// <param name="controlObject">控制对象</param>
/// <param name="controlField">控制字段</param>
public override void Update(ControlObjectModel controlObject, ControlFieldNodeModel controlField)
{
base.Update(controlObject, controlField);
this.IsSendToPreview = false;
this.isInExecuteUpdateValue = true;
this.Text = controlField?.Value;
this.UpdateValueFromString(this.Text);
this.isInExecuteUpdateValue = false;
this.IsSendToPreview = true;
}
/// <summary>
/// 更新动态数据
/// </summary>
/// <param name="listCellEdit">列单元格编辑器</param>
/// <param name="columnDefinition">列定义</param>
/// <param name="rowHandle">行号</param>
/// <param name="row">行数据</param>
public override void UpdateDynamic(ListCellEditBase listCellEdit, GridColumnDefinition columnDefinition, int rowHandle, ExpandoObject row)
{
base.UpdateDynamic(listCellEdit, columnDefinition, rowHandle, row);
IDictionary<string, object> dic = row as IDictionary<string, object>;
this.IsSendToPreview = false;
this.isInExecuteUpdateValue = true;
this.Text = dic?[columnDefinition.FieldName]?.ToString();
this.UpdateValueFromString(this.Text);
this.isInExecuteUpdateValue = false;
this.IsSendToPreview = true;
}
// ============================================================
// Private Function
// ============================================================
/// <summary>
/// 文本值改变时触发
/// </summary>
private void OnTextChanged()
{
// 不需要向预览发送值
if (!this.IsSendToPreview)
return;
// 没有预览连接
if (ApplicationDomainEx.PreviewConn == null)
return;
// 没有控制对象或控制字段
if (this.ControlObject == null || this.ControlField == null)
return;
// 正常模式编辑
if (this.FieldEditMode == FieldEditMode.Normal)
{
this.ControlField.Value = this.Text;
this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier,
this.ControlField.Value);
return;
}
// 没有列信息或行数据
if (this.ColumnDefinition == null || this.Row == null)
return;
// 动态模式编辑
if (this.FieldEditMode == FieldEditMode.Dynamic)
{
IDictionary<string, object> dic = this.Row as IDictionary<string, object>;
dic[this.ColumnDefinition.FieldName] = this.Text;
this.ListCellEdit.UpdateEditValue(this.ColumnDefinition, this.RowHandle, this.Row);
return;
}
}
/// <summary>
/// 更新值
/// </summary>
/// <param name="value">改变的值</param>
private void UpdateValue(DupletEditPanelValue value)
{
if (this.isInExecuteUpdateValue)
return;
this.isInExecuteUpdateValue = true;
//if (this.EditMode == TripletEditPanelMode.Single)
//{
// // nothing to do
//}
if (this.EditMode == DupletEditPanelMode.Locked)
{
this.UpdateValue_Locked(value);
}
else if (this.EditMode == DupletEditPanelMode.Propotional)
{
this.UpdateValue_Propotional(value);
}
this.Text = $"{this.X} {this.Y}";
this.isInExecuteUpdateValue = false;
}
/// <summary>
/// 锁定更新值
/// </summary>
/// <param name="value">改变的值</param>
private void UpdateValue_Locked(DupletEditPanelValue value)
{
if (value == DupletEditPanelValue.X)
{
this.Y = this.X;
}
else if (value == DupletEditPanelValue.Y)
{
this.X = this.Y;
}
}
/// <summary>
/// 百分比更新值
/// </summary>
/// <param name="value">改变的值</param>
private void UpdateValue_Propotional(DupletEditPanelValue value)
{
if (value == DupletEditPanelValue.X)
{
this.Y = this.old_x == 0 ? 0 : this.X * (this.old_y / this.old_x);
}
else if (value == DupletEditPanelValue.Y)
{
this.X = this.old_y == 0 ? 0 : this.Y * (this.old_x / this.old_y);
}
}
/// <summary>
/// 从文本中更新值
/// </summary>
/// <param name="text">文本</param>
private void UpdateValueFromString(string text)
{
string[] pars = text?.Split(' ');
if (pars.Length >= 1)
{
double.TryParse(pars[0], out double x);
this.X = x;
this.old_x = x;
}
if (pars.Length >= 2)
{
double.TryParse(pars[1], out double y);
this.Y = y;
this.old_y = y;
}
}
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Package.Module
{
/// <summary>
/// 二元编辑模式
/// </summary>
public enum DupletEditPanelMode
{
/// <summary>
/// 单独改变值
/// </summary>
Single,
/// <summary>
/// 锁定值
/// </summary>
Locked,
/// <summary>
/// 按照百分比改变值
/// </summary>
Propotional
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Package.Module
{
/// <summary>
/// 二元值
/// </summary>
public enum DupletEditPanelValue
{
/// <summary>
/// X值
/// </summary>
X,
/// <summary>
/// Y值
/// </summary>
Y
}
}
<UserControl x:Class="VIZ.Package.Module.IntegerEditPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage"
xmlns:resource="clr-namespace:VIZ.Package.Module.Resource;assembly=VIZ.Package.Module.Resource"
xmlns:local="clr-namespace:VIZ.Package.Module"
d:DataContext="{d:DesignInstance Type=local:IntegerEditPanelModel}"
d:Background="White"
mc:Ignorable="d"
d:DesignHeight="50" d:DesignWidth="600">
<Grid VerticalAlignment="Top" Margin="0,20,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="值:" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
<dxe:TextEdit AcceptsReturn="True" VerticalAlignment="Top" HorizontalAlignment="Left"
Width="200" Grid.Column="1"
MaskType="Numeric" Mask="d" Margin="20,0,0,0"
EditValue="{Binding Path=EditValue,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></dxe:TextEdit>
</Grid>
</UserControl>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VIZ.Framework.Core;
namespace VIZ.Package.Module
{
/// <summary>
/// IntegerEditPanel.xaml 的交互逻辑
/// </summary>
public partial class IntegerEditPanel : UserControl
{
public IntegerEditPanel()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, new IntegerEditPanelModel());
}
}
}
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
using VIZ.Package.Domain;
using VIZ.Package.Service;
namespace VIZ.Package.Module
{
/// <summary>
/// 数字编辑面板模型
/// </summary>
public class IntegerEditPanelModel : EditPanelModelBase
{
// ============================================================
// Property
// ============================================================
private int editValue;
/// <summary>
/// 编辑值
/// </summary>
public int EditValue
{
get { return editValue; }
set
{
editValue = value;
this.RaisePropertyChanged(nameof(EditValue));
this.OnEditValueChanged();
}
}
// ============================================================
// Message
// ============================================================
// ============================================================
// Public Function
// ============================================================
/// <summary>
/// 更新
/// </summary>
/// <param name="controlObject">控制对象</param>
/// <param name="controlField">控制字段</param>
public override void Update(ControlObjectModel controlObject, ControlFieldNodeModel controlField)
{
base.Update(controlObject, controlField);
this.IsSendToPreview = false;
int.TryParse(controlField?.Value, out int value);
this.EditValue = value;
this.IsSendToPreview = true;
}
/// <summary>
/// 更新动态数据
/// </summary>
/// <param name="listCellEdit">列单元格编辑器</param>
/// <param name="columnDefinition">列定义</param>
/// <param name="rowHandle">行号</param>
/// <param name="row">行数据</param>
public override void UpdateDynamic(ListCellEditBase listCellEdit, GridColumnDefinition columnDefinition, int rowHandle, ExpandoObject row)
{
base.UpdateDynamic(listCellEdit, columnDefinition, rowHandle, row);
IDictionary<string, object> dic = row as IDictionary<string, object>;
this.IsSendToPreview = false;
int.TryParse(dic?[columnDefinition.FieldName]?.ToString(), out int value);
this.EditValue = value;
this.IsSendToPreview = true;
}
// ============================================================
// Private Function
// ============================================================
/// <summary>
/// 值改变时触发
/// </summary>
private void OnEditValueChanged()
{
// 不需要向预览发送值
if (!this.IsSendToPreview)
return;
// 没有预览连接
if (ApplicationDomainEx.PreviewConn == null)
return;
// 没有控制对象或控制字段
if (this.ControlObject == null || this.ControlField == null)
return;
// 正常模式编辑
if (this.FieldEditMode == FieldEditMode.Normal)
{
this.ControlField.Value = this.EditValue.ToString();
this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier,
this.ControlField.Value);
return;
}
// 没有列信息或行数据
if (this.ColumnDefinition == null || this.Row == null)
return;
// 动态模式编辑
if (this.FieldEditMode == FieldEditMode.Dynamic)
{
IDictionary<string, object> dic = this.Row as IDictionary<string, object>;
dic[this.ColumnDefinition.FieldName] = this.EditValue.ToString();
this.ListCellEdit.UpdateEditValue(this.ColumnDefinition, this.RowHandle, this.Row);
return;
}
}
}
}
<local:ListCellEditBase x:Class="VIZ.Package.Module.DupletListCellEdit"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage"
xmlns:resource="clr-namespace:VIZ.Package.Module.Resource;assembly=VIZ.Package.Module.Resource"
xmlns:local="clr-namespace:VIZ.Package.Module"
d:Background="White"
mc:Ignorable="d"
d:DesignHeight="30" d:DesignWidth="200">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="30"></ColumnDefinition>
</Grid.ColumnDefinitions>
<dxe:TextEdit x:Name="PART_Text" IsReadOnly="True" EditValueChanged="EditValueChanged"></dxe:TextEdit>
<Button x:Name="PART_Show" Content=".." Grid.Column="1" Click="EditClick"></Button>
</Grid>
</local:ListCellEditBase>
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VIZ.Package.Domain;
using VIZ.Package.Service;
namespace VIZ.Package.Module
{
/// <summary>
/// DupletListCellEdit.xaml 的交互逻辑
/// </summary>
public partial class DupletListCellEdit : ListCellEditBase
{
public DupletListCellEdit()
{
InitializeComponent();
}
/// <summary>
/// 数据上下文改变时触发
/// </summary>
/// <param name="e">事件参数</param>
protected override void OnDataContextChanged(DependencyPropertyChangedEventArgs e)
{
DevExpress.Xpf.Grid.EditGridCellData cellData = e.NewValue as DevExpress.Xpf.Grid.EditGridCellData;
this.IsSendToPreview = false;
this.PART_Text.EditValue = this.FormatText(cellData?.Value?.ToString());
this.IsSendToPreview = true;
}
/// <summary>
/// 值改变时触发
/// </summary>
private void EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
{
// 是否需要发送至预览
if (!this.IsSendToPreview)
return;
// 预览连接不存在
if (ApplicationDomainEx.PreviewConn == null)
return;
DevExpress.Xpf.Grid.EditGridCellData cellData = this.DataContext as DevExpress.Xpf.Grid.EditGridCellData;
if (cellData == null)
return;
GridColumnDefinition columnDefinition = cellData.Column.DataContext as GridColumnDefinition;
if (columnDefinition == null)
return;
// 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn,
columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value,
columnDefinition.FieldName,
e.NewValue?.ToString() ?? string.Empty);
}
/// <summary>
/// 显示编辑窗口
/// </summary>
private void EditClick(object sender, RoutedEventArgs e)
{
DevExpress.Xpf.Grid.EditGridCellData cellData = this.DataContext as DevExpress.Xpf.Grid.EditGridCellData;
if (cellData == null)
return;
GridColumnDefinition columnDefinition = cellData.Column.DataContext as GridColumnDefinition;
if (columnDefinition == null)
return;
FieldEditWindow window = this.GetFieldEditWindow();
FieldEditWindowModel vm = window.DataContext as FieldEditWindowModel;
vm.Update(this, columnDefinition, cellData.RowData.RowHandle.Value, cellData.Row as ExpandoObject);
window.ShowInTaskbar = true;
window.Visibility = Visibility.Visible;
}
/// <summary>
/// 格式化文本
/// </summary>
/// <param name="text">输入文本</param>
/// <returns></returns>
private string FormatText(string text)
{
if (string.IsNullOrWhiteSpace(text))
return text;
string[] parts = text.Split(' ');
double x = 0;
double y = 0;
if (parts.Length >= 1)
{
double.TryParse(parts[0], out x);
}
if (parts.Length >= 2)
{
double.TryParse(parts[1], out y);
}
return $"{x} {y}";
}
/// <summary>
/// 更新
/// </summary>
/// <param name="columnDefinition">列定义</param>
/// <param name="rowHandle">行号</param>
/// <param name="row">行数据</param>
public override void UpdateEditValue(GridColumnDefinition columnDefinition, int rowHandle, ExpandoObject row)
{
IDictionary<string, object> dic = row as IDictionary<string, object>;
if (dic == null)
{
this.PART_Text.EditValue = null;
return;
}
this.PART_Text.EditValue = this.FormatText(dic[columnDefinition.FieldName]?.ToString());
}
}
}
...@@ -109,7 +109,7 @@ namespace VIZ.Package.Module ...@@ -109,7 +109,7 @@ namespace VIZ.Package.Module
return; return;
} }
this.PART_Text.EditValue = dic[columnDefinition.FieldName].ToString(); this.PART_Text.EditValue = dic[columnDefinition.FieldName]?.ToString();
} }
} }
} }
<local:ListCellEditBase x:Class="VIZ.Package.Module.IntegerListCellEdit"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage"
xmlns:resource="clr-namespace:VIZ.Package.Module.Resource;assembly=VIZ.Package.Module.Resource"
xmlns:local="clr-namespace:VIZ.Package.Module"
d:Background="White"
mc:Ignorable="d"
d:DesignHeight="30" d:DesignWidth="200">
<Grid>
<dxe:TextEdit x:Name="PART_Text"
MaskType="Numeric" Mask="d" EditValueChanged="EditValueChanged"></dxe:TextEdit>
</Grid>
</local:ListCellEditBase>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VIZ.Package.Domain;
using VIZ.Package.Service;
namespace VIZ.Package.Module
{
/// <summary>
/// IntegerListCellEdit.xaml 的交互逻辑
/// </summary>
public partial class IntegerListCellEdit : ListCellEditBase
{
public IntegerListCellEdit()
{
InitializeComponent();
}
/// <summary>
/// 数据上下文改变时触发
/// </summary>
/// <param name="e">事件参数</param>
protected override void OnDataContextChanged(DependencyPropertyChangedEventArgs e)
{
DevExpress.Xpf.Grid.EditGridCellData cellData = e.NewValue as DevExpress.Xpf.Grid.EditGridCellData;
this.IsSendToPreview = false;
bool.TryParse(cellData?.Value?.ToString(), out bool value);
this.PART_Text.EditValue = value;
this.IsSendToPreview = true;
}
/// <summary>
/// 值改变时触发
/// </summary>
private void EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
{
// 是否需要发送至预览
if (!this.IsSendToPreview)
return;
// 预览连接不存在
if (ApplicationDomainEx.PreviewConn == null)
return;
DevExpress.Xpf.Grid.EditGridCellData cellData = this.DataContext as DevExpress.Xpf.Grid.EditGridCellData;
if (cellData == null)
return;
GridColumnDefinition columnDefinition = cellData.Column.DataContext as GridColumnDefinition;
if (columnDefinition == null)
return;
// 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn,
columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value,
columnDefinition.FieldName,
e.NewValue?.ToString());
}
}
}
<local:ListCellEditBase x:Class="VIZ.Package.Module.RichTextListCellEdit"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage"
xmlns:resource="clr-namespace:VIZ.Package.Module.Resource;assembly=VIZ.Package.Module.Resource"
xmlns:local="clr-namespace:VIZ.Package.Module"
d:Background="White"
mc:Ignorable="d"
d:DesignHeight="30" d:DesignWidth="200">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="30"></ColumnDefinition>
</Grid.ColumnDefinitions>
<dxe:TextEdit x:Name="PART_Text" EditValueChanged="EditValueChanged"></dxe:TextEdit>
<Button x:Name="PART_Show" Content=".." Grid.Column="1" Click="EditClick"></Button>
</Grid>
</local:ListCellEditBase>
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VIZ.Package.Domain;
using VIZ.Package.Service;
namespace VIZ.Package.Module
{
/// <summary>
/// RichTextListCellEdit.xaml 的交互逻辑
/// </summary>
public partial class RichTextListCellEdit : ListCellEditBase
{
/// <summary>
/// 富文本左侧
/// </summary>
public const string RICH_TEXT_LEFT = "<fo:wrapper xmlns:fo=\"http://www.w3.org/1999/XSL/Format\"><![CDATA[";
/// <summary>
/// 富文本右侧
/// </summary>
public const string RICH_TEXT_RIGHT = "]]></fo:wrapper>";
public RichTextListCellEdit()
{
InitializeComponent();
}
/// <summary>
/// 数据上下文改变时触发
/// </summary>
/// <param name="e">事件参数</param>
protected override void OnDataContextChanged(DependencyPropertyChangedEventArgs e)
{
DevExpress.Xpf.Grid.EditGridCellData cellData = e.NewValue as DevExpress.Xpf.Grid.EditGridCellData;
this.IsSendToPreview = false;
this.PART_Text.EditValue = this.GetTextFromRichText(cellData?.Value?.ToString());
this.IsSendToPreview = true;
}
/// <summary>
/// 值改变时触发
/// </summary>
private void EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
{
// 是否需要发送至预览
if (!this.IsSendToPreview)
return;
// 预览连接不存在
if (ApplicationDomainEx.PreviewConn == null)
return;
DevExpress.Xpf.Grid.EditGridCellData cellData = this.DataContext as DevExpress.Xpf.Grid.EditGridCellData;
if (cellData == null)
return;
GridColumnDefinition columnDefinition = cellData.Column.DataContext as GridColumnDefinition;
if (columnDefinition == null)
return;
string richText = $"{RICH_TEXT_LEFT}{e.NewValue?.ToString() ?? string.Empty}{RICH_TEXT_RIGHT}";
// 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn,
columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value,
columnDefinition.FieldName,
richText);
}
/// <summary>
/// 显示编辑窗口
/// </summary>
private void EditClick(object sender, RoutedEventArgs e)
{
DevExpress.Xpf.Grid.EditGridCellData cellData = this.DataContext as DevExpress.Xpf.Grid.EditGridCellData;
if (cellData == null)
return;
GridColumnDefinition columnDefinition = cellData.Column.DataContext as GridColumnDefinition;
if (columnDefinition == null)
return;
FieldEditWindow window = this.GetFieldEditWindow();
FieldEditWindowModel vm = window.DataContext as FieldEditWindowModel;
vm.Update(this, columnDefinition, cellData.RowData.RowHandle.Value, cellData.Row as ExpandoObject);
window.ShowInTaskbar = true;
window.Visibility = Visibility.Visible;
}
/// <summary>
/// 从富文本中获取文本内容
/// </summary>
/// <param name="richText">富文本</param>
/// <returns>文本内容</returns>
private string GetTextFromRichText(string richText)
{
if (string.IsNullOrWhiteSpace(richText))
return richText;
string str = richText.Replace(RICH_TEXT_LEFT, string.Empty);
str = str.Replace(RICH_TEXT_RIGHT, string.Empty);
return str;
}
/// <summary>
/// 更新
/// </summary>
/// <param name="columnDefinition">列定义</param>
/// <param name="rowHandle">行号</param>
/// <param name="row">行数据</param>
public override void UpdateEditValue(GridColumnDefinition columnDefinition, int rowHandle, ExpandoObject row)
{
IDictionary<string, object> dic = row as IDictionary<string, object>;
if (dic == null)
{
this.PART_Text.EditValue = null;
return;
}
this.PART_Text.EditValue = this.GetTextFromRichText(dic[columnDefinition.FieldName]?.ToString());
}
}
}
...@@ -109,7 +109,7 @@ namespace VIZ.Package.Module ...@@ -109,7 +109,7 @@ namespace VIZ.Package.Module
return; return;
} }
this.PART_Text.EditValue = dic[columnDefinition.FieldName].ToString(); this.PART_Text.EditValue = dic[columnDefinition.FieldName]?.ToString();
} }
} }
} }
<local:ListCellEditBase x:Class="VIZ.Package.Module.TripletListCellEdit"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage"
xmlns:resource="clr-namespace:VIZ.Package.Module.Resource;assembly=VIZ.Package.Module.Resource"
xmlns:local="clr-namespace:VIZ.Package.Module"
d:Background="White"
mc:Ignorable="d"
d:DesignHeight="30" d:DesignWidth="200">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="30"></ColumnDefinition>
</Grid.ColumnDefinitions>
<dxe:TextEdit x:Name="PART_Text" IsReadOnly="True" EditValueChanged="EditValueChanged"></dxe:TextEdit>
<Button x:Name="PART_Show" Content=".." Grid.Column="1" Click="EditClick"></Button>
</Grid>
</local:ListCellEditBase>
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VIZ.Package.Domain;
using VIZ.Package.Service;
namespace VIZ.Package.Module
{
/// <summary>
/// TripletListCellEdit.xaml 的交互逻辑
/// </summary>
public partial class TripletListCellEdit : ListCellEditBase
{
public TripletListCellEdit()
{
InitializeComponent();
}
/// <summary>
/// 数据上下文改变时触发
/// </summary>
/// <param name="e">事件参数</param>
protected override void OnDataContextChanged(DependencyPropertyChangedEventArgs e)
{
DevExpress.Xpf.Grid.EditGridCellData cellData = e.NewValue as DevExpress.Xpf.Grid.EditGridCellData;
this.IsSendToPreview = false;
this.PART_Text.EditValue = this.FormatText(cellData?.Value?.ToString());
this.IsSendToPreview = true;
}
/// <summary>
/// 值改变时触发
/// </summary>
private void EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
{
// 是否需要发送至预览
if (!this.IsSendToPreview)
return;
// 预览连接不存在
if (ApplicationDomainEx.PreviewConn == null)
return;
DevExpress.Xpf.Grid.EditGridCellData cellData = this.DataContext as DevExpress.Xpf.Grid.EditGridCellData;
if (cellData == null)
return;
GridColumnDefinition columnDefinition = cellData.Column.DataContext as GridColumnDefinition;
if (columnDefinition == null)
return;
// 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn,
columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value,
columnDefinition.FieldName,
e.NewValue?.ToString() ?? string.Empty);
}
/// <summary>
/// 显示编辑窗口
/// </summary>
private void EditClick(object sender, RoutedEventArgs e)
{
DevExpress.Xpf.Grid.EditGridCellData cellData = this.DataContext as DevExpress.Xpf.Grid.EditGridCellData;
if (cellData == null)
return;
GridColumnDefinition columnDefinition = cellData.Column.DataContext as GridColumnDefinition;
if (columnDefinition == null)
return;
FieldEditWindow window = this.GetFieldEditWindow();
FieldEditWindowModel vm = window.DataContext as FieldEditWindowModel;
vm.Update(this, columnDefinition, cellData.RowData.RowHandle.Value, cellData.Row as ExpandoObject);
window.ShowInTaskbar = true;
window.Visibility = Visibility.Visible;
}
/// <summary>
/// 格式化文本
/// </summary>
/// <param name="text">输入文本</param>
/// <returns></returns>
private string FormatText(string text)
{
if (string.IsNullOrWhiteSpace(text))
return text;
string[] parts = text.Split(' ');
double x = 0;
double y = 0;
double z = 0;
if (parts.Length >= 1)
{
double.TryParse(parts[0], out x);
}
if (parts.Length >= 2)
{
double.TryParse(parts[1], out y);
}
if (parts.Length >= 3)
{
double.TryParse(parts[2], out z);
}
return $"{x} {y} {z}";
}
/// <summary>
/// 更新
/// </summary>
/// <param name="columnDefinition">列定义</param>
/// <param name="rowHandle">行号</param>
/// <param name="row">行数据</param>
public override void UpdateEditValue(GridColumnDefinition columnDefinition, int rowHandle, ExpandoObject row)
{
IDictionary<string, object> dic = row as IDictionary<string, object>;
if (dic == null)
{
this.PART_Text.EditValue = null;
return;
}
this.PART_Text.EditValue = this.FormatText(dic[columnDefinition.FieldName]?.ToString());
}
}
}
...@@ -20,14 +20,37 @@ ...@@ -20,14 +20,37 @@
<ResourceDictionary> <ResourceDictionary>
<!-- 行号转化器 --> <!-- 行号转化器 -->
<resource:RowHandleConverter x:Key="RowHandleConverter"></resource:RowHandleConverter> <resource:RowHandleConverter x:Key="RowHandleConverter"></resource:RowHandleConverter>
<!-- 富文本转文本 -->
<resource:RichText2TextConverter x:Key="RichText2TextConverter"></resource:RichText2TextConverter>
<!-- 单元格编辑模板选择器 --> <!-- 单元格编辑模板选择器 -->
<local:ListEditPanelCellTemplateSelector x:Key="CellTemplateSelector"> <local:ListEditPanelCellTemplateSelector x:Key="CellTemplateSelector">
<!-- 富文本 -->
<local:ListEditPanelCellTemplateSelector.RichTextDataTemplate>
<DataTemplate>
<TextBlock Text="{Binding Value,Converter={StaticResource RichText2TextConverter},Mode=OneWay}"
TextTrimming="CharacterEllipsis" TextWrapping="NoWrap" VerticalAlignment="Center"></TextBlock>
</DataTemplate>
</local:ListEditPanelCellTemplateSelector.RichTextDataTemplate>
<!-- Boolean -->
<local:ListEditPanelCellTemplateSelector.BooleanDataTemplate> <local:ListEditPanelCellTemplateSelector.BooleanDataTemplate>
<DataTemplate> <DataTemplate>
<local:BooleanListCellEdit></local:BooleanListCellEdit> <local:BooleanListCellEdit></local:BooleanListCellEdit>
</DataTemplate> </DataTemplate>
</local:ListEditPanelCellTemplateSelector.BooleanDataTemplate> </local:ListEditPanelCellTemplateSelector.BooleanDataTemplate>
<!-- 二元值 -->
<local:ListEditPanelCellTemplateSelector.DupletDataTemplate>
<DataTemplate>
<local:DupletListCellEdit></local:DupletListCellEdit>
</DataTemplate>
</local:ListEditPanelCellTemplateSelector.DupletDataTemplate>
<!-- 三元值 -->
<local:ListEditPanelCellTemplateSelector.TripletDataTemplate>
<DataTemplate>
<local:TripletListCellEdit></local:TripletListCellEdit>
</DataTemplate>
</local:ListEditPanelCellTemplateSelector.TripletDataTemplate>
<!-- 图片 -->
<local:ListEditPanelCellTemplateSelector.ImageDataTemplate> <local:ListEditPanelCellTemplateSelector.ImageDataTemplate>
<DataTemplate> <DataTemplate>
<local:ImageListCellEdit></local:ImageListCellEdit> <local:ImageListCellEdit></local:ImageListCellEdit>
...@@ -37,27 +60,36 @@ ...@@ -37,27 +60,36 @@
<!-- 单元格编辑模板选择器 --> <!-- 单元格编辑模板选择器 -->
<local:ListEditPanelCellTemplateSelector x:Key="CellEditTemplateSelector"> <local:ListEditPanelCellTemplateSelector x:Key="CellEditTemplateSelector">
<!-- 文本 -->
<local:ListEditPanelCellTemplateSelector.TextDataTemplate> <local:ListEditPanelCellTemplateSelector.TextDataTemplate>
<DataTemplate> <DataTemplate>
<local:TextListCellEdit></local:TextListCellEdit> <local:TextListCellEdit></local:TextListCellEdit>
</DataTemplate> </DataTemplate>
</local:ListEditPanelCellTemplateSelector.TextDataTemplate> </local:ListEditPanelCellTemplateSelector.TextDataTemplate>
<local:ListEditPanelCellTemplateSelector.TripletDataTemplate> <!-- 富文本 -->
<local:ListEditPanelCellTemplateSelector.RichTextDataTemplate>
<DataTemplate> <DataTemplate>
<Border></Border> <local:RichTextListCellEdit></local:RichTextListCellEdit>
</DataTemplate> </DataTemplate>
</local:ListEditPanelCellTemplateSelector.TripletDataTemplate> </local:ListEditPanelCellTemplateSelector.RichTextDataTemplate>
<!-- 数字 -->
<local:ListEditPanelCellTemplateSelector.IntegerDataTemplate>
<DataTemplate>
<local:IntegerListCellEdit></local:IntegerListCellEdit>
</DataTemplate>
</local:ListEditPanelCellTemplateSelector.IntegerDataTemplate>
</local:ListEditPanelCellTemplateSelector> </local:ListEditPanelCellTemplateSelector>
<!-- 列定义模板 --> <!-- 列定义模板 -->
<DataTemplate x:Key="ColumnTemplate"> <DataTemplate x:Key="ColumnTemplate">
<ContentControl> <ContentControl>
<dxg:GridColumn FieldName="{Binding FieldName}" Width="{Binding Width}" <dxg:GridColumn FieldName="{Binding FieldName}"
MinWidth="{Binding MinWidth}" MinWidth="120" Width="Auto"
Header="{Binding Header}" ReadOnly="{Binding ReadOnly}" Header="{Binding Header}" ReadOnly="{Binding ReadOnly}"
CellTemplateSelector="{StaticResource CellTemplateSelector}" CellTemplateSelector="{StaticResource CellTemplateSelector}"
CellEditTemplateSelector="{StaticResource CellEditTemplateSelector}" CellEditTemplateSelector="{StaticResource CellEditTemplateSelector}"
AllowEditing="{Binding AllowEditing}" AllowEditing="{Binding AllowEditing}"
AllowResizing="True"
AllowSorting="False" AllowColumnFiltering="False"/> AllowSorting="False" AllowColumnFiltering="False"/>
</ContentControl> </ContentControl>
</DataTemplate> </DataTemplate>
......
...@@ -23,16 +23,31 @@ namespace VIZ.Package.Module ...@@ -23,16 +23,31 @@ namespace VIZ.Package.Module
public DataTemplate TextDataTemplate { get; set; } public DataTemplate TextDataTemplate { get; set; }
/// <summary> /// <summary>
/// 富文本模板
/// </summary>
public DataTemplate RichTextDataTemplate { get; set; }
/// <summary>
/// 图片模板 /// 图片模板
/// </summary> /// </summary>
public DataTemplate ImageDataTemplate { get; set; } public DataTemplate ImageDataTemplate { get; set; }
/// <summary> /// <summary>
/// Bool类型的模板 /// Bool
/// </summary> /// </summary>
public DataTemplate BooleanDataTemplate { get; set; } public DataTemplate BooleanDataTemplate { get; set; }
/// <summary> /// <summary>
/// 数字
/// </summary>
public DataTemplate IntegerDataTemplate { get; set; }
/// <summary>
/// 二元组
/// </summary>
public DataTemplate DupletDataTemplate { get; set; }
/// <summary>
/// 三元组 /// 三元组
/// </summary> /// </summary>
public DataTemplate TripletDataTemplate { get; set; } public DataTemplate TripletDataTemplate { get; set; }
...@@ -56,9 +71,11 @@ namespace VIZ.Package.Module ...@@ -56,9 +71,11 @@ namespace VIZ.Package.Module
case VizControlFieldType.none: return null; case VizControlFieldType.none: return null;
case VizControlFieldType.text: return this.TextDataTemplate; case VizControlFieldType.text: return this.TextDataTemplate;
case VizControlFieldType.boolean: return this.BooleanDataTemplate; case VizControlFieldType.boolean: return this.BooleanDataTemplate;
case VizControlFieldType.richtext: return this.TextDataTemplate; case VizControlFieldType.integer: return this.IntegerDataTemplate;
case VizControlFieldType.richtext: return this.RichTextDataTemplate;
case VizControlFieldType.image: return this.ImageDataTemplate; case VizControlFieldType.image: return this.ImageDataTemplate;
case VizControlFieldType.list: return this.TextDataTemplate; case VizControlFieldType.list: return this.TextDataTemplate;
case VizControlFieldType.duplet: return this.DupletDataTemplate;
case VizControlFieldType.triplet: return this.TripletDataTemplate; case VizControlFieldType.triplet: return this.TripletDataTemplate;
default: return null; default: return null;
} }
......
<UserControl x:Class="VIZ.Package.Module.RichTextEditPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage"
xmlns:resource="clr-namespace:VIZ.Package.Module.Resource;assembly=VIZ.Package.Module.Resource"
xmlns:local="clr-namespace:VIZ.Package.Module"
d:DataContext="{d:DesignInstance Type=local:RichTextEditPanelModel}"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<dxe:TextEdit AcceptsReturn="True"
VerticalContentAlignment="Top"
EditValue="{Binding Path=Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></dxe:TextEdit>
</Grid>
</UserControl>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VIZ.Framework.Core;
namespace VIZ.Package.Module
{
/// <summary>
/// RichTextEditPanel.xaml 的交互逻辑
/// </summary>
public partial class RichTextEditPanel : UserControl
{
public RichTextEditPanel()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, new RichTextEditPanelModel());
}
}
}
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
using VIZ.Package.Domain;
using VIZ.Package.Service;
namespace VIZ.Package.Module
{
/// <summary>
/// 富本编辑面板模型
/// </summary>
public class RichTextEditPanelModel : EditPanelModelBase
{
/// <summary>
/// 富文本左侧
/// </summary>
public const string RICH_TEXT_LEFT = "<fo:wrapper xmlns:fo=\"http://www.w3.org/1999/XSL/Format\"><![CDATA[";
/// <summary>
/// 富文本右侧
/// </summary>
public const string RICH_TEXT_RIGHT = "]]></fo:wrapper>";
// ============================================================
// Property
// ============================================================
#region Text -- 文本
private string text;
/// <summary>
/// 文本
/// </summary>
public string Text
{
get { return text; }
set
{
text = value;
this.RaisePropertyChanged(nameof(Text));
this.OnTextChanged();
}
}
#endregion
// ============================================================
// Message
// ============================================================
// ============================================================
// Public Function
// ============================================================
/// <summary>
/// 更新
/// </summary>
/// <param name="controlObject">控制对象</param>
/// <param name="controlField">控制字段</param>
public override void Update(ControlObjectModel controlObject, ControlFieldNodeModel controlField)
{
base.Update(controlObject, controlField);
this.IsSendToPreview = false;
this.Text = this.GetTextFromRichText(controlField?.Value);
this.IsSendToPreview = true;
}
/// <summary>
/// 更新动态数据
/// </summary>
/// <param name="listCellEdit">列单元格编辑器</param>
/// <param name="columnDefinition">列定义</param>
/// <param name="rowHandle">行号</param>
/// <param name="row">行数据</param>
public override void UpdateDynamic(ListCellEditBase listCellEdit, GridColumnDefinition columnDefinition, int rowHandle, ExpandoObject row)
{
base.UpdateDynamic(listCellEdit, columnDefinition, rowHandle, row);
IDictionary<string, object> dic = row as IDictionary<string, object>;
this.IsSendToPreview = false;
this.Text = this.GetTextFromRichText(dic?[columnDefinition.FieldName]?.ToString());
this.IsSendToPreview = true;
}
// ============================================================
// Private Function
// ============================================================
/// <summary>
/// 文本值改变时触发
/// </summary>
private void OnTextChanged()
{
// 不需要向预览发送值
if (!this.IsSendToPreview)
return;
// 没有预览连接
if (ApplicationDomainEx.PreviewConn == null)
return;
// 没有控制对象或控制字段
if (this.ControlObject == null || this.ControlField == null)
return;
// 正常模式编辑
if (this.FieldEditMode == FieldEditMode.Normal)
{
string richText = $"{RICH_TEXT_LEFT}{this.Text}{RICH_TEXT_RIGHT}";
this.ControlField.Value = richText;
this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier,
this.ControlField.Value);
return;
}
// 没有列信息或行数据
if (this.ColumnDefinition == null || this.Row == null)
return;
// 动态模式编辑
if (this.FieldEditMode == FieldEditMode.Dynamic)
{
IDictionary<string, object> dic = this.Row as IDictionary<string, object>;
string richText = $"{RICH_TEXT_LEFT}{this.Text}{RICH_TEXT_RIGHT}";
dic[this.ColumnDefinition.FieldName] = richText;
this.ListCellEdit.UpdateEditValue(this.ColumnDefinition, this.RowHandle, this.Row);
return;
}
}
/// <summary>
/// 从富文本中获取文本内容
/// </summary>
/// <param name="richText">富文本</param>
/// <returns>文本内容</returns>
private string GetTextFromRichText(string richText)
{
if (string.IsNullOrWhiteSpace(richText))
return richText;
string str = richText.Replace(RICH_TEXT_LEFT, string.Empty);
str = str.Replace(RICH_TEXT_RIGHT, string.Empty);
return str;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Package.Module
{
/// <summary>
/// 三元值
/// </summary>
public enum TripletEditPanelValue
{
/// <summary>
/// X值
/// </summary>
X,
/// <summary>
/// Y值
/// </summary>
Y,
/// <summary>
/// Z值
/// </summary>
Z
}
}
...@@ -11,48 +11,49 @@ ...@@ -11,48 +11,49 @@
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core" xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage" xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage"
xmlns:resource="clr-namespace:VIZ.Package.Module.Resource;assembly=VIZ.Package.Module.Resource" xmlns:resource="clr-namespace:VIZ.Package.Module.Resource;assembly=VIZ.Package.Module.Resource"
xmlns:common="clr-namespace:VIZ.Package.Common;assembly=VIZ.Package.Common"
xmlns:local="clr-namespace:VIZ.Package.Module" xmlns:local="clr-namespace:VIZ.Package.Module"
d:DataContext="{d:DesignInstance Type=local:TripletEditPanelModel}" d:DataContext="{d:DesignInstance Type=local:TripletEditPanelModel}"
d:Background="White" d:Background="White"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="200" d:DesignWidth="800">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition> <RowDefinition Height="*" MaxHeight="60"></RowDefinition>
<RowDefinition Height="*"></RowDefinition> <RowDefinition Height="*" MaxHeight="60"></RowDefinition>
<RowDefinition Height="*"></RowDefinition> <RowDefinition Height="*" MaxHeight="60"></RowDefinition>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="80"></ColumnDefinition> <ColumnDefinition Width="60"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition> <ColumnDefinition Width="*" MaxWidth="200"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition> <ColumnDefinition Width="*" MaxWidth="200"></ColumnDefinition>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- 值编辑 --> <!-- 值编辑 -->
<TextBlock Text="X:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0" Grid.Row="0"></TextBlock> <TextBlock Text="X:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="0"></TextBlock>
<dxe:TextEdit Grid.Row="0" Grid.Column="1" Height="30" MaskType="Numeric" <common:LeftRightTextEdit Grid.Row="0" Grid.Column="1" Height="30" MaskType="Numeric"
EditValue="{Binding Path=X,Mode=TwoWay}"></dxe:TextEdit> EditValue="{Binding Path=X,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit>
<TextBlock Text="Y:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0" Grid.Row="1"></TextBlock> <TextBlock Text="Y:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="1"></TextBlock>
<dxe:TextEdit Grid.Row="1" Grid.Column="1" Height="30" MaskType="Numeric" <common:LeftRightTextEdit Grid.Row="1" Grid.Column="1" Height="30" MaskType="Numeric"
EditValue="{Binding Path=Y,Mode=TwoWay}"></dxe:TextEdit> EditValue="{Binding Path=Y,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit>
<TextBlock Text="Z:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0" Grid.Row="2"></TextBlock> <TextBlock Text="Z:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="2"></TextBlock>
<dxe:TextEdit Grid.Row="2" Grid.Column="1" Height="30" MaskType="Numeric" <common:LeftRightTextEdit Grid.Row="2" Grid.Column="1" Height="30" MaskType="Numeric"
EditValue="{Binding Path=Z,Mode=TwoWay}"></dxe:TextEdit> EditValue="{Binding Path=Z,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit>
<!-- 编辑模式 --> <!-- 编辑模式 -->
<RadioButton Grid.Row="0" Grid.Column="2" Content="Single" Margin="10,0,0,0" <RadioButton Grid.Row="0" Grid.Column="2" Content="Single" Margin="50,0,0,0"
IsChecked="True"> IsChecked="True">
<dxmvvm:Interaction.Behaviors> <dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="Checked" Command="{Binding Path=EditModeChangedCommand}" <dxmvvm:EventToCommand EventName="Checked" Command="{Binding Path=EditModeChangedCommand}"
CommandParameter="{x:Static local:TripletEditPanelMode.Single}"></dxmvvm:EventToCommand> CommandParameter="{x:Static local:TripletEditPanelMode.Single}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors> </dxmvvm:Interaction.Behaviors>
</RadioButton> </RadioButton>
<RadioButton Grid.Row="1" Grid.Column="2" Content="Locked" Margin="10,0,0,0"> <RadioButton Grid.Row="1" Grid.Column="2" Content="Locked" Margin="50,0,0,0">
<dxmvvm:Interaction.Behaviors> <dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="Checked" Command="{Binding Path=EditModeChangedCommand}" <dxmvvm:EventToCommand EventName="Checked" Command="{Binding Path=EditModeChangedCommand}"
CommandParameter="{x:Static local:TripletEditPanelMode.Locked}"></dxmvvm:EventToCommand> CommandParameter="{x:Static local:TripletEditPanelMode.Locked}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors> </dxmvvm:Interaction.Behaviors>
</RadioButton> </RadioButton>
<RadioButton Grid.Row="2" Grid.Column="2" Content="Propotional" Margin="10,0,0,0"> <RadioButton Grid.Row="2" Grid.Column="2" Content="Propotional" Margin="50,0,0,0">
<dxmvvm:Interaction.Behaviors> <dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="Checked" Command="{Binding Path=EditModeChangedCommand}" <dxmvvm:EventToCommand EventName="Checked" Command="{Binding Path=EditModeChangedCommand}"
CommandParameter="{x:Static local:TripletEditPanelMode.Propotional}"></dxmvvm:EventToCommand> CommandParameter="{x:Static local:TripletEditPanelMode.Propotional}"></dxmvvm:EventToCommand>
......
...@@ -25,7 +25,7 @@ namespace VIZ.Package.Module ...@@ -25,7 +25,7 @@ namespace VIZ.Package.Module
{ {
InitializeComponent(); InitializeComponent();
WPFHelper.BindingViewModel(this, new TextEditPanelModel()); WPFHelper.BindingViewModel(this, new TripletEditPanelModel());
} }
} }
} }
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Dynamic; using System.Dynamic;
using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
...@@ -30,6 +31,15 @@ namespace VIZ.Package.Module ...@@ -30,6 +31,15 @@ namespace VIZ.Package.Module
} }
// ============================================================ // ============================================================
// Field
// ============================================================
/// <summary>
/// 是否正在执行更新值
/// </summary>
private bool isInExecuteUpdateValue;
// ============================================================
// Property // Property
// ============================================================ // ============================================================
...@@ -54,20 +64,36 @@ namespace VIZ.Package.Module ...@@ -54,20 +64,36 @@ namespace VIZ.Package.Module
#region EditMode -- 编辑模式 #region EditMode -- 编辑模式
private TripletEditPanelMode editMode; private TripletEditPanelMode editMode = TripletEditPanelMode.Single;
/// <summary> /// <summary>
/// 编辑模式 /// 编辑模式
/// </summary> /// </summary>
public TripletEditPanelMode EditMode public TripletEditPanelMode EditMode
{ {
get { return editMode; } get { return editMode; }
set { editMode = value; this.RaisePropertyChanged(nameof(EditMode)); } set
{
editMode = value;
this.RaisePropertyChanged(nameof(EditMode));
if (value == TripletEditPanelMode.Propotional)
{
this.old_x = this.X;
this.old_y = this.Y;
this.old_z = this.Z;
}
}
} }
#endregion #endregion
#region X -- X #region X -- X
/// <summary>
/// 记录按照百分比改变值时的初始值
/// </summary>
private double old_x;
private double x; private double x;
/// <summary> /// <summary>
/// X值 /// X值
...@@ -79,7 +105,7 @@ namespace VIZ.Package.Module ...@@ -79,7 +105,7 @@ namespace VIZ.Package.Module
{ {
x = value; x = value;
this.RaisePropertyChanged(nameof(X)); this.RaisePropertyChanged(nameof(X));
this.OnTextChanged(); this.UpdateValue(TripletEditPanelValue.X);
} }
} }
...@@ -87,6 +113,11 @@ namespace VIZ.Package.Module ...@@ -87,6 +113,11 @@ namespace VIZ.Package.Module
#region Y -- Y #region Y -- Y
/// <summary>
/// 记录按照百分比改变值时的初始值
/// </summary>
private double old_y;
private double y; private double y;
/// <summary> /// <summary>
/// Y值 /// Y值
...@@ -98,7 +129,7 @@ namespace VIZ.Package.Module ...@@ -98,7 +129,7 @@ namespace VIZ.Package.Module
{ {
y = value; y = value;
this.RaisePropertyChanged(nameof(Y)); this.RaisePropertyChanged(nameof(Y));
this.OnTextChanged(); this.UpdateValue(TripletEditPanelValue.Y);
} }
} }
...@@ -106,6 +137,11 @@ namespace VIZ.Package.Module ...@@ -106,6 +137,11 @@ namespace VIZ.Package.Module
#region Z -- Z #region Z -- Z
/// <summary>
/// 记录按照百分比改变值时的初始值
/// </summary>
private double old_z;
private double z; private double z;
/// <summary> /// <summary>
/// Z值 /// Z值
...@@ -117,7 +153,7 @@ namespace VIZ.Package.Module ...@@ -117,7 +153,7 @@ namespace VIZ.Package.Module
{ {
z = value; z = value;
this.RaisePropertyChanged(nameof(Z)); this.RaisePropertyChanged(nameof(Z));
this.OnTextChanged(); this.UpdateValue(TripletEditPanelValue.Z);
} }
} }
...@@ -159,7 +195,12 @@ namespace VIZ.Package.Module ...@@ -159,7 +195,12 @@ namespace VIZ.Package.Module
base.Update(controlObject, controlField); base.Update(controlObject, controlField);
this.IsSendToPreview = false; this.IsSendToPreview = false;
this.isInExecuteUpdateValue = true;
this.Text = controlField?.Value; this.Text = controlField?.Value;
this.UpdateValueFromString(this.Text);
this.isInExecuteUpdateValue = false;
this.IsSendToPreview = true; this.IsSendToPreview = true;
} }
...@@ -177,7 +218,12 @@ namespace VIZ.Package.Module ...@@ -177,7 +218,12 @@ namespace VIZ.Package.Module
IDictionary<string, object> dic = row as IDictionary<string, object>; IDictionary<string, object> dic = row as IDictionary<string, object>;
this.IsSendToPreview = false; this.IsSendToPreview = false;
this.isInExecuteUpdateValue = true;
this.Text = dic?[columnDefinition.FieldName]?.ToString(); this.Text = dic?[columnDefinition.FieldName]?.ToString();
this.UpdateValueFromString(this.Text);
this.isInExecuteUpdateValue = false;
this.IsSendToPreview = true; this.IsSendToPreview = true;
} }
...@@ -231,5 +277,107 @@ namespace VIZ.Package.Module ...@@ -231,5 +277,107 @@ namespace VIZ.Package.Module
return; return;
} }
} }
/// <summary>
/// 更新值
/// </summary>
/// <param name="value">改变的值</param>
private void UpdateValue(TripletEditPanelValue value)
{
if (this.isInExecuteUpdateValue)
return;
this.isInExecuteUpdateValue = true;
//if (this.EditMode == TripletEditPanelMode.Single)
//{
// // nothing to do
//}
if (this.EditMode == TripletEditPanelMode.Locked)
{
this.UpdateValue_Locked(value);
}
else if (this.EditMode == TripletEditPanelMode.Propotional)
{
this.UpdateValue_Propotional(value);
}
this.Text = $"{this.X} {this.Y} {this.Z}";
this.isInExecuteUpdateValue = false;
}
/// <summary>
/// 锁定更新值
/// </summary>
/// <param name="value">改变的值</param>
private void UpdateValue_Locked(TripletEditPanelValue value)
{
if (value == TripletEditPanelValue.X)
{
this.Y = this.X;
this.Z = this.X;
}
else if (value == TripletEditPanelValue.Y)
{
this.X = this.Y;
this.Z = this.Y;
}
else if (value == TripletEditPanelValue.Z)
{
this.X = this.Z;
this.Y = this.Z;
}
}
/// <summary>
/// 百分比更新值
/// </summary>
/// <param name="value">改变的值</param>
private void UpdateValue_Propotional(TripletEditPanelValue value)
{
if (value == TripletEditPanelValue.X)
{
this.Y = this.old_x == 0 ? 0 : this.X * (this.old_y / this.old_x);
this.Z = this.old_x == 0 ? 0 : this.X * (this.old_z / this.old_x);
}
else if (value == TripletEditPanelValue.Y)
{
this.X = this.old_y == 0 ? 0 : this.Y * (this.old_x / this.old_y);
this.Z = this.old_y == 0 ? 0 : this.Y * (this.old_z / this.old_y);
}
else if (value == TripletEditPanelValue.Z)
{
this.X = this.old_z == 0 ? 0 : this.Z * (this.old_x / this.old_z);
this.Y = this.old_z == 0 ? 0 : this.Z * (this.old_y / this.old_z);
}
}
/// <summary>
/// 从文本中更新值
/// </summary>
/// <param name="text">文本</param>
private void UpdateValueFromString(string text)
{
string[] pars = text?.Split(' ');
if (pars.Length >= 1)
{
double.TryParse(pars[0], out double x);
this.X = x;
this.old_x = x;
}
if (pars.Length >= 2)
{
double.TryParse(pars[1], out double y);
this.Y = y;
this.old_y = y;
}
if (pars.Length >= 3)
{
double.TryParse(pars[2], out double z);
this.Z = z;
this.old_z = z;
}
}
} }
} }
...@@ -46,6 +46,22 @@ namespace VIZ.Package.Module ...@@ -46,6 +46,22 @@ namespace VIZ.Package.Module
ViewCreated = this.OnViewCreated ViewCreated = this.OnViewCreated
}); });
// 富文本编辑器
this.NavigationConfigs.Add(new NavigationConfig
{
Key = VizControlFieldType.richtext.ToString(),
ViewType = typeof(RichTextEditPanel),
ViewCreated = this.OnViewCreated
});
// Boolean类型
this.NavigationConfigs.Add(new NavigationConfig
{
Key = VizControlFieldType.boolean.ToString(),
ViewType = typeof(BooleanEditPanel),
ViewCreated = this.OnViewCreated
});
// 图片选择 // 图片选择
this.NavigationConfigs.Add(new NavigationConfig this.NavigationConfigs.Add(new NavigationConfig
{ {
...@@ -61,6 +77,31 @@ namespace VIZ.Package.Module ...@@ -61,6 +77,31 @@ namespace VIZ.Package.Module
ViewType = typeof(ListEditPanel), ViewType = typeof(ListEditPanel),
ViewCreated = this.OnViewCreated ViewCreated = this.OnViewCreated
}); });
// 数字
this.NavigationConfigs.Add(new NavigationConfig
{
Key = VizControlFieldType.integer.ToString(),
ViewType = typeof(IntegerEditPanel),
ViewCreated = this.OnViewCreated
});
// 二元编辑
this.NavigationConfigs.Add(new NavigationConfig
{
Key = VizControlFieldType.duplet.ToString(),
ViewType = typeof(DupletEditPanel),
ViewCreated = this.OnViewCreated
});
// 三元编辑
this.NavigationConfigs.Add(new NavigationConfig
{
Key = VizControlFieldType.triplet.ToString(),
ViewType = typeof(TripletEditPanel),
ViewCreated = this.OnViewCreated
});
} }
// ============================================================= // =============================================================
......
...@@ -37,6 +37,22 @@ namespace VIZ.Package.Module ...@@ -37,6 +37,22 @@ namespace VIZ.Package.Module
ViewCreated = this.OnViewCreated ViewCreated = this.OnViewCreated
}); });
// 富文本编辑器
this.NavigationConfigs.Add(new NavigationConfig
{
Key = VizControlFieldType.richtext.ToString(),
ViewType = typeof(RichTextEditPanel),
ViewCreated = this.OnViewCreated
});
// Boolean类型
this.NavigationConfigs.Add(new NavigationConfig
{
Key = VizControlFieldType.boolean.ToString(),
ViewType = typeof(BooleanEditPanel),
ViewCreated = this.OnViewCreated
});
// 图片选择 // 图片选择
this.NavigationConfigs.Add(new NavigationConfig this.NavigationConfigs.Add(new NavigationConfig
{ {
...@@ -52,6 +68,30 @@ namespace VIZ.Package.Module ...@@ -52,6 +68,30 @@ namespace VIZ.Package.Module
ViewType = typeof(ListEditPanel), ViewType = typeof(ListEditPanel),
ViewCreated = this.OnViewCreated ViewCreated = this.OnViewCreated
}); });
// 数字
this.NavigationConfigs.Add(new NavigationConfig
{
Key = VizControlFieldType.integer.ToString(),
ViewType = typeof(IntegerEditPanel),
ViewCreated = this.OnViewCreated
});
// 二元编辑
this.NavigationConfigs.Add(new NavigationConfig
{
Key = VizControlFieldType.duplet.ToString(),
ViewType = typeof(DupletEditPanel),
ViewCreated = this.OnViewCreated
});
// 三元编辑
this.NavigationConfigs.Add(new NavigationConfig
{
Key = VizControlFieldType.triplet.ToString(),
ViewType = typeof(TripletEditPanel),
ViewCreated = this.OnViewCreated
});
} }
// ============================================================= // =============================================================
......
...@@ -32,10 +32,8 @@ ...@@ -32,10 +32,8 @@
ShowTotalSummary="False" ShowTotalSummary="False"
ShowFixedTotalSummary="False" ShowFixedTotalSummary="False"
ShowDragDropHint="False" ShowDragDropHint="False"
ShowTargetInfoInDragDropHint="false"> ShowTargetInfoInDragDropHint="false"
<dxmvvm:Interaction.Behaviors> TreeDerivationMode="ChildNodesSelector" ChildNodesPath="Items">
<dxmvvm:EventToCommand EventName="NodeExpanding" Command="{Binding Path=ExpandingCommand}" PassEventArgsToCommand="True"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
</dxg:TreeListView> </dxg:TreeListView>
</dxg:GridControl.View> </dxg:GridControl.View>
</dxg:GridControl> </dxg:GridControl>
......
...@@ -29,7 +29,7 @@ namespace VIZ.Package.Module ...@@ -29,7 +29,7 @@ namespace VIZ.Package.Module
/// </summary> /// </summary>
private void InitCommand() private void InitCommand()
{ {
this.ExpandingCommand = new VCommand<TreeListNodeAllowEventArgs>(this.Expanding);
} }
/// <summary> /// <summary>
...@@ -110,24 +110,6 @@ namespace VIZ.Package.Module ...@@ -110,24 +110,6 @@ namespace VIZ.Package.Module
// Command // Command
// ============================================================= // =============================================================
#region ExpandingCommand -- 展开前命令
/// <summary>
/// 展开节点命令
/// </summary>
public VCommand<TreeListNodeAllowEventArgs> ExpandingCommand { get; set; }
/// <summary>
/// 展开节点
/// </summary>
/// <param name="e"></param>
private void Expanding(TreeListNodeAllowEventArgs e)
{
}
#endregion
// ============================================================= // =============================================================
// Message // Message
// ============================================================= // =============================================================
......
...@@ -93,25 +93,56 @@ ...@@ -93,25 +93,56 @@
<DependentUpon>CommandView.xaml</DependentUpon> <DependentUpon>CommandView.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="ControlObject\FieldEdit\Core\FieldEditMode.cs" /> <Compile Include="ControlObject\FieldEdit\Core\FieldEditMode.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\BooleanEdit\BooleanEditPanel.xaml.cs">
<DependentUpon>BooleanEditPanel.xaml</DependentUpon>
</Compile>
<Compile Include="ControlObject\FieldEdit\Edit\BooleanEdit\BooleanEditPanelModel.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\DupletEdit\DupletEditPanel.xaml.cs">
<DependentUpon>DupletEditPanel.xaml</DependentUpon>
</Compile>
<Compile Include="ControlObject\FieldEdit\Edit\DupletEdit\DupletEditPanelModel.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\DupletEdit\Enum\DupletEditPanelMode.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\DupletEdit\Enum\DupletEditPanelValue.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\EditPanelModelBase.cs" /> <Compile Include="ControlObject\FieldEdit\Edit\EditPanelModelBase.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\ImageEdit\ImageEditPanelModel.cs" /> <Compile Include="ControlObject\FieldEdit\Edit\ImageEdit\ImageEditPanelModel.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\IntegerEdit\IntegerEditPanel.xaml.cs">
<DependentUpon>IntegerEditPanel.xaml</DependentUpon>
</Compile>
<Compile Include="ControlObject\FieldEdit\Edit\IntegerEdit\IntegerEditPanelModel.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\RichTextListCellEdit.xaml.cs">
<DependentUpon>RichTextListCellEdit.xaml</DependentUpon>
</Compile>
<Compile Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\TripletListCellEdit.xaml.cs">
<DependentUpon>TripletListCellEdit.xaml</DependentUpon>
</Compile>
<Compile Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\IntegerListCellEdit.xaml.cs">
<DependentUpon>IntegerListCellEdit.xaml</DependentUpon>
</Compile>
<Compile Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\BooleanListCellEdit.xaml.cs"> <Compile Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\BooleanListCellEdit.xaml.cs">
<DependentUpon>BooleanListCellEdit.xaml</DependentUpon> <DependentUpon>BooleanListCellEdit.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\ImageListCellEdit.xaml.cs"> <Compile Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\ImageListCellEdit.xaml.cs">
<DependentUpon>ImageListCellEdit.xaml</DependentUpon> <DependentUpon>ImageListCellEdit.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\DupletListCellEdit.xaml.cs">
<DependentUpon>DupletListCellEdit.xaml</DependentUpon>
</Compile>
<Compile Include="ControlObject\FieldEdit\Edit\ListEdit\ListCellEditBase.cs" /> <Compile Include="ControlObject\FieldEdit\Edit\ListEdit\ListCellEditBase.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\ListEdit\ListEditPanelCellTemplateSelector.cs" /> <Compile Include="ControlObject\FieldEdit\Edit\ListEdit\ListEditPanelCellTemplateSelector.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\ListEdit\ListEditPanelModel.cs" /> <Compile Include="ControlObject\FieldEdit\Edit\ListEdit\ListEditPanelModel.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\ResourceEdit\GHResourceEditPartModel.cs" /> <Compile Include="ControlObject\FieldEdit\Edit\ResourceEdit\GHResourceEditPartModel.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\ResourceEdit\ResourceEditPanelModelBase.cs" /> <Compile Include="ControlObject\FieldEdit\Edit\ResourceEdit\ResourceEditPanelModelBase.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\RichTextEdit\RichTextEditPanel.xaml.cs">
<DependentUpon>RichTextEditPanel.xaml</DependentUpon>
</Compile>
<Compile Include="ControlObject\FieldEdit\Edit\RichTextEdit\RichTextEditPanelModel.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\TextEdit\TextEditPanelModel.cs" /> <Compile Include="ControlObject\FieldEdit\Edit\TextEdit\TextEditPanelModel.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\TripletEdit\TripletEditPanelMode.cs" /> <Compile Include="ControlObject\FieldEdit\Edit\TripletEdit\Enum\TripletEditPanelMode.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\TripletEdit\TripletEditPanelModel.cs" /> <Compile Include="ControlObject\FieldEdit\Edit\TripletEdit\TripletEditPanelModel.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\TripletEdit\TripletEditPanel.xaml.cs"> <Compile Include="ControlObject\FieldEdit\Edit\TripletEdit\TripletEditPanel.xaml.cs">
<DependentUpon>TripletEditPanel.xaml</DependentUpon> <DependentUpon>TripletEditPanel.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="ControlObject\FieldEdit\Edit\TripletEdit\Enum\TripletEditPanelValue.cs" />
<Compile Include="ControlObject\FieldEdit\FieldEditPluginLifeCycle.cs" /> <Compile Include="ControlObject\FieldEdit\FieldEditPluginLifeCycle.cs" />
<Compile Include="ControlObject\FieldEdit\ViewModel\FieldEditViewModel.cs" /> <Compile Include="ControlObject\FieldEdit\ViewModel\FieldEditViewModel.cs" />
<Compile Include="ControlObject\FieldEdit\ViewModel\FieldEditWindowModel.cs" /> <Compile Include="ControlObject\FieldEdit\ViewModel\FieldEditWindowModel.cs" />
...@@ -248,6 +279,30 @@ ...@@ -248,6 +279,30 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="ControlObject\FieldEdit\Edit\BooleanEdit\BooleanEditPanel.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ControlObject\FieldEdit\Edit\DupletEdit\DupletEditPanel.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ControlObject\FieldEdit\Edit\IntegerEdit\IntegerEditPanel.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\RichTextListCellEdit.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\TripletListCellEdit.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\IntegerListCellEdit.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\BooleanListCellEdit.xaml"> <Page Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\BooleanListCellEdit.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
...@@ -256,6 +311,14 @@ ...@@ -256,6 +311,14 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\DupletListCellEdit.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ControlObject\FieldEdit\Edit\RichTextEdit\RichTextEditPanel.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ControlObject\FieldEdit\Edit\TripletEdit\TripletEditPanel.xaml"> <Page Include="ControlObject\FieldEdit\Edit\TripletEdit\TripletEditPanel.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
......
...@@ -23,7 +23,10 @@ namespace VIZ.Package.Service ...@@ -23,7 +23,10 @@ namespace VIZ.Package.Service
{ {
VizControlFieldType.none, VizControlFieldType.none,
VizControlFieldType.boolean, VizControlFieldType.boolean,
VizControlFieldType.image VizControlFieldType.image,
VizControlFieldType.integer,
VizControlFieldType.duplet,
VizControlFieldType.triplet
}; };
/// <summary> /// <summary>
...@@ -368,6 +371,12 @@ namespace VIZ.Package.Service ...@@ -368,6 +371,12 @@ namespace VIZ.Package.Service
if (type == "richtext") if (type == "richtext")
return VizControlFieldType.richtext; return VizControlFieldType.richtext;
if (type == "integer")
return VizControlFieldType.integer;
if (type == "duplet")
return VizControlFieldType.duplet;
if (type == "triplet") if (type == "triplet")
return VizControlFieldType.triplet; return VizControlFieldType.triplet;
......
...@@ -49,9 +49,23 @@ namespace VIZ.Package.Storage ...@@ -49,9 +49,23 @@ namespace VIZ.Package.Storage
list, list,
/// <summary> /// <summary>
/// 数字
/// </summary>
[Description("数字")]
integer,
/// <summary>
/// 二元组
/// </summary>
[Description("二元组")]
duplet,
/// <summary>
/// 三元组 /// 三元组
/// </summary> /// </summary>
[Description("三元组")] [Description("三元组")]
triplet triplet,
} }
} }
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
\ No newline at end of file
<Application x:Class="VIZ.Package.WpfTest.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:VIZ.Package.WpfTest"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace VIZ.Package.WpfTest
{
/// <summary>
/// App.xaml 的交互逻辑
/// </summary>
public partial class App : Application
{
}
}
<Window x:Class="VIZ.Package.WpfTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:VIZ.Package.WpfTest"
xmlns:common="clr-namespace:VIZ.Package.Common;assembly=VIZ.Package.Common"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<common:LeftRightTextEdit x:Name="edit" EditValue="{Binding Path=Value,Mode=TwoWay}"
Height="40" Width="200"></common:LeftRightTextEdit>
<Button Grid.Row="1" Click="Button_Click"></Button>
</Grid>
</Window>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VIZ.Framework.Core;
namespace VIZ.Package.WpfTest
{
/// <summary>
/// MainWindow.xaml 的交互逻辑
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, new MainWindowModel());
}
private void Button_Click(object sender, RoutedEventArgs e)
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
namespace VIZ.Package.WpfTest
{
public class MainWindowModel : ViewModelBase
{
#region Value --
private string _value;
/// <summary>
/// 值
/// </summary>
public string Value
{
get { return _value; }
set { _value = value; this.RaisePropertyChanged(nameof(Value)); }
}
#endregion
}
}
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("VIZ.Package.WpfTest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("VIZ.Package.WpfTest")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
//若要开始生成可本地化的应用程序,请设置
//.csproj 文件中的 <UICulture>CultureYouAreCodingWith</UICulture>
//例如,如果您在源文件中使用的是美国英语,
//使用的是美国英语,请将 <UICulture> 设置为 en-US。 然后取消
//对以下 NeutralResourceLanguage 特性的注释。 更新
//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //主题特定资源词典所处位置
//(未在页面中找到资源时使用,
//或应用程序资源字典中找到时使用)
ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
//(未在页面中找到资源时使用,
//、应用程序或任何主题专用资源字典中找到时使用)
)]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本: 4.0.30319.42000
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace VIZ.Package.WpfTest.Properties
{
/// <summary>
/// 强类型资源类,用于查找本地化字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// 返回此类使用的缓存 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("VIZ.Package.WpfTest.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace VIZ.Package.WpfTest.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{680C8D29-A993-492E-9E1A-DA80513ADBFE}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>VIZ.Package.WpfTest</RootNamespace>
<AssemblyName>VIZ.Package.WpfTest</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="DevExpress.Data.Desktop.v22.1, Version=22.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.v22.1, Version=22.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Printing.v22.1.Core, Version=22.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Xpf.Core.v22.1, Version=22.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="MainWindowModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Common.Resource\VIZ.Framework.Common.Resource.csproj">
<Project>{76ef480a-e486-41b7-b7a5-2a849fc8d5bf}</Project>
<Name>VIZ.Framework.Common.Resource</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Common\VIZ.Framework.Common.csproj">
<Project>{92834c05-703e-4f05-9224-f36220939d8f}</Project>
<Name>VIZ.Framework.Common</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Connection\VIZ.Framework.Connection.csproj">
<Project>{e07528dd-9dee-47c2-b79d-235ecfa6b003}</Project>
<Name>VIZ.Framework.Connection</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Core\VIZ.Framework.Core.csproj">
<Project>{75b39591-4bc3-4b09-bd7d-ec9f67efa96e}</Project>
<Name>VIZ.Framework.Core</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Domain\VIZ.Framework.Domain.csproj">
<Project>{28661e82-c86a-4611-a028-c34f6ac85c97}</Project>
<Name>VIZ.Framework.Domain</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Module\VIZ.Framework.Module.csproj">
<Project>{47cf6fb0-e37d-4ef1-afc7-03db2bca8892}</Project>
<Name>VIZ.Framework.Module</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Storage\VIZ.Framework.Storage.csproj">
<Project>{06b80c09-343d-4bb2-aeb1-61cfbfbf5cad}</Project>
<Name>VIZ.Framework.Storage</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.Package.Common\VIZ.Package.Common.csproj">
<Project>{e4912bce-bc90-4457-9ee3-06435496d979}</Project>
<Name>VIZ.Package.Common</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.Package.Connection\VIZ.Package.Connection.csproj">
<Project>{421527f6-37b8-4615-9317-ffd5e272181b}</Project>
<Name>VIZ.Package.Connection</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.Package.Domain\VIZ.Package.Domain.csproj">
<Project>{dbaeae47-1f2d-4b05-82c3-abf7cc33aa2d}</Project>
<Name>VIZ.Package.Domain</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.Package.Module.Resource\VIZ.Package.Module.Resource.csproj">
<Project>{327ea1f4-f23c-418a-a2ef-da4f1039b333}</Project>
<Name>VIZ.Package.Module.Resource</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.Package.Module\VIZ.Package.Module.csproj">
<Project>{6fd4c0f0-8a00-4db8-924b-a3cd9a45297f}</Project>
<Name>VIZ.Package.Module</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.Package.Plugin\VIZ.Package.Plugin.csproj">
<Project>{9c7d3994-340a-480f-8d06-92c562137810}</Project>
<Name>VIZ.Package.Plugin</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.Package.Service\VIZ.Package.Service.csproj">
<Project>{bf693c2d-3de8-463b-8394-a0667dca7b42}</Project>
<Name>VIZ.Package.Service</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.Package.Storage\VIZ.Package.Storage.csproj">
<Project>{5bf08a07-9405-4f5d-a7f7-9d9ee17d6dd0}</Project>
<Name>VIZ.Package.Storage</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.14" targetFramework="net48" />
</packages>
\ No newline at end of file
...@@ -61,6 +61,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Package.Connection", "V ...@@ -61,6 +61,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Package.Connection", "V
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Package.Module.Resource", "VIZ.Package.Module.Resource\VIZ.Package.Module.Resource.csproj", "{327EA1F4-F23C-418A-A2EF-DA4F1039B333}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Package.Module.Resource", "VIZ.Package.Module.Resource\VIZ.Package.Module.Resource.csproj", "{327EA1F4-F23C-418A-A2EF-DA4F1039B333}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Package.WpfTest", "VIZ.Package.WpfTest\VIZ.Package.WpfTest.csproj", "{680C8D29-A993-492E-9E1A-DA80513ADBFE}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
...@@ -197,6 +199,14 @@ Global ...@@ -197,6 +199,14 @@ Global
{327EA1F4-F23C-418A-A2EF-DA4F1039B333}.Release|Any CPU.Build.0 = Release|Any CPU {327EA1F4-F23C-418A-A2EF-DA4F1039B333}.Release|Any CPU.Build.0 = Release|Any CPU
{327EA1F4-F23C-418A-A2EF-DA4F1039B333}.Release|x64.ActiveCfg = Release|Any CPU {327EA1F4-F23C-418A-A2EF-DA4F1039B333}.Release|x64.ActiveCfg = Release|Any CPU
{327EA1F4-F23C-418A-A2EF-DA4F1039B333}.Release|x64.Build.0 = Release|Any CPU {327EA1F4-F23C-418A-A2EF-DA4F1039B333}.Release|x64.Build.0 = Release|Any CPU
{680C8D29-A993-492E-9E1A-DA80513ADBFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{680C8D29-A993-492E-9E1A-DA80513ADBFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{680C8D29-A993-492E-9E1A-DA80513ADBFE}.Debug|x64.ActiveCfg = Debug|x64
{680C8D29-A993-492E-9E1A-DA80513ADBFE}.Debug|x64.Build.0 = Debug|x64
{680C8D29-A993-492E-9E1A-DA80513ADBFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{680C8D29-A993-492E-9E1A-DA80513ADBFE}.Release|Any CPU.Build.0 = Release|Any CPU
{680C8D29-A993-492E-9E1A-DA80513ADBFE}.Release|x64.ActiveCfg = Release|Any CPU
{680C8D29-A993-492E-9E1A-DA80513ADBFE}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
...@@ -218,6 +228,7 @@ Global ...@@ -218,6 +228,7 @@ Global
{6FD4C0F0-8A00-4DB8-924B-A3CD9A45297F} = {3EF92943-B3E1-4D8F-857E-B8C3B6999096} {6FD4C0F0-8A00-4DB8-924B-A3CD9A45297F} = {3EF92943-B3E1-4D8F-857E-B8C3B6999096}
{421527F6-37B8-4615-9317-FFD5E272181B} = {13578EF6-3708-4541-AD15-1432CCBB6A76} {421527F6-37B8-4615-9317-FFD5E272181B} = {13578EF6-3708-4541-AD15-1432CCBB6A76}
{327EA1F4-F23C-418A-A2EF-DA4F1039B333} = {3EF92943-B3E1-4D8F-857E-B8C3B6999096} {327EA1F4-F23C-418A-A2EF-DA4F1039B333} = {3EF92943-B3E1-4D8F-857E-B8C3B6999096}
{680C8D29-A993-492E-9E1A-DA80513ADBFE} = {0A0B7990-3978-4CCC-AB65-9E4F60EC5C4E}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {210415E4-5B35-429D-99F2-ACE39AB42FF3} SolutionGuid = {210415E4-5B35-429D-99F2-ACE39AB42FF3}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment