Example #1
0
        /// <summary>
        /// Actual method that initializes the session
        /// </summary>
        private void initialize()
        {
            string jScript = "";

            // Create a new copy of the J Object and make sure were in the Z locale
            jObject = new JEXEServerClass();
            jObject.Quit();
            jObject.Log(1);
            jObject.Show(1);
            this.Eval("18!:4 <'z'");

            //// Now get the base J Script
            //jScript = UnicodeEncoding.ASCII.GetString(Resources.script);
            //// If were debugging, show the J Session Window
            //if (this.debug)
            //{
            //    // Display the session and load the profile
            //    jScript += "\nshowJ ''";
            //    jScript += "\nloadprofile ''";
            //}
            //// load this script to the current session
            //this.Variable("baseScript", jScript);

            //// We execute the script using the code stored in the resource file
            //jScript = Resources.ScriptLoader;
            //// Load the new script to the current session
            //this.Variable("loadScript", jScript);

            //// Now we execute the values in the loadScript variable
            //this.Eval("0!:100 loadScript");

            if (this.debug)
            {
                // Just display a fun message
                string script = "NB. Have fun! - bathala <*****@*****.**>";
                this.Eval(script);
            }
        }