示例#1
0
	public void SubmitForm()
	{
		TextCallback callback = new TextCallback(Localization.Instance.Localize("login.text.loggingin"));
		UIController.Instance.OpenPopup<bool>(Popup.StatusPopup, callback);
		client.Login(username.text, password.text);
		UIController.Instance.CloseUIWindow(UIWindow.Login);
	}
示例#2
0
	private void Client_OnLoginFailure(string message)
	{
		UIController.Instance.ClosePopup(Popup.StatusPopup);
		TextCallback callback = new TextCallback(message);
		UIController.Instance.OpenPopup<bool>(Popup.TextPopup, callback);
		UIController.Instance.OpenUIWindow(UIWindow.Login);

		Debug.Log("Login failed: " + message);
	}
示例#3
0
        internal void ShowCombo <D>(ComboBox combo, List <D> items, TextCallback <D> text, ValueCallback <D> value, int selectedIndex)
        {
            combo.Items.Clear();

            var data = new List <dynamic>();

            items.ForEach((item) => data.Add(new { Text = text(item), Value = value(item) }));

            combo.DataSource = data;
        }
示例#4
0
 private void AddLog(String line)
 {
     if (this.txtLog.InvokeRequired)
     {
         TextCallback d = AddLog;
         this.Invoke(d, new object[] { Environment.NewLine + String.Format("{0}: {1}", DateTime.Now.ToLongTimeString(), line) });
     }
     else
     {
         txtLog.AppendText(Environment.NewLine + String.Format("{0}: {1}", DateTime.Now.ToLongTimeString(), line));
     }
 }
示例#5
0
 private void SetProgressValue(string currentvalue)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.label1.InvokeRequired)
     {
         TextCallback cb = new TextCallback(SetProgressValue);
         this.Invoke(cb, new object[] { currentvalue });
     }
     else
     {
         this.label1.Text = currentvalue + "/" + this.label1.Tag.ToString();
     }
 }
示例#6
0
 public DebugConnection(TextCallback textCallback, int id)
 {
     mTextCallback = textCallback;
     mID           = id;
 }
示例#7
0
 public static void setTextCallback(TextCallback textCallback)
 {
     mTextCallback = textCallback;
 }
示例#8
0
 private static extern void SetCallback(IntPtr obj, TextCallback callback);
示例#9
0
 public SocketConnection(TextCallback textCallback)
 {
     _textCallback = textCallback;
 }
示例#10
0
 public void Register(string key, TextCallback callback)
 {
     // TODO: precalc
     this.methods[key] = (DrawingSurface ds, string text, DrawingSurface.Options options) => ds.Text(callback(), options);
 }
示例#11
0
 private void AddLog(String line)
 {
     if (this.txtLog.InvokeRequired)
     {
         TextCallback d = new TextCallback(AddLog);
         this.Invoke(d, new object[] { 
             Environment.NewLine + String.Format("{0}: {1}", DateTime.Now.ToLongTimeString(), line) });
     }
     else
     {
         txtLog.AppendText(Environment.NewLine + String.Format("{0}: {1}", DateTime.Now.ToLongTimeString(), line));
     }
 }
示例#12
0
 public SocketConnection(TextCallback textCallback)
 {
     _textCallback = textCallback;
 }