Beispiel #1
0
        private void ChooseTemplateAction_Execute(object sender, DevExpress.ExpressApp.Actions.SingleChoiceActionExecuteEventArgs e)
        {
            string appPath = HttpContext.Current.Request.ApplicationPath;

            HttpContext.Current.Response.Redirect(appPath.EndsWith("\\") ?
                                                  appPath : appPath + "\\"
                                                  + e.SelectedChoiceActionItem.Data.ToString() + HttpContext.Current.Request.Url.Query);
        }
Beispiel #2
0
        private void ChooseLanguage_Execute(object sender, DevExpress.ExpressApp.Actions.SingleChoiceActionExecuteEventArgs e)
        {
            string newLanguageName = e.SelectedChoiceActionItem.Data as string;

            if (newLanguageName == defaultLanguageCaption)
            {
                newLanguageName = defaultCultureName;
            }
            Application.SetLanguage(newLanguageName);
        }
Beispiel #3
0
        private void ChooseTemplateAction_Execute(object sender, DevExpress.ExpressApp.Actions.SingleChoiceActionExecuteEventArgs e)
        {
            Page page = WebWindow.CurrentRequestPage;

            if (page != null)
            {
                WebWindowTemplateHttpHandler.PreferredApplicationWindowTemplateType = (TemplateType)e.SelectedChoiceActionItem.Data;
                if (page.IsCallback)
                {
                    WebWindow.CurrentRequestWindow.RegisterStartupScript("redirect", ((ICallbackManagerHolder)WebWindow.CurrentRequestPage).CallbackManager.GetScript(true));
                }
                else
                {
                    HttpContext.Current.Response.Redirect(HttpContext.Current.Request.Path);
                }
            }
        }