private void OnBrowseButtonClicked(object o, EventArgs e) { if( upload == true) { MigrateLocation NewLoc = new MigrateLocation(this, System.IO.Directory.GetCurrentDirectory(), DomainController.GetiFolderService() ); NewLoc.TransientFor = this; int rc = 0; do { rc = NewLoc.Run(); NewLoc.Hide(); if(rc ==(int)ResponseType.Ok) { string selectedFolder = NewLoc.iFolderPath.Trim(); LocationEntry.Text = selectedFolder; NewLoc.Destroy(); NewLoc = null; break; } }while( rc == (int)ResponseType.Ok); } else { FileChooserDialog dlg = new FileChooserDialog("", Util.GS("Select Location..."), null, FileChooserAction.SelectFolder, Stock.Ok, ResponseType.Ok, Stock.Cancel, ResponseType.Cancel); int rc = dlg.Run(); string path = dlg.CurrentFolder; dlg.Hide(); dlg.Destroy(); if( rc == (int)ResponseType.Ok) LocationEntry.Text = path; } }
private void OnBrowseButtonClicked(object o, EventArgs e) { System.IO.DirectoryInfo source = new System.IO.DirectoryInfo(location); string fileName = null; if( copyDir.Active ) { fileName = source.Name; } MigrateLocation NewLoc = new MigrateLocation(this, fileName, ifws ); NewLoc.TransientFor = this; int rc = 0; do { rc = NewLoc.Run(); NewLoc.Hide(); if(rc ==(int)ResponseType.Ok) { string selectedFolder = NewLoc.iFolderPath.Trim(); LocationEntry.Text = selectedFolder; NewLoc.Destroy(); NewLoc = null; break; } }while( rc == (int)ResponseType.Ok); }