private void ButtonAddTag_Click(object sender, EventArgs e) { string tag = comboBoxTagSelector.Text; if (!listBoxTags.Items.Contains(tag)) { TagCatalog.GetCatalog().AddArtifactTag(tag); TagCatalog.GetCatalog().Save(); listBoxTags.Items.Add(tag); FillTagSelector(); } else { MessageBox.Show("Tag schon vorhanden."); } }
public void TagCatalogSingletonTest() { //I dette testscenarie vil vi vurdere vores tagcatalogSingleton fungerer optimalt, //Altsaa at vi kan ekstrahere de hardcodede tags det indeholder //Arrange TagCatalog TestTagCatalog = TagCatalog.Instance; Tag TestTag = TestTagCatalog.Tags["Johnson"]; //Act //Assert Assert.AreSame(TestTag, TestTagCatalog.Tags["Johnson"]); }
private void beendenToolStripMenuItem_Click(object sender, EventArgs e) { TagCatalog.GetCatalog().Save(); this.Close(); }
private void FillTagSelector() { comboBoxTagSelector.Items.Clear(); comboBoxTagSelector.Items.AddRange(TagCatalog.GetCatalog().GetArtifactTags().ToArray()); }
private void Form1_Load(object sender, EventArgs e) { Hermes.DebugLevel = 5; UpdateAllFormData(); TagCatalog.GetCatalog(); }