コード例 #1
0
        private void OnPanelClick(object sender, StatusBarPanelClickEventArgs e)
        {
            if (e.StatusBarPanel == iconPanel && sender == this)
            {
                MenuCommand c = menu.TrackPopup(PointToScreen(new Point(0, -90)), false);
                if (c != null)
                {
                    switch (c.Text)
                    {
                    case "Debug":
                        MpeLog.Threshold = MpeLogLevel.Debug;
                        MpeLog.Debug("Log Level set to Debug");
                        break;

                    case "Info":
                        MpeLog.Threshold = MpeLogLevel.Info;
                        MpeLog.Info("Log Level set to Info");
                        break;

                    case "Warn":
                        MpeLog.Threshold = MpeLogLevel.Warn;
                        MpeLog.Warn("Log Level set to Warn");
                        break;

                    case "Error":
                        MpeLog.Threshold = MpeLogLevel.Error;
                        MpeLog.Error("Log Level set to Error");
                        break;
                    }
                }
            }
        }
コード例 #2
0
ファイル: FrmMain.cs プロジェクト: budaLi/c-
 private void statusBarMain_PanelClick(object sender, StatusBarPanelClickEventArgs e)
 {
     if (e.StatusBarPanel == stbPrana)
     {
         MessageBox.Show("三人组");
     }
 }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: sgissinger/JabberNet-2010
 private void sb_PanelClick(object sender, StatusBarPanelClickEventArgs e)
 {
     if (e.StatusBarPanel != pnlPresence)
     {
         return;
     }
     mnuPresence.Show(sb, new Point(e.X, e.Y));
 }
コード例 #4
0
 private void StatusBar_PanelClick(object sender, StatusBarPanelClickEventArgs e)
 {
     if (e.StatusBarPanel == StatusBarPanel2 && e.Clicks == 2)
     {
         fContext.SwitchShieldState();
         StatusBar.Invalidate();
     }
 }
コード例 #5
0
 // If the user clicks the status bar, check the text of the
 // StatusBarPanel.  If the text equals a short time string,
 // change it to long time display.
 private void statusBar1_PanelClick(object sender,
                                    StatusBarPanelClickEventArgs e)
 {
     if (e.StatusBarPanel.Text ==
         System.DateTime.Now.ToShortTimeString())
     {
         e.StatusBarPanel.Text =
             System.DateTime.Now.ToLongTimeString();
     }
 }
コード例 #6
0
        public void Ctor_StatusBarPanel_MouseButtons_Int_Int_Int_Int(StatusBarPanel statusBarPanel, MouseButtons button, int clicks, int x, int y)
        {
            var e = new StatusBarPanelClickEventArgs(statusBarPanel, button, clicks, x, y);

            Assert.Equal(statusBarPanel, e.StatusBarPanel);
            Assert.Equal(button, e.Button);
            Assert.Equal(clicks, e.Clicks);
            Assert.Equal(x, e.X);
            Assert.Equal(y, e.Y);
            Assert.Equal(0, e.Delta);
            Assert.Equal(new Point(x, y), e.Location);
        }
コード例 #7
0
        private void StatusBar_PanelClick(object sender, StatusBarPanelClickEventArgs e)
        {
            if (e.Clicks == 2 && e.StatusBarPanel.Name == "lblEmpresa")
            {
                f0079 f = new f0079();
                if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    //-- Atualiza o nome da empresa
                    Funcoes func;
                    string  sEmpresa = string.Empty
                    , sCodEmpresa    = func.Busca_Propriedade("codigo_filial")
                    , sSQL           = string.Empty;

                    //-- Carrega nome da empresa
                    sSQL     = string.Format("select Nome_Fantasia from empresas where empresa = {0}", sCodEmpresa);
                    sEmpresa = SQL.ExecuteScalar(sSQL).ToString();

                    this.lblEmpresa.Text = string.Format(this.lblEmpresa.Tag.ToString(), sEmpresa);
                }
            }
        }
コード例 #8
0
ファイル: Audio.cs プロジェクト: seb1707/Questor
 private void _statusBar_PanelClick(object sender, StatusBarPanelClickEventArgs e)
 {
 }
コード例 #9
0
 protected void barStatus_PanelClick(object sender, StatusBarPanelClickEventArgs e)
 {
 }
        /// <summary>
        /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// statusbarpanelclickeventhandler.BeginInvoke(sender, e, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginInvoke(this StatusBarPanelClickEventHandler statusbarpanelclickeventhandler, Object sender, StatusBarPanelClickEventArgs e, AsyncCallback callback)
        {
            if (statusbarpanelclickeventhandler == null)
            {
                throw new ArgumentNullException("statusbarpanelclickeventhandler");
            }

            return(statusbarpanelclickeventhandler.BeginInvoke(sender, e, callback, null));
        }
コード例 #11
0
ファイル: Form1.cs プロジェクト: Ytrog/RssBandit
 private void statusBar1_PanelClick(object sender, StatusBarPanelClickEventArgs e)
 {
     this.htmlControl1.Html = @"<html><head><title>Hällo World from SetHtmlText()</title></head><body><p>Hällo, World</p></body></html>";
     this.htmlControl1.Navigate(null);
 }