Changeset 30536 for extensions/Picasa2Piwigo/Picasa2Piwigo/MainForm.cs
- Timestamp:
- Nov 19, 2014, 4:33:20 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Picasa2Piwigo/Picasa2Piwigo/MainForm.cs
r21241 r30536 51 51 { 52 52 int command_length, i; 53 53 54 byte[] temp_array2 = new byte[2]; 55 string tempstr; 56 57 temp_array2[0] = 0xC3; 58 temp_array2[1] = 0xAF; 59 tempstr = Encoding.UTF8.GetString(temp_array2); 60 61 54 62 this.AddToAlbumGroupbox.Text = WinFormStrings.MFAddToAlbumGroupboxStrRes; 55 63 this.AddTopAlbumCheckbox.Text = WinFormStrings.MFAddTopAlbumCheckboxStrRes; … … 81 89 this.Refresh(); 82 90 91 logit.WriteLog("Program Start up"); 92 83 93 //if no arguments then exit 84 94 if (command_line_args.Length == 0) … … 99 109 } 100 110 111 logit.WriteLog("Reading command line arguments. Length: " + command_length.ToString()); 101 112 AccessComboBox.SelectedIndex = Form1Settings.Default.AccessSetting; 102 113 this.SyncButton.Enabled = true; … … 107 118 DescriptionTextBox.Text = DetermineAlbumDescription(command_line_args[0]); 108 119 109 if (FormSettings.Default.PiwigoUrlSetting.Length == 0 ||110 FormSettings.Default.PicasaContactsLocation.Length == 0)111 {120 if (FormSettings.Default.PiwigoUrlSetting.Length == 0) 121 { 122 logit.WriteLog("Piwigo URL must be configured."); 112 123 MessageBox.Show(WinFormStrings.SetUpConnStrRes, "Picasa2Piwigo"); 124 this.SyncButton.Enabled = false; 113 125 return; 114 126 } 115 127 if (FormSettings.Default.PicasaContactsLocation.Length == 0) 128 { 129 logit.WriteLog("Picasa contacts not set"); 130 } 131 132 if (FormSettings.Default.DebugEnabled) 133 { 134 if (FormSettings.Default.DebugFileLocation.Length < 4) 135 { 136 MessageBox.Show( WinFormStrings.LogPathErrStrRes, "Picasa2Piwigo"); 137 } 138 } 139 140 logit.WriteLog("Going to log in to piwigo."); 116 141 //ok to try to login etc 117 142 LoginBuildAlbumList(); 118 143 144 logit.WriteLog("Populating album list box."); 119 145 //populate album listbox 120 146 PopulateAlbumListBox(); … … 154 180 result = StatusForm.ShowDialog(); 155 181 StatusForm.Close(); 182 183 //bring window to front 184 this.WindowState = FormWindowState.Minimized; 185 this.Show(); 186 this.WindowState = FormWindowState.Normal; 187 156 188 if (result == DialogResult.No) 157 189 { … … 177 209 result = StatusForm.ShowDialog(); 178 210 StatusForm.Close(); 211 212 //bring window to front 213 this.WindowState = FormWindowState.Minimized; 214 this.Show(); 215 this.WindowState = FormWindowState.Normal; 216 179 217 if (result == DialogResult.No) 180 218 { … … 200 238 if (option_form_result == DialogResult.OK) 201 239 { 240 if (FormSettings.Default.DebugEnabled) 241 { 242 if (FormSettings.Default.DebugFileLocation.Length < 4) 243 { 244 MessageBox.Show(WinFormStrings.LogPathErrStrRes, "Picasa2Piwigo"); 245 } 246 } 247 202 248 if (FormSettings.Default.PiwigoUrlSetting.Length != 0 && 203 249 FormSettings.Default.PicasaContactsLocation.Length != 0) … … 239 285 MessageBox.Show(GlobalClass.StatusDialogErrorMessage, WinFormStrings.Picasa2PiwigoErrStrRes, 240 286 MessageBoxButtons.OK, MessageBoxIcon.Error); 287 this.SyncButton.Enabled = false; 241 288 } 242 289 AlbumList = GlobalClass.AlbumList;
Note: See TracChangeset
for help on using the changeset viewer.