DeviceFamilyAndVirtualKey/MainViewModel.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using Windows.System;
using Windows.System.Profile;
using Windows.UI.Xaml.Input;

namespace DeviceFamilyAndVirtualKey
{
    public class MainViewModel : ViewModelBase
    {
        private bool _isShiftKeyPressed;

        public ICommand KeyUpCommand { get; set; }

        public ICommand KeyDownCommand { get; set; }

        public ICommand SendMessageCommand { get; set; }

        public bool IsAcceptReturn
        {
            get
            {
                return AnalyticsInfo.VersionInfo.DeviceFamily == "Windows.Mobile";
            }
        }

        private string _inputText;
        public string InputText
        {
            get
            {
                return _inputText;
            }
            set
            {
                Set(ref _inputText, value);
            }
        }

        private int _index;

        public int Index
        {
            get { return _index; }
            set { Set( ref _index , value); }
        }

        public ObservableCollection<string> Messages { get; set; } = new ObservableCollection<string>();

        public MainViewModel()
        {
            KeyDownCommand = new RelayCommand<KeyRoutedEventArgs>(KeyDown);
            KeyUpCommand = new RelayCommand<KeyRoutedEventArgs>(KeyUp);
后面还有 40 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。