protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            this.proj = e.Parameter as ChaoticaProject;

            this.c_ProjectID.Text = "Project ID: " + this.proj.ID;
            this.xTitle.Text      = this.proj.Title;
        }
        private void c_ProjectsPanel_ItemClick(object sender, ItemClickEventArgs e)
        {
            //Enable edit button on project selection
            this.c_EditProject.IsEnabled = true;
            this.p_Selector.Width        = 100;

            ChaoticaProject selectedProj = (ChaoticaProject)e.ClickedItem;

            this.MyBugs.Clear();

            selectedProj.LoadBugList(selectedProj);
            foreach (ChaoticaBug b in selectedProj.Bugs)
            {
                this.MyBugs.Add(b);
            }
        }
Пример #3
0
        public void LoadBugList(ChaoticaProject proj)
        {
            //Clear bug list
            this.Bugs.Clear();

            //MySQL Query
            MySqlDataReader reader = ChaoticaDBManager.Query("SELECT * FROM `bugs` WHERE PID = '" + this.ID + "';");

            //Loop Tables
            while (reader.Read())
            {
                //Add Project [Get Project Title]
                this.AddBug(new ChaoticaBug(reader.GetString("ID"), reader.GetString("Title"), reader.GetString("Description"), reader.GetString("TimeStamp"), reader.GetInt32("Priority"), reader.GetBoolean("Resolved"), proj));
            }

            //Close reader
            reader.Close();
        }
        private void c_EditProject_Click(object sender, RoutedEventArgs e)
        {
            ChaoticaProject selectedProject = (ChaoticaProject)this.c_ProjectsPanel.Items.ElementAt(this.c_ProjectsPanel.SelectedIndex);

            var newWindow  = Window.Current;
            var newAppView = ApplicationView.GetForCurrentView();

            newAppView.Title = "Create Project";

            var frame = new Frame();

            frame.Navigate(typeof(X_EditProject), selectedProject);
            newWindow.Content = frame;
            newWindow.Activate();


            //frame.Unloaded += new RoutedEventHandler(RefProj_WinClose);
            this.GotFocus += new RoutedEventHandler(RefProj_WinClose);
        }
        public ChaoticaBug(String _id, String _title, String _description, String _timestamp, int _priority, bool _resolved, ChaoticaProject proj)
        {
            Comments = new ObservableCollection <ChaoticaComment>();

            this.ID          = _id;
            this.Title       = _title;
            this.Description = _description;
            this.TimeStamp   = _timestamp;
            this.Priority    = _priority;
            this.Resolved    = _resolved;
            this.Project     = proj;
        }