private void connectButton_Click(object sender, EventArgs e)
 {
     try
     {
         uint appId;
         if (string.IsNullOrWhiteSpace(appIdTextBox.Text))
         {
             MessageBox.Show(this, "Please enter an App ID.", "Failed to connect", MessageBoxButtons.OK, MessageBoxIcon.Error);
             return;
         }
         if (!uint.TryParse(appIdTextBox.Text.Trim(), out appId))
         {
             MessageBox.Show(this, "Please make sure the App ID you entered is valid.", "Failed to connect", MessageBoxButtons.OK, MessageBoxIcon.Error);
             return;
         }
         storage = RemoteStorage.CreateInstance(uint.Parse(appIdTextBox.Text));
         //storage = new RemoteStorageLocal("remote", uint.Parse(appIdTextBox.Text));
         refreshButton.Enabled = true;
         refreshButton_Click(this, EventArgs.Empty);
     }
     catch (Exception ex)
     {
         MessageBox.Show(this, ex.ToString(), "Failed to connect", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Example #2
0
 	public SingleQueryRunner(IRemoteStorage remoteStorage, ConcurrentDictionary<string, AbstractViewGenerator> queryCache, string basePath)
     {
         this.remoteStorage = remoteStorage;
 		this.basePath = basePath;
 		this.queryCache = queryCache;
     }
Example #3
0
 public void Initialize(Type remoteStorageType, object state)
 {
     remoteStorage = (IRemoteStorage)Activator.CreateInstance(remoteStorageType, state);
 }