using FLY.OBJComponents.Client;
using System.Windows;
using System.Windows.Controls;
namespace FLY.Integrated.UI.Client.UIModule
{
///
/// UcTractionPanel.xaml 的交互逻辑
///
public partial class UcTractionPanel : UserControl
{
FLY.Integrated.Client.IntegratedSystemServiceClient integratedSystemServiceClient;
FLY.OBJComponents.Client.SetPLCUpdatePlan setPlan;
public UcTractionPanel()
{
InitializeComponent();
}
public void Init()
{
integratedSystemServiceClient = TDGage.Current.integratedSystemServiceClient;
this.DataContext = integratedSystemServiceClient.Accessory;
//注册属性更新计划
setPlan = new SetPLCUpdatePlan(
integratedSystemServiceClient.PLCos,
integratedSystemServiceClient.Accessory,
new string[] {
"TractionVelocity",
"TractionVelocitySet",
"TractionOn",
"AirCushionOn"
});
}
private void btnVelocityClick(object sender, RoutedEventArgs e)
{
WdVelocity wdVelocity = new WdVelocity();
wdVelocity.Init();
wdVelocity.Owner = FLY.ControlLibrary.COMMON.GetWindow(this);
wdVelocity.ShowDialog();
}
}
public class UIModule_TractionPanel : FLY.UI.Module.IUIModule
{
///
/// 控件标题
/// 它的值取决于culture
///
public string Title
{
get
{
return "综合.牵引调节";
}
}
///
/// 控件
/// 创建时,需要给它唯一ID,让加载自己的数据
///
///
///
public FrameworkElement GetComponent(int id)
{
UcTractionPanel graph = new UcTractionPanel();
graph.Init();
return graph;
}
///
/// 控件缩略图,用于编辑界面时,大致看看
/// 创建时,需要给它唯一ID,让加载自己的数据
///
///
///
public FrameworkElement GetThumbnail(int id)
{
return new System.Windows.Controls.Grid();
}
///
/// 给出全部控件ID, 控件自行删除没有的参数
///
///
public void MatchParam(int[] IDs)
{
}
}
}