Ejemplo n.º 1
0
        private void newConnectionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (ConnectionDialog dialog = new ConnectionDialog())
            {
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    var settings = dialog.GetConnectionSettings();

                    _rdp.Connect(settings.hostname, settings.domain, settings.username, settings.password, settings.port,
                                 new FreeRDP.Core.ConnectionSettings()
                    {
                        DesktopWidth = 1920, DesktopHeight = 1080
                    });

                    //send enter to dismiss legal notice message
                    Thread.Sleep(2000);
                    _rdp.SendInputKeyboardEvent(KeyboardFlags.KBD_FLAGS_DOWN, 28);
                    Thread.Sleep(200);
                    _rdp.SendInputKeyboardEvent(KeyboardFlags.KBD_FLAGS_RELEASE, 28);

                    UpdateStatusLabel();
                }
            }
        }
Ejemplo n.º 2
0
 public void OnKeyboardEvent(UInt16 keyboardFlags, UInt16 keyCode)
 {
     rdp.SendInputKeyboardEvent(keyboardFlags, keyCode);
 }
Ejemplo n.º 3
0
        public void OnKeyboardEvent(UInt16 keyboardFlags, UInt16 keyCode)
        {
            var f = (KeyboardFlags)Enum.Parse(typeof(KeyboardFlags), keyboardFlags.ToString());

            rdp.SendInputKeyboardEvent(f, keyCode);
        }
Ejemplo n.º 4
0
 public void OnKeyboardEvent(UInt16 keyboardFlags, UInt16 keyCode)
 {
     Console.WriteLine("RdpSource.OnKeyboardEvent: {0}", keyCode);
     rdp.SendInputKeyboardEvent(keyboardFlags, keyCode);
 }