static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { DriveApi.GetDriveService(); } catch (Exception) { Application.Run(new ConnectionFailed()); return; } if (Properties.Settings.Default.StayLoggedIn == true) { UserObject.loggedUser.username = Properties.Settings.Default.LoggedUsername; UserObject.loggedUser.iduser = Properties.Settings.Default.LoggedUserId; Application.Run(new Window()); } else { Application.Run(new LoginForm()); } }
IList <Google.Apis.Drive.v3.Data.File> fileList; // Allows files to be referenced by index without storing locally public static DriveApi GetDriveService() { if (_instance == null) { _instance = new DriveApi(); _instance.InitialiseDrive(); } return(_instance); }