Exemplo n.º 1
0
        private void PropertiesButton_Click(object sender, EventArgs e)
        {
            if (NetworksGridView.SelectedRows.Count <= 0)
                return;

            NetworkListViewItem selectedItem = ((NetworkListViewItem)NetworksGridView.SelectedRows[0]);

            VIFDialog dialog = new VIFDialog(Connection, selectedItem.Vif, selectedItem.Index);
            if (dialog.ShowDialog() != DialogResult.OK)
                return;

            selectedItem.Vif = dialog.NewVif();
            selectedItem.UpdateDetails();

            UpdateEnablement();
        }
Exemplo n.º 2
0
        private void AddButton_Click(object sender, EventArgs e)
        {
            VIFDialog dialog = new VIFDialog(Connection, null, NetworksGridView.Rows.Count);
            if (dialog.ShowDialog() != DialogResult.OK)
                return;

            NetworksGridView.Rows.Add(new NetworkListViewItem(Connection, dialog.NewVif(), NetworksGridView.Rows.Count, true));
            UpdateEnablement();
        }