Beispiel #1
0
        public PostPropertiesBandControl(CommandManager commandManager)
        {
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.DoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.ResizeRedraw, true);

            InitializeComponent();

            categoryContext = new CategoryContext();

            controller = new SharedPropertiesController(this, null, categoryDropDown,
                                                        null, textTags, labelPageOrder, textPageOrder, labelPageParent, comboPageParent, null,
                                                        datePublishDate, fields, categoryContext);

            SimpleTextEditorCommandHelper.UseNativeBehaviors(commandManager,
                                                             textTags, textPageOrder);

            postPropertiesForm = new PostPropertiesForm(commandManager, categoryContext);
            if (components == null)
            {
                components = new Container();
            }
            components.Add(postPropertiesForm);

            postPropertiesForm.Synchronize(controller);

            commandManager.Add(CommandId.PostProperties, PostProperties_Execute);
            commandManager.Add(CommandId.ShowCategoryPopup, ShowCategoryPopup_Execute);


            linkViewAll.KeyDown += (sender, args) =>
            {
                if (args.KeyValue == ' ')
                {
                    linkViewAll_LinkClicked(sender, new LinkLabelLinkClickedEventArgs(null));
                }
            };

            // WinLive 180287: We don't want to show or use mnemonics on labels in the post properties band because
            // they can steal focus from the canvas.
            linkViewAll.Text            = TextHelper.StripAmpersands(Res.Get(StringId.ViewAll));
            linkViewAll.UseMnemonic     = false;
            labelPageParent.Text        = TextHelper.StripAmpersands(Res.Get(StringId.PropertiesPageParent));
            labelPageParent.UseMnemonic = false;
            labelPageOrder.Text         = TextHelper.StripAmpersands(Res.Get(StringId.PropertiesPageOrder));
            labelPageOrder.UseMnemonic  = false;
        }
        public PostPropertiesBandControl(CommandManager commandManager)
        {
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.DoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.ResizeRedraw, true);

            InitializeComponent();

            categoryContext = new CategoryContext();

            controller = new SharedPropertiesController(this, null, categoryDropDown,
                null, textTags, labelPageOrder, textPageOrder, labelPageParent, comboPageParent, null,
                datePublishDate, fields, categoryContext);

            SimpleTextEditorCommandHelper.UseNativeBehaviors(commandManager,
                textTags, textPageOrder);

            postPropertiesForm = new PostPropertiesForm(commandManager, categoryContext);
            if (components == null)
                components = new Container();
            components.Add(postPropertiesForm);

            postPropertiesForm.Synchronize(controller);

            commandManager.Add(CommandId.PostProperties, PostProperties_Execute);
            commandManager.Add(CommandId.ShowCategoryPopup, ShowCategoryPopup_Execute);

            linkViewAll.KeyDown += (sender, args) =>
                                   {
                                       if (args.KeyValue == ' ')
                                           linkViewAll_LinkClicked(sender, new LinkLabelLinkClickedEventArgs(null));
                                   };

            // WinLive 180287: We don't want to show or use mnemonics on labels in the post properties band because
            // they can steal focus from the canvas.
            linkViewAll.Text = TextHelper.StripAmpersands(Res.Get(StringId.ViewAll));
            linkViewAll.UseMnemonic = false;
            labelPageParent.Text = TextHelper.StripAmpersands(Res.Get(StringId.PropertiesPageParent));
            labelPageParent.UseMnemonic = false;
            labelPageOrder.Text = TextHelper.StripAmpersands(Res.Get(StringId.PropertiesPageOrder));
            labelPageOrder.UseMnemonic = false;
        }