Esempio n. 1
0
 public static void DisplayInfo()
 {
     try
     {
         foreach (string str in SelfHelpManager.GetScriptInfo())
         {
             PrintCentered(str);
         }
     }
     catch (Exception ex) { Debug.WriteLine(ex); }
 }
Esempio n. 2
0
 public static void ClearCredentials()
 {
     try
     {
         var res = SelfHelpManager.ClearCredentials().Result;
         printTaskResult(res.ToString(), res.IsSuccess);
     }
     catch (Exception ex)
     {
         PrintErrorCentered(ex.Message);
     }
 }
Esempio n. 3
0
 public static void UpdateDeploymentVersionNumber(int VersionNumber)
 {
     try
     {
         var res = SelfHelpManager.UpdateDeploymentVersionNumber(VersionNumber).Result;
         printTaskResult(res.ToString(), res.IsSuccess);
     }
     catch (Exception ex)
     {
         PrintErrorCentered(ex.Message);
     }
 }
Esempio n. 4
0
 public static void CreateManifestFile()
 {
     try
     {
         var res = SelfHelpManager.CreateNewAppsScriptManifestJSONFile().Result;
         printTaskResult(res.ToString(), res.IsSuccess);
     }
     catch (Exception ex)
     {
         PrintErrorCentered(ex.Message);
     }
 }
Esempio n. 5
0
 public static void CreateSourceCodeFile(string Name, SelfHelpManager.FILE_TYPES F, bool Sync)
 {
     try
     {
         var res = SelfHelpManager.AddNewSourceFile(Name, F, Sync).Result;
         printTaskResult(res.ToString(), res.IsSuccess);
     }
     catch (Exception ex)
     {
         PrintErrorCentered(ex.Message);
     }
 }
Esempio n. 6
0
 public static void DownloadSelfHelpSourceCode()
 {
     try
     {
         var res = SelfHelpManager.DownloadSelfHelpSourceFiles().Result;
         printTaskResult(res.ToString(), res.IsSuccess);
     }
     catch (Exception ex)
     {
         PrintErrorCentered(ex.Message);
     }
 }
Esempio n. 7
0
 public static void DownloadFilesVersion(int VersionNumber)
 {
     try
     {
         var res = SelfHelpManager.DownloadFiles(VersionNumber).Result;
         printTaskResult(res.ToString(), res.IsSuccess);
     }
     catch (Exception ex)
     {
         PrintErrorCentered(ex.Message);
     }
 }
Esempio n. 8
0
 public static void CreateGASProject(string Name)
 {
     try
     {
         var res = SelfHelpManager.CreateNewGASProject(Name).Result;
         printTaskResult(res.ToString(), res.IsSuccess);
     }
     catch (Exception ex)
     {
         PrintErrorCentered(ex.Message);
     }
 }
Esempio n. 9
0
 public static void InitializeLibrary()
 {
     try
     {
         var res = SelfHelpManager.Initialize(SourceCode).Result;
         printTaskResult(res.ToString(), res.IsSuccess);
         DisplayInfo();
     }
     catch (Exception ex)
     {
         PrintErrorCentered(ex.Message);
     }
 }
Esempio n. 10
0
 public static bool CreateNewVersionAndUpdateDeployment(string Description)
 {
     try
     {
         var res = SelfHelpManager.CreateNewVersionAndUpdateDeployment(Description).Result;
         printTaskResult(res.ToString(), res.IsSuccess);
         return(res.IsSuccess);
     }
     catch (Exception ex)
     {
         PrintErrorCentered(ex.Message);
         return(false);
     }
 }
Esempio n. 11
0
 public static bool VersionBackupThenUploadFiles()
 {
     try
     {
         var res = SelfHelpManager.PreVersionAndSyncChanges().Result;
         printTaskResult(res.ToString(), res.IsSuccess);
         return(res.IsSuccess);
     }
     catch (Exception ex)
     {
         PrintErrorCentered(ex.Message);
         return(false);
     }
 }
Esempio n. 12
0
        public static void GetWatchers()
        {
            if (AutoSync && watchers == null)
            {
                watchers = SelfHelpManager.GetWatchers();

                watchers?.ForEach(fw =>
                {
                    fw.NotifyFilter = System.IO.NotifyFilters.LastWrite;
                    fw.Changed     += fw_Changed;

                    fw.EnableRaisingEvents = true;
                });
            }
        }
Esempio n. 13
0
 /// <summary>
 /// Lists the versions of your project
 /// </summary>
 /// <returns>Boolean representing the success of this execution.</returns>
 public static bool ListProjectVersions()
 {
     try
     {
         var result = SelfHelpManager.ListVersions().Result;
         if (result.IsSuccess)
         {
             versions = result.MyResult;
             result.MyResult?.ForEach(v => PrintCentered(string.Format(" Version #{0}, Create Time {1}, Description {2}", v.VersionNumber, v.CreateTime, v.Description)));
             return(true);
         }
         else
         {
             PrintErrorCentered(result.AdditionalInformation);
             return(false);
         }
     }
     catch (Exception ex)
     {
         PrintErrorCentered(ex.Message);
         return(false);
     }
 }