コード例 #1
0
ファイル: BookingViewModel.cs プロジェクト: syatin003/Wpf
        public BookingViewModel(BookingViews type, ModelBase model, bool IsDuplicate)
        {
            _model = model;

            // TODO: Remove "() => false" when tab will be completed.
            SwitchToTeeBookingCommand = new RelayCommand(SwitchToTeeBookingCommandExecuted, () => false);
            SwitchToGroupBookingCommand = new RelayCommand(SwitchToGroupBookingCommandExecuted, () => false);
            SwitchToEventBookingCommand = new RelayCommand(SwitchToEventBookingCommandExecuted);
            SwitchToCompetitionBookingCommand = new RelayCommand(SwitchToCompetitionBookingCommandExecuted, () => false);
            SwitchToMatchBookingCommand = new RelayCommand(SwitchToMatchBookingCommandExecuted, () => false);
            if (IsDuplicate)
            {
                Content = new EventBookingView(_model as EventModel, IsDuplicate);
            }
            else
            {
                SwitchBookingView(type);

            }
        }
コード例 #2
0
ファイル: BookingViewModel.cs プロジェクト: syatin003/Wpf
 private void SwitchToEventBookingCommandExecuted()
 {
     Content = new EventBookingView(_model as EventModel);
 }