Ejemplo n.º 1
0
        private void OnRenameConfig(object sender, EventArgs e)
        {
            if (ConfigList.SelectedCells.Count == 0)
            {
                return;
            }

            int index = ConfigList.SelectedCells[0].RowIndex;

            RenameConfigWin ren = new RenameConfigWin();

            ren.ConfigName = Configs[index].Name;

            if (ren.ShowDialog() == DialogResult.OK)
            {
                if (string.IsNullOrEmpty(ren.ConfigName))
                {
                    MessageBox.Show("Config name can not be empty", "Error", MessageBoxButtons.OK);
                    return;
                }

                Configs[index].Name = ren.ConfigName;
                DisplayConfigs();
            }
        }
Ejemplo n.º 2
0
        private void OnRenameConfig(object sender, EventArgs e)
        {
            if (ConfigList.SelectedCells.Count == 0)
                return;

            int index = ConfigList.SelectedCells[0].RowIndex;

            RenameConfigWin ren = new RenameConfigWin();
            ren.ConfigName = Configs[index].Name;

            if (ren.ShowDialog() == DialogResult.OK)
            {
                if (string.IsNullOrEmpty(ren.ConfigName))
                {
                    MessageBox.Show("Config name can not be empty", "Error", MessageBoxButtons.OK);
                    return;
                }

                Configs[index].Name = ren.ConfigName;
                DisplayConfigs();
            }
        }