private void newSync() { var ftg = Global.Preferences.Brand == Brand.Photomic ? "ftg" : "kngftg"; _sync = new vdFtp( _tp = new TransferProgress(callback), "ftp://ftp.viron.se", string.Format("{0}{1:000}", ftg, Global.Preferences.Fotografnummer), string.Format("{0:000}{1}", Global.Preferences.Fotografnummer, ftg)); //_sync.SimulateBadConnection = true; //_sync.DelayTimeBetweenChunks = 20; }
protected override void OnLoad( EventArgs e ) { base.OnLoad( e ); foreach ( var s in Directory.GetDirectories( Global.Preferences.MainPath ) ) if ( Regex.IsMatch( s, @"_\d{5,6}$" )) _existingOrders.Add(int.Parse(s.Substring(s.LastIndexOf('_') + 1))); ug.setColumnFullWidth( 0 ); ug.subscribeToEvents(); _sync = new vdFtp( _tp = callback, "ftp://ftp.photomic.com/", Global.Preferences.Brand == Brand.Photomic ? "plata" : "kngplata", "h6d9b5" ); _strFtgFolder = string.Format( "ftg{0:000}", Global.Preferences.Fotografnummer ); var w = _sync.getGetFolders(); w.addFolder( _strFtgFolder ); w.addFolder( "_uppdateringar" ); w.addFolder( _strFtgFolder + "/standbylistor" ); w.run(); setMessage( "Hämtar data från Viron...\r\n" ); }