private void Form1_Load(object sender, EventArgs e) { if (Properties.Settings.Default.Translate_from == "") { Properties.Settings.Default.Translate_from = "en"; Properties.Settings.Default.Translate_to = "ru"; Properties.Settings.Default.Save(); } TrayIcon.Icon = Properties.Resources.BookIcon; WindowState = FormWindowState.Minimized; Icon = Properties.Resources.BookIcon; ClipboardMonitor.OnClipboardChange += Clip; ClipboardMonitor.Start(); Trans.OnTranslateChange += () => { TranslatedText.BeginInvoke((MethodInvoker)(() => TranslatedText.Text = Trans.TranslatedText)); }; Trans.OnTranslateChange += () => { TrayIcon.BalloonTipTitle = "Перевод скопированного текста"; TrayIcon.BalloonTipText = Trans.TranslatedText; TrayIcon.ShowBalloonTip(100); }; }