// Constructor
		public MainPage()
		{
			InitializeComponent();

			if (string.IsNullOrWhiteSpace(ConnectionSettings.EverliveApiKey) || ConnectionSettings.EverliveApiKey == "your-api-key-here")
			{
				MessageBox.Show("Hi there!\n\nBefore you can use this demo, you must insert your API key in the code.\n\nPlease go to ConnectionSettings.cs and put the API key for your Everlive application.", "API Key needed", MessageBoxButton.OK);
				this.ContentPanel.Visibility = Visibility.Collapsed;
				ConnectionSettings.ThrowError();
			}
			else
			{
				//Initialize the connection to the Everlive service
				var settings = new EverliveAppSettings()
				{
					ApiKey = ConnectionSettings.EverliveApiKey,
					UseHttps = ConnectionSettings.EverliveUseHttps,
					DateTimeUnspecifiedHandling = DateTimeUnspecifiedHandling.TreatAsUtc
				};
				if (!string.IsNullOrWhiteSpace(ConnectionSettings.EverliveHost)) settings.ServiceUrl = ConnectionSettings.EverliveHost;
				this.app = new EverliveApp(settings);

				//initialize progress indicator
				prog = new ProgressIndicator();
				prog.IsVisible = false;
				prog.IsIndeterminate = true;
				SystemTray.SetProgressIndicator(this, prog);

				this.OnPushDisabled();
			}
		}
 public TelerikBackendServicesUploadProvider(string apiKey, bool useHttps = false)
 {
     EverliveAppSettings settings = new EverliveAppSettings();
     settings.ServiceUrl = "api.everlive.com";
     settings.ApiKey = apiKey;
     settings.UseHttps = useHttps;
     this.application = new EverliveApp(settings);
 }
        public TelerikBackendServicesUploadProvider(string apiKey, bool useHttps = false)
        {
            EverliveAppSettings settings = new EverliveAppSettings();

            settings.ServiceUrl = "api.everlive.com";
            settings.ApiKey     = apiKey;
            settings.UseHttps   = useHttps;
            this.application    = new EverliveApp(settings);
        }
Exemple #4
0
        public BizJetsViewModel()
        {
            EverliveAppSettings appSettings = new EverliveAppSettings()
            {
                AppId = BSAppId, UseHttps = true
            };

            ELHandle = new EverliveApp(appSettings);
        }
 internal static IEnumerable<string> ListFiles(string apiKey)
 {
     EverliveAppSettings settings = new EverliveAppSettings();
     settings.ServiceUrl = "api.everlive.com";
     settings.ApiKey = apiKey;
     var application = new EverliveApp(settings);
     AppHandler currentAppHandler = application.WorkWith();
     var files = currentAppHandler.Files().GetAll().ExecuteSync();
     return files.Select(f => f.Filename);
 }
        internal static IEnumerable <string> ListFiles(string apiKey)
        {
            EverliveAppSettings settings = new EverliveAppSettings();

            settings.ServiceUrl = "api.everlive.com";
            settings.ApiKey     = apiKey;
            var        application       = new EverliveApp(settings);
            AppHandler currentAppHandler = application.WorkWith();
            var        files             = currentAppHandler.Files().GetAll().ExecuteSync();

            return(files.Select(f => f.Filename));
        }