/// <summary> /// Обновить данные по основному исполняемому файлу в рабочей директории и в релизе /// </summary> /// <returns></returns> public void UpdateMainFileInfo() { MainFileDate = FileOperations.GetChangeDate(MainFilePath); MainFileHash = FileOperations.GetCheckSumm(MainFilePath); MainFileVersion = FileOperations.GetVersion(MainFilePath); MainFileReleaseDate = FileOperations.GetChangeDate(MainFileReleasePath); MainFileReleaseHash = FileOperations.GetCheckSumm(MainFileReleasePath); MainFileReleaseVersion = FileOperations.GetVersion(MainFileReleasePath); UpToDate = (MainFileVersion.Equals(MainFileReleaseVersion) && MainFileHash.Equals(MainFileReleaseHash)); }
/// <summary> /// Обновить данные по основному исполняемому файлу в рабочей директории и в релизе /// </summary> /// <returns></returns> public async Task UpdateMainFileInfoAsync() { Blocked = true; WorkingStatus = "Проверка актуальности приложения в релизе"; await Task.Run(() => { MainFileDate = FileOperations.GetChangeDate(MainFilePath); MainFileHash = FileOperations.GetCheckSumm(MainFilePath); MainFileVersion = FileOperations.GetVersion(MainFilePath); MainFileReleaseDate = FileOperations.GetChangeDate(MainFileReleasePath); MainFileReleaseHash = FileOperations.GetCheckSumm(MainFileReleasePath); MainFileReleaseVersion = FileOperations.GetVersion(MainFileReleasePath); }); GoogleScriptsClass.UpdateSheetsData(new List <ControlledApp>() { this }); UpToDate = (MainFileVersion.Equals(MainFileReleaseVersion) && MainFileHash.Equals(MainFileReleaseHash)); WorkingStatus = ""; Blocked = false; }