ViewModel/BaseViewModel.cs

(开头部分) 2KB

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

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Microsoft.Practices.Prism.Commands;
using Microsoft.Practices.Prism.ViewModel;

namespace Micro.Ui.RunningTextStyle.ViewModel
{
    public class BaseViewModel : NotificationObject
    {
        #region 退出命令
        private DelegateCommand<Window> _exitCommand = null;
        public DelegateCommand<Window> ExitCommand
        {
            get
            {
                if (_exitCommand == null)
                {
                    _exitCommand = new DelegateCommand<Window>(new Action<Window>((window) =>
                    {
                        window.Close();
                        Environment.Exit(0);
                    }));
                }
                return _exitCommand;
            }
        }
        #endregion

        #region 关闭命令
        private DelegateCommand<Window> _closeCommand = null;
        public DelegateCommand<Window> CloseCommand
        {
            get
            {
                if (_closeCommand == null)
                {
                    _closeCommand = new DelegateCommand<Window>(new Action<Window>((window) =>
                    {
                        window.Close();
                    }));
                }
                return _closeCommand;
            }
        }
        #endregion

        #region 最小化命令
        private DelegateCommand<Window> _minimizeCommand = null;
        public DelegateCommand<Window> MinimizeCommand
        {
            get
            {
                if (_minimizeCommand == null)
                {
                    _minimizeCommand = new DelegateCommand<Window>(new Action<Window>((window) =>
后面还有 10 行代码,购买后查看完整代码

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

AI 解读 AI

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

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