public UstColor(string colorfile = "", bool ispath = false) { BgColor = Color.White; NoteBorderColor = Color.Black; NoteBorderWidth = 1; OutsideNoteBgColor = Color.Green; PeaceNoteBgColor = Color.Pink; CantoNoteBgColor = Color.Beige; MuffleNoteBgColor = Color.Purple; RestNoteBgColor = Color.Gray; NoteLyricColor = Color.Black; NoteLyricFontFamily = "微軟正黑體"; string readtoend = colorfile; if (ispath) { if (File.Exists(colorfile)) { readtoend = File.ReadAllText(colorfile, Functs.GetEncoding(colorfile)); } else { readtoend = ""; } } Parse(readtoend); }
public override string ToString() { string result = ""; foreach (KeyValuePair <string, string> tmpkvp in _Values) { result += Functs.NextLine(tmpkvp.Key + "=" + tmpkvp.Value); } return(result); }
public PriorList(string priorfile = "", bool ispath = false) { string readtoend = priorfile; _FilePath = priorfile; if (ispath) { if (File.Exists(priorfile)) { readtoend = File.ReadAllText(priorfile, Functs.GetEncoding(priorfile)); } else { readtoend = ""; } } Parse(readtoend); }
private object DetectValue(string key, string value) { switch (key) { case "NoteBorderWidth": return(Convert.ToInt32(value)); case "NoteLyricFontFamily": return(value); default: if (value != "") { value = Functs.RemoveAllSpaces(value); string[] rgbarray = value.Split(new char[] { ',' }); if (rgbarray.Length == 3) { Color tmpcolor = Color.FromArgb(Convert.ToByte(rgbarray[0]), Convert.ToByte(rgbarray[1]), Convert.ToByte(rgbarray[2])); return(tmpcolor); } } return(null); } }