public TechnicalTaskContent(TabItemParent mainTabItem, TechnicalTask technicalTask) : base(mainTabItem) { InitializeComponent(); if (technicalTask == null) // control for output => technical task cannot be null { throw new ArgumentNullException(); } DataContext = this.technicalTask = technicalTask; }
public EditProfileContent(TabItemParent mainTabItem) : base(mainTabItem) { InitializeComponent(); if (MainTabItem.MainWindow.User == null) { throw new NullReferenceException("User is not authenticated"); } this.DataContext = this.user = MainTabItem.MainWindow.User; }
public EditSampleSiteContent(TabItemParent mainTabItem, SampleSite sampleSite = null) : base(mainTabItem) { InitializeComponent(); if (sampleSite == null) { sampleSite = new SampleSite(); createFlag = true; } this.DataContext = this.sampleSite = sampleSite; }
public SiteLayoutPossibleListContent(TabItemParent mainTabItem, Logbook logbook) : base(mainTabItem) { InitializeComponent(); if (logbook == null) { throw new ArgumentNullException(); } this.DataContext = this.logbook = logbook; Update(); }
public DemandContent(TabItemParent mainTabItem, Demand demand) : base(mainTabItem) { InitializeComponent(); if (demand == null) { throw new ArgumentNullException(); } DataContext = this.demand = demand; Update(); }
public EditTechnicalTaskContent(TabItemParent mainTabItem, TechnicalTask technicalTask = null) : base(mainTabItem) { InitializeComponent(); if (technicalTask == null) { technicalTask = new TechnicalTask(); ButtonDelete.Visibility = Visibility.Collapsed; ButtonAddDemand.Visibility = Visibility.Collapsed; BorderTogglePopup.IsEnabled = false; createFlag = true; } this.DataContext = this.technicalTask = technicalTask; Update(); }
public EditUserContent(TabItemParent mainTabItem, User user = null) : base(mainTabItem) { InitializeComponent(); if (user == null) { user = new User(); createFlag = true; buttonPasswordChange.Content = "Установить пароль"; } this.DataContext = this.user = user; if (user.isAdministrator) { buttonPasswordChange.Visibility = Visibility.Hidden; } }
public EditSiteLayoutContent(TabItemParent mainTabItem, Logbook logbook, SiteLayout siteLayout = null) : base(mainTabItem) { InitializeComponent(); if (logbook == null) { throw new ArgumentNullException(); } if (siteLayout == null) { siteLayout = new SiteLayout(); buttonDelete.Visibility = Visibility.Collapsed; createFlag = true; } this.logbook = logbook; this.DataContext = this.siteLayout = siteLayout; Update(); }
public EditDemandContent(TabItemParent mainTabItem, TechnicalTask technicalTask, Demand demand = null) : base(mainTabItem) { InitializeComponent(); if (demand == null) { createFlag = true; ButtonDelete.Visibility = Visibility.Collapsed; SampleSitesCombobox.Visibility = Visibility.Collapsed; ButtonSaveSite.Visibility = Visibility.Collapsed; demand = new Demand(); } if (technicalTask == null) { throw new ArgumentNullException(); } this.technicalTask = technicalTask; this.DataContext = this.demand = demand; Update(); }
public SiteLayoutWorkContent(TabItemParent mainTabItem, LayoutAccess layoutAccess, SiteLayout siteLayout) : base(mainTabItem) { InitializeComponent(); if (siteLayout == null || layoutAccess == null) { throw new ArgumentNullException(); } this.DataContext = this.siteLayout = siteLayout; this.layoutAccess = layoutAccess; if (!layoutAccess.isOwner) { buttonSiteLayoutEdit.Visibility = Visibility.Collapsed; } else { buttonDenyLayout.Visibility = Visibility.Collapsed; } Update(); }
public ShowTechnicalTaskContent(TabItemParent mainTabItem, TechnicalTask technicalTask, bool isAvaible = false) : base(mainTabItem) { InitializeComponent(); if (technicalTask == null) { throw new ArgumentNullException(); } this.DataContext = this.technicalTask = technicalTask; if (isAvaible) // if task not chosed by user { buttonDemandAdd.Visibility = Visibility.Collapsed; } else { buttonRefuseTechnicalTask.Visibility = Visibility.Collapsed; buttonTechnicalTaskWork.Visibility = Visibility.Collapsed; } }
public MainContentPresenter(TabItemParent mainTabItem) : base(mainTabItem) { InitializeComponent(); Update(); }
public UserListContent(TabItemParent mainTabItem) : base(mainTabItem) { InitializeComponent(); Update(); }
public AvaibleTechnicalTaskListContent(TabItemParent mainTabItem) : base(mainTabItem) { InitializeComponent(); Update(); }
public SampleSiteListContent(TabItemParent mainTabItem) : base(mainTabItem) { InitializeComponent(); Update(); }