Beispiel #1
0
        private void удалитьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.metroListView1.SelectedItems.Count == 0)
            {
                return;
            }

            var item = this.metroListView1.SelectedItems[0];

            SignaturesDB.Delete((VirusInfo)item.Tag);
            SignaturesDB.UpdateList(this.metroListView1);

            btn_ApplyChanges.Visible = true;
        }
Beispiel #2
0
        private void добавитьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var form = new AddNewSignatureForm();

            form.ShowDialog();

            if (form.Add)
            {
                var type = VirusType.Unknown;
                Enum.TryParse <VirusType>(form.TypeComboBox.Text, out type);

                SignaturesDB.Add(
                    type,
                    form.metroTextBox_NAME.Text,
                    form.signature
                    );

                SignaturesDB.UpdateList(this.metroListView1);
                btn_ApplyChanges.Visible = true;
            }
        }
Beispiel #3
0
 private void Editor_Shown(object sender, EventArgs e)
 {
     SignaturesDB.UpdateList(this.metroListView1);
 }