using FLY.Thick.BlowingScan.IService;
using MultiLayout.UiModule;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Unity;
namespace FLY.Thick.BlowingScan.UI.Client.UiModule
{
///
/// DynAreaProfile.xaml 的交互逻辑
///
public partial class DynAreaProfile : UserControl
{
IUnityContainer container;
IBlowingProfileService profileService;
public DynAreaProfile()
{
InitializeComponent();
}
[InjectionMethod]
public void Init(
IUnityContainer container,
IBlowingProfileService profileService
)
{
this.container = container;
this.profileService = profileService;
Border_Profile.DataContext = this.profileService.Param;
}
private void button_profile_click(object sender, RoutedEventArgs e)
{
PgProfileBlowing p = new PgProfileBlowing();
container.BuildUp(p);
(Application.Current.Properties["NavigationService"] as NavigationService).Navigate(p);
}
}
public class UiModule2_DynAreaProfile : IUiModule2
{
/// 控件标题
/// 它的值取决于culture
///
public string Title => "产品状态";
public ComponentType Type => ComponentType.DynArea;
public bool IsUnique => true;
///
/// 控件
/// 创建时,需要给它唯一ID,让加载自己的数据
///
///
///
public FrameworkElement GetComponent(int id, IUnityContainer container)
{
DynAreaProfile graph = new DynAreaProfile();
container.BuildUp(graph);
return graph;
}
///
/// 控件缩略图,用于编辑界面时,大致看看
/// 创建时,需要给它唯一ID,让加载自己的数据
///
///
///
public FrameworkElement GetThumbnail()
{
return new System.Windows.Controls.Grid();
}
///
/// 给出全部控件ID, 控件自行删除没有的参数
///
///
public void MatchParam(int[] IDs)
{
}
}
}