public void cmdRecord(string args) { switch (args.Trim().ToLowerInvariant()) { case "stop": { // stop record if (!_IO.IsRecording) { _IO.WriteError(Lang.Get("No_Record")); } else { _IO.RecordStop(); _IO.WriteInfo(Lang.Get("Stop_Recording_Successful")); } break; } default: { // start record if (_IO.IsRecording) { _IO.RecordStop(); _IO.WriteInfo(Lang.Get("Stop_Recording_Successful")); } try { _IO.RecordStart(args); _IO.WriteInfo(Lang.Get("Start_Recording_Successful")); } catch (Exception e) { _IO.WriteError(e.Message); } break; } } }