コード例 #1
0
 private void Settings_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     if (SettingsClicked != null)
     {
         SettingsClicked.Invoke();
     }
 }
コード例 #2
0
ファイル: HeaderSection.xaml.cs プロジェクト: ianByrne/Beans
 private void BtnSettings_Click(object sender, EventArgs e)
 {
     if (SettingsClicked != null)
     {
         SettingsClicked.Invoke(this, EventArgs.Empty);
     }
 }
コード例 #3
0
        /// <summary>
        /// Used to initialize the IBrowserHeader
        /// </summary>
        /// <param name="StartWidth">Starting width of the browser</param>
        public IBrowserHeader(int StartWidth)
        {
            // IBrowserHeader //
            this.Width     = StartWidth;
            this.Height    = 33;
            this.BackColor = Color.Transparent;
            this.BackColor = Color.White;

            // Web Back Button //
            sendBack.Location = new System.Drawing.Point(0, 0);
            sendBack.Click   += ((obj, args) =>
            {
                SendBackClick?.Invoke(this, new EventArgs());
            });

            this.Controls.Add(sendBack);

            // Web Forward Button //
            sendForward.Location = new System.Drawing.Point(32 * 1, 0);

            sendForward.Click += ((obj, args) =>
            {
                SendForwardClick.Invoke(this, new EventArgs());
            });

            this.Controls.Add(sendForward);

            // Reload Button //
            reloadButton.Location = new System.Drawing.Point(32 * 2, 0);
            reloadButton.Enabled  = true;

            reloadButton.Click += ((obj, args) =>
            {
                SendReloadClick?.Invoke(this, new EventArgs());
            });

            this.Controls.Add(reloadButton);

            // Settings Button //
            settingsButton.Location = new Point(this.Width - 32, 0);

            settingsButton.Click += ((obj, args) =>
            {
                SettingsClicked?.Invoke(this, new EventArgs());
            });

            this.Controls.Add(settingsButton);

            downloadButton.Location = new Point(this.Width - 64, 0);
            downloadButton.Anchor   = (AnchorStyles.Right | AnchorStyles.Top);

            downloadButton.Click += (obj, args) =>
            {
                DownloadButtonClicked?.Invoke(this, new EventArgs());
            };
            this.Controls.Add(downloadButton);

            VPNButton.Location = new Point(this.Width - 96, 0);
            VPNButton.Anchor   = (AnchorStyles.Right | AnchorStyles.Top);

            VPNButton.Click += (obj, args) =>
            {
                VPNButtonClicked?.Invoke(this, new EventArgs());
            };

            this.Controls.Add(VPNButton);

            // Home Button //
            homeButton.Location = new Point(32 * 3, 0);

            homeButton.Click += ((obj, args) =>
            {
                SendHomeClick?.Invoke(this, new EventArgs());
            });

            this.Controls.Add(homeButton);

            // Text Search
            text_Search.Location = new Point(32 * 4 + 3, this.Height / 2 - (text_Search.Height / 2));
            text_Search.Anchor   = (AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Left);
            text_Search.Font     = new Font("Segoe UI", 12f);
            text_Search.Text     = "";
            text_Search.Width    = this.Width - (32 * 4) - 64;

            text_Search.BackColor         = Color.White;
            text_Search.BorderColor       = Color.White;
            text_Search.BottomBorderColor = Color.FromArgb(236, 236, 236);

            text_Search.baseControl.KeyDown += TextSearch_KeyDown;
            this.Controls.Add(text_Search);
        }
コード例 #4
0
 protected virtual void OnSettingsClicked(EventArgs e)
 {
     SettingsClicked?.Invoke(this, e);
 }
コード例 #5
0
 private void ToolStripButtonSettings_Click(object sender, EventArgs e)
 {
     SettingsClicked?.Invoke(this, EventArgs.Empty);
 }
コード例 #6
0
 public void OnSettingsClicked()
 {
     SettingsClicked?.Invoke(this);
     IsVisible = false;
 }
コード例 #7
0
ファイル: MenuManager.cs プロジェクト: fbluth/Wookie
 private void Settings_Click(object sender, EventArgs e)
 {
     SettingsClicked?.Invoke(this, new EventArgs());
 }
コード例 #8
0
 private void SettingsClickExecute(object obj)
 {
     SettingsClicked?.Invoke(this, EventArgs.Empty);
 }