コード例 #1
0
ファイル: PrefPanel.cs プロジェクト: nfan/Jaxer
        public PrefPanel(Form aParent, Preferences aPrefs)
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

              // LAME oh so lame.
              mPrefs = aPrefs;
              mParent = aParent;

              // All preferences panels have these properties initially.
              this.Location = new System.Drawing.Point(160, 16);
              this.Size = new System.Drawing.Size(320, 264);
              this.TabIndex = 1;
              this.Visible = false;

              // When the preference panel is shown for the first time, we
              // need to fill its fields from preferences.
              this.VisibleChanged += new EventHandler(VisibilityChanged);
        }
コード例 #2
0
ファイル: BrowserDisplayPanel.cs プロジェクト: nfan/Jaxer
        /// <summary>
        /// Construct a BrowserDisplayPanel
        /// </summary>
        /// <param name="aParent"></param>
        /// <param name="aOpener">
        /// The window that opened the preferencs dialog. We'd really rather get rid of
        /// this and replace it with calls to a window-mediator service.
        /// </param>
        /// <param name="aPrefs">
        /// The preferences handle from the application object. We want to get rid of this
        /// and use some kind of global preferences service. 
        /// </param>
        public BrowserDisplayPanel(Form aParent, Form aOpener, Preferences aPrefs)
            : base(aParent, aPrefs)
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

              mOpener = aOpener;

              restoreSessionSettingsButton.Enabled = false;

              radioButton3.Click += new EventHandler(OnStartupModeRadio);
              radioButton2.Click += new EventHandler(OnStartupModeRadio);
              radioButton1.Click += new EventHandler(OnStartupModeRadio);

              restoreSessionSettingsButton.Click += new EventHandler(OnRestoreSessionSettings);

              button2.Click += new EventHandler(OnUseCurrent);
              button1.Click += new EventHandler(OnBrowseForHomepage);
        }
コード例 #3
0
ファイル: PrefsDialog.cs プロジェクト: nfan/Jaxer
        public PrefsDialog(Form aOpener)
            : base(aOpener)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

              okButton.Click += new EventHandler(OnOK);

              mNodes = new Hashtable();
              mPanels = new Hashtable();

              BrowserWindow window = mOpener as BrowserWindow;
              mPrefs = ServiceManager.Preferences;

              //
              // Initialize all the preference panels.
              //
              InitializePanels();

              // Add select handler for tree view so that we can
              // switch panels.
              treeView1.AfterSelect += new TreeViewEventHandler(OnTreeSelect);

              //
              // Initialize the category list.
              //
              InitializeCategoryList();

              // XXX - eventually we want to remember user state. This will do
              //       for now.
              treeView1.ExpandAll();
        }