public void Restore()
        {
            EnvDTE80.DTE2 dte2 = m_serviceProvider.GetService(typeof(EnvDTE.DTE)) as EnvDTE80.DTE2;

            // Delete old breakpoints
            foreach (Breakpoint BP in dte2.Debugger.Breakpoints)
            {
                if (m_file.CompareTo(BP.File) == 0)
                {
                    BP.Delete();
                }
            }
            foreach (BreakpointStorage BP in m_breakpointStorage)
            {
                try
                {
                    dte2.Debugger.Breakpoints.Add("", BP.file, BP.line, BP.column, BP.condition, BP.conditionType, BP.language, "", 0, "", BP.hitCount, BP.hitCountType);

                    foreach (Breakpoint DTEBP in dte2.Debugger.Breakpoints)
                    {
                        try
                        {
                            if ((DTEBP.File.CompareTo(BP.file) == 0) &&
                                (DTEBP.FileLine == BP.line))
                            {
                                DTEBP.Enabled = BP.enabled;
                            }
                        }
                        catch (Exception) { }
                    }
                }
                catch (Exception) { }
            }
        }
예제 #2
0
        public void Restore()
        {
            // Delete old breakpoints
            foreach (Breakpoint BP in m_dte2.Debugger.Breakpoints)
            {
                if (m_file.CompareTo(BP.File) == 0)
                {
                    BP.Delete();
                }
            }
            foreach (BreakpointStorage BP in m_breakpointStorage)
            {
                try
                {
                    m_dte2.Debugger.Breakpoints.Add("", BP.file, BP.line, BP.column, BP.condition, BP.conditionType, BP.language, "", 0, "", BP.hitCount, BP.hitCountType);

                    foreach (Breakpoint DTEBP in m_dte2.Debugger.Breakpoints)
                    {
                        try
                        {
                            if ((DTEBP.File.CompareTo(BP.file) == 0) &&
                                (DTEBP.FileLine == BP.line))
                            {
                                DTEBP.Enabled = BP.enabled;
                            }
                        }
                        catch (Exception) { }
                    }
                }
                catch (Exception) { }
            }
        }
예제 #3
0
        public void Save(String file, bool remove)
        {
            m_file = file;
            m_breakpointStorage.Clear();
            foreach (Breakpoint BP in m_dte2.Debugger.Breakpoints)
            {
                if (file.CompareTo(BP.File) == 0)
                {
                    m_breakpointStorage.Add(new BreakpointStorage(BP));

                    if (remove)
                    {
                        BP.Delete();
                    }
                }
            }
        }
        public void Save(String file, bool remove)
        {
            EnvDTE80.DTE2 dte2 = m_serviceProvider.GetService(typeof(EnvDTE.DTE)) as EnvDTE80.DTE2;

            m_file = file;
            m_breakpointStorage.Clear();
            foreach (Breakpoint BP in dte2.Debugger.Breakpoints)
            {
                if (file.CompareTo(BP.File) == 0)
                {
                    m_breakpointStorage.Add(new BreakpointStorage(BP));

                    if (remove)
                    {
                        BP.Delete();
                    }
                }
            }
        }
        private void PictureBox5_Click(object sender, EventArgs e)
        {
            c.gym_id = int.Parse(textBox1.Text);

            bool success = u.Delete(c);

            if (success)
            {
                MessageBox.Show("Član uspjesno izbrisan.");
            }
            else
            {
                MessageBox.Show("Pogreška pri brisanju člana.");
            }

            kampusGym f = new kampusGym();

            f.Show();
            this.Hide();
        }