コード例 #1
0
ファイル: MembersViewModel.cs プロジェクト: syatin003/Wpf
        private void AddMembershipGroupStyleCommandExecuted()
        {
            RaisePropertyChanged("DisableParentWindow");

            var addMembershipGroupStyleView = new AddMembershipGroupStyleView(MembershipGroupStyle);
            addMembershipGroupStyleView.ShowDialog();

            RaisePropertyChanged("EnableParentWindow");
            if (addMembershipGroupStyleView.DialogResult != null && addMembershipGroupStyleView.DialogResult == true)
            {
                if (Content != null)
                {
                    var viewModel = Content.DataContext as MembershipGroupStylesViewModel;
                    if (viewModel != null)
                    {
                        viewModel.AllMembershipGroupStyles.Add(addMembershipGroupStyleView.ViewModel.MembershipGroupStyle);
                        viewModel.RefreshMembershipGroupStyles();
                    }
                }
                TreeViewItemPath = "Members|Category Groups|Style";

                RaisePropertyChanged("SelectTreeViewItem");
            }
        }
コード例 #2
0
        private void EditMembershipGroupStyleCommandExecuted(MembershipGroupStyleModel membershipGroupStyle)
        {
            RaisePropertyChanged("DisableParentWindow");

            var view = new AddMembershipGroupStyleView(membershipGroupStyle);
            view.ShowDialog();

            RaisePropertyChanged("EnableParentWindow");

            if (view.DialogResult != null && view.DialogResult == true)
            {
                _adminDataUnit.MembershipGroupStylesRepository.Refresh();
            }
        }