예제 #1
0
        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);
        }
예제 #2
0
        void Menu_Session_Start(object InObj, RoutedEventArgs InArgs)
        {
            EhllapiSettings settings = EhllapiSettings.RecallSettings();

            SessionScript.Launch_LoadLogonCache(settings);
            SessionScript.Launch_ClientAccessSession(settings);
        }
예제 #3
0
        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);
            }
        }
예제 #4
0
        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
        }
예제 #5
0
 void EhlappiSettingsEntry_Loaded(object sender, RoutedEventArgs e)
 {
     this.EhllapiSettings          = EhllapiSettings.RecallSettings();
     grdSettingsPrompt.DataContext = this.EhllapiSettings;
 }
예제 #6
0
        void Menu_Session_End(object InObj, RoutedEventArgs InArgs)
        {
            EhllapiSettings settings = EhllapiSettings.RecallSettings();

            SessionScript.End_ClientAccessSession(settings);
        }