Ejemplo n.º 1
0
        public RegularArticlePanel(IControllerPlugin ctrl, Article a)
            : base(ctrl, a)
        {
            InitializeComponent();

            if (a.IsNew()==true )
            {
                BackColor = plugins.Default.EmphasizedBackColor;
            }

            splitContainer1.Panel2.BackColor = plugins.Default.MouseOverArticleBackColor;
            splitContainer1.Panel2Collapsed = true;

            TextControl titleControl = new TextControl( Toolkit.UnHTML(a.Title) );
            titleControl.Dock = DockStyle.Fill;
            titleControl.MouseEnter += new EventHandler(titleControl_MouseEnter);
            titleControl.MouseClick += new MouseEventHandler(TextControl_MouseClick);
            splitContainer1.Panel1.Controls.Add(titleControl);

            TextControl contentControl = new TextControl( Toolkit.UnHTML(a.Content) );
            contentControl.Cursor = Cursors.Hand;
            contentControl.Dock = DockStyle.Fill;
            contentControl.MouseLeave += new EventHandler(contentControl_MouseLeave);
            contentControl.MouseClick += new MouseEventHandler(TextControl_MouseClick);
            splitContainer1.Panel2.Controls.Add(contentControl);

            mediaControl = MediaControl.Get();
            mediaControl.Dock = DockStyle.Fill;
            panel1.Controls.Add(mediaControl);

            Resize += new EventHandler(RegularArticlePanel_Resize);
            RegularArticlePanel_Load(null, EventArgs.Empty);
        }
Ejemplo n.º 2
0
        //private TextControl textControl;
        public Form1()
        {
            InitializeComponent();
            TextControl test = new TextControl();
            test.Dock = DockStyle.Fill;
            this.Controls.Add(test);

            test.MouseEnter += new EventHandler(test_MouseEnter);
        }