public rcInfo(rcInfo other) { fileName = other.fileName; fileDescription = other.fileDescription; originalFileName = other.originalFileName; productName = other.productName; legalCopyright = other.legalCopyright; fileType = other.fileType; icoName = other.icoName; }
public Form1() { InitializeComponent(); rcInfo _rc = new rcInfo();; rcInfo.loadSettings(ref _rc); ui_propertyGrid.SelectedObject = _rc; }
public static bool saveSettings(rcInfo _settings) { try { XmlSerializer ser = new XmlSerializer(typeof(rcInfo)); TextWriter writer = new StreamWriter("lastRc.xml"); ser.Serialize(writer, _settings); writer.Close(); return true; } catch { return false; } }
public static bool loadSettings(ref rcInfo _rc) { try { XmlSerializer ser = new XmlSerializer(typeof(rcInfo)); TextReader reader = new StreamReader("lastRc.xml", Encoding.UTF8); _rc = (rcInfo)ser.Deserialize(reader); reader.Close(); return true; } catch { return false; } }