wenxiangchao
3 天以前 b544d5cccd76735e034c8055918a50927b437474
HMI.Base/PluginMaskControl.cs
@@ -1,6 +1,7 @@
using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows;
using System.Windows.Controls;
using HMI.Core.Api;
using HMI.UI;
@@ -8,7 +9,11 @@
namespace HMI.Base
{
    public class PluginMaskControl : UserControl, IPlugin, INotifyPropertyChanged
    /// <summary>
    /// PluginMaskControl.xaml 的交互逻辑
    /// </summary>
    public partial class PluginMaskControl : UserControl, IPlugin, INotifyPropertyChanged
    {
        #region ...
        public event PropertyChangedEventHandler PropertyChanged;
@@ -28,6 +33,12 @@
            }
        }
        #endregion
        static PluginMaskControl()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(PluginMaskControl),
                new FrameworkPropertyMetadata(typeof(PluginMaskControl)));
        }
        protected ILog log;
        protected string BaseFolder;
@@ -85,5 +96,15 @@
                mask.ShowMask(this, action, reject, title, content);
            }
        }
        public virtual bool CanActive()
        {
            return true;
        }
        public virtual bool CanDeActive()
        {
            return true;
        }
    }
}