bool Execute(int index, string rgb) { uint value; try { value = Convert.ToUInt32(rgb, 16); } catch (Exception) { PrintError("Wrong color value"); return(false); } CColorCode[] values = (CColorCode[])Enum.GetValues(typeof(CColorCode)); if (index >= 0 && index < values.Length) { Color color = CColorUtils.FromRGB(value); CEditorSkin.SetColor(values[index], color); Print("{0}: {1}", index, CStringUtils.C(values[index].ToString(), values[index])); } else { PrintError("Wrong index"); Execute(); } return(true); }
protected override Color CreateLevelDebug() { return(CColorUtils.FromRGB(0xdee4ed)); }
protected override Color CreateLevelInfo() { return(CColorUtils.FromRGB(0xb4c974)); }
protected override Color CreateLevelWarning() { return(CColorUtils.FromRGB(0xffcf85)); }
protected override Color CreateLevelError() { return(CColorUtils.FromRGB(0xff6f5d)); }
protected override Color CreateErrorUnknownCommand() { return(CColorUtils.FromRGB(0xe1614e)); }
protected override Color CreateTableVar() { return(CColorUtils.FromRGB(0xb4c974)); }
protected override Color CreatePlain() { return(CColorUtils.FromRGB(0x243e57)); }
protected override Color CreateTableCommand() { return(CColorUtils.FromRGB(0xffcf85)); }
protected override Color CreatePlain() { return(CColorUtils.FromRGB(0xb8c4d0)); }
protected override Color CreateClear() { return(CColorUtils.FromRGB(0x383838)); }
protected override Color CreateLink() { return(CColorUtils.FromRGB(0x193562)); }
protected override Color CreateLevelCritical() { return(CColorUtils.FromRGB(0xbe2323)); }
protected override Color CreateError() { return(CColorUtils.FromRGB(0xbe2323)); }
protected override Color CreateLevelVerbose() { return(CColorUtils.FromRGB(0xb8c4d0)); }
protected override Color CreateLink() { return(CColorUtils.FromRGB(0x6ba1ff)); }
protected override Color CreateTableCommandDisabled() { return(CColorUtils.FromRGB(0xb8c4d0)); }