Example #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = 13;
         hashCode = (hashCode * 17) ^ TypeOfFileSearch.GetHashCode();
         hashCode = (hashCode * 17) ^ FileNames?.GetHashCode() ?? 5;
         hashCode = (hashCode * 17) ^ IgnoreFilePattern?.GetHashCode() ?? 5;
         hashCode = (hashCode * 17) ^ TypeOfSearch.GetHashCode();
         hashCode = (hashCode * 17) ^ SearchPattern?.GetHashCode() ?? 5;
         hashCode = (hashCode * 17) ^ ReplacePattern?.GetHashCode() ?? 5;
         hashCode = (hashCode * 17) ^ CaseSensitive.GetHashCode();
         hashCode = (hashCode * 17) ^ WholeWord.GetHashCode();
         hashCode = (hashCode * 17) ^ Multiline.GetHashCode();
         hashCode = (hashCode * 17) ^ Singleline.GetHashCode();
         hashCode = (hashCode * 17) ^ BooleanOperators.GetHashCode();
         hashCode = (hashCode * 17) ^ IncludeSubfolders.GetHashCode();
         hashCode = (hashCode * 17) ^ IncludeHiddenFiles.GetHashCode();
         hashCode = (hashCode * 17) ^ IncludeBinaryFiles.GetHashCode();
         hashCode = (hashCode * 17) ^ MaxSubfolderDepth.GetHashCode();
         hashCode = (hashCode * 17) ^ UseGitignore.GetHashCode();
         hashCode = (hashCode * 17) ^ IncludeArchive.GetHashCode();
         hashCode = (hashCode * 17) ^ FollowSymlinks.GetHashCode();
         hashCode = (hashCode * 17) ^ CodePage.GetHashCode();
         return(hashCode);
     }
 }
Example #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = 13;
         hashCode = (hashCode * 17) ^ TypeOfFileSearch.GetHashCode();
         hashCode = (hashCode * 17) ^ FilePattern?.GetHashCode() ?? 5;
         hashCode = (hashCode * 17) ^ IgnoreFilePattern?.GetHashCode() ?? 5;
         hashCode = (hashCode * 17) ^ TypeOfSearch.GetHashCode();
         hashCode = (hashCode * 17) ^ SearchFor?.GetHashCode() ?? 5;
         hashCode = (hashCode * 17) ^ ReplaceWith?.GetHashCode() ?? 5;
         hashCode = (hashCode * 17) ^ CaseSensitive.GetHashCode();
         hashCode = (hashCode * 17) ^ WholeWord.GetHashCode();
         hashCode = (hashCode * 17) ^ Multiline.GetHashCode();
         hashCode = (hashCode * 17) ^ Singleline.GetHashCode();
         hashCode = (hashCode * 17) ^ BooleanOperators.GetHashCode();
         hashCode = (hashCode * 17) ^ IncludeSubfolders.GetHashCode();
         hashCode = (hashCode * 17) ^ IncludeHidden.GetHashCode();
         hashCode = (hashCode * 17) ^ IncludeBinary.GetHashCode();
         hashCode = (hashCode * 17) ^ MaxSubfolderDepth.GetHashCode();
         hashCode = (hashCode * 17) ^ UseGitignore.GetHashCode();
         hashCode = (hashCode * 17) ^ SkipRemoteCloudStorageFiles.GetHashCode();
         hashCode = (hashCode * 17) ^ IncludeArchive.GetHashCode();
         hashCode = (hashCode * 17) ^ FollowSymlinks.GetHashCode();
         hashCode = (hashCode * 17) ^ CodePage.GetHashCode();
         hashCode = (hashCode * 17) ^ ApplyFileSourceFilters.GetHashCode();
         hashCode = (hashCode * 17) ^ ApplyFilePropertyFilters.GetHashCode();
         hashCode = (hashCode * 17) ^ ApplyContentSearchFilters.GetHashCode();
         return(hashCode);
     }
 }
Example #3
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.Append("Skyline file: ").AppendLine(SkylineFilePath);
            sb.Append("Folder to watch: ").AppendLine(FolderToWatch);
            sb.Append("Include subfolders: ").AppendLine(IncludeSubfolders.ToString());
            sb.AppendLine(QcFileFilter.ToString());
            sb.Append("Instrument: ").AppendLine(InstrumentType);
            sb.Append("Results window: ").Append(ResultsWindow.ToString()).AppendLine(" days");
            sb.Append("Acquisition time: ").Append(AcquisitionTime.ToString()).AppendLine(" minutes");
            return(sb.ToString());
        }
Example #4
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (SkylineFilePath != null ? SkylineFilePath.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (FolderToWatch != null ? FolderToWatch.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IncludeSubfolders.GetHashCode();
         hashCode = (hashCode * 397) ^ (QcFileFilter != null ? QcFileFilter.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ ResultsWindow;
         hashCode = (hashCode * 397) ^ (InstrumentType != null ? InstrumentType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ AcquisitionTime;
         hashCode = (hashCode * 397) ^ LastAcquiredFileDate.GetHashCode();
         return(hashCode);
     }
 }
Example #5
0
        public void UpdateSettings()
        {
            Log.Debug("Begin saving app settings");

            var configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);

            configuration.AppSettings.Settings[nameof(AtolOnlineINN)].Value = AtolOnlineINN;
            Log.Trace($"{nameof(AtolOnlineINN)}='{AtolOnlineINN}'");

            configuration.AppSettings.Settings[nameof(AtolOnlineGroupID)].Value = AtolOnlineGroupID;
            Log.Trace($"{nameof(AtolOnlineGroupID)}='{AtolOnlineGroupID}'");

            configuration.AppSettings.Settings[nameof(AtolOnlineHostname)].Value = AtolOnlineHostname;
            Log.Trace($"{nameof(AtolOnlineHostname)}='{AtolOnlineHostname}'");

            configuration.AppSettings.Settings[nameof(AtolOnlineLogin)].Value = AtolOnlineLogin;
            Log.Trace($"{nameof(AtolOnlineLogin)}='{AtolOnlineLogin}'");

            configuration.AppSettings.Settings[nameof(AtolOnlinePassword)].Value = AtolOnlinePassword;
            Log.Trace($"{nameof(AtolOnlinePassword)}='{AtolOnlinePassword}'");

            configuration.AppSettings.Settings[nameof(AtolOnlineDelay)].Value = AtolOnlineDelay.ToString();
            Log.Trace($"{nameof(AtolOnlineDelay)}='{AtolOnlineDelay}'");

            configuration.AppSettings.Settings[nameof(ServerAddress)].Value = ServerAddress;
            Log.Trace($"{nameof(ServerAddress)}='{ServerAddress}'");

            configuration.AppSettings.Settings[nameof(ServerPort)].Value = ServerPort.ToString();
            Log.Trace($"{nameof(ServerPort)}='{ServerPort}'");

            configuration.AppSettings.Settings[nameof(ServerLogin)].Value = ServerLogin;
            Log.Trace($"{nameof(ServerLogin)}='{ServerLogin}'");

            configuration.AppSettings.Settings[nameof(ServerPassword)].Value = ServerPassword;
            Log.Trace($"{nameof(ServerPassword)}='{ServerPassword}'");

            configuration.AppSettings.Settings[nameof(CashierName)].Value = CashierName;
            Log.Trace($"{nameof(CashierName)}='{CashierName}'");

            configuration.AppSettings.Settings[nameof(CashierVatin)].Value = CashierVatin;
            Log.Trace($"{nameof(CashierVatin)}='{CashierVatin}'");

            configuration.AppSettings.Settings[nameof(CompanyMail)].Value = CompanyMail;
            Log.Trace($"{nameof(CompanyMail)}='{CompanyMail}'");

            configuration.AppSettings.Settings[nameof(ServerDeviceId)].Value = ServerDeviceId.ToString();
            Log.Trace($"{nameof(ServerDeviceId)}='{ServerDeviceId}'");

            configuration.AppSettings.Settings[nameof(FolderPath)].Value = FolderPath;
            Log.Trace($"{nameof(FolderPath)}='{FolderPath}'");

            configuration.AppSettings.Settings[nameof(IncludeSubfolders)].Value = IncludeSubfolders.ToString();
            Log.Trace($"{nameof(IncludeSubfolders)}='{IncludeSubfolders}'");

            configuration.AppSettings.Settings[nameof(AtolHost)].Value = AtolHost;
            Log.Trace($"{nameof(AtolHost)}='{AtolHost}'");

            configuration.AppSettings.Settings[nameof(DefaultPositionName)].Value = DefaultPositionName;
            Log.Trace($"{nameof(DefaultPositionName)}='{DefaultPositionName}'");

            configuration.AppSettings.Settings[nameof(PositionEnabled)].Value = PositionEnabled.ToString();
            Log.Trace($"{nameof(PositionEnabled)}='{PositionEnabled}'");

            configuration.AppSettings.Settings[nameof(AutosumEnabled)].Value = AutosumEnabled.ToString();
            Log.Trace($"{nameof(AutosumEnabled)}='{AutosumEnabled}'");

            configuration.AppSettings.Settings[nameof(ForceAutosumEnabled)].Value = ForceAutosumEnabled.ToString();
            Log.Trace($"{nameof(ForceAutosumEnabled)}='{ForceAutosumEnabled}'");

            configuration.Save(ConfigurationSaveMode.Full, true);
            ConfigurationManager.RefreshSection("appSettings");
            Log.Debug("End saving app settings");
            Log.Info("Настройки сохранены!");
        }