public override string Execute(int consoleWidth) { int _id = (int)pars.GetPar("id").argValues[0]; string _memo1 = ""; string _memo2 = ""; object[] args = pars.GetPar("m1").argValues; for (int i = 0; i < args.Length; i++) { _memo1 += (string)args[i] + " "; } args = pars.GetPar("m2").argValues; for (int i = 0; i < args.Length; i++) { _memo2 += (string)args[i] + " "; } string _guid = ""; lock (_js.jsLock) { JobNode _node = _js.LGetNode(_id); _guid = _node.guid.ToString(); } _db.AddMemoToNode(_guid, _memo1, _memo2); return("<color><green>DB updated."); }
public override string Execute(int consoleWidth) { lock (_js.jsLock) { JobNode _node = _js.LGetNode((Int32)pars.GetPar("id").argValues[0]); if (_node != null) { if (OParUsed("n")) { _node.name = (string)pars.GetPar("n").argValues[0]; } if (OParUsed("mac")) { _node.mac = ((PhysicalAddress)pars.GetPar("mac").argValues[0]).ToString(); } if (OParUsed("ip")) { _node.ip = (IPAddress)pars.GetPar("ip").argValues[0]; } return("<color><green>Node edited."); } else { return("<color><red>Node does not exist!"); } } }
public override string Execute(int consoleWidth) { int _id = (int)pars.GetPar("id").argValues[0]; string _guid = ""; lock (_js.jsLock) { JobNode _node = _js.LGetNode(_id); _guid = _node.guid.ToString(); } string[] _buffer = _db.GetMemoFromNode(_guid); if (_buffer == null) { return("<color><red>NODE [GUID: " + _guid + "] does not exist!"); } output += "<color><green>NODE [GUID: " + _guid + "]\n\n"; output += "<color><white>" + _buffer[0] + "\n\n" + _buffer[1]; return(output); }