private Control getProcessingDialog() { var image = new EwfImage("Images/Progress.gif"); image.Style.Add("display", "inline"); return(new Block( new Paragraph(image, " ".GetLiteralControl(), Translation.Processing.GetLiteralControl()), new Paragraph( new CustomButton(() => "stopPostBackRequest()") { ActionControlStyle = new TextActionControlStyle(Translation.ThisSeemsToBeTakingAWhile) }) { CssClass = "ewfTimeOut" /* This is used by the Standard Library JavaScript file. */ }) { CssClass = CssElementCreator.ProcessingDialogBlockCssClass }); }
void ControlTreeDataLoader.LoadData() { basicBody.Attributes.Add("onpagehide", "hideProcessingDialog();"); form.Action = EwfPage.Instance.InfoAsBaseType.GetUrl(); var warningControls = new List <Control>(); if (!AppTools.IsLiveInstallation) { var children = new List <Control>(); children.Add("This is not the live system. Changes made here will be lost and are not recoverable. ".GetLiteralControl()); if (AppTools.IsIntermediateInstallation && AppRequestState.Instance.IntermediateUserExists) { children.Add( new PostBackButton( PostBack.CreateFull( id: "ewfIntermediateLogOut", firstModificationMethod: IntermediateAuthenticationMethods.ClearCookie, actionGetter: () => new PostBackAction(new ExternalResourceInfo(NetTools.HomeUrl))), new ButtonActionControlStyle("Log Out", ButtonActionControlStyle.ButtonSize.ShrinkWrap), false)); } warningControls.Add(new PlaceHolder().AddControlsReturnThis(children.ToArray())); } else if (ConfigurationStatics.MachineIsStandbyServer) { warningControls.Add( "This is a standby system. It operates with a read-only database, and any attempt to make a modification will result in an error.".GetLiteralControl()); } if (AppRequestState.Instance.UserAccessible && AppRequestState.Instance.ImpersonatorExists && (!AppTools.IsIntermediateInstallation || AppRequestState.Instance.IntermediateUserExists)) { warningControls.Add( new PlaceHolder().AddControlsReturnThis( "User impersonation is in effect. ".GetLiteralControl(), EwfLink.Create( SelectUser.GetInfo(EwfPage.Instance.InfoAsBaseType.GetUrl()), new ButtonActionControlStyle("Change User", ButtonActionControlStyle.ButtonSize.ShrinkWrap)), " ".GetLiteralControl(), new PostBackButton( PostBack.CreateFull( id: "ewfEndImpersonation", firstModificationMethod: UserImpersonationStatics.EndImpersonation, actionGetter: () => new PostBackAction(new ExternalResourceInfo(NetTools.HomeUrl))), new ButtonActionControlStyle("End Impersonation", ButtonActionControlStyle.ButtonSize.ShrinkWrap), usesSubmitBehavior: false))); } if (warningControls.Any()) { var warningControl = warningControls.Count() > 1 ? ControlStack.CreateWithControls(true, warningControls.ToArray()) : warningControls.Single(); ph.AddControlsReturnThis(new Block(warningControl) { CssClass = CssElementCreator.TopWarningBlockCssClass }); } ph2.AddControlsReturnThis(new Block { CssClass = CssElementCreator.ClickBlockingBlockCssClass }, getProcessingDialog()); ph2.AddControlsReturnThis(new NamingPlaceholder(getStatusMessageDialog())); var ajaxLoadingImage = new EwfImage("Images/ajax-loader.gif") { CssClass = "ajaxloaderImage" }; ajaxLoadingImage.Style.Add("display", "none"); ph2.AddControlsReturnThis(ajaxLoadingImage); EwfPage.Instance.ClientScript.RegisterOnSubmitStatement(GetType(), "formSubmitEventHandler", "postBackRequestStarted()"); }