public void Initialize() { string filePath = System.IO.Path.GetFullPath(Utils.GetAppDirectory() + "\\Settings\\Base.xml"); _settingData = new SettingData(); if (System.IO.File.Exists(filePath)) { XmlSerializer serializer = new XmlSerializer(typeof(SettingData)); using (System.IO.StreamReader reader = new System.IO.StreamReader(filePath, Encoding.UTF8)) { _settingData = (SettingData)serializer.Deserialize(reader); reader.Close(); } } TextBoxNiconicoMailAddress.Text = _settingData.NiconicoMailaddress; PasswordNiconico.Password = _settingData.NiconicoPassword; CheckBoxRunningStart.IsChecked = _settingData.AutoRun; LoadCommunities(); if (_settingData.AutoRun) { NiconicoAlertStart(); } }
public void Initialize() { string filePath = System.IO.Path.GetFullPath(Utils.GetAppDirectory() + "\\Settings\\Base.xml"); _settingData = new SettingData(); if (System.IO.File.Exists(filePath)) { XmlSerializer serializer = new XmlSerializer(typeof(SettingData)); using (System.IO.StreamReader reader = new System.IO.StreamReader(filePath, Encoding.UTF8)) { _settingData = (SettingData)serializer.Deserialize(reader); reader.Close(); } } TextBoxNiconicoMailAddress.Text = _settingData.NiconicoMailaddress; PasswordNiconico.Password = _settingData.NiconicoPassword; CheckBoxRunningStart.IsChecked = _settingData.AutoRun; LoadCommunities(); if(_settingData.AutoRun) { NiconicoAlertStart(); } }