UcSectionOsk.xaml.cs 1.33 KB
Newer Older
潘栩锋's avatar
潘栩锋 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
using Misc;
using System.ComponentModel;
using System.Windows.Controls;

namespace FLY.Thick.Base.UI.CustomSection
{
    /// <summary>
    /// UcSectionOsk.xaml 的交互逻辑
    /// </summary>
    public partial class UcSectionOsk : UserControl
    {
        UcSectionOskVm viewModel;

        public UcSectionOsk()
        {
            InitializeComponent();
        }
        [Unity.InjectionMethod]
        public void Init(ParamDictionary paramDictionary)
        {
            viewModel = new UcSectionOskVm();
            viewModel.Init(paramDictionary);
            this.DataContext = viewModel;
        }
    }
    public class UcSectionOskVm : INotifyPropertyChanged
    {

        public event PropertyChangedEventHandler PropertyChanged;


        /// <summary>
        /// 使用虚拟键盘
        /// </summary>
        public bool HaveOSK { get; set; }


        /// <summary>
        /// 虚拟键盘支持鼠标
        /// </summary>
        public bool HaveOSK_mouse { get; set; }


        public UcSectionOskVm()
        {

        }

        public void Init(ParamDictionary paramDictionary)
        {
51 52
            paramDictionary.SetBinding(this, nameof(HaveOSK), ParamDistItemKeys.HaveOSK, false);
            paramDictionary.SetBinding(this, nameof(HaveOSK_mouse), ParamDistItemKeys.HaveOSK_mouse, false);
潘栩锋's avatar
潘栩锋 committed
53 54 55 56
        }

    }
}