示例#1
0
 private void updateInterface(Sitecore.Web.UI.Sheer.Message message)
 {
     ItemList.ColumnNames.Clear();
     ItemList.Controls.Clear();
     Status.Text = "";
     createParameters();
     createActions();
     ConfigSection.Header = string.Concat("Configure report - ", Current.Context.ReportItem.Name);
     Sitecore.Context.ClientPage.ClientResponse.Refresh(MainPanel);
     Sitecore.Context.ClientPage.ClientResponse.Refresh(Status);
 }
示例#2
0
        //protected override void OK_Click() {
        //    ReadValuesIntoResponse();
        //    SheerResponse.SetDialogValue(this.ScheduleValue.XmlValue.ToString());
        //    base.OK_Click();
        //}

        //if (!Sitecore.Web.UI.XamlSharp.Xaml.XamlControl.AjaxScriptManager.IsEvent) {
        //    Sitecore.Shell.Applications.ContentEditor.Checklist list = FindControl(GetID("list")) as Sitecore.Shell.Applications.ContentEditor.Checklist;
        //    Sitecore.Shell.Applications.ContentEditor.Text text = FindControl(GetID("text")) as Sitecore.Shell.Applications.ContentEditor.Text;

        //    list.CheckAll();
        //}

        public override void HandleMessage(Sitecore.Web.UI.Sheer.Message message)
        {
            if (message["id"] == this.ID)
            {
                Sitecore.Shell.Applications.ContentEditor.Checklist list = FindControl(GetID("list")) as Sitecore.Shell.Applications.ContentEditor.Checklist;
                Sitecore.Shell.Applications.ContentEditor.Text      text = FindControl(GetID("text")) as Sitecore.Shell.Applications.ContentEditor.Text;
                if (list != null)
                {
                    string messageText;
                    if ((messageText = message.Name) == null)
                    {
                        return;
                    }

                    if (messageText != "checklist:checkall")
                    {
                        if (messageText == "checklist:uncheckall")
                        {
                            list.UncheckAll();
                        }
                        else if (messageText == "checklist:invert")
                        {
                            list.Invert();
                        }
                    }
                    else if (messageText != "checklist:selectplayer")
                    {
                        list.CheckAll();
                    }
                    else if (messageText != "checklist:clear")
                    {
                    }
                    else
                    {
                        list.CheckAll();
                    }
                }
            }

            base.HandleMessage(message);
        }
示例#3
0
        private void updateParameters(Sitecore.Web.UI.Sheer.Message message)
        {
            foreach (Control ctl in ConfigSection.Controls)
            {
                if (ctl.ID != null && ctl.ID.StartsWith("params_"))
                {
                    string[] splitid = ctl.ID.Split('_');

                    foreach (Control subCtl in ctl.Controls)
                    {
                        if (subCtl.ID != null && subCtl.ID.StartsWith("params_"))
                        {
                            string tid     = subCtl.ID.Substring(7);
                            int    indexof = tid.IndexOf('_');
                            tid = tid.Substring(0, indexof);
                            Control input = subCtl.FindControl(subCtl.Value) as Control;
                            if (input != null)
                            {
                                if (splitid[1].StartsWith("scanner"))
                                {
                                    Current.Context.ReportItem.Scanners.First(s => s.Name.ToLower() == splitid[2]).SetAttributeValue(tid, input.Value);
                                }
                                else if (splitid[1].StartsWith("viewer"))
                                {
                                    Current.Context.ReportItem.Viewers.First(v => v.Name.ToLower() == splitid[2]).SetAttributeValue(tid, input.Value);
                                }
                                else
                                {
                                    Current.Context.ReportItem.Filters.First(f => f.Name.ToLower() == splitid[2]).SetAttributeValue(tid, input.Value);
                                }
                            }
                        }
                    }
                }
            }
            if (message.Name == "asr:linkit")
            {
                Sitecore.Context.ClientPage.SendMessage(this, "asr:createlink");
            }
        }
        /// <inheritdoc />
        public override void HandleMessage(Message message)
        {
            base.HandleMessage(message);
            if (message["id"] != this.ID || string.IsNullOrWhiteSpace(message.Name))
            {
                return;
            }

            switch (message.Name)
            {
            case "fotowareimage:SelectImageFromFotoWare":
                Sitecore.Context.ClientPage.Start((object)this, "SelectFromFotoWare");
                break;

            default:
                if (this.Value.Length > 0)
                {
                    this.SetModified();
                    this.Value = string.Empty;
                }
                break;
            }
        }
示例#5
0
 private void runFinished(Sitecore.Web.UI.Sheer.Message message)
 {
     populateItemList(1, Current.Context.Settings.PageSize);
     SheerResponse.Refresh(MyToolbar);
 }