private void SyncButton_Click(object sender, EventArgs e) { DialogResult result; if (NewAlbumRadioButton.Checked) { if (AlbumNameTextBox.Text.Length == 0) { MessageBox.Show(WinFormStrings.BlankAlbumNameStrRes); return; } GlobalClass.NewAlbumName = AlbumNameTextBox.Text.Trim(); GlobalClass.NewAlbumDescription = DescriptionTextBox.Text.Trim(); if (NewAlbumParentAlbumComboBox.SelectedIndex == -1) { GlobalClass.NewAlbumNameParentID = -1; } else { GlobalClass.NewAlbumNameParentID = album_list_array[NewAlbumParentAlbumComboBox.SelectedIndex].album_index; } if (AlbumAlreadyExists(NewAlbumParentAlbumComboBox.SelectedIndex)) { MessageBox.Show(WinFormStrings.AlbumExistsStrRes); return; } Form StatusForm = new StatusForm(constants.COMMAND_NEW_ALBUM, command_line_args); result = StatusForm.ShowDialog(); StatusForm.Close(); if (result == DialogResult.No) { MessageBox.Show(GlobalClass.StatusDialogErrorMessage, WinFormStrings.Picasa2PiwigoErrStrRes, MessageBoxButtons.OK, MessageBoxIcon.Error); } else { MessageBox.Show(WinFormStrings.AddNewCompleteStrRes); } Application.Exit(); } if (AddTopAlbumCheckbox.Checked) { if (AddToAlbumComboBox.SelectedIndex == -1) { MessageBox.Show(WinFormStrings.NoAlbumSelectedStrRes); return; } GlobalClass.AddAlbumCategoryID = album_list_array[AddToAlbumComboBox.SelectedIndex].album_index; Form StatusForm = new StatusForm(constants.COMMAND_ADD_TO_ALBUM, command_line_args); result = StatusForm.ShowDialog(); StatusForm.Close(); if (result == DialogResult.No) { MessageBox.Show(GlobalClass.StatusDialogErrorMessage, WinFormStrings.Picasa2PiwigoErrStrRes, MessageBoxButtons.OK, MessageBoxIcon.Error); } else { MessageBox.Show(WinFormStrings.AddToAlbumStrRes); } Application.Exit(); } }
public void LoginBuildAlbumList() { DialogResult result; Form StatusForm = new StatusForm(constants.COMMAND_START_UP, command_line_args); result = StatusForm.ShowDialog(); StatusForm.Close(); if (result == DialogResult.No) { MessageBox.Show(GlobalClass.StatusDialogErrorMessage, WinFormStrings.Picasa2PiwigoErrStrRes, MessageBoxButtons.OK, MessageBoxIcon.Error); } AlbumList = GlobalClass.AlbumList; //build album list BuildAlbumList(AlbumList); }