public void Load() { Clear(); _error = string.Empty; Core.RPCCommand rpc = new Core.RPCCommand(_jee, "cmd::all"); bool result = rpc.Execute(); if (result) { _innerJson = rpc.Response; JObject googleSearch = JObject.Parse(rpc.Response); IEnumerable <JToken> results = googleSearch["result"].Children(); foreach (JToken res in results) { Command searchResult = JsonConvert.DeserializeObject <Command>(res.ToString()); searchResult.BaseCollection = _entities.EqLogics; Add(searchResult); } } else { _error = rpc.Error; } _loaded = result; }
public void Load() { this.Clear(); _error = string.Empty; Core.RPCCommand rpc = new Core.RPCCommand(_jee, "scenario::all"); bool result = rpc.Execute(); if (result) { _innerJson = rpc.Response; JObject googleSearch = JObject.Parse(rpc.Response); IEnumerable <JToken> results = googleSearch["result"].Children(); foreach (JToken res in results) { Scenario searchResult = JsonConvert.DeserializeObject <Scenario>(res.ToString()); Add(searchResult); } } else { _error = rpc.Error; } _loaded = result; }
public bool Empty() { Core.RPCCommand rpc = new Core.RPCCommand(_jee, "message::removeAll"); if (rpc.Execute()) { JObject googleSearch = JObject.Parse(rpc.Response); IEnumerable <JToken> results = googleSearch["result"]; return(results.ToString() == "ok"); } else { return(false); } }