int filePosition=0; // file position; for use with search public RdlEditPreview() { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); pbLines.Editor = tbEditor; rdlPreview.Zoom=1; // force default zoom to 1 // initialize the design tab dcTopRuler = new DesignRuler(); dcLeftRuler = new DesignRuler(); dcLeftRuler.Vertical = true; // need to set before setting Design property dcDesign = new DesignCtl(); dcTopRuler.Design = dcDesign; // associate rulers with design ctl dcLeftRuler.Design = dcDesign; tpDesign.Controls.Add(dcTopRuler); tpDesign.Controls.Add(dcLeftRuler); tpDesign.Controls.Add(dcDesign); // Top ruler dcTopRuler.Height = 14; dcTopRuler.Width = tpDesign.Width; dcTopRuler.Dock = DockStyle.Top; dcTopRuler.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; dcTopRuler.Enabled = false; // Left ruler dcLeftRuler.Width = 14; dcLeftRuler.Height = tpDesign.Height; dcLeftRuler.Dock = DockStyle.Left; dcLeftRuler.Anchor = AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top; dcLeftRuler.Enabled = false; dcTopRuler.Offset = dcLeftRuler.Width; dcLeftRuler.Offset = dcTopRuler.Height; // dcDesign.Dock = System.Windows.Forms.DockStyle.Bottom; dcDesign.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right; dcDesign.Location = new System.Drawing.Point(dcLeftRuler.Width, dcTopRuler.Height); dcDesign.Name = "dcDesign"; dcDesign.Size = new System.Drawing.Size(tpDesign.Width-dcLeftRuler.Width, tpDesign.Height-dcTopRuler.Height); dcDesign.TabIndex = 0; dcDesign.ReportChanged += new System.EventHandler(dcDesign_ReportChanged); dcDesign.HeightChanged += new DesignCtl.HeightEventHandler(dcDesign_HeightChanged); dcDesign.SelectionChanged += new System.EventHandler(dcDesign_SelectionChanged); dcDesign.SelectionMoved += new System.EventHandler(dcDesign_SelectionMoved); dcDesign.ReportItemInserted += new System.EventHandler(dcDesign_ReportItemInserted); dcDesign.OpenSubreport += new DesignCtl.OpenSubreportEventHandler(dcDesign_OpenSubreport); tbEditor.SelectionChanged +=new EventHandler(tbEditor_SelectionChanged); // adjust size of line box by measuring a large # #if !MONO using (Graphics g = this.CreateGraphics()) { this.pbLines.Width = (int) (g.MeasureString("99999", tbEditor.Font).Width); } #endif }
int filePosition = 0; // file position; for use with search public RdlEditPreview() { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); pbLines.Editor = tbEditor; rdlPreview.Zoom = 1; // force default zoom to 1 // initialize the design tab dcTopRuler = new DesignRuler(); dcLeftRuler = new DesignRuler(); dcLeftRuler.Vertical = true; // need to set before setting Design property dcDesign = new DesignCtl(); dcTopRuler.Design = dcDesign; // associate rulers with design ctl dcLeftRuler.Design = dcDesign; tpDesign.Controls.Add(dcTopRuler); tpDesign.Controls.Add(dcLeftRuler); tpDesign.Controls.Add(dcDesign); // Top ruler dcTopRuler.Height = 14; dcTopRuler.Width = tpDesign.Width; dcTopRuler.Dock = DockStyle.Top; dcTopRuler.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; dcTopRuler.Enabled = false; // Left ruler dcLeftRuler.Width = 14; dcLeftRuler.Height = tpDesign.Height; dcLeftRuler.Dock = DockStyle.Left; dcLeftRuler.Anchor = AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top; dcLeftRuler.Enabled = false; dcTopRuler.Offset = dcLeftRuler.Width; dcLeftRuler.Offset = dcTopRuler.Height; // dcDesign.Dock = System.Windows.Forms.DockStyle.Bottom; dcDesign.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right; dcDesign.Location = new System.Drawing.Point(dcLeftRuler.Width, dcTopRuler.Height); dcDesign.Name = "dcDesign"; dcDesign.Size = new System.Drawing.Size(tpDesign.Width - dcLeftRuler.Width, tpDesign.Height - dcTopRuler.Height); dcDesign.TabIndex = 0; dcDesign.ReportChanged += new System.EventHandler(dcDesign_ReportChanged); dcDesign.HeightChanged += new DesignCtl.HeightEventHandler(dcDesign_HeightChanged); dcDesign.SelectionChanged += new System.EventHandler(dcDesign_SelectionChanged); dcDesign.SelectionMoved += new System.EventHandler(dcDesign_SelectionMoved); dcDesign.ReportItemInserted += new System.EventHandler(dcDesign_ReportItemInserted); dcDesign.OpenSubreport += new DesignCtl.OpenSubreportEventHandler(dcDesign_OpenSubreport); tbEditor.SelectionChanged += new EventHandler(tbEditor_SelectionChanged); // adjust size of line box by measuring a large # #if !MONO using (Graphics g = this.CreateGraphics()) { this.pbLines.Width = (int)(g.MeasureString("99999", tbEditor.Font).Width); } #endif }
public RdlEditPreview() { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); rdlPreview.Zoom = 1; // force default zoom to 1 // initialize the design tab dcTopRuler = new DesignRuler(); dcLeftRuler = new DesignRuler(); dcLeftRuler.Vertical = true; // need to set before setting Design property dcDesign = new DesignCtl(); dcTopRuler.Design = dcDesign; // associate rulers with design ctl dcLeftRuler.Design = dcDesign; tpDesign.Controls.Add(dcTopRuler); tpDesign.Controls.Add(dcLeftRuler); tpDesign.Controls.Add(dcDesign); // Top ruler dcTopRuler.Height = 14; dcTopRuler.Width = tpDesign.Width; dcTopRuler.Dock = DockStyle.Top; dcTopRuler.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; dcTopRuler.Enabled = false; // Left ruler dcLeftRuler.Width = 14; dcLeftRuler.Height = tpDesign.Height; dcLeftRuler.Dock = DockStyle.Left; dcLeftRuler.Anchor = AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top; dcLeftRuler.Enabled = false; dcTopRuler.Offset = dcLeftRuler.Width; dcLeftRuler.Offset = dcTopRuler.Height; // dcDesign.Dock = System.Windows.Forms.DockStyle.Bottom; dcDesign.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right; dcDesign.Location = new System.Drawing.Point(dcLeftRuler.Width, dcTopRuler.Height); dcDesign.Name = "dcDesign"; dcDesign.Size = new System.Drawing.Size(tpDesign.Width - dcLeftRuler.Width, tpDesign.Height - dcTopRuler.Height); dcDesign.TabIndex = 0; dcDesign.ReportChanged += new System.EventHandler(dcDesign_ReportChanged); dcDesign.HeightChanged += new DesignCtl.HeightEventHandler(dcDesign_HeightChanged); dcDesign.SelectionChanged += new System.EventHandler(dcDesign_SelectionChanged); dcDesign.SelectionMoved += new System.EventHandler(dcDesign_SelectionMoved); dcDesign.ReportItemInserted += new System.EventHandler(dcDesign_ReportItemInserted); dcDesign.OpenSubreport += new DesignCtl.OpenSubreportEventHandler(dcDesign_OpenSubreport); //ScintillaNET Init ConfigureScintillaStyle(scintilla1); scintilla1.SetSavePoint(); }
DesignTabs _DesignChanged; // last designer that triggered change #endregion Fields #region Constructors public RdlEditPreview() { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); rdlPreview.Zoom=1; // force default zoom to 1 // initialize the design tab dcTopRuler = new DesignRuler(); dcLeftRuler = new DesignRuler(); dcLeftRuler.Vertical = true; // need to set before setting Design property dcDesign = new DesignCtl(); dcTopRuler.Design = dcDesign; // associate rulers with design ctl dcLeftRuler.Design = dcDesign; tpDesign.Controls.Add(dcTopRuler); tpDesign.Controls.Add(dcLeftRuler); tpDesign.Controls.Add(dcDesign); // Top ruler dcTopRuler.Height = 14; dcTopRuler.Width = tpDesign.Width; dcTopRuler.Dock = DockStyle.Top; dcTopRuler.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; dcTopRuler.Enabled = false; // Left ruler dcLeftRuler.Width = 14; dcLeftRuler.Height = tpDesign.Height; dcLeftRuler.Dock = DockStyle.Left; dcLeftRuler.Anchor = AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top; dcLeftRuler.Enabled = false; dcTopRuler.Offset = dcLeftRuler.Width; dcLeftRuler.Offset = dcTopRuler.Height; // dcDesign.Dock = System.Windows.Forms.DockStyle.Bottom; dcDesign.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right; dcDesign.Location = new System.Drawing.Point(dcLeftRuler.Width, dcTopRuler.Height); dcDesign.Name = "dcDesign"; dcDesign.Size = new System.Drawing.Size(tpDesign.Width-dcLeftRuler.Width, tpDesign.Height-dcTopRuler.Height); dcDesign.TabIndex = 0; dcDesign.ReportChanged += new System.EventHandler(dcDesign_ReportChanged); dcDesign.HeightChanged += new DesignCtl.HeightEventHandler(dcDesign_HeightChanged); dcDesign.SelectionChanged += new System.EventHandler(dcDesign_SelectionChanged); dcDesign.SelectionMoved += new System.EventHandler(dcDesign_SelectionMoved); dcDesign.ReportItemInserted += new System.EventHandler(dcDesign_ReportItemInserted); dcDesign.OpenSubreport += new DesignCtl.OpenSubreportEventHandler(dcDesign_OpenSubreport); //ScintillaNET Init ConfigureScintillaStyle(scintilla1); scintilla1.SetSavePoint(); }