Пример #1
0
 public AppContainer()
 {
     InitializeComponent();
     AeroPeekEnabled = true;
     TabRenderer     = new ChromeTabRenderer(this);
     Icon            = Properties.Resources.vei;
 }
Пример #2
0
        public AppContainer()
        {
            InitializeComponent();

            AeroPeekEnabled = true;
            TabRenderer     = new ChromeTabRenderer(this);
        }
Пример #3
0
 public BbMainWindow()
 {
     InitializeComponent();
     AeroPeekEnabled = true;
     TabRenderer     = new ChromeTabRenderer(this);
     Icon            = Resources.DefaultIcon;
 }
Пример #4
0
        /// <summary>
        /// Initializes the UI, loads the bookmark and history data, and sets up the IPC remoting channel and low-level keyboard hook.
        /// </summary>
        protected void Init()
        {
            AeroPeekEnabled = false;

            // Create a remoting channel used to tell this window to open historical connections when entries in the jump list are clicked
            if (_ipcChannel == null)
            {
                _ipcChannel = new IpcServerChannel("EasyConnect");
                ChannelServices.RegisterChannel(_ipcChannel, false);
                RemotingConfiguration.RegisterWellKnownServiceType(typeof(HistoryMethods), "HistoryMethods", WellKnownObjectMode.SingleCall);
            }

            // Wire up the tab event handlers
            TabClicked += MainForm_TabClicked;

            ActiveInstance         = this;
            ConnectToHistoryMethod = ConnectToHistory;

            TabRenderer = new ChromeTabRenderer(this);

            // Get the low-level keyboard hook that will be used to process shortcut keys
            using (Process curProcess = Process.GetCurrentProcess())
                using (ProcessModule curModule = curProcess.MainModule)
                {
                    _hookproc = KeyboardHookCallback;
                    _hookId   = User32.SetWindowsHookEx(WH.WH_KEYBOARD_LL, _hookproc, Kernel32.GetModuleHandle(curModule.ModuleName), 0);
                }
        }
        public AppTabs()
        {
            InitializeComponent();

            AeroPeekEnabled = true;
            TabRenderer     = new ChromeTabRenderer(this);
            Icon            = mBible.Properties.Resources.appico;
        }
Пример #6
0
 public AppContainer()
 {
     InitializeComponent();
     this.WindowState = FormWindowState.Normal;
     AeroPeekEnabled  = true;
     TabRenderer      = new ChromeTabRenderer(this);
     Icon             = Icon.FromHandle(Properties.Resources.EditIcon.GetHicon());
     //ForeColor = Color.FromArgb(13,71,161);
 }
Пример #7
0
 public Container()
 {
     InitializeComponent();
     manageable      = new ManageableForm(this);
     AeroPeekEnabled = true;
     TabRenderer     = new ChromeTabRenderer(this);
     //CreateTab();
     this.FormClosing += (se, ev) => {
         MainForm.Kapat(); Login.ApplicationContext.Dispose(); Login.Kapat();
     };
 }
Пример #8
0
        private bool m_showen  = false; // shown is called.


        public ToolMainForm()
        {
            InitializeComponent();

            AeroPeekEnabled = true;
            TabRenderer     = new ChromeTabRenderer(this);
            Text            = "ToolMain".Localize();
            Name            = "ToolMain";
            Icon            = GdiUtil.CreateIcon(ResourceUtil.GetImage(Sce.Atf.Resources.AtfIconImage));

            StartPosition    = FormStartPosition.Manual; // so we can persist bounds
            m_mainFormBounds = Bounds;

            Sce.Atf.Direct2D.D2dFactory.EnableResourceSharing(this.Handle);
        }
Пример #9
0
        public Sibor()
        {
            InitializeComponent();

            AeroPeekEnabled = true;
            TabRenderer     = new ChromeTabRenderer(this);
            Icon            = Resources.DefaultIcon;
            BackgroundWorker bgw = new BackgroundWorker();

            bgw.DoWork                    += LoadBookmarks;
            bgw.ProgressChanged           += UpdateBookmarks;
            bgw.WorkerReportsProgress      = true;
            bgw.WorkerSupportsCancellation = false;
            bgw.RunWorkerAsync();
        }
Пример #10
0
 public FireFox()
 {
     InitializeComponent();
     AeroPeekEnabled = false;
     TabRenderer     = new ChromeTabRenderer(this);
 }
Пример #11
0
        /// <summary>
        /// Initializes the UI, loads the bookmark and history data, and sets up the IPC remoting channel and low-level keyboard hook.
        /// </summary>
        protected void Init()
        {
            AeroPeekEnabled = false;
            bool convertingToRsa = false;

            // If the user hasn't formally selected an encryption type (either they're starting the application for the first time or are running a legacy
            // version that explicitly used Rijndael), ask them if they want to use RSA
            if (Options.EncryptionType == null)
            {
                string messageBoxText = @"Do you want to use an RSA key container to encrypt your passwords?

The RSA encryption mode uses cryptographic keys associated with 
your Windows user account to encrypt sensitive data without having 
to enter an encryption password every time you start this 
application. However, your bookmarks file will be tied uniquely to 
this user account and you will be unable to share them between
multiple users.";

                if (!Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\EasyConnect"))
                {
                    messageBoxText += @"

The alternative is to derive an encryption key from a password that
you will need to enter every time that this application starts.";
                }

                else
                {
                    messageBoxText += @"

Since you've already encrypted your data with a password once, 
you would need to enter it one more time to decrypt it before RSA 
can be used.";
                }

                Options.EncryptionType = MessageBox.Show(messageBoxText, "Use RSA?", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes
                                                                 ? EncryptionType.Rsa
                                                                 : EncryptionType.Rijndael;

                // Since they want to use RSA but already have connection data encrypted with Rijndael, we'll have to capture that password so that we can
                // decrypt it using Rijndael and then re-encrypt it using the RSA keypair
                convertingToRsa = Options.EncryptionType == EncryptionType.Rsa &&
                                  Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\EasyConnect");
            }

            // If this is the first time that the user is running the application, pop up and information box informing them that they're going to enter a
            // password used to encrypt sensitive connection details
            if (!Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\EasyConnect"))
            {
                if (Options.EncryptionType == EncryptionType.Rijndael)
                {
                    MessageBox.Show(Resources.FirstRunPasswordText, Resources.FirstRunPasswordTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }

                Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\EasyConnect");
            }

            if (Options.EncryptionType != null)
            {
                Options.Save();
            }

            bool encryptionTypeSet = false;

            while (Bookmarks == null || _history == null)
            {
                // Get the user's encryption password via the password dialog
                if (!encryptionTypeSet && (Options.EncryptionType == EncryptionType.Rijndael || convertingToRsa))
                {
                    PasswordWindow passwordWindow = new PasswordWindow();
                    passwordWindow.ShowDialog();

                    ConnectionFactory.SetEncryptionType(EncryptionType.Rijndael, passwordWindow.Password);
                }

                else
                {
                    ConnectionFactory.SetEncryptionType(Options.EncryptionType.Value);
                }

                // Create the bookmark and history windows which will try to use the password to decrypt sensitive connection details; if it's unable to, an
                // exception will be thrown that wraps a CryptographicException instance
                try
                {
                    _bookmarks = new BookmarksWindow(this);
                    _history   = new HistoryWindow(this);

                    ConnectionFactory.GetDefaultProtocol();

                    encryptionTypeSet = true;
                }

                catch (Exception e)
                {
                    if ((Options.EncryptionType == EncryptionType.Rijndael || convertingToRsa) && !ContainsCryptographicException(e))
                    {
                        throw;
                    }

                    // Tell the user that their password is incorrect and, if they click OK, repeat the process
                    DialogResult result = MessageBox.Show(
                        Resources.IncorrectPasswordText, Resources.ErrorTitle, MessageBoxButtons.OKCancel, MessageBoxIcon.Error);

                    if (result != DialogResult.OK)
                    {
                        IsClosing = true;
                        return;
                    }
                }
            }

            // If we're converting over to RSA, we've already loaded and decrypted the sensitive data using
            if (convertingToRsa)
            {
                SetEncryptionType(Options.EncryptionType.Value, null);
            }

            // Create a remoting channel used to tell this window to open historical connections when entries in the jump list are clicked
            if (_ipcChannel == null)
            {
                _ipcChannel = new IpcServerChannel("EasyConnect");
                ChannelServices.RegisterChannel(_ipcChannel, false);
                RemotingConfiguration.RegisterWellKnownServiceType(typeof(HistoryMethods), "HistoryMethods", WellKnownObjectMode.SingleCall);
            }

            // Wire up the tab event handlers
            TabClicked += MainForm_TabClicked;

            ActiveInstance         = this;
            ConnectToHistoryMethod = ConnectToHistory;

            TabRenderer = new ChromeTabRenderer(this);

            // Get the low-level keyboard hook that will be used to process shortcut keys
            using (Process curProcess = Process.GetCurrentProcess())
                using (ProcessModule curModule = curProcess.MainModule)
                {
                    _hookproc = KeyboardHookCallback;
                    _hookId   = User32.SetWindowsHookEx(WH.WH_KEYBOARD_LL, _hookproc, Kernel32.GetModuleHandle(curModule.ModuleName), 0);
                }
        }
Пример #12
0
 public NewTab()
 {
     InitializeComponent();
     AeroPeekEnabled = true;
     TabRenderer     = new ChromeTabRenderer(this);
 }
Пример #13
0
 public BrowserForm()
 {
     InitializeComponent();
     AeroPeekEnabled = true;
     TabRenderer     = new ChromeTabRenderer(this);
 }