예제 #1
0
        public TabLockWarningDialog(TabLockInfo info)
        {
            InitializeComponent();

            TabLockWarningViewModel viewModel = new TabLockWarningViewModel(info);
            viewModel.View = this;
            DataContext = viewModel;
        }
예제 #2
0
        public TabLockWarningViewModel(TabLockInfo info)
        {
            if (info == null) throw new ArgumentNullException("info");

            if (DesignerProperties.IsInDesignTool)
            {
                return;
            }

            mInfo = info;

            UserName = info.UserWithLock.LastFirstName + " opened ";
            DateTimeText = " on "+ info.DateTimeTabOpened.ToString("dd/MM/yyyy") +" at " + info.DateTimeTabOpened.ToLongTimeString() + ".";
            IssueText = info.TabName;

            OkCommand = new DelegateCommand<object>(OkButtonHandler);
            ResetCommand = new DelegateCommand<object>(ResetHandler, CanExecuteResetButton);
        }