Beispiel #1
0
 public void updateCategories(Thought t)
 {
     if (!cbx_cats.Items.Contains(t.getCategory()))
     {
         cbx_cats.Items.Add(t.getCategory());
     }
 }
Beispiel #2
0
        public ThoughtInfo(ref ListViewItem inView, ref tQueue inThoughtList, MainWindow mainForm)
        {
            InitializeComponent();

            item = inView;
            displayed = (Thought)item.Tag;
            queue = inThoughtList;

            txt_Title.Text = displayed.getTitle();
            txt_Description.Text = displayed.getDescription();
            txt_Created.Text = displayed.getTimeCreated().ToShortTimeString();
            cbx_cat.Text = displayed.getCategory();
            foreach (String el in inThoughtList.categories)
            {
                cbx_cat.Items.Add(el);
            }
            this.mainForm = mainForm;

            if (displayed.tState == thought_state.archived)
            {
                btnArchive.Enabled = false;
            }
            this.Text = "Thought Info -- " + displayed.getTitle();
        }