private void connectToolStripMenuItem_Click(object sender, EventArgs e) { var d = new FrameConnect(); if (d.ShowDialog() == DialogResult.OK) { cloudType = d.type; if (cloudType == CloudTypeEnum.AWS) { // TODO aws = new AwsDataModel(); } else if (cloudType == CloudTypeEnum.GCP) { try { gcp = new GcpDataModel(); gcp.credentialsFilePath = d.gcpCredsPath; gcp.projectId = d.gcpProjectId; var creds = GoogleCredential.FromFile(gcp.credentialsFilePath); gcp.client = StorageClient.Create(creds); } catch (Exception ex) { MessageBox.Show(ex.Message); } fs = CloudFileSystemIngestor.IngestGcp(gcp); currentDirectoryNode = fs.GetRootNode(); loadListFilesAtDirPath(currentDirectoryNode.AbsolutePath); } } }
public bool Equals(CloudTypeEnum obj) { if ((object)obj == null) { return(false); } return(StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value)); }
private void buttonConnect_Click(object sender, EventArgs e) { // TODO: error checking if (tabControl.SelectedTab == tabAWS) { // TODO type = CloudTypeEnum.AWS; } else if (tabControl.SelectedTab == tabGCP) { type = CloudTypeEnum.GCP; gcpCredsPath = textGCPCredsFilepath.Text; gcpProjectId = textGCPProjectId.Text; } this.DialogResult = DialogResult.OK; this.Close(); }
public WeatherProfile(PrecipitationTypeEnum precipType, CloudTypeEnum cloudType) { PrecipitationType = precipType; CloudType = cloudType; }