示例#1
0
        // Add the given source viewer to the global collection of source files.
        static void AddSourceViewer(SourceViewerBaseForm source)
        {
            Debug.Assert(source != null);
            object key = source.GetHashKey();

            Debug.Assert(key != null);

            m_sourceList.Add(key, source);
        }
示例#2
0
        // Handle key commands that don't require source focus (like Stepping).
        static public void HandleGlobalKeyCommand(System.Windows.Forms.KeyEventArgs e)
        {
            // Find th
            SourceViewerBaseForm f = m_ActiveSourceFile;

            if (m_ActiveSourceFile != null)
            {
                f.HandleGlobalKeyCommandWorker(e);
            }
        }
示例#3
0
        // There's one SourceViewerForm instance for each source-file
        // Get the instance for the new source file.
        // Called on UI thread.
        public static SourceViewerBaseForm GetSourceFile(MainForm parent, MDbgFunction function)
        {
            SourceViewerBaseForm source = (SourceViewerBaseForm)m_sourceList[function];

            if (source == null)
            {
                source = new VirtualSourceViewerForm(parent, function);
                AddSourceViewer(source);
            }
            m_ActiveSourceFile = source;
            return(source);
        }
示例#4
0
        // There's one SourceViewerForm instance for each source-file
        // Get the instance for the new source file.
        // Called on UI thread.
        public static SourceViewerForm GetSourceFile(MainForm parent, string path)
        {
            path = CommandBase.Shell.FileLocator.GetFileLocation(path);
            SourceViewerForm source = (SourceViewerForm)m_sourceList[path];

            if (source == null)
            {
                source = SourceViewerForm.Build(parent, path);
                if (source != null)
                {
                    AddSourceViewer(source);
                }
            }
            m_ActiveSourceFile = source;
            return(source);
        }
示例#5
0
        // this is called on the UI thread.
        bool ShowSourceFile(SourceViewerBaseForm f)
        {
            if (f == null)
            {
                return false;
            }


            f.Focus();
            cmdInput.Focus();
            return true;
        }
示例#6
0
 // There's one SourceViewerForm instance for each source-file
 // Get the instance for the new source file.
 // Called on UI thread.
 public static SourceViewerBaseForm GetSourceFile(MainForm parent, MDbgFunction function)
 {            
     SourceViewerBaseForm source = (SourceViewerBaseForm)m_sourceList[function];
     if (source == null)
     {
         source = new VirtualSourceViewerForm(parent, function);
         AddSourceViewer(source);
     }
     m_ActiveSourceFile = source;
     return source;
 }
示例#7
0
 // There's one SourceViewerForm instance for each source-file
 // Get the instance for the new source file.
 // Called on UI thread.
 public static SourceViewerForm GetSourceFile(MainForm parent,string path)
 {
     path = CommandBase.Shell.FileLocator.GetFileLocation(path);
     SourceViewerForm source = (SourceViewerForm)m_sourceList[path];
     if(source==null)
     {
         source = SourceViewerForm.Build(parent, path);
         if (source != null)
         {
             AddSourceViewer(source);
         }
     }
     m_ActiveSourceFile = source;
     return source;
 }
示例#8
0
        // Add the given source viewer to the global collection of source files.
        static void AddSourceViewer(SourceViewerBaseForm source)
        {
            Debug.Assert(source != null);
            object key = source.GetHashKey();
            Debug.Assert(key != null);

            m_sourceList.Add(key, source);
        }
示例#9
0
 /// <summary>
 /// Clean up any resources being used.
 /// </summary>
 protected override void Dispose( bool disposing )
 {
     // if disposing==true, then we release managed + unmanaged resources.
     // if disposing==false, then we only release unmanaged resources.
     if( disposing )
     {
         m_sourceList.Remove(this.GetHashKey());
         if (m_ActiveSourceFile == this)
         {
             m_ActiveSourceFile = null;
         }
         if(components != null)
         {
             components.Dispose();
         }
     }
     base.Dispose( disposing );
 }