Пример #1
0
        public bool Login(string UserName, string Password, string Client, string Language)
        {
            BeforeLogin?.Invoke(Session, new EventArgs());
            Session.FindById <GuiTextField>("wnd[0]/usr/txtRSYST-BNAME").Text = UserName;
            Session.FindById <GuiTextField>("wnd[0]/usr/pwdRSYST-BCODE").Text = Password;
            Session.FindById <GuiTextField>("wnd[0]/usr/txtRSYST-MANDT").Text = Client;
            Session.FindById <GuiTextField>("wnd[0]/usr/txtRSYST-LANGU").Text = Language;
            var window = Session.FindById <GuiFrameWindow>("wnd[0]");

            window.SendVKey(0);
            GuiStatusbar status = Session.FindById <GuiStatusbar>("wnd[0]/sbar");

            if (status != null && status.MessageType.ToLower() == "e")
            {
                Connection.CloseSession(Session.Id);
                FailLogin?.Invoke(Session, new EventArgs());
                return(false);
            }
            AfterLogin?.Invoke(Session, new EventArgs());
            GuiRadioButton rb_Button = Session.FindById <GuiRadioButton>("wnd[1]/usr/radMULTI_LOGON_OPT2");

            if (rb_Button != null)
            {
                rb_Button.Select();
                window.SendVKey(0);
            }
            return(true);
        }
Пример #2
0
        //com.abstractatech.appmanager.Assets.Publish ref0;

        //FormAsPopupExtensionsForConsoleFormPackageMediator ref_allow_webview_to_talk;


        /// <summary>
        /// This is a javascript application.
        /// </summary>
        /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
        public Application(com.abstractatech.appmanager.about.HTML.Pages.IApp a)
        {
            "My Appz".ToDocumentTitle();


            a.LaunchMyAppz.WhenClicked(
             delegate
             {
                 Console.WriteLine("LaunchMyAppz click");

                 Native.window.history.pushState(
                     "too big to store",
                     async scope =>
                     {
                         Console.WriteLine("LaunchMyAppz state loading");

                         var xpage = new com.abstractatech.appmanager.about.HTML.Pages.App.FromDocument();
                         //Error	247	'com.abstractatech.appmanager.HTML.Pages.IApp' does not contain a definition for 'LaunchMyAppz' and no extension method 'LaunchMyAppz' accepting a first argument of type 'com.abstractatech.appmanager.HTML.Pages.IApp' could be found (are you missing a using directive or an assembly reference?)	X:\jsc.svn\examples\javascript\android\com.abstractatech.appmanager\com.abstractatech.appmanager\Application.cs	55	45	com.abstractatech.appmanager

                         var button = xpage.LaunchMyAppz;

                         button.disabled = true;
                         button.style.Opacity = 0.5;

                         {
                             var source = await typeof(x);


                             #region layout


                             var newbody_page = new BeforeLogin();

                             // we have to restore id fields

                             newbody_page.go.id = "go";
                             newbody_page.username.id = "username";
                             newbody_page.LoginButton.id = "LoginButton";


                             var newbody = newbody_page.body;
                             var oldbody = Native.document.body;

                             Native.document.body.parentNode.insertBefore(
                                 newbody, oldbody
                             );

                             oldbody.Orphanize();

                             #endregion

                             Console.WriteLine("LaunchMyAppz state before eval");

                             var restore = source.eval();

                             Console.WriteLine("LaunchMyAppz state after eval");


                             // do we know how to unwind? if not reload

                             //await scope;
                             //restore();
                         }

                         //button.style.Opacity = 1;
                         //button.disabled = false;
                     }
                 );


             }
          );



        }