示例#1
0
        private void AddButtonPanel()
        {
            this.saveSlabFrames = new List <SlabFrame>();
            List <WebServiceMethod> list = new List <WebServiceMethod>();

            foreach (SlabFrame slabFrame in this.slabFrames)
            {
                if (slabFrame.PropertiesControl != null && slabFrame.PropertiesControl.HasSaveMethod)
                {
                    this.saveSlabFrames.Add(slabFrame);
                    slabFrame.InitSaveButton();
                    WebServiceMethod saveWebServiceMethod = slabFrame.PropertiesControl.SaveWebServiceMethod;
                    if (saveWebServiceMethod != null)
                    {
                        list.Add(saveWebServiceMethod);
                    }
                }
            }
            if (this.ShowGlobalSaveButton() || this.showCloseButton)
            {
                this.buttonsPanel = new ButtonsPanel();
                if (this.showCloseButton)
                {
                    this.buttonsPanel.State = ButtonsPanelState.ReadOnly;
                    ButtonsPanel buttonsPanel = this.buttonsPanel;
                    buttonsPanel.CssClass += " glbClsPnl";
                    this.buttonsPanel.CloseWindowOnCancel = true;
                }
                else
                {
                    this.buttonsPanel.State = ButtonsPanelState.Save;
                    ButtonsPanel buttonsPanel2 = this.buttonsPanel;
                    buttonsPanel2.CssClass += " glbSvPnl";
                    this.buttonsPanel.SaveWebServiceMethods.AddRange(list);
                }
                this.buttonsPanel.Attributes.Add("dock", "bottom");
                this.Controls.Add(this.buttonsPanel);
            }
            if (this.saveSlabFrames.Count > 0)
            {
                base.Attributes.Add("data-type", "MultiPropertyPageViewModel");
            }
        }
示例#2
0
 internal static void SetFocusCssOnSaveButton(ButtonsPanel buttonsPanel)
 {
     ((HtmlButton)buttonsPanel.FindControl("btnCommit")).Attributes.Add("class", "btnSave");
 }