void _Connect_ConnectedEvent(string account, int password, Regulus.Remoting.Value<bool> result) { Regulus.Remoting.Value<bool> r = _Agent.Connect(account, password); r.OnValue += (success) => { DoneEvent(); result.SetValue(success); }; }
void _OnConnect(string ipaddr, int port, Regulus.Remoting.Value<bool> result) { var value = _Connect(ipaddr , port); value.OnValue += (ret) => { result.SetValue(ret); ResultEvent(ret); }; }
private void _Connecter_ConnectedEvent(string addr, int port, Regulus.Remoting.Value<bool> result) { var val = _Complex.Connect(addr , port); val.OnValue += (r) => { result.SetValue(r); }; _Updater.Remove(_Complex); _Updater.Add(_Complex); }