public static EhllapiSettings RecallSettings() { EhllapiSettings settings = new EhllapiSettings(); string applDataDir = EhllapiSettings.BuildApplDataDir(); Pather.AssureDirectoryExists(applDataDir); string applStateFileName = "EhllapiSettings.xml"; string applStatePath = Path.Combine(applDataDir, applStateFileName); if (System.IO.File.Exists(applStatePath) == true) { try { using (XmlTextReader tr = new XmlTextReader(applStatePath)) { settings.ReadXml(tr); } } catch (Exception) { settings = new EhllapiSettings(); } } return(settings); }
void Menu_Session_Start(object InObj, RoutedEventArgs InArgs) { EhllapiSettings settings = EhllapiSettings.RecallSettings(); SessionScript.Launch_LoadLogonCache(settings); SessionScript.Launch_ClientAccessSession(settings); }
public void StoreSettings() { string applDataDir = EhllapiSettings.BuildApplDataDir(); string applStateFileName = "EhllapiSettings.xml"; string applStatePath = Path.Combine(applDataDir, applStateFileName); using (StreamWriter stmw = new StreamWriter(applStatePath)) { XmlSerializer xmlser = new XmlSerializer(typeof(EhllapiSettings)); xmlser.Serialize(stmw, this); } }
void Menu_Script_Signoff(object InObj, RoutedEventArgs InArgs) { SessionScript script = new SessionScript(); EhllapiSettings settings = EhllapiSettings.RecallSettings(); SessionScript.Assure_ClientAccessSession(settings); script.Play_Signon(settings); #if skip var lines = SessionScript.ReadPresentationSpace(settings).Lines; StringBuilder sb = new StringBuilder(); foreach (var line in lines) { sb.Append(line + Environment.NewLine); } MessageBox.Show(sb.ToString()); #endif }
void EhlappiSettingsEntry_Loaded(object sender, RoutedEventArgs e) { this.EhllapiSettings = EhllapiSettings.RecallSettings(); grdSettingsPrompt.DataContext = this.EhllapiSettings; }
void Menu_Session_End(object InObj, RoutedEventArgs InArgs) { EhllapiSettings settings = EhllapiSettings.RecallSettings(); SessionScript.End_ClientAccessSession(settings); }