using CapMachine.Core; using Prism.Commands; using Prism.Services.Dialogs; using SharpDX.Direct3D9; using System; using System.Windows; namespace CapMachine.Wpf.ViewModels { public class RealTimeChartViewModel : NavigationViewModel { /// /// 实例化函数 /// public RealTimeChartViewModel(IDialogService dialogService, IFreeSql freeSql) { DialogService = dialogService; FreeSql = freeSql; } /// /// 弹窗服务 /// public IDialogService DialogService { get; } /// /// FreeSQL 实例 /// public IFreeSql FreeSql { get; } private DelegateCommand _ChartConfigCmd; /// /// 编辑曲线数据 /// public DelegateCommand ChartConfigCmd { set { _ChartConfigCmd = value; } get { if (_ChartConfigCmd == null) { _ChartConfigCmd = new DelegateCommand(() => ChartConfigCmdMethod()); } return _ChartConfigCmd; } } /// /// 编辑曲线数据执行方法 /// private void ChartConfigCmdMethod() { //弹窗 DialogService.ShowDialog("DialogChartRtConfigView", new DialogParameters() { { "Name", "" } }, (par) => { if (par.Result == ButtonResult.OK) { //程序名称 var ReturnValue = par.Parameters.GetValue("Name"); } else if (par.Result == ButtonResult.Cancel) { //取消 } }); } //#region 曲线配置 //private LightningChart _LightningChartInstance; ///// ///// LightningChart 实例 ///// //public LightningChart LightningChartInstance //{ // get { return _LightningChartInstance; } // set { _LightningChartInstance = value; RaisePropertyChanged(); } //} ///// ///// 获取实例 ///// ///// //public void SetChart(LightningChart chart) //{ // LightningChartInstance = chart; //} //private AxisYCollection _YAxes=new AxisYCollection(); ///// ///// Y轴配置 ///// //public AxisYCollection YAxes //{ // get { return _YAxes; } // set { _YAxes = value; RaisePropertyChanged(); } //} //private AxisXCollection _XAxes = new AxisXCollection(); ///// ///// X轴配置 ///// //public AxisXCollection XAxes //{ // get { return _XAxes; } // set { _XAxes = value; RaisePropertyChanged(); } //} //private SampleDataSeriesCollection _ChartDataSeries; ///// ///// 曲线集合数据 ///// //public SampleDataSeriesCollection ChartDataSeries //{ // get { return _ChartDataSeries; } // set { _ChartDataSeries = value; RaisePropertyChanged(); } //} //#endregion } }