| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593 |
- using System;
- using Gtk;
- using Gdk;
- using System.Net;
- using System.Net.Sockets;
- using System.Threading;
- using System.Text;
- using Newtonsoft.Json.Linq;
- public partial class MainWindow: Gtk.Window
- {
- private System.Net.Sockets.Socket m_sock = null;
- private TextTag tagInfo;
- private TextTag tagWarning;
- private TextTag tagError;
- private TextTag tagDebug;
- // Console history
- private const uint MAX_HISTORY_ITEMS = 256;
- private uint history_size = 0;
- private uint history_current = 0;
- private string[] history = new string[MAX_HISTORY_ITEMS];
- // Connection
- private string m_server_ip;
- private int m_server_port;
- private byte[] m_msg_header = new byte[4];
- private byte[] m_byBuff = new byte[4096]; // Recieved data buffer
-
- public MainWindow (): base (Gtk.WindowType.Toplevel)
- {
- Build ();
- // Connection
- m_server_ip = "127.0.0.1";
- m_server_port = 10001;
- // Create tags for color-formatted text
- tagInfo = new Gtk.TextTag ("info");
- tagInfo.BackgroundGdk = new Gdk.Color (255, 255, 255);
- tagWarning = new Gtk.TextTag ("warning");
- tagWarning.BackgroundGdk = new Gdk.Color (255, 255, 153);
- tagError = new Gtk.TextTag ("error");
- tagError.BackgroundGdk = new Gdk.Color (255, 153, 153);
- tagDebug = new Gtk.TextTag ("debug");
- tagDebug.BackgroundGdk = new Gdk.Color (224, 224, 224);
- TextBuffer textbuffer1 = textview1.Buffer;
- textbuffer1.TagTable.Add (tagInfo);
- textbuffer1.TagTable.Add (tagWarning);
- textbuffer1.TagTable.Add (tagError);
- textbuffer1.TagTable.Add (tagDebug);
- // Create completion dictionary
- ListStore lua_api = new ListStore (typeof (string));
- lua_api.AppendValues ("Device.frame_count");
- lua_api.AppendValues ("Device.last_delta_time");
- lua_api.AppendValues ("Device.start");
- lua_api.AppendValues ("Device.stop");
- lua_api.AppendValues ("Device.create_resource_package");
- lua_api.AppendValues ("Device.destroy_resource_package");
- lua_api.AppendValues ("Window.show");
- lua_api.AppendValues ("Window.hide");
- lua_api.AppendValues ("Window.get_size");
- lua_api.AppendValues ("Window.get_position");
- lua_api.AppendValues ("Window.resize");
- lua_api.AppendValues ("Window.move");
- lua_api.AppendValues ("Window.minimize");
- lua_api.AppendValues ("Window.restore");
- lua_api.AppendValues ("Window.is_resizable");
- lua_api.AppendValues ("Window.set_resizable");
- lua_api.AppendValues ("Window.show_cursor");
- lua_api.AppendValues ("Window.get_cursor_xy");
- lua_api.AppendValues ("Window.set_cursor_xy");
- lua_api.AppendValues ("Window.title");
- lua_api.AppendValues ("Window.set_title");
- lua_api.AppendValues ("Math.deg_to_rad");
- lua_api.AppendValues ("Math.rad_to_deg");
- lua_api.AppendValues ("Math.next_pow_2");
- lua_api.AppendValues ("Math.is_pow_2");
- lua_api.AppendValues ("Math.ceil");
- lua_api.AppendValues ("Math.floor");
- lua_api.AppendValues ("Math.sqrt");
- lua_api.AppendValues ("Math.inv_sqrt");
- lua_api.AppendValues ("Math.sin");
- lua_api.AppendValues ("Math.cos");
- lua_api.AppendValues ("Math.asin");
- lua_api.AppendValues ("Math.acos");
- lua_api.AppendValues ("Math.tan");
- lua_api.AppendValues ("Math.atan2");
- lua_api.AppendValues ("Math.abs");
- lua_api.AppendValues ("Math.fmod");
- lua_api.AppendValues ("Vector2.new");
- lua_api.AppendValues ("Vector2.val");
- lua_api.AppendValues ("Vector2.add");
- lua_api.AppendValues ("Vector2.sub");
- lua_api.AppendValues ("Vector2.mul");
- lua_api.AppendValues ("Vector2.div");
- lua_api.AppendValues ("Vector2.dot");
- lua_api.AppendValues ("Vector2.equals");
- lua_api.AppendValues ("Vector2.lower");
- lua_api.AppendValues ("Vector2.greater");
- lua_api.AppendValues ("Vector2.length");
- lua_api.AppendValues ("Vector2.squared_length");
- lua_api.AppendValues ("Vector2.set_length");
- lua_api.AppendValues ("Vector2.normalize");
- lua_api.AppendValues ("Vector2.negate");
- lua_api.AppendValues ("Vector2.get_distance_to");
- lua_api.AppendValues ("Vector2.get_angle_between");
- lua_api.AppendValues ("Vector2.zero");
- lua_api.AppendValues ("Vector3.new");
- lua_api.AppendValues ("Vector3.val");
- lua_api.AppendValues ("Vector3.add");
- lua_api.AppendValues ("Vector3.sub");
- lua_api.AppendValues ("Vector3.mul");
- lua_api.AppendValues ("Vector3.div");
- lua_api.AppendValues ("Vector3.dot");
- lua_api.AppendValues ("Vector3.cross");
- lua_api.AppendValues ("Vector3.equals");
- lua_api.AppendValues ("Vector3.lower");
- lua_api.AppendValues ("Vector3.greater");
- lua_api.AppendValues ("Vector3.length");
- lua_api.AppendValues ("Vector3.squared_length");
- lua_api.AppendValues ("Vector3.set_length");
- lua_api.AppendValues ("Vector3.normalize");
- lua_api.AppendValues ("Vector3.negate");
- lua_api.AppendValues ("Vector3.get_distance_to");
- lua_api.AppendValues ("Vector3.get_angle_between");
- lua_api.AppendValues ("Vector3.zero");
- lua_api.AppendValues ("Quaternion.new");
- lua_api.AppendValues ("Quaternion.negate");
- lua_api.AppendValues ("Quaternion.load_identity");
- lua_api.AppendValues ("Quaternion.length");
- lua_api.AppendValues ("Quaternion.conjugate");
- lua_api.AppendValues ("Quaternion.inverse");
- lua_api.AppendValues ("Quaternion.cross");
- lua_api.AppendValues ("Quaternion.mul");
- lua_api.AppendValues ("Quaternion.pow");
- lua_api.AppendValues ("StringSetting.value");
- lua_api.AppendValues ("StringSetting.synopsis");
- lua_api.AppendValues ("StringSetting.update");
- lua_api.AppendValues ("IntSetting.value");
- lua_api.AppendValues ("IntSetting.synopsis");
- lua_api.AppendValues ("IntSetting.min");
- lua_api.AppendValues ("IntSetting.max");
- lua_api.AppendValues ("IntSetting.update");
- lua_api.AppendValues ("FloatSetting.value");
- lua_api.AppendValues ("FloatSetting.synopsis");
- lua_api.AppendValues ("FloatSetting.min");
- lua_api.AppendValues ("FloatSetting.max");
- lua_api.AppendValues ("FloatSetting.update");
- lua_api.AppendValues ("Mouse.button_pressed");
- lua_api.AppendValues ("Mouse.button_released");
- lua_api.AppendValues ("Mouse.any_pressed");
- lua_api.AppendValues ("Mouse.any_released");
- lua_api.AppendValues ("Mouse.cursor_xy");
- lua_api.AppendValues ("Mouse.set_cursor_xy");
- lua_api.AppendValues ("Mouse.cursor_relative_xy");
- lua_api.AppendValues ("Mouse.set_cursor_relative_xy");
- lua_api.AppendValues ("Mouse.MB_LEFT");
- lua_api.AppendValues ("Mouse.KB_MIDDLE");
- lua_api.AppendValues ("Mouse.MB_RIGHT");
- lua_api.AppendValues ("Keyboard.modifier_pressed");
- lua_api.AppendValues ("Keyboard.button_pressed");
- lua_api.AppendValues ("Keyboard.button_released");
- lua_api.AppendValues ("Keyboard.any_pressed");
- lua_api.AppendValues ("Keyboard.any_released");
- lua_api.AppendValues ("Keyboard.TAB");
- lua_api.AppendValues ("Keyboard.ENTER");
- lua_api.AppendValues ("Keyboard.ESCAPE");
- lua_api.AppendValues ("Keyboard.SPACE");
- lua_api.AppendValues ("Keyboard.BACKSPACE");
- lua_api.AppendValues ("Keyboard.KP_0");
- lua_api.AppendValues ("Keyboard.KP_1");
- lua_api.AppendValues ("Keyboard.KP_2");
- lua_api.AppendValues ("Keyboard.KP_3");
- lua_api.AppendValues ("Keyboard.KP_4");
- lua_api.AppendValues ("Keyboard.KP_5");
- lua_api.AppendValues ("Keyboard.KP_6");
- lua_api.AppendValues ("Keyboard.KP_7");
- lua_api.AppendValues ("Keyboard.KP_8");
- lua_api.AppendValues ("Keyboard.KP_9");
- lua_api.AppendValues ("Keyboard.F1");
- lua_api.AppendValues ("Keyboard.F2");
- lua_api.AppendValues ("Keyboard.F3");
- lua_api.AppendValues ("Keyboard.F4");
- lua_api.AppendValues ("Keyboard.F5");
- lua_api.AppendValues ("Keyboard.F6");
- lua_api.AppendValues ("Keyboard.F7");
- lua_api.AppendValues ("Keyboard.F8");
- lua_api.AppendValues ("Keyboard.F9");
- lua_api.AppendValues ("Keyboard.F10");
- lua_api.AppendValues ("Keyboard.F11");
- lua_api.AppendValues ("Keyboard.F12");
- lua_api.AppendValues ("Keyboard.HOME");
- lua_api.AppendValues ("Keyboard.LEFT");
- lua_api.AppendValues ("Keyboard.UP");
- lua_api.AppendValues ("Keyboard.RIGHT");
- lua_api.AppendValues ("Keyboard.DOWN");
- lua_api.AppendValues ("Keyboard.PAGE_UP");
- lua_api.AppendValues ("Keyboard.PAGE_DOWN");
- lua_api.AppendValues ("Keyboard.LCONTROL");
- lua_api.AppendValues ("Keyboard.RCONTROL");
- lua_api.AppendValues ("Keyboard.LSHIFT");
- lua_api.AppendValues ("Keyboard.RSHIFT");
- lua_api.AppendValues ("Keyboard.CAPS_LOCK");
- lua_api.AppendValues ("Keyboard.LALT");
- lua_api.AppendValues ("Keyboard.RALT");
- lua_api.AppendValues ("Keyboard.LSUPER");
- lua_api.AppendValues ("Keyboard.RSUPER");
- lua_api.AppendValues ("Keyboard.NUM_0");
- lua_api.AppendValues ("Keyboard.NUM_1");
- lua_api.AppendValues ("Keyboard.NUM_2");
- lua_api.AppendValues ("Keyboard.NUM_3");
- lua_api.AppendValues ("Keyboard.NUM_4");
- lua_api.AppendValues ("Keyboard.NUM_5");
- lua_api.AppendValues ("Keyboard.NUM_6");
- lua_api.AppendValues ("Keyboard.NUM_7");
- lua_api.AppendValues ("Keyboard.NUM_8");
- lua_api.AppendValues ("Keyboard.NUM_9");
- lua_api.AppendValues ("Keyboard.A");
- lua_api.AppendValues ("Keyboard.B");
- lua_api.AppendValues ("Keyboard.C");
- lua_api.AppendValues ("Keyboard.D");
- lua_api.AppendValues ("Keyboard.E");
- lua_api.AppendValues ("Keyboard.F");
- lua_api.AppendValues ("Keyboard.G");
- lua_api.AppendValues ("Keyboard.H");
- lua_api.AppendValues ("Keyboard.I");
- lua_api.AppendValues ("Keyboard.J");
- lua_api.AppendValues ("Keyboard.K");
- lua_api.AppendValues ("Keyboard.L");
- lua_api.AppendValues ("Keyboard.M");
- lua_api.AppendValues ("Keyboard.N");
- lua_api.AppendValues ("Keyboard.O");
- lua_api.AppendValues ("Keyboard.P");
- lua_api.AppendValues ("Keyboard.Q");
- lua_api.AppendValues ("Keyboard.R");
- lua_api.AppendValues ("Keyboard.S");
- lua_api.AppendValues ("Keyboard.T");
- lua_api.AppendValues ("Keyboard.U");
- lua_api.AppendValues ("Keyboard.V");
- lua_api.AppendValues ("Keyboard.W");
- lua_api.AppendValues ("Keyboard.X");
- lua_api.AppendValues ("Keyboard.Y");
- lua_api.AppendValues ("Keyboard.Z");
- lua_api.AppendValues ("Keyboard.a");
- lua_api.AppendValues ("Keyboard.b");
- lua_api.AppendValues ("Keyboard.c");
- lua_api.AppendValues ("Keyboard.d");
- lua_api.AppendValues ("Keyboard.e");
- lua_api.AppendValues ("Keyboard.f");
- lua_api.AppendValues ("Keyboard.g");
- lua_api.AppendValues ("Keyboard.h");
- lua_api.AppendValues ("Keyboard.i");
- lua_api.AppendValues ("Keyboard.j");
- lua_api.AppendValues ("Keyboard.k");
- lua_api.AppendValues ("Keyboard.l");
- lua_api.AppendValues ("Keyboard.m");
- lua_api.AppendValues ("Keyboard.n");
- lua_api.AppendValues ("Keyboard.o");
- lua_api.AppendValues ("Keyboard.p");
- lua_api.AppendValues ("Keyboard.q");
- lua_api.AppendValues ("Keyboard.r");
- lua_api.AppendValues ("Keyboard.s");
- lua_api.AppendValues ("Keyboard.t");
- lua_api.AppendValues ("Keyboard.u");
- lua_api.AppendValues ("Keyboard.v");
- lua_api.AppendValues ("Keyboard.w");
- lua_api.AppendValues ("Keyboard.x");
- lua_api.AppendValues ("Keyboard.y");
- lua_api.AppendValues ("Keyboard.z");
- lua_api.AppendValues ("ResourcePackage.load");
- lua_api.AppendValues ("ResourcePackage.unload");
- lua_api.AppendValues ("ResourcePackage.flush");
- lua_api.AppendValues ("ResourcePackage.has_loaded");
- lua_api.AppendValues("Camera.local_position");
- lua_api.AppendValues("Camera.local_rotation");
- lua_api.AppendValues("Camera.local_pose");
- lua_api.AppendValues("Camera.world_position");
- lua_api.AppendValues("Camera.world_rotation");
- lua_api.AppendValues("Camera.world_pose");
- lua_api.AppendValues("Camera.set_local_position");
- lua_api.AppendValues("Camera.set_local_rotation");
- lua_api.AppendValues("Camera.set_local_pose");
- lua_api.AppendValues("Camera.set_projection_type");
- lua_api.AppendValues("Camera.projection_type");
- lua_api.AppendValues("Camera.fov");
- lua_api.AppendValues("Camera.set_fov");
- lua_api.AppendValues("Camera.aspect");
- lua_api.AppendValues("Camera.set_aspect");
- lua_api.AppendValues("Camera.near_clip_distance");
- lua_api.AppendValues("Camera.set_near_clip_distance");
- lua_api.AppendValues("Camera.far_clip_distance");
- lua_api.AppendValues("Camera.set_far_clip_distance");
- lua_api.AppendValues("Mesh.local_position");
- lua_api.AppendValues("Mesh.local_rotation");
- lua_api.AppendValues("Mesh.local_pose");
- lua_api.AppendValues("Mesh.world_position");
- lua_api.AppendValues("Mesh.world_rotation");
- lua_api.AppendValues("Mesh.world_pose");
- lua_api.AppendValues("Mesh.set_local_position");
- lua_api.AppendValues("Mesh.set_local_rotation");
- lua_api.AppendValues("Mesh.set_local_pose");
- lua_api.AppendValues("Unit.local_position");
- lua_api.AppendValues("Unit.local_rotation");
- lua_api.AppendValues("Unit.local_pose");
- lua_api.AppendValues("Unit.world_position");
- lua_api.AppendValues("Unit.world_rotation");
- lua_api.AppendValues("Unit.world_pose");
- lua_api.AppendValues("Unit.set_local_position");
- lua_api.AppendValues("Unit.set_local_rotation");
- lua_api.AppendValues("Unit.set_local_pose");
- lua_api.AppendValues("World.spawn_unit");
- lua_api.AppendValues("World.play_sound");
- lua_api.AppendValues("World.pause_sound");
- lua_api.AppendValues("World.link_sound");
- lua_api.AppendValues("World.set_listener");
- lua_api.AppendValues("World.set_sound_position");
- lua_api.AppendValues("World.set_sound_range");
- lua_api.AppendValues("World.set_sound_volume");
- entry1.Completion = new EntryCompletion ();
- entry1.Completion.Model = lua_api;
- entry1.Completion.TextColumn = 0;
- }
-
- public void Connect()
- {
- try
- {
- // Do nothing if connected
- if( m_sock != null && m_sock.Connected )
- {
- return;
- }
- // Try to connect
- m_sock = new System.Net.Sockets.Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
- // TODO: Input check
- m_server_ip = ip_entry.Text;
- m_server_port = Convert.ToInt16(port_entry.Text);
- // Define the Server address and port
- IPEndPoint epServer = new IPEndPoint(IPAddress.Parse(m_server_ip), m_server_port);
- // Connect to server non-Blocking method
- m_sock.Blocking = false;
- m_sock.BeginConnect(epServer, new AsyncCallback(OnConnected), m_sock);
- }
- catch(Exception e)
- {
- WriteLog("Unable to connect to " + m_server_ip + ":" + m_server_port + "\n", tagInfo);
- }
- }
-
- public void OnConnected(IAsyncResult ar)
- {
- try
- {
- System.Net.Sockets.Socket sock = (System.Net.Sockets.Socket)ar.AsyncState;
- sock.EndConnect(ar);
- WriteLog("Connected to " + sock.RemoteEndPoint.ToString() + "\n", tagInfo);
- // Start receiving stuff
- Receive(sock);
- }
- catch( Exception ex )
- {
- WriteLog("Unable to connect to " + m_server_ip + ":" + m_server_port + "\n", tagInfo);
- }
- }
-
- public void Receive(System.Net.Sockets.Socket sock)
- {
- try
- {
- sock.BeginReceive(m_msg_header, 0, 4, SocketFlags.None,
- new AsyncCallback(OnReceived), sock);
- }
- catch( Exception ex )
- {
- Console.Write("Receive failed!");
- }
- }
-
- public void OnReceived(IAsyncResult ar)
- {
- try
- {
- System.Net.Sockets.Socket sock = (System.Net.Sockets.Socket)ar.AsyncState;
- int nBytesRec = sock.EndReceive(ar);
- if(nBytesRec > 0)
- {
- // Read the message
- int bytesRead = sock.Receive(m_byBuff, BitConverter.ToInt32(m_msg_header, 0), SocketFlags.None);
- // Wrote the data to the List
- string received = Encoding.ASCII.GetString( m_byBuff, 0, bytesRead );
- JObject obj = JObject.Parse(received);
- if (obj["type"].ToString() == "message")
- {
- string severity = obj["severity"].ToString();
- string message = obj["message"].ToString();
- if (severity == "info")
- {
- WriteLog(message, tagInfo);
- }
- else if (severity == "warning")
- {
- WriteLog(message, tagWarning);
- }
- else if (severity == "error")
- {
- WriteLog(message, tagError);
- }
- else if (severity == "debug")
- {
- WriteLog(message, tagDebug);
- }
- }
- else
- {
- WriteLog("Unknown response from server\n", tagInfo);
- }
- // If the connection is still usable restablish the callback
- Receive(sock);
- }
- else
- {
- // If no data was recieved then the connection is probably dead
- WriteLog ("Server closed connection\n", tagInfo);
- sock.Shutdown( SocketShutdown.Both );
- sock.Close();
- }
- }
- catch( Exception ex )
- {
- WriteLog ("Unknown error during receive\n", tagInfo);
- }
- }
- protected void WriteLog(string text, TextTag tag)
- {
- Gtk.Application.Invoke (delegate
- {
- TextIter endIter = textview1.Buffer.EndIter;
- textview1.Buffer.Insert(ref endIter, text);
- endIter.BackwardChars(text.Length);
- textview1.Buffer.ApplyTag(tag, endIter, textview1.Buffer.EndIter);
- textview1.ScrollToMark(textview1.Buffer.CreateMark("bottom", textview1.Buffer.EndIter, false), 0, true, 0.0, 1.0);
- });
- }
- protected void OnDeleteEvent (object sender, DeleteEventArgs a)
- {
- Application.Quit ();
- a.RetVal = true;
- }
- private static void OnSent(IAsyncResult ar)
- {
- try
- {
- // Retrieve the socket from the state object.
- System.Net.Sockets.Socket sock = (System.Net.Sockets.Socket) ar.AsyncState;
- // Complete sending the data to the remote device.
- sock.EndSend(ar);
- }
- catch (Exception e)
- {
- Console.WriteLine(e.ToString());
- }
- }
- protected void Send(string data)
- {
- try {
- m_sock.Send(BitConverter.GetBytes(data.Length));
- m_sock.Send(Encoding.ASCII.GetBytes (data));
- } catch (Exception e) {
- Console.WriteLine (e.ToString ());
- }
- }
- protected void SendScript(String script)
- {
- string json = "{\"type\":\"script\",\"script\":\"" + script + "\"}";
- Send(json);
- }
- protected void SendCommand(String command)
- {
- char[] delimiterChars = { ' ', '\t' };
- string[] words = command.Split(delimiterChars);
- string cmd = words[0];
- string resource_type = words[1];
- string resource_name = words[2];
-
- string json = "{\"type\":\"command\",\"command\":\"" + cmd + "\","
- + "\"resource_type\":" + "\"" + resource_type + "\","
- + "\"resource_name\":" + "\"" + resource_name + "\"}";
- Send (json);
- }
- protected void OnEntryActivated (object sender, EventArgs e)
- {
- string text = entry1.Text;
- text = text.Trim ();
- // Do processing only if we have text
- if (text.Length > 0)
- {
- // Add command to history
- history [history_size % MAX_HISTORY_ITEMS] = text;
- history_size++;
- history_current = history_size;
- // Try to connect before sending any stuff
- Connect();
- // Sanitize entered text
- string safe_text = text.Replace("\"", "\\\"");
- if (safe_text[0] == '\\') {
- SendCommand (safe_text.Substring(1));
- } else {
- SendScript (safe_text);
- }
- // Log entered text
- WriteLog ("> " + text + "\n", tagInfo);
- }
- entry1.Text = "";
- }
- protected void OnEntryKeyPressed (object o, KeyPressEventArgs args)
- {
- switch (args.Event.Key)
- {
- case Gdk.Key.Down:
- {
- if (history_current < history_size)
- {
- history_current++;
- }
- break;
- }
- case Gdk.Key.Up:
- {
- if (history_current > 0)
- {
- history_current--;
- }
- break;
- }
- default:
- {
- return;
- }
- }
- if (history_size == history_current)
- {
- entry1.Text = "";
- }
- else
- {
- entry1.Text = history [history_current % MAX_HISTORY_ITEMS];
- entry1.Position = entry1.Text.Length;
- }
- args.RetVal = true;
- }
- protected void OnConnectClicked (object sender, EventArgs e)
- {
- Connect ();
- }
- }
|