当前位置: 首页>>代码示例>>C#>>正文


C# ToolTip.Show方法代码示例

本文整理汇总了C#中System.Windows.Forms.ToolTip.Show方法的典型用法代码示例。如果您正苦于以下问题:C# ToolTip.Show方法的具体用法?C# ToolTip.Show怎么用?C# ToolTip.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.ToolTip的用法示例。


在下文中一共展示了ToolTip.Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ShowToolTip

        public void ShowToolTip(IWin32Window ui, string title, string des, int iniDelay = 2000, bool repeat = false)
        {
            if (Properties.Settings.Default.showTip || repeat)
            {
                ToolTip toolTip = new ToolTip();
                toolTip.ToolTipTitle = title;
                toolTip.UseFading = true;
                toolTip.UseAnimation = true;
                toolTip.IsBalloon = true;
                toolTip.InitialDelay = iniDelay;

                toolTip.Show(string.Empty, ui, 3000);
                toolTip.Show(des, ui);
            }
        }
开发者ID:Inndy,项目名称:BeanfunLogin,代码行数:15,代码来源:Form1.cs

示例2: SetMsg

 public static void SetMsg(string str, IWin32Window win)
 {
     ToolTip toolTip = new ToolTip();
     toolTip.IsBalloon = true;
     toolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;
     toolTip.Show(str, win, 0, -75, 5000);//toolTip.Show(str, win, 0, -70, 5000);
 }
开发者ID:bvv27,项目名称:oht_api_2_csharp,代码行数:7,代码来源:tools.cs

示例3: button1_Click

        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Length == 0)
            {
                ToolTip tip = new ToolTip();
                tip.IsBalloon = true;
                tip.ToolTipIcon = ToolTipIcon.Error;
                tip.ToolTipTitle = "Грешка!";
                tip.Show("Моля въведете IP адрес или Hostname!", textBox1, 0, -65, 1000);
                textBox1.Focus();
                return;
            }

            if (firstrun)
            {
                dataSet1.Tables["settings"].Rows[0]["first_run"] = false;
            }
            //dataSet1.Tables["settings"].Rows[0]["hist"] = numericUpDown2.Value;
            //dataSet1.Tables["settings"].Rows[0]["upper_limit"] = numericUpDown4.Value;
            //dataSet1.Tables["settings"].Rows[0]["lower_limit"] = numericUpDown3.Value;

            dataSet1.AcceptChanges();
            string xmlfile = Application.StartupPath + "\\db.xml";
            dataSet1.WriteXml(xmlfile);
            //Form1 f1 = new Form1();
            //f1.reload_db();
            //f1.Show();
            //Application.Restart();
            f1.dataSet1 = (DataSet1)dataSet1.Copy();
            f1.reload_db();
            this.Close();
        }
开发者ID:Jacketbg,项目名称:firemon,代码行数:32,代码来源:Form2.cs

示例4: buttonX_test_connection_Click

        private void buttonX_test_connection_Click(object sender, EventArgs e)
        {
            Properties.Settings.Default.sHost = uiTBSettingHost.Text;
            Properties.Settings.Default.sDB = uiTBSettingDB.Text;
            Properties.Settings.Default.sUser = uiTBSettingUser.Text;
            Properties.Settings.Default.sPassword = uiTBSettingPassword.Text;

            Properties.Settings.Default.Save();

            if (DataManager.Initialize(Properties.Settings.Default.sHost, Properties.Settings.Default.sDB, Properties.Settings.Default.sUser, Properties.Settings.Default.sPassword))
            {

                DialogResult = DialogResult.OK;

            }
            else
            {
                const int visibleTime = 3 * 1000; //in milliseconds

                var tt1 = new ToolTip();
                tt1.Show("Please, enter a valid data.", uiTBSettingHost, 0, -20, visibleTime);

                var tt2 = new ToolTip();
                var tt3 = new ToolTip();
                var tt4 = new ToolTip();

                tt2.Show("Please, enter a valid data.", uiTBSettingDB, 0, -20, visibleTime);
                tt3.Show("Please, enter a valid data.", uiTBSettingUser, 0, -20, visibleTime);
                tt4.Show("Please, enter a valid data.", uiTBSettingPassword, 0, -20, visibleTime);
            }
        }
开发者ID:rlyalko,项目名称:REVERSALS_v14,代码行数:31,代码来源:FormSettings.cs

示例5: button1_Click

        private void button1_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(textBox1.Text) || textBox1.Text.Length < 3)
            {
                textBox1.Focus();
                var tip = new ToolTip();
                tip.SetToolTip(textBox1, "Fyll ut tittel på varen det registreres svinn på");
                tip.Show("Varen må ha en tittel", textBox1);
                return;
            }

            var svinn = new Svinn
            {
                Sum = numericUpDown1.Value,
                DatoTidspunkt = dateTimePicker1.Value,
                Kommentar = richTextBox1.Text,
                Navn = textBox1.Text,
                RegistrertTidspunkt = DateTime.Now
            };

            var context = new SalgDbContext();

            //TODO lagre svinn
            context.Svinn.Add(svinn);
            context.SaveChanges();
            Dispose();
        }
开发者ID:dosjos,项目名称:rpdekors,代码行数:27,代码来源:RegistrerSvinn.cs

示例6: saveButton_Click

 private void saveButton_Click(object sender, EventArgs e)
 {
     Properties.Settings.Default.Save();
     ToolTip tooltip = new ToolTip();
     tooltip.ToolTipTitle = "Successful";
     tooltip.Show("Options Saved Successfully!", saveButton, 3000);
     tooltip.IsBalloon = true;
 }
开发者ID:Dawn-of-Light,项目名称:DataQuestBuilder,代码行数:8,代码来源:MySqlLoginForm.cs

示例7: dataEvents_CellContentClick

        private void dataEvents_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (this.dataEvents.Columns[e.ColumnIndex] == this.eventListeners)
            {
                var cell = this.dataEvents.Rows[e.RowIndex].Cells[this.eventName.Name];
                var toolTipText = this.GetEventListenersText(cell.Value.ToString());

                var tt = new ToolTip();
                tt.Show(toolTipText, this, this.PointToClient(Cursor.Position), 5000);
            }
        }
开发者ID:kristiandupont,项目名称:CherryTomato-classic,代码行数:11,代码来源:EventsAndCommandsBrowserForm.cs

示例8: btn_save_Click

 private void btn_save_Click(object sender, EventArgs e)
 {
     if (textBoxX_contract_name.Text != "")
     {
         DialogResult = DialogResult.OK;
     }
     else
     {
         var tt1 = new ToolTip();
         tt1.Show("Please, enter name of contract.", textBoxX_contract_name, 0, -20, 3000);
     }
 }
开发者ID:rlyalko,项目名称:REVERSALS_v14,代码行数:12,代码来源:FormContractAdd.cs

示例9: textBoxBookName_TextChanged

        private void textBoxBookName_TextChanged(object sender, EventArgs e)
        {
            MatchCollection matches = regexalpha.Matches(textBoxBookName.Text);

            if (matches.Count != textBoxBookName.Text.Length) {
                textBoxBookName.Text = textBoxBookName.Text.Substring(0, textBoxBookName.Text.Length - 1);
                textBoxBookName.Focus();
                textBoxBookName.SelectionStart = textBoxBookName.Text.Length;

                ToolTip tooltip = new ToolTip();
                tooltip.Show("Only alphabets are allowed", textBoxBookName, 50, 0, 1000);
            }
        }
开发者ID:techboy-zero,项目名称:Software-Development,代码行数:13,代码来源:AddBook.cs

示例10: textBoxX_contract_name_KeyDown

 private void textBoxX_contract_name_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Escape)
         DialogResult = DialogResult.Cancel;
     if (e.KeyCode == Keys.Enter)
     {
         if (textBoxX_contract_name.Text != "")
         {
             DialogResult = DialogResult.OK;
         }
         else
         {
             var tt1 = new ToolTip();
             tt1.Show("Please, enter name of contract.", textBoxX_contract_name, 0, -20, 3000);
         }
     }
 }
开发者ID:rlyalko,项目名称:REVERSALS_v14,代码行数:17,代码来源:FormContractAdd.cs

示例11: ExibirErro

        public void ExibirErro(String Erro, String NomeDoControle)
        {
            Control ctrl = this.Controls.Find(NomeDoControle, true)[0];
            ToolTip tt = new ToolTip();
            tt.ToolTipIcon = ToolTipIcon.Error;
            tt.ToolTipTitle = "Erro!";

            try
            {
                tt.Show(Erro, ctrl);
            }
            catch (NullReferenceException)
            {
                // Se não achar o controle chama a exceção convencional
                this.ExibirErro(Erro);
            }
        }
开发者ID:RMedeirosCosta,项目名称:eimbo,代码行数:17,代码来源:TelaPadrao.cs

示例12: ToolTipListBox_MouseHover

        void ToolTipListBox_MouseHover( object sender, EventArgs e ) {
            ListBoxEntry entry = DetermineHoveredItem();
            if ( entry == null ) {
                if ( currentToolTip != null ) {
                    currentToolTip.Hide( this );
                    currentToolTip.Dispose();
                }
                return;
            }


            currentToolTip = new ToolTip() {
                ToolTipTitle = entry.Text,
                ToolTipIcon = ToolTipIcon.Info
            };
            Point drawLocation = PointToClient( ListBox.MousePosition );
            drawLocation.Offset(8, 8);
            currentToolTip.Show( entry.HoverText, this, drawLocation);
        }
开发者ID:nullpic,项目名称:MCForge-Vanilla,代码行数:19,代码来源:ToolTipListBox.cs

示例13: button2_Click

        private void button2_Click(object sender, EventArgs e)
        {
            if (wowPathInput.Text != "")
            {
                if (System.IO.File.Exists(wowPathInput.Text + "\\wow.exe") == true)
                {
                    WriteSettingsFile xmlWrite = new WriteSettingsFile();
                    xmlWrite.Load();

                    xmlWrite.SetWoWPath(wowPathInput.Text);
                    if (startUpSoundCheckBox.Checked == true)
                    {
                        xmlWrite.SetStartUpSound(true);
                    }
                    else
                    {
                        xmlWrite.SetStartUpSound(false);
                    }

                    if (minimizeToTrayCheckBox.Checked == true)
                    {
                        xmlWrite.MinimizeToTray(true);
                    }
                    else
                    {
                        xmlWrite.MinimizeToTray(false);
                    }

                    Form3.ActiveForm.Hide();
                }
                else
                {
                    MessageBox.Show("ERROR: can't find wow.exe in: \n\n '" + wowPathInput.Text + "\' \n\n Please choose another directory.", "Error!");
                }
            }
            else
            {
                ToolTip errorTip = new ToolTip();
                errorTip.IsBalloon = true;
                errorTip.Show("Field cannot be empty!", wowPathInput, 5, -35, 1500);
                //wowPathInput.
            }
        }
开发者ID:Kittnz,项目名称:TrueWoWLauncher,代码行数:43,代码来源:Form3.cs

示例14: btnSet_Click

 private void btnSet_Click(object sender, EventArgs e)
 {
     var ripper = this.Owner as Main;
     if (udFrom.Value > 0 && udFrom.Value < udTo.Value)
     {
         ripper.From = decimal.ToInt32(udFrom.Value); ripper.To = decimal.ToInt32(udTo.Value);
         var n = _seed.ToString();
         var m = ripper.Address.LastIndexOf(n);
         ripper.Address = ripper.Address.Substring(0, m) + ripper.From.ToString() + ripper.Address.Substring(m + n.Length);
         ripper.Batch = true;
         ripper.Range = ripper.To - ripper.From + 1;
         Close();
     }
     else
     {
         var tt = new ToolTip();
         tt.IsBalloon = true;
         tt.ToolTipIcon = ToolTipIcon.Warning;
         tt.ToolTipTitle = "Invalid Range";
         tt.Show("Out of range values", lblCaption, 2000);
     }
 }
开发者ID:Wyvern,项目名称:ImageRipper,代码行数:22,代码来源:Batch.cs

示例15: NotificarArchivo

        internal void NotificarArchivo(ArchivoSOA archivoSOA)
        {
            if (Contenedor.InvokeRequired)
            {
                Contenedor.BeginInvoke(new SetLabelTextDelegate(NotificarArchivo),
                                                            new object[] { archivoSOA });

                return;
            }
            _archivos.Add(archivoSOA);
            string mensaje =
            "Hora: " + archivoSOA.Fecha.ToString() + Environment.NewLine +
            "Nombre: " + archivoSOA.FileName + Environment.NewLine +
            "Tamaño: " + archivoSOA.Length.ToString() + " bytes" + Environment.NewLine +
            "Puerto Origen: " + archivoSOA.SourcePort.ToString() + Environment.NewLine +
            "Puerto Destino: " + archivoSOA.DestinationPort.ToString();
            ToolTip toolTip = new ToolTip();
            toolTip.ToolTipIcon = ToolTipIcon.Info;
            toolTip.ToolTipTitle = "Archivo Recibido";
            toolTip.Show(mensaje, base.Contenedor.Window, DimensionMundo.Centro.X, DimensionMundo.Centro.Y, 9000);
        }
开发者ID:Xavinightshade,项目名称:ipsimulator,代码行数:21,代码来源:ComputadorView.cs


注:本文中的System.Windows.Forms.ToolTip.Show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。