123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- using MECF.Framework.Common.RecipeCenter;
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
- namespace CyberX8_Themes.UserControls
- {
- /// <summary>
- /// RecipeFileLoadControl.xaml 的交互逻辑
- /// </summary>
- public partial class RecipeFileLoadControl : UserControl
- {
- #region 属性
- public static readonly DependencyProperty TitleProperty = DependencyProperty.Register("Title", typeof(string), typeof(RecipeFileLoadControl),
- new FrameworkPropertyMetadata("Recipe", FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// 标题
- /// </summary>
- public string Title
- {
- get
- {
- return (string)this.GetValue(TitleProperty);
- }
- set
- {
- this.SetValue(TitleProperty, value);
- }
- }
- public static readonly DependencyProperty RecipeLocationProperty = DependencyProperty.Register("RecipeLocation", typeof(string), typeof(RecipeFileLoadControl),
- new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
- public string RecipeLocation
- {
- get { return (string)this.GetValue(RecipeLocationProperty); }
- set { this.SetValue(RecipeLocationProperty, value); }
- }
- public static readonly DependencyProperty RecipeFileNameProperty = DependencyProperty.Register("RecipeFileName", typeof(string), typeof(RecipeFileLoadControl),
- new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
- public string RecipeFileName
- {
- get { return (string)this.GetValue(RecipeFileNameProperty); }
- set { this.SetValue(RecipeFileNameProperty, value); }
- }
- public static readonly DependencyProperty RecipeNodesProperty = DependencyProperty.Register("RecipeNodes", typeof(ObservableCollection<RecipeNode>),typeof(RecipeFileLoadControl));
- public ObservableCollection<RecipeNode> RecipeNodes
- {
- get { return (ObservableCollection<RecipeNode>)this.GetValue(RecipeNodesProperty); }
- set { this.SetValue(RecipeNodesProperty, value); }
- }
- public static readonly DependencyProperty CommandProperty = DependencyProperty.Register("OperationCommand", typeof(ICommand), typeof(RecipeFileLoadControl),
- new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
- public ICommand OperationCommand
- {
- get
- {
- return (ICommand)this.GetValue(CommandProperty);
- }
- set
- {
- this.SetValue(CommandProperty, value);
- }
- }
- public static readonly DependencyProperty CreateCommandProperty = DependencyProperty.Register("CreateCommand", typeof(ICommand), typeof(RecipeFileLoadControl),
- new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
- public ICommand CreateCommand
- {
- get
- {
- return (ICommand)this.GetValue(CreateCommandProperty);
- }
- set
- {
- this.SetValue(CreateCommandProperty, value);
- }
- }
- public static readonly DependencyProperty EditCommandProperty = DependencyProperty.Register("EditCommand", typeof(ICommand), typeof(RecipeFileLoadControl),
- new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
- public ICommand EditCommand
- {
- get
- {
- return (ICommand)this.GetValue(EditCommandProperty);
- }
- set
- {
- this.SetValue(EditCommandProperty, value);
- }
- }
- public static readonly DependencyProperty CreateEnableProperty = DependencyProperty.Register("CreateEnable", typeof(bool), typeof(RecipeFileLoadControl),
- new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
- public bool CreateEnable
- {
- get
- {
- return (bool)this.GetValue(CreateEnableProperty);
- }
- set
- {
- this.SetValue(CreateEnableProperty, value);
- }
- }
- public static readonly DependencyProperty EditEnableProperty = DependencyProperty.Register("EditEnable", typeof(bool), typeof(RecipeFileLoadControl),
- new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
- public bool EditEnable
- {
- get
- {
- return (bool)this.GetValue(EditEnableProperty);
- }
- set
- {
- this.SetValue(EditEnableProperty, value);
- }
- }
- #endregion
- /// <summary>
- /// 构造函数
- /// </summary>
- public RecipeFileLoadControl()
- {
- InitializeComponent();
- }
- }
- }
|