Exemplo n.º 1
0
        internal void OnLoad()
        {
            AceMainWindow aceMW  = this.MainWindow;         // m_uiMainWindow might be null
            AceDefaults   aceDef = this.Defaults;           // m_def might be null

            // aceInt.UrlSchemeOverrides.SetDefaultsIfEmpty();

            ObfuscateCred(false);
            ChangePathsRelAbs(true);

            // Remove invalid columns
            List <AceColumn> vColumns = aceMW.EntryListColumns;
            int i = 0;

            while (i < vColumns.Count)
            {
                if (((int)vColumns[i].Type < 0) || ((int)vColumns[i].Type >=
                                                    (int)AceColumnType.Count))
                {
                    vColumns.RemoveAt(i);
                }
                else
                {
                    ++i;
                }
            }

            SearchUtil.FinishDeserialize(aceDef.SearchParameters);
            DpiScale();

            if (aceMW.EscMinimizesToTray)            // For backward compatibility
            {
                aceMW.EscMinimizesToTray = false;    // Default value
                aceMW.EscAction          = AceEscAction.MinimizeToTray;
            }

            if (NativeLib.IsUnix())
            {
                this.Security.MasterKeyOnSecureDesktop = false;

                AceIntegration aceInt = this.Integration;
                aceInt.HotKeyGlobalAutoType   = (ulong)Keys.None;
                aceInt.HotKeySelectedAutoType = (ulong)Keys.None;
                aceInt.HotKeyShowWindow       = (ulong)Keys.None;
            }

            if (MonoWorkarounds.IsRequired(1378))
            {
                AceWorkspaceLocking aceWL = this.Security.WorkspaceLocking;
                aceWL.LockOnSessionSwitch       = false;
                aceWL.LockOnSuspend             = false;
                aceWL.LockOnRemoteControlChange = false;
            }

            if (MonoWorkarounds.IsRequired(1418))
            {
                aceMW.MinimizeAfterOpeningDatabase        = false;
                this.Application.Start.MinimizedAndLocked = false;
            }
        }
Exemplo n.º 2
0
        public void Apply(AceApplyFlags f)
        {
            AceSecurity    aceSec = this.Security;          // m_sec might be null
            AceIntegration aceInt = this.Integration;       // m_int might be null

            if ((f & AceApplyFlags.Proxy) != AceApplyFlags.None)
            {
                IOConnection.SetProxy(aceInt.ProxyType, aceInt.ProxyAddress,
                                      aceInt.ProxyPort, aceInt.ProxyUserName, aceInt.ProxyPassword);
            }

            if ((f & AceApplyFlags.Ssl) != AceApplyFlags.None)
            {
                IOConnection.SslCertsAcceptInvalid = aceSec.SslCertsAcceptInvalid;
            }
        }
Exemplo n.º 3
0
        private void ObfuscateCred(bool bObf)
        {
            AceApplication aceApp = this.Application;             // m_aceApp might be null
            AceIntegration aceInt = this.Integration;             // m_int might be null

            if (aceApp.LastUsedFile == null)
            {
                Debug.Assert(false);
            }
            else
            {
                aceApp.LastUsedFile.Obfuscate(bObf);
            }

            foreach (IOConnectionInfo iocMru in aceApp.MostRecentlyUsed.Items)
            {
                if (iocMru == null)
                {
                    Debug.Assert(false);
                }
                else
                {
                    iocMru.Obfuscate(bObf);
                }
            }

            if (bObf)
            {
                aceInt.ProxyUserName = StrUtil.Obfuscate(aceInt.ProxyUserName);
            }
            else
            {
                aceInt.ProxyUserName = StrUtil.Deobfuscate(aceInt.ProxyUserName);
            }

            if (bObf)
            {
                aceInt.ProxyPassword = StrUtil.Obfuscate(aceInt.ProxyPassword);
            }
            else
            {
                aceInt.ProxyPassword = StrUtil.Deobfuscate(aceInt.ProxyPassword);
            }
        }
Exemplo n.º 4
0
        public void Apply(AceApplyFlags f)
        {
            AceApplication aceApp = this.Application;       // m_aceApp might be null
            AceSecurity    aceSec = this.Security;          // m_sec might be null
            AceIntegration aceInt = this.Integration;       // m_int might be null

            if ((f & AceApplyFlags.Proxy) != AceApplyFlags.None)
            {
                IOConnection.SetProxy(aceInt.ProxyType, aceInt.ProxyAddress,
                                      aceInt.ProxyPort, aceInt.ProxyAuthType, aceInt.ProxyUserName,
                                      aceInt.ProxyPassword);
            }

            if ((f & AceApplyFlags.Ssl) != AceApplyFlags.None)
            {
                IOConnection.SslCertsAcceptInvalid = aceSec.SslCertsAcceptInvalid;
            }

            if ((f & AceApplyFlags.FileTransactions) != AceApplyFlags.None)
            {
                FileTransactionEx.ExtraSafe = aceApp.FileTxExtra;
            }
        }