本文整理汇总了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);
}
}
示例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);
}
示例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();
}
示例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);
}
}
示例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();
}
示例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;
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
}
示例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);
}
}
示例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);
}
示例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.
}
}
示例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);
}
}
示例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);
}