Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ShowIssueViewModel" /> class.
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="board">The board.</param>
 public ShowIssueViewModel(INavigatePage parent, Board board)
     : base(parent)
 {
     _board = board;
     Parents = new ObservableCollection<IssueViewModel>();
     Children = new ObservableCollection<IssueViewModel>();
     Attachments = new ObservableCollection<AttachmentViewModel>();
     Links = new ObservableCollection<LinkViewModel>();
     IsActiveChildren = true;
     IsRootChildren = true;
 }
        public EditIssueViewModelBase(INavigatePage parent, Board board)
            : base(parent)
        {
            _parent = parent;
            _board = board;
            Attachments = new ObservableCollection<AttachmentViewModel>();
            Links = new ObservableCollection<LinkViewModel>();
            FilePaths = new Dictionary<string, string>();
            SubmitHeader = "Submit";

            ParentsViewModel = new EditRelationViewModel();
            ChildrenViewModel = new EditRelationViewModel();

            ParentsViewModel.AddCommand = new DelegateCommand<IssueViewModel>(AddParent, ParentsViewModel.CanAdd);
            ParentsViewModel.RemoveCommand = new DelegateCommand<IssueViewModel>(RemoveParent);
            ParentsViewModel.SearchCommand = new DelegateCommand(ParentSearch);

            ChildrenViewModel.AddCommand = new DelegateCommand<IssueViewModel>(AddChild, ChildrenViewModel.CanAdd);
            ChildrenViewModel.RemoveCommand = new DelegateCommand<IssueViewModel>(RemoveChild);
            ChildrenViewModel.SearchCommand = new DelegateCommand(ChildSearch);
        }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EditIssueViewModel" /> class.
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="board">The board.</param>
 public EditIssueViewModel(INavigatePage parent, Board board)
     : base(parent, board)
 {
     SubmitHeader = (string) Application.Current.FindResource("EditHeader");
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EditIssueViewModelBase" /> class.
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="board">The board.</param>
 public EditIssueViewModelBase(INavigatePage parent, Board board)
     : base(parent)
 {
     _parent = parent;
     _board = board;
     Issues = new ObservableCollection<IssueViewModel>();
     ParentIssues = new ObservableCollection<IssueViewModel>();
     Attachments = new ObservableCollection<AttachmentViewModel>();
     Links = new ObservableCollection<LinkViewModel>();
     FilePaths = new Dictionary<string, string>();
     SubmitHeader = "Submit";
 }