public TabAllIssuesViewModel(Messenger messenger, DialogCoordinator dialogCoordinator, IDataAccess dataAccess)
        {
            this.messenger = messenger;
            this.dialogCoordinator = dialogCoordinator;
            this.dataAccess = dataAccess;

            ShowCloseButton = false;
            TabHeader = "All Issues";
            AllIssues = new List<IssueViewModel>();
            DropdownCommands = CreateListOfDropdownCommands();

            filterTimer = new System.Timers.Timer(1000);
            filterTimer.AutoReset = false;
            filterTimer.Elapsed += (object sender, System.Timers.ElapsedEventArgs e) => RefreshTab();

            AllIssues = dataAccess.GetAllIssues(String.Empty);
        }
Example #2
0
        public TabBugViewModel(Messenger messenger,
                               DialogCoordinator dialogCoordinator,
                               IDataAccess dataAccess,
                               Bug bug,
                               Issue issue)
            : base(issue)
        {
            this.messenger = messenger;
            this.dialogCoordinator = dialogCoordinator;
            this.dataAccess = dataAccess;
            this.Bug = bug;
            this.ID = bug.ID;

            ShowCloseButton = true;
            TabHeader = "Bug #" + IssueID.ToString();
        }
Example #3
0
        public ShellViewModel()
        {
            messenger = new Messenger();
            messenger.closeTab = CloseTab;
            messenger.openIssue = OpenOrLocateIssueInTabs;
            messenger.tabSaveStatusChanged = CurrentTabIsDirty;

            dialogCoordinator = DialogCoordinator.Instance;

            Application.Current.MainWindow.Closing += new CancelEventHandler(MainWindow_Closing);

            dataAccess = new SQLiteController();

            Settings = new SettingsViewModel(dataAccess);

            Tabs = new ObservableCollection<ScreenBase>();
            Tabs.Add(new TabAllIssuesViewModel(messenger, dialogCoordinator, dataAccess));
                        
            SelectedTab = Tabs[0];
        }
Example #4
0
 public TabBugViewModel(Messenger messenger,
                        DialogCoordinator dialogCoordinator,
                        IDataAccess dataAccess)
     : this(messenger, dialogCoordinator, dataAccess,
     new Bug()
     {
         ID = 0,
         VersionFound = "",
         VersionFixed = "",
         DetailedDescription = "",
         StepsToReproduce = "",
         Workaround = "",
         Fix = ""
     }, new Issue()
     {
         IssueID = 0,
         Description = "",
         UserCreated = Environment.UserName,
         UserClosed = "",
         DateCreated = DateTime.Now,
         DateClosed = DateTime.Now,
         PlantContact = "",
         IssueType = (int)eIssueType.Bug,
         IssueState = (int)eIssueState.Open,
         IssueResolution = (int)eIssueResolution.NA,
         Priority = (int)ePriority.Low,
         Severity = (int)eSeverity.Low
     })
 {
     IsDirty = true;
     TabHeader = "New Bug";
 }