public void Fire(RPOSWindow window, RPOSWindowMessage message) { if (this.init && message >= RPOSWindowMessage.WillShow && message <= RPOSWindowMessage.DidHide) { this.responders[(int)message - (int)RPOSWindowMessage.WillShow].Invoke(window, message); } }
public void Invoke(RPOSWindow window, RPOSWindowMessage message) { if (this.init && (this.count != 0)) { if (((message - 2) & RPOSWindowMessage.DidOpen) == RPOSWindowMessage.DidOpen) { for (int i = this.count - 1; i >= 0; i--) { if (!this.TryInvoke(window, message, i)) { this.handlerGate.Remove(this.handlers[i]); this.handlers.RemoveAt(i); this.count--; } } } else { for (int j = 0; j < this.count; j++) { if (!this.TryInvoke(window, message, j)) { this.handlerGate.Remove(this.handlers[j]); this.handlers.RemoveAt(j--); this.count--; } } } } }
private void ButtonClickCallback(GameObject button) { if (RPOSWindow.GameObjectEqual(button, this._closeButton)) { this.CloseButtonClicked(); } else if (this.bumpers != null) { int count = this.bumpers.Count; if (count > 0 && button) { UIButton component = button.GetComponent <UIButton>(); if (component) { for (int i = 0; i < count; i++) { if (component == this.bumpers[i].button) { this.OnBumperClick(this.bumpers[i]); return; } } } } } }
public void Invoke(RPOSWindow window, RPOSWindowMessage message) { if (!this.init || this.count == 0) { return; } if (((int)message - (int)RPOSWindowMessage.WillShow & (int)RPOSWindowMessage.DidOpen) != (int)RPOSWindowMessage.DidOpen) { for (int i = 0; i < this.count; i++) { if (!this.TryInvoke(window, message, i)) { this.handlerGate.Remove(this.handlers[i]); int num = i; i = num - 1; this.handlers.RemoveAt(num); RPOSWindowMessageCenter.RPOSWindowMessageResponder rPOSWindowMessageResponder = this; rPOSWindowMessageResponder.count = rPOSWindowMessageResponder.count - 1; } } } else { for (int j = this.count - 1; j >= 0; j--) { if (!this.TryInvoke(window, message, j)) { this.handlerGate.Remove(this.handlers[j]); this.handlers.RemoveAt(j); RPOSWindowMessageCenter.RPOSWindowMessageResponder rPOSWindowMessageResponder1 = this; rPOSWindowMessageResponder1.count = rPOSWindowMessageResponder1.count - 1; } } } }
public void Fire(RPOSWindow window, RPOSWindowMessage message) { if ((this.init && (message >= RPOSWindowMessage.WillShow)) && (message <= RPOSWindowMessage.DidHide)) { this.responders[((int)message) - 2].Invoke(window, message); } }
public static TRPOSWindow EnsureAwake <TRPOSWindow>(this TRPOSWindow window) where TRPOSWindow : RPOSWindow { if (window != null) { RPOSWindow.EnsureAwake(window); } return(window); }
private bool TryInvoke(RPOSWindow window, RPOSWindowMessage message, int i) { RPOSWindowMessageHandler handler = this.handlers[i]; try { return(handler(window, message)); } catch (Exception exception) { Debug.LogError(string.Concat(new object[] { "handler ", handler, " threw exception with message ", message, " on window ", window, " and will no longer execute. The exception is below\r\n", exception }), window); return(false); } }
private bool TryInvoke(RPOSWindow window, RPOSWindowMessage message, int i) { bool flag; RPOSWindowMessageHandler item = this.handlers[i]; try { flag = item(window, message); } catch (Exception exception1) { Exception exception = exception1; Debug.LogError(string.Concat(new object[] { "handler ", item, " threw exception with message ", message, " on window ", window, " and will no longer execute. The exception is below\r\n", exception }), window); flag = false; } return(flag); }
public bool IsBelow(RPOSWindow window) { return(window.order > this.order); }
public bool IsAbove(RPOSWindow window) { return(window.order < this.order); }
public static void EnsureAwake(RPOSWindow window) { window._EnsureAwake(); }
private bool TryInvoke(RPOSWindow window, RPOSWindowMessage message, int i) { bool flag; RPOSWindowMessageHandler item = this.handlers[i]; try { flag = item(window, message); } catch (Exception exception1) { Exception exception = exception1; Debug.LogError(string.Concat(new object[] { "handler ", item, " threw exception with message ", message, " on window ", window, " and will no longer execute. The exception is below\r\n", exception }), window); flag = false; } return flag; }
public bool MoveUp() { RPOSWindow.EnsureAwake(this); return(RPOS.MoveUp(this)); }
public static bool IsRegistered(this RPOSWindow window) { return((window != null) && window.ready); }
public static bool IsRegistered(this RPOSWindow window) { return(!window ? false : window.ready); }