示例#1
0
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            Action action = value as Action;

            if (action != null)
            {            //Determine which is set
                if (action.BookmarkLink != null &&
                    action.BookmarkLink.Expression != null &&
                    action.BookmarkLink.Expression != EmptyString)
                {
                    return("Jump to bookmark");
                }
                if (action.Hyperlink != null &&
                    action.Hyperlink.Expression != null &&
                    action.Hyperlink.Expression != EmptyString)
                {
                    return("Jump to URL");
                }
                if (action.Drillthrough != null &&
                    !action.Drillthrough.ReportName.IsEmptyString)
                {
                    return("Jump to Report");
                }
                return("None");
            }
            return("(Action)");
        }
示例#2
0
        private void InitializeControls()
        {
            _action = new Action();
            _action.BookmarkLink            = Designer.BookmarkLink;
            _action.Hyperlink               = Designer.Hyperlink;
            _action.Drillthrough.ReportName = Designer.Drillthrough.ReportName;
            _action.Drillthrough.Parameters.AddRange(Designer.Drillthrough.Parameters);

            using (new SuspendLayoutTransaction(this, true))
            {
                Control editor = CreateActionEditor(Designer.ReportItem, _action);
                editor.Dock = DockStyle.Top;
                Controls.Add(editor);

                Controls.Add(new TypedValueEditor(ServiceProvider,
                                                  Resources.CalendarSmartPanelDocumentMapLabel, Designer.ReportItem, ReportItemDesignerBase.DocumentMapLabelPropertyName));

                Controls.Add(new TypedValueEditor(ServiceProvider,
                                                  Resources.CalendarSmartPanelBookmarkIDLabel, Designer.ReportItem, ReportItemDesignerBase.BookmarkIDPropertyName));
            }
        }