Пример #1
0
 private void tb_Click(object sender, System.EventArgs e)
 {
     if (((TextBox)sender).Text.Length > 0)
     {
         Clipboard.SetText(((TextBox)sender).Text);
         frmToast toast = new frmToast("Skopiowano", Cursor.Position.Y, Cursor.Position.X);
         toast.Show();
     }
 }
Пример #2
0
        //private void AddEvent(Control parentCtrl)
        //{
        //    foreach (Control tb in parentCtrl.Controls)
        //    {
        //        if(tb.GetType() == typeof(TextBox)){
        //            if(tb != txtMail)
        //            {
        //                tb.Click += new EventHandler(tb_Click);
        //            }
        //        }
        //        AddEvent(tb);
        //    }
        //}

        private void mailTo(object sender, EventArgs e)
        {
            if (((TextBox)sender).Text.Length > 0)
            {
                frmToast toast = new frmToast("Tworzę wiadomość", Cursor.Position.Y, Cursor.Position.X);
                toast.Show();
                string command = "mailto:" + ((TextBox)sender).Text;
                Process.Start(command);
            }
        }
Пример #3
0
        private void callTo(object sender, EventArgs e)
        {
            string who = ((TextBox)sender).Text;

            if (who.Length > 0)
            {
                frmToast toast = new frmToast("Przechodzę do Skype", Cursor.Position.Y, Cursor.Position.X);
                toast.Show();
                string command = "tel:" + who;
                Process.Start(command);
            }
        }