Ignore:
Timestamp:
Nov 19, 2014, 4:33:20 PM (10 years ago)
Author:
kenl
Message:

Version 1.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Picasa2Piwigo/Picasa2Piwigo/MainForm.cs

    r21241 r30536  
    5151        {
    5252            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
    5462            this.AddToAlbumGroupbox.Text = WinFormStrings.MFAddToAlbumGroupboxStrRes;
    5563            this.AddTopAlbumCheckbox.Text = WinFormStrings.MFAddTopAlbumCheckboxStrRes;
     
    8189            this.Refresh();
    8290
     91            logit.WriteLog("Program Start up");
     92
    8393            //if no arguments then exit
    8494            if (command_line_args.Length == 0)
     
    99109            }
    100110
     111            logit.WriteLog("Reading command line arguments. Length: " + command_length.ToString());
    101112            AccessComboBox.SelectedIndex = Form1Settings.Default.AccessSetting;
    102113            this.SyncButton.Enabled = true;
     
    107118            DescriptionTextBox.Text = DetermineAlbumDescription(command_line_args[0]);
    108119
    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.");
    112123                MessageBox.Show(WinFormStrings.SetUpConnStrRes, "Picasa2Piwigo");
     124                this.SyncButton.Enabled = false;
    113125                return;
    114126            }
    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.");
    116141            //ok to try to login etc
    117142            LoginBuildAlbumList();
    118143
     144            logit.WriteLog("Populating album list box.");
    119145            //populate album listbox
    120146            PopulateAlbumListBox();
     
    154180                result = StatusForm.ShowDialog();
    155181                StatusForm.Close();
     182
     183                //bring window to front
     184                this.WindowState = FormWindowState.Minimized;
     185                this.Show();
     186                this.WindowState = FormWindowState.Normal;
     187
    156188                if (result == DialogResult.No)
    157189                {
     
    177209                result = StatusForm.ShowDialog();
    178210                StatusForm.Close();
     211
     212                //bring window to front
     213                this.WindowState = FormWindowState.Minimized;
     214                this.Show();
     215                this.WindowState = FormWindowState.Normal;
     216
    179217                if (result == DialogResult.No)
    180218                {
     
    200238            if (option_form_result == DialogResult.OK)
    201239            {
     240                if (FormSettings.Default.DebugEnabled)
     241                {
     242                    if (FormSettings.Default.DebugFileLocation.Length < 4)
     243                    {
     244                        MessageBox.Show(WinFormStrings.LogPathErrStrRes, "Picasa2Piwigo");
     245                    }
     246                }           
     247
    202248                if (FormSettings.Default.PiwigoUrlSetting.Length != 0 &&
    203249                    FormSettings.Default.PicasaContactsLocation.Length != 0)
     
    239285                MessageBox.Show(GlobalClass.StatusDialogErrorMessage, WinFormStrings.Picasa2PiwigoErrStrRes,
    240286                    MessageBoxButtons.OK, MessageBoxIcon.Error);
     287                this.SyncButton.Enabled = false;
    241288            }
    242289            AlbumList = GlobalClass.AlbumList;
Note: See TracChangeset for help on using the changeset viewer.