public void XmlLoad() { XmlSerializer xmls = new XmlSerializer(typeof(CContents)); using (FileStream fs = new FileStream(m_sSettingFile, FileMode.Open)) { this.Contents = (CContents)xmls.Deserialize(fs); fs.Close(); fs.Dispose(); } }
private void InitializeSettins() { m_sSettingFile = SettingsDirectory + "\\settings.xml"; if (File.Exists(m_sSettingFile)) { XmlLoad(); return; } this.Contents = new CContents(); Contents.TimeSheetFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); Contents.UploadFileFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); XmlSave(); }