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); }
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); }
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; }
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)); } }
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(); } }
public DebugConnection(TextCallback textCallback, int id) { mTextCallback = textCallback; mID = id; }
public static void setTextCallback(TextCallback textCallback) { mTextCallback = textCallback; }
private static extern void SetCallback(IntPtr obj, TextCallback callback);
public SocketConnection(TextCallback textCallback) { _textCallback = textCallback; }
public void Register(string key, TextCallback callback) { // TODO: precalc this.methods[key] = (DrawingSurface ds, string text, DrawingSurface.Options options) => ds.Text(callback(), options); }
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)); } }