Пример #1
0
 /// <summary>
 /// Import a configuration from dropbox
 /// </summary>
 /// <param name="sender">Sender.</param>
 partial void ImportConfiguration(NSObject sender)
 {
     DBChooser.DefaultChooser.OpenChooser(DBChooserLinkType.Direct, this, async(results) => {
         if (results == null)
         {
             // results is null if the user cancels
             //new UIAlertView ("Cancelled", "User cancelled!", null, "Continue").Show ();
         }
         else
         {
             var confs = await ConfigsEngine.ImportFile(results[0].Link.ToString(), results[0].Name);
             InvokeOnMainThread(() => {
                 new UIAlertView("Import", confs, null, "Ok".Localize()).Show();
             });
         }
     });
 }
Пример #2
0
 private async void OnConfigSelected(RepoConfig config)
 {
     string configZipFile = await ConfigsEngine.ImportFile(config.Path, config.Name);
 }