Пример #1
0
        void ToggleAllBPState()
        {
            Project             proj = ServiceHost.Project.Current;
            IFileManagerService fm   = ServiceHost.File;
            AdvancedTextBox     atb  = fm[fm.Current] as AdvancedTextBox;

            if (atb != null)
            {
                int       cline  = atb.Buffer.CurrentLine;
                Hashtable bpsmap = proj.GetBreakpoints(fm.Current);
                if (bpsmap != null)
                {
                    ArrayList bps = new ArrayList(bpsmap.Values);

                    foreach (Breakpoint bp in bps)
                    {
                        bp.enabled = allbp;
                    }

                    atb.Invalidate();

                    allbp = !allbp;
                }
            }
        }
Пример #2
0
        void ToggleBP()
        {
            Project             proj = ServiceHost.Project.Current;
            IFileManagerService fm   = ServiceHost.File;
            AdvancedTextBox     atb  = fm[fm.Current] as AdvancedTextBox;

            if (atb != null)
            {
                int        cline = atb.Buffer.CurrentLine;
                Breakpoint bp    = proj.GetBreakpoint(fm.Current, cline);

                if (bp != null)
                {
                    RemoveBreakpoint(bp);
                    proj.RemoveBreakpoint(bp);
                }
                else
                {
                    bp = InsertBreakpoint(fm.Current, cline);
                    if (bp.bound)
                    {
                        proj.SetBreakpoint(bp);
                    }
                }

                atb.Invalidate();
            }
        }
Пример #3
0
        void BpBoundChange(object sender, EventArgs e)
        {
            Breakpoint bp = sender as Breakpoint;

            if (bp != null)
            {
                tempbp = bp;
            }
            else
            {
                bp = tempbp;
            }

            if (InvokeRequired)
            {
                BeginInvoke(bpboundchange, new object[] { sender, e });
                return;
            }

            AdvancedTextBox atb = ServiceHost.File[bp.filename] as AdvancedTextBox;

            if (atb != null)
            {
                atb.Invalidate();
            }
        }
Пример #4
0
 private void button2_Click(object sender, System.EventArgs e)
 {
     if (atb.SelectionLength > 0)
     {
         atb.SelectionText = comboBox2.Text;
         atb.Invalidate();
     }
 }
Пример #5
0
        void BreakLine()
        {
            AdvancedTextBox atb = ServiceHost.File[ServiceHost.File.Current] as AdvancedTextBox;

            AdvancedTextBox.TextBuffer.TokenLine  tl = atb.Buffer.GetUserState(atb.Buffer.CurrentLine);
            AdvancedTextBox.TextBuffer.DrawInfo[] di = atb.Buffer.GetDrawCache(atb.Buffer.CurrentLine);
            IDebugService dbg = ServiceHost.Debug;

            System.Diagnostics.Debugger.Break();
            Console.WriteLine("{0}{1}", tl, di);
            atb.Buffer.SetDrawCache(atb.Buffer.CurrentLine, null);
            atb.Invalidate();
        }