public TabLockWarningDialog(TabLockInfo info) { InitializeComponent(); TabLockWarningViewModel viewModel = new TabLockWarningViewModel(info); viewModel.View = this; DataContext = viewModel; }
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); }