Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            RegisterHyperLink.NavigateUrl = "Register";
            // Enable this once you have account confirmation enabled for password reset functionality
            ForgotPasswordHyperLink.NavigateUrl = "Forgot";
            OpenAuthLogin.ReturnUrl             = Request.QueryString["ReturnUrl"];
            var returnUrl = HttpUtility.UrlEncode(Request.QueryString["ReturnUrl"]);

            if (!String.IsNullOrEmpty(returnUrl))
            {
                RegisterHyperLink.NavigateUrl += "?ReturnUrl=" + returnUrl;
            }

            string applicationName = MyWebUtils.Application;

            if (!String.IsNullOrEmpty(applicationName))
            {
                Title = string.Format("Log in to {0}", applicationName);
            }

            if (UiApplication.Me != null)
            {
                CiApplication ciApplication = UiApplication.Me.CiApplication;
                if (ciApplication != null)
                {
                    string themeColor = ciApplication.ThemeColor;

                    if (!String.IsNullOrEmpty(themeColor))
                    {
                        btnLogin.ForeColor = Color.White;
                        btnLogin.BackColor = MyWebUtils.ToColor(themeColor);
                    }
                }
            }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            UiApplication.Me = CreateUiPlugin(APPLICATION_PUX_FILE) as UiApplication;
            CiApplication ciApplication = UiApplication.Me.CiApplication;


            if (!MyWebUtils.IsTimeOutReached(this) && ciApplication != null)
            {
                ASPxWebControl.GlobalTheme          = ciApplication.Theme;
                ASPxWebControl.GlobalThemeBaseColor = ciApplication.ThemeColor;

                MyWebUtils.RegisterPluginScripts(this);

                myOuterPanel.Controls.AddAt(0, UiApplication.Me);

                object justLoggedIn = Session["JustLoggedIn"];
                if (justLoggedIn != null && Convert.ToBoolean(justLoggedIn))
                {
                    Session["JustLoggedIn"] = null;
                    UiApplication.Me.RunLoginMacro();
                }

                string puxFile = MyWebUtils.QueryString[PLUGIN_SRC_KEY];
                if (MyUtils.IsEmpty(puxFile))
                {
                    puxFile = ciApplication.HomePluginSrc;
                }

                if (puxFile != APPLICATION_PUX_FILE)
                {
                    LoadUiPlugin(puxFile);
                }
            }
        }