public void SaveStyle() { Epilog.SetStyle(_fontSize, _classColor, _methodColor, _messageColor, _dataColor); EditorPrefs.SetInt(Data.FontSizePrefId, Epilog.Style.FontSize); EditorPrefs.SetString(Data.ClassColorPrefId, Epilog.Style.ClassColor); EditorPrefs.SetString(Data.MethodColorPrefId, Epilog.Style.MethodColor); EditorPrefs.SetString(Data.MessageColorPrefId, Epilog.Style.MessageColor); EditorPrefs.SetString(Data.DataColorPrefId, Epilog.Style.DataColor); }
private void Deserialize() { var formatter = new BinaryFormatter(); using (var fs = new FileStream(@"C:\Users\vladimir_fly\Downloads\style.epilog", FileMode.OpenOrCreate)) { var style = (Style)formatter.Deserialize(fs); Epilog.SetStyle(style); Epilog.Print("deserialized", style.FontSize, style.ClassColor, style.MessageColor, style.MessageColor, style.DataColor); } }