Esempio n. 1
0
            public MultiDiagramDocViewControl(MultiDiagramDocView docView)
            {
                DocView = docView;

                Control parentControl = new ParentControl(this);

                parentControl.SuspendLayout();
                base.SuspendLayout();
                parentControl.Controls.Add(this);

                base.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.SupportsTransparentBackColor | ControlStyles.UserPaint, true);
                base.SetStyle(ControlStyles.Selectable, false);

                base.Dock      = DockStyle.Fill;
                base.Alignment = TabAlignment.Bottom;
                base.DrawMode  = TabDrawMode.OwnerDrawFixed;
                base.Padding   = new Point(TabOutsideBorderLength + TabInsideBorderLength, TabOutsideBorderLength + TabInsideBorderLength);
                base.HotTrack  = false;
                base.TabStop   = false;

                Microsoft.Win32.SystemEvents.UserPreferenceChanged += SetFonts;
                SetFonts(null, null);

                base.AllowDrop = true;
                Timer activateTimer = new Timer();

                activateTimer.Interval = SystemInformation.DoubleClickTime;
                activateTimer.Tick    += new EventHandler(ActivateTimer_Tick);
                myDragActivateTabIndex = -1;
                myDragActivateTimer    = activateTimer;

                base.ResumeLayout(false);
                parentControl.ResumeLayout(false);
            }
			public MultiDiagramDocViewControl(MultiDiagramDocView docView)
			{
				DocView = docView;

				Control parentControl = new ParentControl(this);
				parentControl.SuspendLayout();
				base.SuspendLayout();
				parentControl.Controls.Add(this);

				base.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.SupportsTransparentBackColor | ControlStyles.UserPaint, true);
				base.SetStyle(ControlStyles.Selectable, false);

				base.Dock = DockStyle.Fill;
				base.Alignment = TabAlignment.Bottom;
				base.DrawMode = TabDrawMode.OwnerDrawFixed;
				base.Padding = new Point(TabOutsideBorderLength + TabInsideBorderLength, TabOutsideBorderLength + TabInsideBorderLength);
				base.HotTrack = false;
				base.TabStop = false;

				Microsoft.Win32.SystemEvents.UserPreferenceChanged += SetFonts;
				SetFonts(null, null);

				base.AllowDrop = true;
				Timer activateTimer = new Timer();
				activateTimer.Interval = SystemInformation.DoubleClickTime;
				activateTimer.Tick += new EventHandler(ActivateTimer_Tick);
				myDragActivateTabIndex = -1;
				myDragActivateTimer = activateTimer;
	
				base.ResumeLayout(false);
				parentControl.ResumeLayout(false);
			}