コード例 #1
0
        public static string GetVersion()
        {
            var c      = new ConfigOpt(HostInstance.CustomConfig);
            var verOvr = c.OverrideKeePassXcVersion;

            return(string.IsNullOrWhiteSpace(verOvr) ? KeePassXcVersion.ToString() : verOvr);
        }
コード例 #2
0
        public PwDatabase GetConnectionDatabase()
        {
            var options = new ConfigOpt(HostInstance.CustomConfig);

            if (string.IsNullOrEmpty(options.ConnectionDatabaseHash))
            {
                return(HostInstance.Database);
            }
            else
            {
                var document = HostInstance.MainWindow.DocumentManager.Documents.Find(p => GetDbHash(p.Database) == options.ConnectionDatabaseHash);
                if (document != null)
                {
                    return(document.Database);
                }
                else
                {
                    return(HostInstance.Database);
                }
            }
        }
コード例 #3
0
        internal string GetDbHashForMessage()
        {
            var opts = new ConfigOpt(HostInstance.CustomConfig);

            return(GetDbHash(GetConnectionDatabase(), !opts.UseKeePassXcSettings));
        }
コード例 #4
0
 public OptionsForm(ConfigOpt config)
 {
     _config = config;
     InitializeComponent();
 }