Ejemplo n.º 1
0
        private void cbDatabases_SelectedIndexChanged(object sender, EventArgs e)
        {
            HelpDatabaseViewItem item = cbDatabases.SelectedItem as HelpDatabaseViewItem;

            if (item == null)
            {
                viewModel.ActiveDatabase = null;
            }
            else
            {
                viewModel.ActiveDatabase = item.Database;
            }
        }
Ejemplo n.º 2
0
        private void btnRemoveArchive_Click(object sender, EventArgs e)
        {
            int index = cbDatabases.SelectedIndex;

            if (index < 0)
            {
                return;
            }

            HelpDatabaseViewItem item = cbDatabases.Items[index] as HelpDatabaseViewItem;

            viewModel.RemoveDatabase(item.Database);

            if (index < cbDatabases.Items.Count)
            {
                item = cbDatabases.Items[index] as HelpDatabaseViewItem;
                viewModel.ActiveDatabase = item.Database;
            }
        }