Commit ed4d37f9 by wangonghui
parents d9f016be 5778ea87
...@@ -141,7 +141,7 @@ namespace VIZ.Package.Connection ...@@ -141,7 +141,7 @@ namespace VIZ.Package.Connection
string errorMessage = null; string errorMessage = null;
VizImage img = this.vizEnginePool.RequestImage(message, IMAGE_GET_TIME_OUT, ref errorMessage); VizImage img = this.vizEnginePool.RequestImage(message, IMAGE_GET_TIME_OUT, ref errorMessage);
if (!string.IsNullOrWhiteSpace(errorMessage)) if (img == null || !string.IsNullOrWhiteSpace(errorMessage))
return null; return null;
return img.Image; return img.Image;
......
...@@ -3,6 +3,7 @@ using System.Collections.Generic; ...@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using VIZ.Package.Storage;
namespace VIZ.Package.Domain namespace VIZ.Package.Domain
{ {
...@@ -39,7 +40,7 @@ namespace VIZ.Package.Domain ...@@ -39,7 +40,7 @@ namespace VIZ.Package.Domain
/// <returns>场景父级</returns> /// <returns>场景父级</returns>
public static string GetSceneParent(this PageModelBase pageBase) public static string GetSceneParent(this PageModelBase pageBase)
{ {
string parent = ApplicationDomainEx.CurrentPage.ScenePath.Substring(0, ApplicationDomainEx.CurrentPage.ScenePath.LastIndexOf('/')); string parent = pageBase.ScenePath.Substring(0, pageBase.ScenePath.LastIndexOf('/'));
return parent; return parent;
} }
...@@ -58,5 +59,24 @@ namespace VIZ.Package.Domain ...@@ -58,5 +59,24 @@ namespace VIZ.Package.Domain
return Guid.Empty; return Guid.Empty;
} }
/// <summary>
/// 获取Viz场景层
/// </summary>
/// <param name="pageBase">页模型基类</param>
/// <returns>Viz场景层</returns>
public static VizScene GetVizScene(this PageModelBase pageBase)
{
if (pageBase == null)
return VizScene.MAIN_SCENE;
switch (pageBase.Layer)
{
case VizLayer.FRONT_LAYER: return VizScene.FRONT_SCENE;
case VizLayer.MAIN_LAYER: return VizScene.MAIN_SCENE;
case VizLayer.BACK_LAYER: return VizScene.BACK_SCENE;
default: return VizScene.MAIN_SCENE;
}
}
} }
} }
...@@ -35,6 +35,11 @@ namespace VIZ.Package.Domain ...@@ -35,6 +35,11 @@ namespace VIZ.Package.Domain
/// </summary> /// </summary>
public const string SYSTEM_HOT_KEY = "触发快捷键"; public const string SYSTEM_HOT_KEY = "触发快捷键";
/// <summary>
/// 页命令日志
/// </summary>
public const string SYSTEM_PAGE_CMD_LOG = "页命令日志";
// ============================================================================= // =============================================================================
// Task // Task
// ============================================================================= // =============================================================================
......
...@@ -11,13 +11,14 @@ using System.Windows.Data; ...@@ -11,13 +11,14 @@ using System.Windows.Data;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using VIZ.Package.Domain; using VIZ.Package.Domain;
using VIZ.Package.Storage;
namespace VIZ.Package.Module.Resource namespace VIZ.Package.Module.Resource
{ {
/// <summary> /// <summary>
/// 页缩略图转化器 /// 页缩略图转化器
/// </summary> /// </summary>
public class PageThumbnailConverter : IValueConverter public class PageThumbnailMultiConverter : IMultiValueConverter
{ {
[DllImport("gdi32.dll", SetLastError = true)] [DllImport("gdi32.dll", SetLastError = true)]
private static extern bool DeleteObject(IntPtr hObject); private static extern bool DeleteObject(IntPtr hObject);
...@@ -27,20 +28,21 @@ namespace VIZ.Package.Module.Resource ...@@ -27,20 +28,21 @@ namespace VIZ.Package.Module.Resource
/// </summary> /// </summary>
public ImageSource CommandThumbnail { get; set; } public ImageSource CommandThumbnail { get; set; }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{ {
PageModelBase pageBase = value as PageModelBase; if (values == null || values.Length != 2)
if (pageBase == null)
return null; return null;
if (pageBase.PageType == Storage.PageType.Command) if (!(values[1] is PageType type))
return null;
if (type == PageType.Command)
return this.CommandThumbnail; return this.CommandThumbnail;
Bitmap bitmap = pageBase.ThumbnailBitmap; if (!(values[0] is Bitmap bmp))
if (bitmap == null)
return null; return null;
IntPtr hBitmap = bitmap.GetHbitmap(); IntPtr hBitmap = bmp.GetHbitmap();
ImageSource wpfBitmap = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap( ImageSource wpfBitmap = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
hBitmap, hBitmap,
IntPtr.Zero, IntPtr.Zero,
...@@ -53,7 +55,7 @@ namespace VIZ.Package.Module.Resource ...@@ -53,7 +55,7 @@ namespace VIZ.Package.Module.Resource
return wpfBitmap; return wpfBitmap;
} }
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Converter\ConnGroupStatus2BrushConverter.cs" /> <Compile Include="Converter\ConnGroupStatus2BrushConverter.cs" />
<Compile Include="Converter\PageThumbnailConverter.cs" /> <Compile Include="Converter\PageThumbnailMultiConverter.cs" />
<Compile Include="Converter\VizControlFieldTypeStringConverter.cs" /> <Compile Include="Converter\VizControlFieldTypeStringConverter.cs" />
<Compile Include="Converter\ResourceFileSelectionModeConverter.cs" /> <Compile Include="Converter\ResourceFileSelectionModeConverter.cs" />
<Compile Include="Converter\RichText2TextConverter.cs" /> <Compile Include="Converter\RichText2TextConverter.cs" />
...@@ -290,5 +290,8 @@ ...@@ -290,5 +290,8 @@
<ItemGroup> <ItemGroup>
<Resource Include="Images\cmd_template.png" /> <Resource Include="Images\cmd_template.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Icons\icon_cmd_32x32.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
\ No newline at end of file
...@@ -50,7 +50,7 @@ namespace VIZ.Package.Module ...@@ -50,7 +50,7 @@ namespace VIZ.Package.Module
this.vizCommandService.SetObject(conn, ApplicationDomainEx.CurrentPage.ScenePath, ApplicationDomainEx.CurrentPage.Layer); this.vizCommandService.SetObject(conn, ApplicationDomainEx.CurrentPage.ScenePath, ApplicationDomainEx.CurrentPage.Layer);
if (obj != null) if (obj != null)
{ {
this.vizCommandControlObjectService.SetControlObject(conn, obj); this.vizCommandControlObjectService.SetControlObject(conn, obj, newPageBase.GetVizScene());
this.vizCommandControlObjectService.SetCustomControlFieldValue(conn, obj.AllFiledNodes); this.vizCommandControlObjectService.SetCustomControlFieldValue(conn, obj.AllFiledNodes);
} }
if (view != null) if (view != null)
...@@ -350,7 +350,7 @@ namespace VIZ.Package.Module ...@@ -350,7 +350,7 @@ namespace VIZ.Package.Module
{ {
if (obj != null) if (obj != null)
{ {
this.vizCommandControlObjectService.SetControlObject(conn, obj); this.vizCommandControlObjectService.SetControlObject(conn, obj, newPageBase.GetVizScene());
this.vizCommandControlObjectService.SetCustomControlFieldValue(conn, obj.AllFiledNodes); this.vizCommandControlObjectService.SetCustomControlFieldValue(conn, obj.AllFiledNodes);
} }
view?.TakeUpdate(conn); view?.TakeUpdate(conn);
......
...@@ -128,6 +128,7 @@ namespace VIZ.Package.Module ...@@ -128,6 +128,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -173,17 +173,17 @@ namespace VIZ.Package.Module ...@@ -173,17 +173,17 @@ namespace VIZ.Package.Module
{ {
get { return downTime; } get { return downTime; }
set set
{ {
downTime = value; downTime = value;
this.RaisePropertyChanged(nameof(DownTime)); this.RaisePropertyChanged(nameof(DownTime));
//down和 //down和
//if (RadioDown && RadioSetStart) //if (RadioDown && RadioSetStart)
//{ //{
int hours = Convert.ToDateTime(downTime).Hour; int hours = Convert.ToDateTime(downTime).Hour;
int minutes = Convert.ToDateTime(downTime).Minute; int minutes = Convert.ToDateTime(downTime).Minute;
int second = Convert.ToDateTime(downTime).Second; int second = Convert.ToDateTime(downTime).Second;
downTotalTimes = string.Format("{0}.000", (second + minutes * 60 + hours * 60 * 60).ToString()); downTotalTimes = string.Format("{0}.000", (second + minutes * 60 + hours * 60 * 60).ToString());
if (RadioDown && RadioSetStart) if (RadioDown && RadioSetStart)
{ {
OnTextChanged(downTotalTimes, true); OnTextChanged(downTotalTimes, true);
...@@ -246,23 +246,24 @@ namespace VIZ.Package.Module ...@@ -246,23 +246,24 @@ namespace VIZ.Package.Module
if (this.ControlObject == null || this.ControlField == null) if (this.ControlObject == null || this.ControlField == null)
return; return;
//正计时发送命令行 //正计时发送命令行
this.VizCommandControlObjectService.SetControlObjectClockValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath, ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlField.FieldIdentifier, this.ControlObject.TreeNodePath,
""); this.ControlField.FieldIdentifier,
"");
if(radioUP) if (radioUP)
{ {
RadioDown = false; RadioDown = false;
Save(); Save();
} }
if(radioUP&& RadioSetStart) if (radioUP && RadioSetStart)
{ {
if (!string.IsNullOrEmpty(downTotalTimes)) if (!string.IsNullOrEmpty(downTotalTimes))
{ {
OnTextChanged(downTotalTimes,true); OnTextChanged(downTotalTimes, true);
} }
} }
...@@ -275,7 +276,7 @@ namespace VIZ.Package.Module ...@@ -275,7 +276,7 @@ namespace VIZ.Package.Module
private void Save() private void Save()
{ {
ClockFieldEntity clockFieldEntity = ApplicationDomainEx.ClockField; ClockFieldEntity clockFieldEntity = ApplicationDomainEx.ClockField;
clockFieldEntity.RadioDown =this.radioDown; clockFieldEntity.RadioDown = this.radioDown;
clockFieldEntity.RadioUp = this.RadioUP; clockFieldEntity.RadioUp = this.RadioUP;
ApplicationDomainEx.LocalDbContext.ClockField.Upsert(clockFieldEntity); ApplicationDomainEx.LocalDbContext.ClockField.Upsert(clockFieldEntity);
} }
...@@ -303,20 +304,21 @@ namespace VIZ.Package.Module ...@@ -303,20 +304,21 @@ namespace VIZ.Package.Module
//倒计时发送命令行 //倒计时发送命令行
if (radioDown) if (radioDown)
{ {
this.VizCommandControlObjectService.SetControlObjectClockValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath, ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlField.FieldIdentifier, this.ControlObject.TreeNodePath,
""); this.ControlField.FieldIdentifier,
"");
} }
if (radioDown&& RadioSetStart) if (radioDown && RadioSetStart)
{ {
if (!string.IsNullOrEmpty(upTotalTimes)) if (!string.IsNullOrEmpty(upTotalTimes))
{ {
OnTextChanged(upTotalTimes,true); OnTextChanged(upTotalTimes, true);
} }
} }
} }
...@@ -325,7 +327,7 @@ namespace VIZ.Package.Module ...@@ -325,7 +327,7 @@ namespace VIZ.Package.Module
/// <summary> /// <summary>
/// none设置命令 /// none设置命令
/// </summary> /// </summary>
private bool radioNone=true; private bool radioNone = true;
public bool RadioNone public bool RadioNone
{ {
...@@ -337,11 +339,12 @@ namespace VIZ.Package.Module ...@@ -337,11 +339,12 @@ namespace VIZ.Package.Module
if (radioNone) if (radioNone)
{ {
this.VizCommandControlObjectService.SetControlObjectClockValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath, ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlField.FieldIdentifier, this.ControlObject.TreeNodePath,
""); this.ControlField.FieldIdentifier,
"");
this.ControlField.Value = ""; this.ControlField.Value = "";
RadioSetStart = false; RadioSetStart = false;
...@@ -366,13 +369,13 @@ namespace VIZ.Package.Module ...@@ -366,13 +369,13 @@ namespace VIZ.Package.Module
{ {
get { return radioSetStart; } get { return radioSetStart; }
set set
{ {
radioSetStart = value; radioSetStart = value;
this.RaisePropertyChanged(nameof(RadioSetStart)); this.RaisePropertyChanged(nameof(RadioSetStart));
string showValue = ""; string showValue = "";
if(radioSetStart) if (radioSetStart)
{ {
RadioNone = false; RadioNone = false;
...@@ -387,22 +390,24 @@ namespace VIZ.Package.Module ...@@ -387,22 +390,24 @@ namespace VIZ.Package.Module
if (StopIsCheck) if (StopIsCheck)
{ {
this.VizCommandControlObjectService.SetControlObjectClockCmd( this.VizCommandControlObjectService.SetControlObjectClockCmd(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath, ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlField.FieldIdentifier, this.ControlObject.TreeNodePath,
upTotalTimes, downTotalTimes, "DOWN,START,UPDATE_TEXT SET 1 " this.ControlField.FieldIdentifier,
); upTotalTimes, downTotalTimes, "DOWN,START,UPDATE_TEXT SET 1 "
);
//*TIME SET {upValue},*LIMIT SET {downValue},*DIRECTION SET {cmd}" //*TIME SET {upValue},*LIMIT SET {downValue},*DIRECTION SET {cmd}"
showValue=$"*TIME SET {upTotalTimes},*LIMIT SET {downTotalTimes},*DIRECTION SET DOWN,START,UPDATE_TEXT SET 1"; showValue = $"*TIME SET {upTotalTimes},*LIMIT SET {downTotalTimes},*DIRECTION SET DOWN,START,UPDATE_TEXT SET 1";
} }
else else
{ {
this.VizCommandControlObjectService.SetControlObjectClockCmd( this.VizCommandControlObjectService.SetControlObjectClockCmd(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath, ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlField.FieldIdentifier, this.ControlObject.TreeNodePath,
upTotalTimes, "NONE", "DOWN,START,UPDATE_TEXT SET 1 " this.ControlField.FieldIdentifier,
); upTotalTimes, "NONE", "DOWN,START,UPDATE_TEXT SET 1 "
);
showValue = $"*TIME SET {upTotalTimes},*LIMIT SET NONE,*DIRECTION SET DOWN,START,UPDATE_TEXT SET 1"; showValue = $"*TIME SET {upTotalTimes},*LIMIT SET NONE,*DIRECTION SET DOWN,START,UPDATE_TEXT SET 1";
...@@ -413,21 +418,23 @@ namespace VIZ.Package.Module ...@@ -413,21 +418,23 @@ namespace VIZ.Package.Module
if (StopIsCheck) if (StopIsCheck)
{ {
this.VizCommandControlObjectService.SetControlObjectClockCmd( this.VizCommandControlObjectService.SetControlObjectClockCmd(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath, ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlField.FieldIdentifier, this.ControlObject.TreeNodePath,
upTotalTimes, downTotalTimes, "UP,START,UPDATE_TEXT SET 1 " this.ControlField.FieldIdentifier,
); upTotalTimes, downTotalTimes, "UP,START,UPDATE_TEXT SET 1 "
);
showValue = $"*TIME SET {upTotalTimes},*LIMIT SET {downTotalTimes},*DIRECTION SET UP,START,UPDATE_TEXT SET 1"; showValue = $"*TIME SET {upTotalTimes},*LIMIT SET {downTotalTimes},*DIRECTION SET UP,START,UPDATE_TEXT SET 1";
} }
else else
{ {
this.VizCommandControlObjectService.SetControlObjectClockCmd( this.VizCommandControlObjectService.SetControlObjectClockCmd(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath, ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlField.FieldIdentifier, this.ControlObject.TreeNodePath,
upTotalTimes, "NONE", "UP,START,UPDATE_TEXT SET 1 " this.ControlField.FieldIdentifier,
); upTotalTimes, "NONE", "UP,START,UPDATE_TEXT SET 1 "
);
showValue = $"*TIME SET {upTotalTimes},*LIMIT SET NONE,*DIRECTION SET UP,START,UPDATE_TEXT SET 1"; showValue = $"*TIME SET {upTotalTimes},*LIMIT SET NONE,*DIRECTION SET UP,START,UPDATE_TEXT SET 1";
} }
} }
...@@ -446,13 +453,13 @@ namespace VIZ.Package.Module ...@@ -446,13 +453,13 @@ namespace VIZ.Package.Module
public bool RadioSetStop public bool RadioSetStop
{ {
get { return radioSetStop; } get { return radioSetStop; }
set set
{ {
radioSetStop = value; radioSetStop = value;
this.RaisePropertyChanged(nameof(RadioSetStop)); this.RaisePropertyChanged(nameof(RadioSetStop));
string showValue = ""; string showValue = "";
if(radioSetStop) if (radioSetStop)
{ {
RadioNone = false; RadioNone = false;
RadioSetStart = false; RadioSetStart = false;
...@@ -466,21 +473,23 @@ namespace VIZ.Package.Module ...@@ -466,21 +473,23 @@ namespace VIZ.Package.Module
if (StopIsCheck) if (StopIsCheck)
{ {
this.VizCommandControlObjectService.SetControlObjectClockCmd( this.VizCommandControlObjectService.SetControlObjectClockCmd(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath, ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlField.FieldIdentifier, this.ControlObject.TreeNodePath,
upTotalTimes, downTotalTimes, "DOWN,STOP " this.ControlField.FieldIdentifier,
); upTotalTimes, downTotalTimes, "DOWN,STOP "
);
showValue = $"*TIME SET {upTotalTimes},*LIMIT SET {downTotalTimes},*DIRECTION SET DOWN,STOP"; showValue = $"*TIME SET {upTotalTimes},*LIMIT SET {downTotalTimes},*DIRECTION SET DOWN,STOP";
} }
else else
{ {
this.VizCommandControlObjectService.SetControlObjectClockCmd( this.VizCommandControlObjectService.SetControlObjectClockCmd(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath, ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlField.FieldIdentifier, this.ControlObject.TreeNodePath,
upTotalTimes, "NONE", "DOWN,STOP " this.ControlField.FieldIdentifier,
); upTotalTimes, "NONE", "DOWN,STOP "
);
showValue = $"*TIME SET {upTotalTimes},*LIMIT SET NONE,*DIRECTION SET DOWN,STOP"; showValue = $"*TIME SET {upTotalTimes},*LIMIT SET NONE,*DIRECTION SET DOWN,STOP";
} }
} }
...@@ -489,21 +498,23 @@ namespace VIZ.Package.Module ...@@ -489,21 +498,23 @@ namespace VIZ.Package.Module
if (StopIsCheck) if (StopIsCheck)
{ {
this.VizCommandControlObjectService.SetControlObjectClockCmd( this.VizCommandControlObjectService.SetControlObjectClockCmd(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath, ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlField.FieldIdentifier, this.ControlObject.TreeNodePath,
upTotalTimes, downTotalTimes, "UP,STOP " this.ControlField.FieldIdentifier,
); upTotalTimes, downTotalTimes, "UP,STOP "
);
showValue = $"*TIME SET {upTotalTimes},*LIMIT SET {downTotalTimes},*DIRECTION SET UP,STOP"; showValue = $"*TIME SET {upTotalTimes},*LIMIT SET {downTotalTimes},*DIRECTION SET UP,STOP";
} }
else else
{ {
this.VizCommandControlObjectService.SetControlObjectClockCmd( this.VizCommandControlObjectService.SetControlObjectClockCmd(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath, ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlField.FieldIdentifier, this.ControlObject.TreeNodePath,
upTotalTimes, "NONE", "UP,STOP " this.ControlField.FieldIdentifier,
); upTotalTimes, "NONE", "UP,STOP "
);
showValue = $"*TIME SET {upTotalTimes},*LIMIT SET NONE,*DIRECTION SET UP,STOP"; showValue = $"*TIME SET {upTotalTimes},*LIMIT SET NONE,*DIRECTION SET UP,STOP";
} }
} }
...@@ -522,11 +533,11 @@ namespace VIZ.Package.Module ...@@ -522,11 +533,11 @@ namespace VIZ.Package.Module
{ {
get { return radioStop; } get { return radioStop; }
set set
{ {
radioStop = value; radioStop = value;
this.RaisePropertyChanged(nameof(RadioStop)); this.RaisePropertyChanged(nameof(RadioStop));
if(radioStop) if (radioStop)
{ {
RadioNone = false; RadioNone = false;
...@@ -536,11 +547,12 @@ namespace VIZ.Package.Module ...@@ -536,11 +547,12 @@ namespace VIZ.Package.Module
RadioFreeze = false; RadioFreeze = false;
RadioUnFreeze = false; RadioUnFreeze = false;
this.VizCommandControlObjectService.SetControlObjectClockValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath, ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlField.FieldIdentifier, this.ControlObject.TreeNodePath,
"STOP"); this.ControlField.FieldIdentifier,
"STOP");
this.ControlField.Value = "STOP"; this.ControlField.Value = "STOP";
} }
} }
...@@ -554,13 +566,13 @@ namespace VIZ.Package.Module ...@@ -554,13 +566,13 @@ namespace VIZ.Package.Module
{ {
get { return radioContinue; } get { return radioContinue; }
set set
{ {
radioContinue = value; radioContinue = value;
this.RaisePropertyChanged(nameof(RadioContinue)); this.RaisePropertyChanged(nameof(RadioContinue));
if(radioContinue) if (radioContinue)
{ {
RadioNone = false; RadioNone = false;
...@@ -570,11 +582,12 @@ namespace VIZ.Package.Module ...@@ -570,11 +582,12 @@ namespace VIZ.Package.Module
RadioFreeze = false; RadioFreeze = false;
RadioUnFreeze = false; RadioUnFreeze = false;
this.VizCommandControlObjectService.SetControlObjectClockValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath, ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlField.FieldIdentifier, this.ControlObject.TreeNodePath,
"CONT"); this.ControlField.FieldIdentifier,
"CONT");
this.ControlField.Value = "CONT"; this.ControlField.Value = "CONT";
...@@ -591,11 +604,11 @@ namespace VIZ.Package.Module ...@@ -591,11 +604,11 @@ namespace VIZ.Package.Module
public bool RadioFreeze public bool RadioFreeze
{ {
get { return radioFreeze; } get { return radioFreeze; }
set set
{ {
radioFreeze = value; radioFreeze = value;
this.RaisePropertyChanged(nameof(RadioFreeze)); this.RaisePropertyChanged(nameof(RadioFreeze));
if(radioFreeze) if (radioFreeze)
{ {
RadioNone = false; RadioNone = false;
RadioSetStart = false; RadioSetStart = false;
...@@ -604,11 +617,12 @@ namespace VIZ.Package.Module ...@@ -604,11 +617,12 @@ namespace VIZ.Package.Module
RadioContinue = false; RadioContinue = false;
RadioUnFreeze = false; RadioUnFreeze = false;
this.VizCommandControlObjectService.SetControlObjectClockValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath, ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlField.FieldIdentifier, this.ControlObject.TreeNodePath,
"UPDATE_TEXT SET 0"); this.ControlField.FieldIdentifier,
"UPDATE_TEXT SET 0");
this.ControlField.Value = "UPDATE_TEXT SET 0"; this.ControlField.Value = "UPDATE_TEXT SET 0";
} }
...@@ -629,7 +643,7 @@ namespace VIZ.Package.Module ...@@ -629,7 +643,7 @@ namespace VIZ.Package.Module
radioUnFreeze = value; radioUnFreeze = value;
this.RaisePropertyChanged(nameof(RadioUnFreeze)); this.RaisePropertyChanged(nameof(RadioUnFreeze));
if(radioUnFreeze) if (radioUnFreeze)
{ {
RadioNone = false; RadioNone = false;
...@@ -638,13 +652,14 @@ namespace VIZ.Package.Module ...@@ -638,13 +652,14 @@ namespace VIZ.Package.Module
RadioStop = false; RadioStop = false;
RadioContinue = false; RadioContinue = false;
RadioFreeze = false; RadioFreeze = false;
this.VizCommandControlObjectService.SetControlObjectClockValue(
ApplicationDomainEx.PreviewConn, this.VizCommandControlObjectService.SetControlObjectValue(
this.ControlObject.TreeNodePath, ApplicationDomainEx.PreviewConn,
this.ControlField.FieldIdentifier, ApplicationDomainEx.CurrentPage.GetVizScene(),
"UPDATE_TEXT SET 1"); this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier,
"UPDATE_TEXT SET 1");
this.ControlField.Value = "UPDATE_TEXT SET 1"; this.ControlField.Value = "UPDATE_TEXT SET 1";
} }
} }
...@@ -746,7 +761,7 @@ namespace VIZ.Package.Module ...@@ -746,7 +761,7 @@ namespace VIZ.Package.Module
/// <summary> /// <summary>
/// 文本值改变时触发 /// 文本值改变时触发
/// </summary> /// </summary>
private void OnTextChanged(string times,bool flag) private void OnTextChanged(string times, bool flag)
{ {
// 不需要向预览发送值 // 不需要向预览发送值
if (!this.IsSendToPreview) if (!this.IsSendToPreview)
...@@ -765,11 +780,11 @@ namespace VIZ.Package.Module ...@@ -765,11 +780,11 @@ namespace VIZ.Package.Module
if (this.FieldEditMode == FieldEditMode.Normal) if (this.FieldEditMode == FieldEditMode.Normal)
{ {
//this.ControlField.Value = times; //this.ControlField.Value = times;
if(RadioSetStop)//设置的Set and stop if (RadioSetStop)//设置的Set and stop
{ {
if(RadioUP)//向上计时的按 if (RadioUP)//向上计时的按
{ {
if(StopIsCheck) if (StopIsCheck)
{ {
showValue = $"*TIME SET {upTotalTimes},*LIMIT SET {downTotalTimes},*DIRECTION SET UP,STOP"; showValue = $"*TIME SET {upTotalTimes},*LIMIT SET {downTotalTimes},*DIRECTION SET UP,STOP";
} }
...@@ -780,7 +795,7 @@ namespace VIZ.Package.Module ...@@ -780,7 +795,7 @@ namespace VIZ.Package.Module
} }
else else
{ {
if(StopIsCheck) if (StopIsCheck)
{ {
showValue = $"*TIME SET {upTotalTimes},*LIMIT SET {downTotalTimes},*DIRECTION SET DOWN,STOP"; showValue = $"*TIME SET {upTotalTimes},*LIMIT SET {downTotalTimes},*DIRECTION SET DOWN,STOP";
} }
...@@ -791,11 +806,11 @@ namespace VIZ.Package.Module ...@@ -791,11 +806,11 @@ namespace VIZ.Package.Module
} }
this.ControlField.Value = showValue; this.ControlField.Value = showValue;
} }
else if(RadioSetStart)// 设置的Set and Start else if (RadioSetStart)// 设置的Set and Start
{ {
if(RadioUP) if (RadioUP)
{ {
if(StopIsCheck) if (StopIsCheck)
{ {
showValue = $"*TIME SET {upTotalTimes},*LIMIT SET {downTotalTimes},*DIRECTION SET UP,START,UPDATE_TEXT SET 1"; showValue = $"*TIME SET {upTotalTimes},*LIMIT SET {downTotalTimes},*DIRECTION SET UP,START,UPDATE_TEXT SET 1";
} }
...@@ -817,17 +832,18 @@ namespace VIZ.Package.Module ...@@ -817,17 +832,18 @@ namespace VIZ.Package.Module
} }
this.ControlField.Value = showValue; this.ControlField.Value = showValue;
} }
else if(RadioNone) else if (RadioNone)
{ {
this.ControlField.Value = ""; this.ControlField.Value = "";
} }
if (flag) if (flag)
{ {
if (!this.ControlField.IsCustom) if (!this.ControlField.IsCustom)
{ {
this.VizCommandControlObjectService.SetControlObjectClockValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
$"*TIME SET {times}"); $"*TIME SET {times}");
......
...@@ -170,6 +170,7 @@ namespace VIZ.Package.Module ...@@ -170,6 +170,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -35,14 +35,16 @@ ...@@ -35,14 +35,16 @@
<TextBlock Text="X:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="0"></TextBlock> <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" <common:LeftRightTextEdit Grid.Row="0" Grid.Column="1" Height="30"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull" dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.HideInsignificantZeros="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False" dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
MaskType="Numeric" Mask="##########.###" MaskType="Numeric"
EditValue="{Binding Path=X,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit> 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> <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" <common:LeftRightTextEdit Grid.Row="1" Grid.Column="1" Height="30"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull" dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.HideInsignificantZeros="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False" dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
MaskType="Numeric" Mask="##########.###" MaskType="Numeric"
EditValue="{Binding Path=Y,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit> EditValue="{Binding Path=Y,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit>
<!-- 编辑模式 --> <!-- 编辑模式 -->
......
...@@ -266,6 +266,7 @@ namespace VIZ.Package.Module ...@@ -266,6 +266,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -26,8 +26,9 @@ ...@@ -26,8 +26,9 @@
Width="200" Grid.Column="1" Width="200" Grid.Column="1"
Margin="20,0,0,0" Margin="20,0,0,0"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull" dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.HideInsignificantZeros="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False" dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
MaskType="Numeric" Mask="##########.###" MaskType="Numeric"
EditValue="{Binding Path=EditValue,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></dxe:TextEdit> EditValue="{Binding Path=EditValue,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></dxe:TextEdit>
</Grid> </Grid>
</UserControl> </UserControl>
...@@ -115,6 +115,7 @@ namespace VIZ.Package.Module ...@@ -115,6 +115,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -122,6 +122,7 @@ namespace VIZ.Package.Module ...@@ -122,6 +122,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -171,6 +171,7 @@ namespace VIZ.Package.Module ...@@ -171,6 +171,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -115,6 +115,7 @@ namespace VIZ.Package.Module ...@@ -115,6 +115,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -71,6 +71,7 @@ namespace VIZ.Package.Module ...@@ -71,6 +71,7 @@ namespace VIZ.Package.Module
// 向Viz发送指令 // 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue( this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
columnDefinition.ControlObject.TreeNodePath, columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier, columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value, cellData.RowData.RowHandle.Value,
......
...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module ...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module
// 向Viz发送指令 // 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue( this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
columnDefinition.ControlObject.TreeNodePath, columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier, columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value, cellData.RowData.RowHandle.Value,
......
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
d:DesignHeight="30" d:DesignWidth="200"> d:DesignHeight="30" d:DesignWidth="200">
<Grid> <Grid>
<dxe:TextEdit x:Name="PART_Text" Margin="1" Background="Transparent" ShowBorder="False" <dxe:TextEdit x:Name="PART_Text" Margin="1" Background="Transparent" ShowBorder="False"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.HideInsignificantZeros="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
MaskType="Numeric" EditValueChanged="EditValueChanged"></dxe:TextEdit> MaskType="Numeric" EditValueChanged="EditValueChanged"></dxe:TextEdit>
</Grid> </Grid>
</local:ListCellEditBase> </local:ListCellEditBase>
...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module ...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module
// 向Viz发送指令 // 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue( this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
columnDefinition.ControlObject.TreeNodePath, columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier, columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value, cellData.RowData.RowHandle.Value,
......
...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module ...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module
// 向Viz发送指令 // 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue( this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
columnDefinition.ControlObject.TreeNodePath, columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier, columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value, cellData.RowData.RowHandle.Value,
......
...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module ...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module
// 向Viz发送指令 // 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue( this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
columnDefinition.ControlObject.TreeNodePath, columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier, columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value, cellData.RowData.RowHandle.Value,
......
...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module ...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module
// 向Viz发送指令 // 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue( this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
columnDefinition.ControlObject.TreeNodePath, columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier, columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value, cellData.RowData.RowHandle.Value,
......
...@@ -81,6 +81,7 @@ namespace VIZ.Package.Module ...@@ -81,6 +81,7 @@ namespace VIZ.Package.Module
// 向Viz发送指令 // 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue( this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
columnDefinition.ControlObject.TreeNodePath, columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier, columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value, cellData.RowData.RowHandle.Value,
......
...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module ...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module
// 向Viz发送指令 // 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue( this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
columnDefinition.ControlObject.TreeNodePath, columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier, columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value, cellData.RowData.RowHandle.Value,
......
...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module ...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module
// 向Viz发送指令 // 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue( this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
columnDefinition.ControlObject.TreeNodePath, columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier, columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value, cellData.RowData.RowHandle.Value,
......
...@@ -155,6 +155,7 @@ namespace VIZ.Package.Module ...@@ -155,6 +155,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -128,6 +128,7 @@ namespace VIZ.Package.Module ...@@ -128,6 +128,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
xmlns:local="clr-namespace:VIZ.Package.Module" xmlns:local="clr-namespace:VIZ.Package.Module"
d:DataContext="{d:DesignInstance Type=local:ScrollElementsEditPanelModel}" d:DataContext="{d:DesignInstance Type=local:ScrollElementsEditPanelModel}"
d:Background="White" d:Background="White"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="400" d:DesignWidth="800"> d:DesignHeight="400" d:DesignWidth="800">
<UserControl.Resources> <UserControl.Resources>
...@@ -103,14 +103,10 @@ ...@@ -103,14 +103,10 @@
<!-- 数据 --> <!-- 数据 -->
<dxg:GridControl ItemsSource="{Binding Path=ItemsSource}" ShowBorder="True" Grid.Row="1" AllowDrop="True" <dxg:GridControl ItemsSource="{Binding Path=ItemsSource}" ShowBorder="True" Grid.Row="1" AllowDrop="True"
ColumnsSource="{Binding Path=Columns}" SelectionMode="Cell" Margin="10" ColumnsSource="{Binding Path=Columns}" SelectionMode="Row" Margin="10"
SelectedItem="{Binding Path=SelectedValue}" SelectedItem="{Binding Path=SelectedValue}"
SelectedItems="{Binding Path=SelectedValues}"
ColumnGeneratorTemplate="{StaticResource ColumnTemplate}"> ColumnGeneratorTemplate="{StaticResource ColumnTemplate}">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="SelectionChanged" PassEventArgsToCommand="True" Command="{Binding Path=SelectionChangedCommand}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
<dxg:GridControl.ContextMenu> <dxg:GridControl.ContextMenu>
<ContextMenu> <ContextMenu>
<MenuItem Header="添加" Command="{Binding Path=PlacementTarget.DataContext.AddCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/> <MenuItem Header="添加" Command="{Binding Path=PlacementTarget.DataContext.AddCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
......
...@@ -34,6 +34,9 @@ namespace VIZ.Package.Module ...@@ -34,6 +34,9 @@ namespace VIZ.Package.Module
{ {
// 初始化命令 // 初始化命令
this.InitCommand(); this.InitCommand();
// 初始化消息
this.InitMessage();
} }
/// <summary> /// <summary>
...@@ -51,6 +54,16 @@ namespace VIZ.Package.Module ...@@ -51,6 +54,16 @@ namespace VIZ.Package.Module
this.PreviewSetPosCommand = new VCommand(this.PreviewSetPos); this.PreviewSetPosCommand = new VCommand(this.PreviewSetPos);
} }
/// <summary>
/// 初始化消息
/// </summary>
private void InitMessage()
{
ApplicationDomainEx.MessageManager.Register<PageOpenMessage>(this, this.OnPageOpenMessage);
ApplicationDomainEx.MessageManager.Register<PageSaveMessage>(this, this.OnPageSaveMessage);
ApplicationDomainEx.MessageManager.Register<PageSaveAsMessage>(this, this.OnPageSaveAsMessage);
}
// ============================================================ // ============================================================
// Service & Controller // Service & Controller
// ============================================================ // ============================================================
...@@ -149,6 +162,20 @@ namespace VIZ.Package.Module ...@@ -149,6 +162,20 @@ namespace VIZ.Package.Module
#endregion #endregion
#region SelectedValues -- 当前选中项的集合
private ObservableCollection<ExpandoObject> selectedValues = new ObservableCollection<ExpandoObject>();
/// <summary>
/// 当前选中项的集合
/// </summary>
public ObservableCollection<ExpandoObject> SelectedValues
{
get { return selectedValues; }
set { selectedValues = value; this.RaisePropertyChanged(nameof(SelectedValues)); }
}
#endregion
#region ScrollElementPackage -- 底飞数据包 #region ScrollElementPackage -- 底飞数据包
private ScrollElementPackageEntity scrollElementPackage; private ScrollElementPackageEntity scrollElementPackage;
...@@ -255,10 +282,14 @@ namespace VIZ.Package.Module ...@@ -255,10 +282,14 @@ namespace VIZ.Package.Module
/// </summary> /// </summary>
private void Remove() private void Remove()
{ {
if (this.SelectedValue == null) if (this.SelectedValues == null || this.SelectedValues.Count == 0)
return; return;
this.ItemsSource.Remove(this.SelectedValue); List<ExpandoObject> list = this.SelectedValues.ToList();
foreach (ExpandoObject item in list)
{
this.ItemsSource.Remove(item);
}
} }
#endregion #endregion
...@@ -336,6 +367,57 @@ namespace VIZ.Package.Module ...@@ -336,6 +367,57 @@ namespace VIZ.Package.Module
// Message // Message
// ============================================================ // ============================================================
/// <summary>
/// 页打开消息
/// </summary>
/// <param name="msg">消息</param>
private void OnPageOpenMessage(PageOpenMessage msg)
{
this.ScrollElementPackage = null;
this.SceneTemplateModels = null;
this.SelectedSceneTemplateModel = null;
this.Columns = null;
this.ItemsSource = null;
this.SelectedValue = null;
this.PreviewPosition = 0;
}
/// <summary>
/// 页保存消息
/// </summary>
/// <param name="msg">消息</param>
private void OnPageSaveMessage(PageSaveMessage msg)
{
if (this.ScrollElementPackage == null || ApplicationDomainEx.CurrentPage == null || this.ControlField == null)
return;
if (this.ScrollElementPackage.TemplateOrPageID != ApplicationDomainEx.CurrentPage.GetTemplateIdOrPageId())
return;
if (this.ScrollElementPackage.FieldIdentifier != this.ControlField.FieldIdentifier)
return;
this.scrollElementService.SaveScrollElementPackageToDB(this.ScrollElementPackage);
}
/// <summary>
/// 页另存为消息
/// </summary>
/// <param name="msg">消息</param>
private void OnPageSaveAsMessage(PageSaveAsMessage msg)
{
if (this.ScrollElementPackage == null || ApplicationDomainEx.CurrentPage == null || this.ControlField == null)
return;
if (this.ScrollElementPackage.TemplateOrPageID != ApplicationDomainEx.CurrentPage.GetTemplateIdOrPageId())
return;
if (this.ScrollElementPackage.FieldIdentifier != this.ControlField.FieldIdentifier)
return;
this.scrollElementService.SaveScrollElementPackageToDB(this.ScrollElementPackage);
}
// ============================================================ // ============================================================
// Public Function // Public Function
// ============================================================ // ============================================================
...@@ -355,7 +437,10 @@ namespace VIZ.Package.Module ...@@ -355,7 +437,10 @@ namespace VIZ.Package.Module
this.TryUpdateScrollElementPackage(); this.TryUpdateScrollElementPackage();
IPageTemplateService service = ApplicationDomainEx.ServiceManager.GetService<IPageTemplateService>(ViewServiceKeys.PAGE_TEMPLATE_SERVICE); IPageTemplateService service = ApplicationDomainEx.ServiceManager.GetService<IPageTemplateService>(ViewServiceKeys.PAGE_TEMPLATE_SERVICE);
this.SceneTemplateModels = service.SceneTemplateModels.Where(p => p.ScenePath != ApplicationDomainEx.CurrentPage?.ScenePath).ToObservableCollection();
this.SceneTemplateModels = service.SceneTemplateModels.Where(p => p.ScenePath != ApplicationDomainEx.CurrentPage?.ScenePath &&
p.GetSceneParent() == ApplicationDomainEx.CurrentPage.GetSceneParent()).ToObservableCollection();
if (this.ScrollElementPackage != null) if (this.ScrollElementPackage != null)
{ {
this.SelectedSceneTemplateModel = this.SceneTemplateModels.FirstOrDefault(p => p.ScenePath == this.ScrollElementPackage.TemplateScenePath); this.SelectedSceneTemplateModel = this.SceneTemplateModels.FirstOrDefault(p => p.ScenePath == this.ScrollElementPackage.TemplateScenePath);
...@@ -364,10 +449,14 @@ namespace VIZ.Package.Module ...@@ -364,10 +449,14 @@ namespace VIZ.Package.Module
// 只处理文本与图片类型 // 只处理文本与图片类型
List<ControlFieldNodeModel> fields = new List<ControlFieldNodeModel>(); List<ControlFieldNodeModel> fields = new List<ControlFieldNodeModel>();
foreach (var field in this.ScrollElementPackage.TemplateFields) if (this.ScrollElementPackage != null && this.ScrollElementPackage.TemplateFields != null)
{ {
fields.Add(this.vizCommandControlObjectService.CreateControlFieldNodeModeFromEntity(field)); foreach (var field in this.ScrollElementPackage.TemplateFields)
{
fields.Add(this.vizCommandControlObjectService.CreateControlFieldNodeModeFromEntity(field));
}
} }
this.Columns = this.scrollElementService.GetDynamicColumns(ApplicationDomainEx.CurrentPage, controlObject, fields).ToObservableCollection(); this.Columns = this.scrollElementService.GetDynamicColumns(ApplicationDomainEx.CurrentPage, controlObject, fields).ToObservableCollection();
this.ItemsSource = this.scrollElementService.GetDynamicList(fields, this.ControlField.Value).ToObservableCollection(); this.ItemsSource = this.scrollElementService.GetDynamicList(fields, this.ControlField.Value).ToObservableCollection();
...@@ -418,6 +507,9 @@ namespace VIZ.Package.Module ...@@ -418,6 +507,9 @@ namespace VIZ.Package.Module
/// <returns>字段值</returns> /// <returns>字段值</returns>
public override string GetFieldValue() public override string GetFieldValue()
{ {
if (this.ScrollElementPackage == null)
return string.Empty;
string value = this.scrollElementService.GetScrollElementValue(this.ScrollElementPackage.TemplateScenePath, this.ScrollElementPackage.TemplateFields, this.ItemsSource, VizScrollElementRootTag.entry); string value = this.scrollElementService.GetScrollElementValue(this.ScrollElementPackage.TemplateScenePath, this.ScrollElementPackage.TemplateFields, this.ItemsSource, VizScrollElementRootTag.entry);
return value; return value;
......
...@@ -117,6 +117,7 @@ namespace VIZ.Package.Module ...@@ -117,6 +117,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -36,20 +36,23 @@ ...@@ -36,20 +36,23 @@
<TextBlock Text="X:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="0"></TextBlock> <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" <common:LeftRightTextEdit Grid.Row="0" Grid.Column="1" Height="30"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull" dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.HideInsignificantZeros="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False" dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
MaskType="Numeric" Mask="##########.###" MaskType="Numeric"
EditValue="{Binding Path=X,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit> 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> <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" <common:LeftRightTextEdit Grid.Row="1" Grid.Column="1" Height="30"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull" dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.HideInsignificantZeros="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False" dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
MaskType="Numeric" Mask="##########.###" MaskType="Numeric"
EditValue="{Binding Path=Y,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit> EditValue="{Binding Path=Y,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit>
<TextBlock Text="Z:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="2"></TextBlock> <TextBlock Text="Z:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="2"></TextBlock>
<common:LeftRightTextEdit Grid.Row="2" Grid.Column="1" Height="30" <common:LeftRightTextEdit Grid.Row="2" Grid.Column="1" Height="30"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull" dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.HideInsignificantZeros="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False" dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
MaskType="Numeric" Mask="##########.###" MaskType="Numeric"
EditValue="{Binding Path=Z,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit> EditValue="{Binding Path=Z,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit>
<!-- 编辑模式 --> <!-- 编辑模式 -->
......
...@@ -292,6 +292,7 @@ namespace VIZ.Package.Module ...@@ -292,6 +292,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</StackPanel> </StackPanel>
</Border> </Border>
<!-- 字段编辑 --> <!-- 字段编辑 -->
<fcommon:NavigationControl ItemsSource="{Binding Path=NavigationConfigs}" Grid.Row="2" Margin="0,5,0,0" <fcommon:NavigationControl ItemsSource="{Binding Path=NavigationConfigs}" Grid.Row="2" Margin="0,5,0,0" PreviewMouseLeftButtonDown="NavigationControl_PreviewMouseLeftButtonDown"
SelectedValue="{Binding Path=SelectedNavigationConfig,Mode=OneWay}"></fcommon:NavigationControl> SelectedValue="{Binding Path=SelectedNavigationConfig,Mode=OneWay}"></fcommon:NavigationControl>
</Grid> </Grid>
</UserControl> </UserControl>
...@@ -27,5 +27,10 @@ namespace VIZ.Package.Module ...@@ -27,5 +27,10 @@ namespace VIZ.Package.Module
WPFHelper.BindingViewModel(this, new FieldEditViewModel()); WPFHelper.BindingViewModel(this, new FieldEditViewModel());
} }
private void NavigationControl_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
}
} }
} }
...@@ -148,9 +148,7 @@ namespace VIZ.Package.Module ...@@ -148,9 +148,7 @@ namespace VIZ.Package.Module
{ {
// 当前没有打开的页或模板 || 当前没有打开的项目 // 当前没有打开的页或模板 || 当前没有打开的项目
if (ApplicationDomainEx.CurrentPage == null || ApplicationDomainEx.ProjectDbContext == null) if (ApplicationDomainEx.CurrentPage == null || ApplicationDomainEx.ProjectDbContext == null)
{
return; return;
}
// 字段树服务不可用 // 字段树服务不可用
IFieldTreeService service = ApplicationDomainEx.ServiceManager.GetService<IFieldTreeService>(ViewServiceKeys.FIELD_TREE_SERVICE); IFieldTreeService service = ApplicationDomainEx.ServiceManager.GetService<IFieldTreeService>(ViewServiceKeys.FIELD_TREE_SERVICE);
......
...@@ -153,7 +153,11 @@ namespace VIZ.Package.Module ...@@ -153,7 +153,11 @@ namespace VIZ.Package.Module
ThreadHelper.SafeRun(action: () => ThreadHelper.SafeRun(action: () =>
{ {
if (msg.Page.PageType != PageType.Scene) if (msg.Page.PageType != PageType.Scene)
{
this.ControlObject = null;
this.SelectedControlField = null;
return; return;
}
// 从本地数据库获取控制对象 // 从本地数据库获取控制对象
ControlObjectEntity entity = this.controlObjectService.GetControlObject(msg.Page)?.FirstOrDefault(); ControlObjectEntity entity = this.controlObjectService.GetControlObject(msg.Page)?.FirstOrDefault();
...@@ -170,7 +174,7 @@ namespace VIZ.Package.Module ...@@ -170,7 +174,7 @@ namespace VIZ.Package.Module
}); });
// 将当前值上至预览 // 将当前值上至预览
this.vizCommandControlObjectService.SetControlObject(ApplicationDomainEx.PreviewConn, this.ControlObject); this.vizCommandControlObjectService.SetControlObject(ApplicationDomainEx.PreviewConn, this.ControlObject, ApplicationDomainEx.CurrentPage.GetVizScene());
// 插件处理 // 插件处理
PageModel pageModel = msg.Page as PageModel; PageModel pageModel = msg.Page as PageModel;
......
<dx:ThemedWindow x:Class="VIZ.Package.Module.AboutPageCommandWindow"
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:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:local="clr-namespace:VIZ.Package.Module"
mc:Ignorable="d" d:Background="Black"
d:DataContext="{d:DesignInstance Type=local:AboutCustomControlFieldWindowModel}"
WindowStartupLocation="CenterScreen"
Title="摩羯座播控系统" Height="700" Width="1200">
<Grid>
<RichTextBox IsReadOnly="True" Background="Transparent" Margin="5" Foreground="White">
<FlowDocument>
<!-- 注册字段 -->
<Paragraph FontSize="18" FontWeight="Bold">页命令</Paragraph>
<Table>
<Table.Columns>
<TableColumn Width="100"></TableColumn>
<TableColumn Width="160"></TableColumn>
<TableColumn Width="Auto"></TableColumn>
<TableColumn Width="Auto"></TableColumn>
</Table.Columns>
<TableRowGroup>
<TableRow>
<TableCell>
<Paragraph FontSize="14" FontWeight="Bold">命令</Paragraph>
</TableCell>
<TableCell>
<Paragraph FontSize="14" FontWeight="Bold">参数</Paragraph>
</TableCell>
<TableCell>
<Paragraph FontSize="14" FontWeight="Bold">示例</Paragraph>
</TableCell>
<TableCell>
<Paragraph FontSize="14" FontWeight="Bold">示例描述</Paragraph>
</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Paragraph Margin="0,10,0,0">delay</Paragraph>
</TableCell>
<TableCell>
<Paragraph Margin="0,10,0,0">毫秒</Paragraph>
</TableCell>
<TableCell>
<Paragraph Margin="0,10,0,0">delay 5000</Paragraph>
</TableCell>
<TableCell>
<Paragraph Margin="0,10,0,0">延时5000毫秒</Paragraph>
</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Paragraph Margin="0,10,0,0">log</Paragraph>
</TableCell>
<TableCell>
<Paragraph Margin="0,10,0,0">日志内容</Paragraph>
</TableCell>
<TableCell>
<Paragraph Margin="0,10,0,0">log hello word!</Paragraph>
</TableCell>
<TableCell>
<Paragraph Margin="0,10,0,0">在操作日志中记录"hello word!"</Paragraph>
</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Paragraph Margin="0,10,0,0">send</Paragraph>
</TableCell>
<TableCell>
<Paragraph Margin="0,10,0,0">VIZ命令</Paragraph>
</TableCell>
<TableCell>
<Paragraph Margin="0,10,0,0">send RENDERER*MAIN_LAYER SET_OBJECT SCENE*TestScene</Paragraph>
</TableCell>
<TableCell>
<Paragraph Margin="0,10,0,0">向Viz引擎发送命令"RENDERER*MAIN_LAYER SET_OBJECT SCENE*TestScene"</Paragraph>
</TableCell>
</TableRow>
</TableRowGroup>
</Table>
</FlowDocument>
</RichTextBox>
</Grid>
</dx:ThemedWindow>
using DevExpress.Xpf.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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.Shapes;
using VIZ.Framework.Core;
namespace VIZ.Package.Module
{
/// <summary>
/// Interaction logic for AboutPageCommandWindow.xaml
/// </summary>
public partial class AboutPageCommandWindow : ThemedWindow
{
public AboutPageCommandWindow()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, new AboutPageCommandWindowModel());
}
}
}
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<!-- 系统版本 --> <!-- 系统版本 -->
<TextBlock Text="系统版本:" VerticalAlignment="Center" HorizontalAlignment="Right" <TextBlock Text="系统版本:" VerticalAlignment="Center" HorizontalAlignment="Right"
Grid.Row="1" Grid.Column="0" Margin="0,0,10,0"></TextBlock> Grid.Row="1" Grid.Column="0" Margin="0,0,10,0"></TextBlock>
<TextBlock Text="V1.1.0.03171405_beta" VerticalAlignment="Center" HorizontalAlignment="Left" <TextBlock Text="V1.2.0.03231400_beta" VerticalAlignment="Center" HorizontalAlignment="Left"
Grid.Row="1" Grid.Column="1"></TextBlock> Grid.Row="1" Grid.Column="1"></TextBlock>
</Grid> </Grid>
</dx:ThemedWindow> </dx:ThemedWindow>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
namespace VIZ.Package.Module
{
/// <summary>
/// 关于页命令模型
/// </summary>
public class AboutPageCommandWindowModel : ViewModelBase
{
public AboutPageCommandWindowModel()
{
}
// ==========================================================
// 属性
// ==========================================================
// ==========================================================
// 命令
// ==========================================================
}
}
...@@ -87,6 +87,8 @@ ...@@ -87,6 +87,8 @@
Command="{Binding Path=AboutCommand}"/> Command="{Binding Path=AboutCommand}"/>
<dxb:BarButtonItem Content="关于自定义控制字段" Glyph="/VIZ.Package.Module.Resource;component/Icons/icon_custom_32x32.png" <dxb:BarButtonItem Content="关于自定义控制字段" Glyph="/VIZ.Package.Module.Resource;component/Icons/icon_custom_32x32.png"
Command="{Binding Path=AboutCustomControlFieldCommand}"/> Command="{Binding Path=AboutCustomControlFieldCommand}"/>
<dxb:BarButtonItem Content="关于页命令" Glyph="/VIZ.Package.Module.Resource;component/Icons/icon_cmd_32x32.png"
Command="{Binding Path=AboutPageCommandCommand}"/>
</dxb:BarSubItem> </dxb:BarSubItem>
</dxb:MainMenuControl> </dxb:MainMenuControl>
</StackPanel> </StackPanel>
......
...@@ -53,6 +53,7 @@ namespace VIZ.Package.Module ...@@ -53,6 +53,7 @@ namespace VIZ.Package.Module
this.ResetLayoutCommand = new VCommand(this.ResetLayout); this.ResetLayoutCommand = new VCommand(this.ResetLayout);
this.AboutCommand = new VCommand(this.About); this.AboutCommand = new VCommand(this.About);
this.AboutCustomControlFieldCommand = new VCommand(this.AboutCustomControlField); this.AboutCustomControlFieldCommand = new VCommand(this.AboutCustomControlField);
this.AboutPageCommandCommand = new VCommand(this.AboutPageCommand);
} }
/// <summary> /// <summary>
...@@ -267,7 +268,7 @@ namespace VIZ.Package.Module ...@@ -267,7 +268,7 @@ namespace VIZ.Package.Module
if (vm == null) if (vm == null)
return; return;
ApplicationDomainEx.ProjectDbContext.Dispose(); ApplicationDomainEx.ProjectDbContext?.Dispose();
this.OpenProject(vm.SelectedFileModel.Path); this.OpenProject(vm.SelectedFileModel.Path);
} }
...@@ -465,6 +466,25 @@ namespace VIZ.Package.Module ...@@ -465,6 +466,25 @@ namespace VIZ.Package.Module
#endregion #endregion
#region AboutPageCommandCommand -- 关于页命令命令
/// <summary>
/// 关于页命令命令
/// </summary>
public VCommand AboutPageCommandCommand { get; set; }
/// <summary>
/// 关于页命令
/// </summary>
private void AboutPageCommand()
{
AboutPageCommandWindow window = new AboutPageCommandWindow();
window.Owner = ApplicationDomainEx.MainWindow;
window.ShowDialog();
}
#endregion
// ===================================================================== // =====================================================================
// Message // Message
// ===================================================================== // =====================================================================
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm" xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core" xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common" xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:common="clr-namespace:VIZ.Package.Common;assembly=VIZ.Package.Common" xmlns:common="clr-namespace:VIZ.Package.Common;assembly=VIZ.Package.Common"
xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage" xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage"
...@@ -31,8 +32,8 @@ ...@@ -31,8 +32,8 @@
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<resource:RowHandleConverter x:Key="RowHandleConverter"></resource:RowHandleConverter> <resource:RowHandleConverter x:Key="RowHandleConverter"></resource:RowHandleConverter>
<resource:PageThumbnailConverter x:Key="PageThumbnailConverter" <resource:PageThumbnailMultiConverter x:Key="PageThumbnailMultiConverter"
CommandThumbnail="/VIZ.Package.Module.Resource;component/Images/cmd_template.png"></resource:PageThumbnailConverter> CommandThumbnail="/VIZ.Package.Module.Resource;component/Images/cmd_template.png"></resource:PageThumbnailMultiConverter>
<fcore:Bitmap2ImageSourceConverter x:Key="Bitmap2ImageSourceConverter"></fcore:Bitmap2ImageSourceConverter> <fcore:Bitmap2ImageSourceConverter x:Key="Bitmap2ImageSourceConverter"></fcore:Bitmap2ImageSourceConverter>
<fcore:Enum2EnumDescriptionConverter x:Key="Enum2EnumDescriptionConverter" EnumType="{x:Type storage:PageType}"></fcore:Enum2EnumDescriptionConverter> <fcore:Enum2EnumDescriptionConverter x:Key="Enum2EnumDescriptionConverter" EnumType="{x:Type storage:PageType}"></fcore:Enum2EnumDescriptionConverter>
<fcore:Bool2SolidColorBrushConverter x:Key="RowHandleBgConverter" <fcore:Bool2SolidColorBrushConverter x:Key="RowHandleBgConverter"
...@@ -127,9 +128,8 @@ ...@@ -127,9 +128,8 @@
<dxg:GridColumn Header="序号" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="40" AllowResizing="False"> <dxg:GridColumn Header="序号" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="40" AllowResizing="False">
<dxg:GridColumn.CellTemplate> <dxg:GridColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<Grid Background="{Binding Path=Row.IsOpen,Converter={StaticResource RowHandleBgConverter}}"> <Grid>
<Rectangle Fill="{Binding Path=Row.IsTake,Converter={StaticResource RowHandleTakeConverter}}" <Rectangle Fill="{Binding Path=Row.IsTake,Converter={StaticResource RowHandleTakeConverter}}"></Rectangle>
Width="10" HorizontalAlignment="Left"></Rectangle>
<TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding RowData.RowHandle,Converter={StaticResource RowHandleConverter}}"></TextBlock> <TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding RowData.RowHandle,Converter={StaticResource RowHandleConverter}}"></TextBlock>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
...@@ -175,9 +175,14 @@ ...@@ -175,9 +175,14 @@
VisibleIndex="{Binding Path=VisibleIndex,Mode=TwoWay}"> VisibleIndex="{Binding Path=VisibleIndex,Mode=TwoWay}">
<common:GridColumnResizeMinHeight.CellTemplate> <common:GridColumnResizeMinHeight.CellTemplate>
<DataTemplate> <DataTemplate>
<fcommon:ResizeImageControl ImageSource="{Binding Path=Row,Converter={StaticResource PageThumbnailConverter}}" <fcommon:ResizeImageControl IconSource="/VIZ.Package.Module.Resource;component/Icons/image_20x20.png"
IconSource="/VIZ.Package.Module.Resource;component/Icons/image_20x20.png"
ShowImageMinWidth="50" ShowImageMinHeight="50"> ShowImageMinWidth="50" ShowImageMinHeight="50">
<fcommon:ResizeImageControl.ImageSource>
<MultiBinding Converter="{StaticResource PageThumbnailMultiConverter}">
<Binding Path="Row.ThumbnailBitmap"/>
<Binding Path="Row.PageType"/>
</MultiBinding>
</fcommon:ResizeImageControl.ImageSource>
</fcommon:ResizeImageControl> </fcommon:ResizeImageControl>
</DataTemplate> </DataTemplate>
</common:GridColumnResizeMinHeight.CellTemplate> </common:GridColumnResizeMinHeight.CellTemplate>
...@@ -398,6 +403,26 @@ ...@@ -398,6 +403,26 @@
SelectedItems="{Binding Path=SelectedPages}" SelectedItems="{Binding Path=SelectedPages}"
ColumnsSource="{Binding ElementName=uc, Path=DataContext.Columns}" ColumnsSource="{Binding ElementName=uc, Path=DataContext.Columns}"
ColumnGeneratorTemplateSelector="{StaticResource ResourceKey=ColumnDefintionGeneratorTemplateSelector}"> ColumnGeneratorTemplateSelector="{StaticResource ResourceKey=ColumnDefintionGeneratorTemplateSelector}">
<dxg:GridControl.Resources>
<Style TargetType="{x:Type dxg:RowControl}">
<Style.Triggers>
<DataTrigger Binding="{Binding Row.IsOpen}" Value="True">
<Setter Property="Background" Value="#AA0078D7"></Setter>
</DataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Row.IsOpen}" Value="True"></Condition>
<Condition Binding="{Binding IsActive,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type dxdo:LayoutPanel}}}" Value="True"></Condition>
</MultiDataTrigger.Conditions>
<MultiDataTrigger.Setters>
<Setter Property="Background" Value="#FF0078D7"></Setter>
</MultiDataTrigger.Setters>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</dxg:GridControl.Resources>
<dxg:GridControl.ContextMenu> <dxg:GridControl.ContextMenu>
<common:ContextMenuEx BindingTargetType="{x:Type dx:DXTabControl}"> <common:ContextMenuEx BindingTargetType="{x:Type dx:DXTabControl}">
<MenuItem Header="添加命令页" Command="{Binding Path=DataContext.CreateCmdPageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type common:ContextMenuEx}}}"/> <MenuItem Header="添加命令页" Command="{Binding Path=DataContext.CreateCmdPageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type common:ContextMenuEx}}}"/>
......
...@@ -4,9 +4,11 @@ ...@@ -4,9 +4,11 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxcn="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars" xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm" xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core" xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common" xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
...@@ -119,9 +121,28 @@ ...@@ -119,9 +121,28 @@
</MultiBinding> </MultiBinding>
</Grid.IsHitTestVisible> </Grid.IsHitTestVisible>
<dxg:GridControl ItemsSource="{Binding Path=SceneTemplateModels}" ShowBorder="False" SelectionMode="Row" <dxg:GridControl x:Name="grid" ItemsSource="{Binding Path=SceneTemplateModels}" ShowBorder="False" SelectionMode="Row"
SelectedItem="{Binding Path=SelectedSceneTemplateModel}" x:Name="t" SelectedItem="{Binding Path=SelectedSceneTemplateModel}"
SelectedItems="{Binding Path=SelectedSceneTemplateModels}"> SelectedItems="{Binding Path=SelectedSceneTemplateModels}">
<dxg:GridControl.Resources>
<Style TargetType="{x:Type dxg:RowControl}">
<Style.Triggers>
<DataTrigger Binding="{Binding Row.IsOpen}" Value="True">
<Setter Property="Background" Value="#AA0078D7"></Setter>
</DataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Row.IsOpen}" Value="True"></Condition>
<Condition Binding="{Binding IsActive,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type dxdo:LayoutPanel}}}" Value="True"></Condition>
</MultiDataTrigger.Conditions>
<MultiDataTrigger.Setters>
<Setter Property="Background" Value="#FF0078D7"></Setter>
</MultiDataTrigger.Setters>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</dxg:GridControl.Resources>
<dxg:GridControl.ContextMenu> <dxg:GridControl.ContextMenu>
<ContextMenu> <ContextMenu>
<MenuItem Header="打开" Command="{Binding Path=PlacementTarget.DataContext.OpenScenePageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/> <MenuItem Header="打开" Command="{Binding Path=PlacementTarget.DataContext.OpenScenePageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
...@@ -136,9 +157,8 @@ ...@@ -136,9 +157,8 @@
<dxg:GridColumn Header="序号" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="40" AllowResizing="False"> <dxg:GridColumn Header="序号" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="40" AllowResizing="False">
<dxg:GridColumn.CellTemplate> <dxg:GridColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<Grid Background="{Binding Path=Row.IsOpen,Converter={StaticResource RowHandleBgConverter}}"> <Grid>
<Rectangle Fill="{Binding Path=Row.IsTake,Converter={StaticResource RowHandleTakeConverter}}" <Rectangle Fill="{Binding Path=Row.IsTake,Converter={StaticResource RowHandleTakeConverter}}"></Rectangle>
Width="10" HorizontalAlignment="Left"></Rectangle>
<TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding RowData.RowHandle,Converter={StaticResource RowHandleConverter}}"></TextBlock> <TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding RowData.RowHandle,Converter={StaticResource RowHandleConverter}}"></TextBlock>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
......
using System; using DevExpress.Xpf.Docking;
using DevExpress.Xpf.Grid;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
......
...@@ -5,6 +5,8 @@ using System.Text; ...@@ -5,6 +5,8 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using VIZ.Package.Domain; using VIZ.Package.Domain;
using VIZ.Package.Service;
using VIZ.Package.Storage;
namespace VIZ.Package.Module namespace VIZ.Package.Module
{ {
...@@ -14,6 +16,11 @@ namespace VIZ.Package.Module ...@@ -14,6 +16,11 @@ namespace VIZ.Package.Module
public class PageCommandController public class PageCommandController
{ {
/// <summary> /// <summary>
/// 操作日志服务
/// </summary>
private RecordLogService recordLogService = new RecordLogService();
/// <summary>
/// 延时 /// 延时
/// </summary> /// </summary>
/// <remarks> /// <remarks>
...@@ -32,6 +39,15 @@ namespace VIZ.Package.Module ...@@ -32,6 +39,15 @@ namespace VIZ.Package.Module
public const string CMD_SEND = "send"; public const string CMD_SEND = "send";
/// <summary> /// <summary>
/// 记录日志
/// </summary>
/// <remarks>
/// 示例:log xxx
/// 描述:记录命令日志
/// </remarks>
public const string CMD_LOG = "log";
/// <summary>
/// 开始执行命令 /// 开始执行命令
/// </summary> /// </summary>
/// <param name="pageBase">页</param> /// <param name="pageBase">页</param>
...@@ -83,6 +99,7 @@ namespace VIZ.Package.Module ...@@ -83,6 +99,7 @@ namespace VIZ.Package.Module
{ {
case CMD_DELAY: this.ExecuteLine_Delay(pageBase, conn, cmd, args); break; case CMD_DELAY: this.ExecuteLine_Delay(pageBase, conn, cmd, args); break;
case CMD_SEND: this.ExecuteLine_Send(pageBase, conn, cmd, args); break; case CMD_SEND: this.ExecuteLine_Send(pageBase, conn, cmd, args); break;
case CMD_LOG: this.ExecuteLine_Log(pageBase, conn, cmd, args); break;
} }
} }
...@@ -117,5 +134,18 @@ namespace VIZ.Package.Module ...@@ -117,5 +134,18 @@ namespace VIZ.Package.Module
conn.EndpointManager.Send(args); conn.EndpointManager.Send(args);
} }
/// <summary>
/// 执行 -- 记录命令日志
/// </summary>
/// <param name="pageBase">页</param>
/// <param name="conn">连接</param>
/// <param name="cmd">命令</param>
/// <param name="args">参数</param>
private void ExecuteLine_Log(PageModelBase pageBase, ConnModel conn, string cmd, string args)
{
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.System, RecordLogTrigger.System, RecordLogConstants.SYSTEM_PAGE_CMD_LOG, args);
}
} }
} }
...@@ -42,6 +42,7 @@ namespace VIZ.Package.Module ...@@ -42,6 +42,7 @@ namespace VIZ.Package.Module
info.ID = PLUGIN_ID; info.ID = PLUGIN_ID;
info.Name = PLUGIN_NAME; info.Name = PLUGIN_NAME;
info.ViewType = typeof(PageCommandView); info.ViewType = typeof(PageCommandView);
info.Icon = "/VIZ.Package.Module.Resource;component/Icons/icon_cmd_32x32.png";
return info; return info;
} }
......
...@@ -356,7 +356,7 @@ namespace VIZ.Package.Module ...@@ -356,7 +356,7 @@ namespace VIZ.Package.Module
{ {
if (ApplicationDomainEx.CurrentPage.PageType == PageType.Scene) if (ApplicationDomainEx.CurrentPage.PageType == PageType.Scene)
{ {
this.vizCommandService.Start(conn, null, VizLayer.MAIN_LAYER); this.vizCommandService.Start(conn, null, ApplicationDomainEx.CurrentPage.Layer);
view?.PreviewIn(conn); view?.PreviewIn(conn);
} }
...@@ -391,7 +391,7 @@ namespace VIZ.Package.Module ...@@ -391,7 +391,7 @@ namespace VIZ.Package.Module
{ {
if (ApplicationDomainEx.CurrentPage.PageType == PageType.Scene) if (ApplicationDomainEx.CurrentPage.PageType == PageType.Scene)
{ {
this.vizCommandService.Continue(conn, null, VizLayer.MAIN_LAYER); this.vizCommandService.Continue(conn, null, ApplicationDomainEx.CurrentPage.Layer);
view?.PreviewContinue(conn); view?.PreviewContinue(conn);
} }
...@@ -420,7 +420,7 @@ namespace VIZ.Package.Module ...@@ -420,7 +420,7 @@ namespace VIZ.Package.Module
{ {
if (ApplicationDomainEx.CurrentPage.PageType == PageType.Scene) if (ApplicationDomainEx.CurrentPage.PageType == PageType.Scene)
{ {
this.vizCommandService.Stop(conn, null, VizLayer.MAIN_LAYER); this.vizCommandService.Stop(conn, null, ApplicationDomainEx.CurrentPage.Layer);
view?.PreviewOut(conn); view?.PreviewOut(conn);
} }
...@@ -464,7 +464,7 @@ namespace VIZ.Package.Module ...@@ -464,7 +464,7 @@ namespace VIZ.Package.Module
{ {
if (obj != null) if (obj != null)
{ {
this.vizCommandControlObjectService.SetControlObject(conn, obj); this.vizCommandControlObjectService.SetControlObject(conn, obj, ApplicationDomainEx.CurrentPage.GetVizScene());
this.vizCommandControlObjectService.SetCustomControlFieldValue(conn, obj.AllFiledNodes); this.vizCommandControlObjectService.SetCustomControlFieldValue(conn, obj.AllFiledNodes);
} }
view?.PreviewUpdate(conn); view?.PreviewUpdate(conn);
...@@ -575,7 +575,14 @@ namespace VIZ.Package.Module ...@@ -575,7 +575,14 @@ namespace VIZ.Package.Module
{ {
if (msg.Page.PageType == PageType.Scene) if (msg.Page.PageType == PageType.Scene)
{ {
this.vizCommandService.SetObject(ApplicationDomainEx.PreviewConn, msg.Page.ScenePath, VizLayer.MAIN_LAYER); List<VizLayer> layers = new List<VizLayer> { VizLayer.FRONT_LAYER, VizLayer.MAIN_LAYER, VizLayer.BACK_LAYER };
layers.Remove(msg.Page.Layer);
foreach (VizLayer layer in layers)
{
this.vizCommandService.SetObjectEmpty(ApplicationDomainEx.PreviewConn, layer);
}
this.vizCommandService.SetObject(ApplicationDomainEx.PreviewConn, msg.Page.ScenePath, msg.Page.Layer);
} }
// 发送节目单项初始化完成消息 // 发送节目单项初始化完成消息
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</ResourceDictionary> </ResourceDictionary>
</UserControl.Resources> </UserControl.Resources>
<GroupBox Header="插件映射" Padding="10" Margin="10"> <GroupBox Header="数据模板映射" Padding="10" Margin="10">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="40"></RowDefinition> <RowDefinition Height="40"></RowDefinition>
......
...@@ -129,7 +129,11 @@ ...@@ -129,7 +129,11 @@
<Compile Include="ControlObject\FieldEdit\Edit\ScrollElementsEdit\ScrollElementsEditPanelModel.cs" /> <Compile Include="ControlObject\FieldEdit\Edit\ScrollElementsEdit\ScrollElementsEditPanelModel.cs" />
<Compile Include="Control\Controller\ControlController.cs" /> <Compile Include="Control\Controller\ControlController.cs" />
<Compile Include="Control\Service\IControlService.cs" /> <Compile Include="Control\Service\IControlService.cs" />
<Compile Include="Help\About\ViewModel\AboutPageCommandWindowModel.cs" />
<Compile Include="Help\About\ViewModel\AboutCustomControlFieldWindowModel.cs" /> <Compile Include="Help\About\ViewModel\AboutCustomControlFieldWindowModel.cs" />
<Compile Include="Help\About\View\AboutPageCommandWindow.xaml.cs">
<DependentUpon>AboutPageCommandWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Help\About\View\AboutCustomControlFieldWindow.xaml.cs"> <Compile Include="Help\About\View\AboutCustomControlFieldWindow.xaml.cs">
<DependentUpon>AboutCustomControlFieldWindow.xaml</DependentUpon> <DependentUpon>AboutCustomControlFieldWindow.xaml</DependentUpon>
</Compile> </Compile>
...@@ -474,6 +478,10 @@ ...@@ -474,6 +478,10 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="Help\About\View\AboutPageCommandWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Help\About\View\AboutCustomControlFieldWindow.xaml"> <Page Include="Help\About\View\AboutCustomControlFieldWindow.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
......
...@@ -4,6 +4,7 @@ using log4net.Repository.Hierarchy; ...@@ -4,6 +4,7 @@ using log4net.Repository.Hierarchy;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Drawing;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
...@@ -290,13 +291,20 @@ namespace VIZ.Package.Service ...@@ -290,13 +291,20 @@ namespace VIZ.Package.Service
return; return;
} }
using (System.IO.MemoryStream ms = new System.IO.MemoryStream()) using (Bitmap dest = new Bitmap(bmp.Width, bmp.Height, bmp.PixelFormat))
using (Graphics g = Graphics.FromImage(dest))
{ {
bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); g.DrawImage(bmp, 0, 0);
ms.Position = 0;
using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
{
dest.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
ms.Position = 0;
ApplicationDomainEx.ProjectDbContext.SceneThumbnailCache.Upload(id, $"{id}", ms); ApplicationDomainEx.ProjectDbContext.SceneThumbnailCache.Upload(id, $"{id}", ms);
}
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -155,12 +155,13 @@ namespace VIZ.Package.Service ...@@ -155,12 +155,13 @@ namespace VIZ.Package.Service
/// 获取场景树节点信息 /// 获取场景树节点信息
/// </summary> /// </summary>
/// <param name="conn">连接</param> /// <param name="conn">连接</param>
/// <param name="scene">Viz场景</param>
/// <returns>场景树节点信息</returns> /// <returns>场景树节点信息</returns>
public List<VizTreeNodeInfo> GetTreeNodeList(ConnModel conn) public List<VizTreeNodeInfo> GetTreeNodeList(ConnModel conn, VizScene scene)
{ {
List<VizTreeNodeInfo> list = new List<VizTreeNodeInfo>(); List<VizTreeNodeInfo> list = new List<VizTreeNodeInfo>();
string cmd = $"MAIN_SCENE*TREE GET"; string cmd = $"{scene}*TREE GET";
string result = conn.EndpointManager.Request(cmd); string result = conn.EndpointManager.Request(cmd);
List<string> nodes = result.Split('{').Select(p => p.Replace("}", "")).ToList(); List<string> nodes = result.Split('{').Select(p => p.Replace("}", "")).ToList();
...@@ -188,10 +189,11 @@ namespace VIZ.Package.Service ...@@ -188,10 +189,11 @@ namespace VIZ.Package.Service
/// 获取控制对象ID集合 /// 获取控制对象ID集合
/// </summary> /// </summary>
/// <param name="conn">连接</param> /// <param name="conn">连接</param>
/// <param name="scene">Viz场景层</param>
/// <returns>控制对象ID集合</returns> /// <returns>控制对象ID集合</returns>
public List<string> GetControlObjectIds(ConnModel conn) public List<string> GetControlObjectIds(ConnModel conn, VizScene scene)
{ {
string cmd = $"MAIN_SCENE*TREE SEARCH_FOR_CONTAINER_WITH_PROPERTY BUILT_IN*FUNCTION BUILT_IN*FUNCTION*ControlObject"; string cmd = $"{scene}*TREE SEARCH_FOR_CONTAINER_WITH_PROPERTY BUILT_IN*FUNCTION BUILT_IN*FUNCTION*ControlObject";
string result = conn.EndpointManager.Request(cmd); string result = conn.EndpointManager.Request(cmd);
string[] source = result.Trim().Split(' '); string[] source = result.Trim().Split(' ');
...@@ -208,11 +210,11 @@ namespace VIZ.Package.Service ...@@ -208,11 +210,11 @@ namespace VIZ.Package.Service
ControlObjectModel obj = new ControlObjectModel(); ControlObjectModel obj = new ControlObjectModel();
// Step 1. 获取场景树信息 // Step 1. 获取场景树信息
List<VizTreeNodeInfo> treeNodeList = this.GetTreeNodeList(conn); List<VizTreeNodeInfo> treeNodeList = this.GetTreeNodeList(conn, VizScene.MAIN_SCENE);
Dictionary<string, VizTreeNodeInfo> treeNodeDic = treeNodeList.ToDictionary(p => $"#{p.Num}", p => p); Dictionary<string, VizTreeNodeInfo> treeNodeDic = treeNodeList.ToDictionary(p => $"#{p.Num}", p => p);
// Step 2. 获取控制对象ID集合 // Step 2. 获取控制对象ID集合
List<string> ids = this.GetControlObjectIds(conn); List<string> ids = this.GetControlObjectIds(conn, VizScene.MAIN_SCENE);
// Step 3. 获取控制对象信息, 只获取第一个控制对象 // Step 3. 获取控制对象信息, 只获取第一个控制对象
string id = ids.FirstOrDefault(); string id = ids.FirstOrDefault();
...@@ -225,16 +227,16 @@ namespace VIZ.Package.Service ...@@ -225,16 +227,16 @@ namespace VIZ.Package.Service
// Step 4. 获取第一个控制对象的信息 // Step 4. 获取第一个控制对象的信息
obj.TreeNodePath = objTreeNodeInfo.Path; obj.TreeNodePath = objTreeNodeInfo.Path;
obj.TreeNodeName = objTreeNodeInfo.Name; obj.TreeNodeName = objTreeNodeInfo.Name;
obj.Description = this.GetControlObjectParameter(conn, obj.TreeNodePath, VizControlObjectParameters.description); obj.Description = this.GetControlObjectParameter(conn, VizScene.MAIN_SCENE, obj.TreeNodePath, VizControlObjectParameters.description);
obj.UseAllDirectors = this.GetControlObjectParameter(conn, obj.TreeNodePath, VizControlObjectParameters.use_all_directors) == "1"; obj.UseAllDirectors = this.GetControlObjectParameter(conn, VizScene.MAIN_SCENE, obj.TreeNodePath, VizControlObjectParameters.use_all_directors) == "1";
// 切换场景 // 切换场景
obj.TransitionLogic = this.GetControlObjectParameter(conn, obj.TreeNodePath, VizControlObjectParameters.trio_loadable) == "1"; obj.TransitionLogic = this.GetControlObjectParameter(conn, VizScene.MAIN_SCENE, obj.TreeNodePath, VizControlObjectParameters.trio_loadable) == "1";
obj.LayerIdentifier = this.GetControlObjectParameter(conn, obj.TreeNodePath, VizControlObjectParameters.layer); obj.LayerIdentifier = this.GetControlObjectParameter(conn, VizScene.MAIN_SCENE, obj.TreeNodePath, VizControlObjectParameters.layer);
obj.StateIdentifier = this.GetControlObjectParameter(conn, obj.TreeNodePath, VizControlObjectParameters.state); obj.StateIdentifier = this.GetControlObjectParameter(conn, VizScene.MAIN_SCENE, obj.TreeNodePath, VizControlObjectParameters.state);
obj.BackgroundScene = this.GetControlObjectParameter(conn, obj.TreeNodePath, VizControlObjectParameters.background); obj.BackgroundScene = this.GetControlObjectParameter(conn, VizScene.MAIN_SCENE, obj.TreeNodePath, VizControlObjectParameters.background);
// Step 5. 获取第一个控制对象的字段描述 // Step 5. 获取第一个控制对象的字段描述
string fieldDetails = this.GetControlObjectResult(conn, obj.TreeNodePath); string fieldDetails = this.GetControlObjectResult(conn, VizScene.MAIN_SCENE, obj.TreeNodePath);
obj.FieldDetails = fieldDetails ?? string.Empty; obj.FieldDetails = fieldDetails ?? string.Empty;
// Step 6. 更新控制对象字段 // Step 6. 更新控制对象字段
...@@ -269,12 +271,13 @@ namespace VIZ.Package.Service ...@@ -269,12 +271,13 @@ namespace VIZ.Package.Service
/// 获取控制对象参数 /// 获取控制对象参数
/// </summary> /// </summary>
/// <param name="conn">连接</param> /// <param name="conn">连接</param>
/// <param name="scene">Viz场景层</param>
/// <param name="treeNodePath">场景数路径</param> /// <param name="treeNodePath">场景数路径</param>
/// <param name="parameter">参数</param> /// <param name="parameter">参数</param>
/// <returns>描述</returns> /// <returns>描述</returns>
public string GetControlObjectParameter(ConnModel conn, string treeNodePath, VizControlObjectParameters parameter) public string GetControlObjectParameter(ConnModel conn, VizScene scene, string treeNodePath, VizControlObjectParameters parameter)
{ {
string cmd = $"MAIN_SCENE*TREE*{treeNodePath}*FUNCTION*ControlObject*{parameter} GET"; string cmd = $"{scene}*TREE*{treeNodePath}*FUNCTION*ControlObject*{parameter} GET";
string result = conn.EndpointManager.Request(cmd); string result = conn.EndpointManager.Request(cmd);
return result; return result;
...@@ -288,12 +291,13 @@ namespace VIZ.Package.Service ...@@ -288,12 +291,13 @@ namespace VIZ.Package.Service
/// FieldIdentifier:VizID_SetGetfunction:Type:Min:Max:MaxChar:Description:AuxField: /// FieldIdentifier:VizID_SetGetfunction:Type:Min:Max:MaxChar:Description:AuxField:
/// </remarks> /// </remarks>
/// <param name="conn">连接</param> /// <param name="conn">连接</param>
/// <param name="scene">Viz场景层</param>
/// <param name="treeNodePath">场景树路径</param> /// <param name="treeNodePath">场景树路径</param>
/// <returns>控制对象返回值</returns> /// <returns>控制对象返回值</returns>
public string GetControlObjectResult(ConnModel conn, string treeNodePath) public string GetControlObjectResult(ConnModel conn, VizScene scene, string treeNodePath)
{ {
conn.EndpointManager.Send($"MAIN_SCENE*TREE*{treeNodePath}*FUNCTION*ControlObject*in SET LIST"); conn.EndpointManager.Send($"{scene}*TREE*{treeNodePath}*FUNCTION*ControlObject*in SET LIST");
string result = conn.EndpointManager.Request($"MAIN_SCENE*TREE*{treeNodePath}*FUNCTION*ControlObject*result GET"); string result = conn.EndpointManager.Request($"{scene}*TREE*{treeNodePath}*FUNCTION*ControlObject*result GET");
return result; return result;
} }
...@@ -302,13 +306,14 @@ namespace VIZ.Package.Service ...@@ -302,13 +306,14 @@ namespace VIZ.Package.Service
/// 获取控制对象字段值 /// 获取控制对象字段值
/// </summary> /// </summary>
/// <param name="conn">连接</param> /// <param name="conn">连接</param>
/// <param name="scene">Viz场景层</param>
/// <param name="treeNodePath">场景树路径</param> /// <param name="treeNodePath">场景树路径</param>
/// <param name="fieldIdentifier">字段</param> /// <param name="fieldIdentifier">字段</param>
/// <returns>字段值</returns> /// <returns>字段值</returns>
public string GetControlFieldValue(ConnModel conn, string treeNodePath, string fieldIdentifier) public string GetControlFieldValue(ConnModel conn, VizScene scene, string treeNodePath, string fieldIdentifier)
{ {
conn.EndpointManager.Send($"MAIN_SCENE*TREE*{treeNodePath}*FUNCTION*ControlObject*in SET ON {fieldIdentifier} GET"); conn.EndpointManager.Send($"{scene}*TREE*{treeNodePath}*FUNCTION*ControlObject*in SET ON {fieldIdentifier} GET");
string result = conn.EndpointManager.Request($"MAIN_SCENE*TREE*{treeNodePath}*FUNCTION*ControlObject*result GET"); string result = conn.EndpointManager.Request($"{scene}*TREE*{treeNodePath}*FUNCTION*ControlObject*result GET");
return result; return result;
} }
...@@ -317,33 +322,20 @@ namespace VIZ.Package.Service ...@@ -317,33 +322,20 @@ namespace VIZ.Package.Service
/// 设置控制对象值 /// 设置控制对象值
/// </summary> /// </summary>
/// <param name="conn">连接</param> /// <param name="conn">连接</param>
/// <param name="scene">场景层</param>
/// <param name="treeNodePath">场景节点路径</param> /// <param name="treeNodePath">场景节点路径</param>
/// <param name="fieldIdentifier">字段</param> /// <param name="fieldIdentifier">字段</param>
/// <param name="value">值</param> /// <param name="value">值</param>
public void SetControlObjectValue(ConnModel conn, string treeNodePath, string fieldIdentifier, string value) public void SetControlObjectValue(ConnModel conn, VizScene scene, string treeNodePath, string fieldIdentifier, string value)
{ {
string str = $"MAIN_SCENE*TREE*{treeNodePath}*FUNCTION*ControlObject*in SET ON {fieldIdentifier} SET {value}"; string str = $"{scene}*TREE*{treeNodePath}*FUNCTION*ControlObject*in SET ON {fieldIdentifier} SET {value}";
conn.EndpointManager.Send(str); conn.EndpointManager.Send(str);
} }
/// <summary> public void SetControlObjectClockCmd(ConnModel conn, VizScene scene, string treeNodePath, string fieldIdentifier, string upValue, string downValue, string cmd)
/// 设置时钟控制对象
/// </summary>
/// <param name="conn"></param>
/// <param name="treeNodePath"></param>
/// <param name="fieldIdentifier"></param>
/// <param name="value"></param>
public void SetControlObjectClockValue(ConnModel conn, string treeNodePath, string fieldIdentifier, string value)
{ {
string str = $"MAIN_SCENE*TREE*{treeNodePath}*FUNCTION*ControlObject*in SET ON {fieldIdentifier} SET {value} "; string str = $"{scene}*TREE*{treeNodePath}*FUNCTION*ControlObject*in SET ON {fieldIdentifier} SET *TIME SET {upValue},*LIMIT SET {downValue},*DIRECTION SET {cmd}";
conn.EndpointManager.Send(str);
}
public void SetControlObjectClockCmd(ConnModel conn, string treeNodePath, string fieldIdentifier,string upValue, string downValue,string cmd)
{
string str = $"MAIN_SCENE*TREE*{treeNodePath}*FUNCTION*ControlObject*in SET ON {fieldIdentifier} SET *TIME SET {upValue},*LIMIT SET {downValue},*DIRECTION SET {cmd}";
conn.EndpointManager.Send(str); conn.EndpointManager.Send(str);
} }
...@@ -353,10 +345,11 @@ namespace VIZ.Package.Service ...@@ -353,10 +345,11 @@ namespace VIZ.Package.Service
/// </summary> /// </summary>
/// <param name="conn">连接</param> /// <param name="conn">连接</param>
/// <param name="obj">控制对象</param> /// <param name="obj">控制对象</param>
public void SetControlObject(ConnModel conn, ControlObjectModel obj) /// <param name="scene">层</param>
public void SetControlObject(ConnModel conn, ControlObjectModel obj, VizScene scene)
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.Append($"MAIN_SCENE*TREE*{obj.TreeNodePath}*FUNCTION*ControlObject*in SET ON "); sb.Append($"{scene}*TREE*{obj.TreeNodePath}*FUNCTION*ControlObject*in SET ON ");
foreach (ControlFieldNodeModel field in obj.AllFiledNodes) foreach (ControlFieldNodeModel field in obj.AllFiledNodes)
{ {
// 自定义字段不通过该方法上板 // 自定义字段不通过该方法上板
...@@ -373,14 +366,15 @@ namespace VIZ.Package.Service ...@@ -373,14 +366,15 @@ namespace VIZ.Package.Service
/// 设置列表控制对象的值 /// 设置列表控制对象的值
/// </summary> /// </summary>
/// <param name="conn">连接</param> /// <param name="conn">连接</param>
/// <param name="scene">场景层</param>
/// <param name="treeNodePath">场景节点路径</param> /// <param name="treeNodePath">场景节点路径</param>
/// <param name="listName">列表名称</param> /// <param name="listName">列表名称</param>
/// <param name="listLine">列表值位序</param> /// <param name="listLine">列表值位序</param>
/// <param name="fieldIdentifier">字段</param> /// <param name="fieldIdentifier">字段</param>
/// <param name="value">值</param> /// <param name="value">值</param>
public void SetControlObjectListValue(ConnModel conn, string treeNodePath, string listName, int listLine, string fieldIdentifier, string value) public void SetControlObjectListValue(ConnModel conn, VizScene scene, string treeNodePath, string listName, int listLine, string fieldIdentifier, string value)
{ {
conn.EndpointManager.Send($"MAIN_SCENE*TREE*{treeNodePath}*FUNCTION*ControlObject*in SET WITH {listName} INDEX {listLine} ON {fieldIdentifier} SET {value}"); conn.EndpointManager.Send($"{scene}*TREE*{treeNodePath}*FUNCTION*ControlObject*in SET WITH {listName} INDEX {listLine} ON {fieldIdentifier} SET {value}");
} }
/// <summary> /// <summary>
...@@ -638,7 +632,7 @@ namespace VIZ.Package.Service ...@@ -638,7 +632,7 @@ namespace VIZ.Package.Service
node.Type = this.GetControlFieldType(node.TypeSchema); node.Type = this.GetControlFieldType(node.TypeSchema);
if (isGetValueFromViz) if (isGetValueFromViz)
{ {
node.Value = this.GetControlFieldValue(conn, model.TreeNodePath, node.FieldIdentifier); node.Value = this.GetControlFieldValue(conn, VizScene.MAIN_SCENE, model.TreeNodePath, node.FieldIdentifier);
} }
if (pars.Length >= 7) if (pars.Length >= 7)
......
...@@ -71,7 +71,8 @@ namespace VIZ.Package.Service ...@@ -71,7 +71,8 @@ namespace VIZ.Package.Service
if (ApplicationDomainEx.PreviewConn == null || !ApplicationDomainEx.PreviewConn.IsConnected) if (ApplicationDomainEx.PreviewConn == null || !ApplicationDomainEx.PreviewConn.IsConnected)
return null; return null;
string result = ApplicationDomainEx.PreviewConn.EndpointManager.Request($"{ApplicationDomainEx.VizPreviewRenderer}*TREE*$object*FUNCTION*ControlObject*in SET ON_CONTAINER {scrollElementField.FieldIdentifier} GEOM*currentPos GET"); ApplicationDomainEx.PreviewConn.EndpointManager.Request($"{ApplicationDomainEx.VizPreviewRenderer}*TREE*$object*FUNCTION*ControlObject*in SET ON_CONTAINER {scrollElementField.FieldIdentifier} GEOM*currentPos GET");
string result = ApplicationDomainEx.PreviewConn.EndpointManager.Request($"{ApplicationDomainEx.VizPreviewRenderer}*TREE*$object*FUNCTION*ControlObject**result GET");
if (string.IsNullOrWhiteSpace(result) || result.StartsWith(ApplicationConstants.VIZ_COMMAND_RESULT_ERROR_PREFIX)) if (string.IsNullOrWhiteSpace(result) || result.StartsWith(ApplicationConstants.VIZ_COMMAND_RESULT_ERROR_PREFIX))
return null; return null;
......
...@@ -31,6 +31,19 @@ namespace VIZ.Package.Service ...@@ -31,6 +31,19 @@ namespace VIZ.Package.Service
} }
/// <summary> /// <summary>
/// 设置空场景
/// </summary>
/// <param name="conn">连接</param>
/// <param name="layer">图层</param>
public void SetObjectEmpty(ConnModel conn, VizLayer layer)
{
if (conn == null)
throw new ArgumentNullException(nameof(conn));
conn.EndpointManager.Request($"RENDERER*{layer} SET_OBJECT");
}
/// <summary>
/// 重新加载场景 /// 重新加载场景
/// </summary> /// </summary>
/// <param name="conn">连接</param> /// <param name="conn">连接</param>
......
...@@ -110,7 +110,7 @@ namespace VIZ.Package.Service ...@@ -110,7 +110,7 @@ namespace VIZ.Package.Service
ConnModel conn = ApplicationDomainEx.PreviewConn; ConnModel conn = ApplicationDomainEx.PreviewConn;
// 获取控制对象ID // 获取控制对象ID
List<string> ids = this.vizCommandControlObjectService.GetControlObjectIds(conn); List<string> ids = this.vizCommandControlObjectService.GetControlObjectIds(conn, VizScene.MAIN_SCENE);
string objectId = ids.FirstOrDefault(); string objectId = ids.FirstOrDefault();
if (string.IsNullOrWhiteSpace(objectId)) if (string.IsNullOrWhiteSpace(objectId))
...@@ -122,7 +122,7 @@ namespace VIZ.Package.Service ...@@ -122,7 +122,7 @@ namespace VIZ.Package.Service
string groupPath = this.vizCommandService.GroupAdd(conn, pageBase.ScenePath, objectId, VizGroupMoveDirection.BOTTOM); string groupPath = this.vizCommandService.GroupAdd(conn, pageBase.ScenePath, objectId, VizGroupMoveDirection.BOTTOM);
// SCENE*TITLES/2022/YC/YC_CUP2*TREE GET // SCENE*TITLES/2022/YC/YC_CUP2*TREE GET
List<VizTreeNodeInfo> treeNodeList = this.vizCommandControlObjectService.GetTreeNodeList(conn); List<VizTreeNodeInfo> treeNodeList = this.vizCommandControlObjectService.GetTreeNodeList(conn, VizScene.MAIN_SCENE);
VizTreeNodeInfo groupNode = treeNodeList.FirstOrDefault(p => p.Path == groupPath); VizTreeNodeInfo groupNode = treeNodeList.FirstOrDefault(p => p.Path == groupPath);
if (groupNode == null) if (groupNode == null)
return; return;
......
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