private void buttonAddPicasaButton_Click(object sender, EventArgs e) { CreatePicasaButtonForm createPicasaButtonForm = new CreatePicasaButtonForm(_appSettingsDir); createPicasaButtonForm.ShowDialog(); if (createPicasaButtonForm.DialogResult == DialogResult.OK) { _settings.picasaButtons.ButtonList.Add(createPicasaButtonForm.PicasaButton); this.ReFillPicasaButtonList(); } }
private void buttonEditPicasaButton_Click(object sender, EventArgs e) { if (listBoxPicasaButtons.SelectedIndex == -1 || listBoxPicasaButtons.SelectedIndex >= _settings.picasaButtons.ButtonList.Count) { MessageBox.Show("Please choose a picasa button from the list first"); return; } PicasaButton curButton = _settings.picasaButtons.ButtonList[listBoxPicasaButtons.SelectedIndex]; CreatePicasaButtonForm createPicasaButtonForm = new CreatePicasaButtonForm(curButton, _appSettingsDir); createPicasaButtonForm.ShowDialog(); if (createPicasaButtonForm.DialogResult == DialogResult.OK) { _settings.picasaButtons.ButtonList[listBoxPicasaButtons.SelectedIndex] = createPicasaButtonForm.PicasaButton; this.ReFillPicasaButtonList(); } }