Exemple #1
0
        private void lbSchemaErrors_DoubleClick(object sender, System.EventArgs e)
        {
            RdlEditPreview rep = mc.Editor;

            if (rep == null || this.lbSchemaErrors.SelectedIndex < 0)
            {
                return;
            }
            try
            {
                // line numbers are reported as (line#, character offset) e.g. (110, 32)
                string v  = this.lbSchemaErrors.Items[lbSchemaErrors.SelectedIndex] as string;
                int    li = v.LastIndexOf("(");
                if (li < 0)
                {
                    return;
                }
                v  = v.Substring(li + 1);
                li = v.IndexOf(",");                    // find the
                v  = v.Substring(0, li);

                int nLine = Int32.Parse(v);
                rep.Goto(this, nLine);
                this.BringToFront();
            }
#if DEBUG
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);                    // developer might care about this error??
            }
#else
            catch
            {}                          // user doesn't really care if something went wrong
#endif
        }
Exemple #2
0
        internal FindTab(RdlEditPreview pad)
        {
            rdlEdit = pad;
            InitializeComponent();

            this.AcceptButton = btnNext;
            this.CancelButton = btnCancel;
            txtFind.Focus();
        }