Esempio n. 1
0
        void m_VM_OnDebugCallback(DebugHookType type, string sourceName, string funcName, int line)
        {
            //FIXME: Only checking ActiveDocument since we only compile/run that single file for nows.
            SqDocument activeDocument = null;

            Dispatcher.BeginInvoke(
                (ThreadStart) delegate
            {
                activeDocument = ActiveDocument;
            },
                System.Windows.Threading.DispatcherPriority.Send).Wait();

            if (activeDocument != null && activeDocument.DocumentFileName == sourceName)
            {
                if (activeDocument.HandleBreakPoint(type, funcName, line))
                {
                    Dispatcher.BeginInvoke(
                        (ThreadStart) delegate
                    {
                        OnScriptThreadPause();
                    },
                        System.Windows.Threading.DispatcherPriority.Send).Wait();
                    m_BreakPointLock.WaitOne();
                }
            }
        }
Esempio n. 2
0
        private void m_DockingManager_ActiveContentChanged(object sender, EventArgs e)
        {
            var content = m_DockingManager.ActiveContent as SqDocument;

            if (content != null)
            {
                ActiveDocument = content as SqDocument;
            }
        }
Esempio n. 3
0
        void layoutDoc_Closed(object sender, EventArgs e)
        {
            var doc = (sender as LayoutDocument);

            if (doc.Content != null && ActiveDocument == doc.Content)
            {
                ActiveDocument = null;
            }
        }
Esempio n. 4
0
		void OpenDocument(string fileName)
		{
			SqDocument doc = new SqDocument(fileName);
			Xceed.Wpf.AvalonDock.Layout.LayoutDocument layoutDoc = new Xceed.Wpf.AvalonDock.Layout.LayoutDocument();
			layoutDoc.Content = doc;
			layoutDoc.Closed += layoutDoc_Closed;
			m_CodeDocumentPane.InsertChildAt(0, layoutDoc);
			doc.Loaded += (s, e) =>
			{
				layoutDoc.Title = System.IO.Path.GetFileName(doc.DocumentFileName);
			};
			m_DockingManager.ActiveContent = doc;
		}
Esempio n. 5
0
        void OpenDocument(string fileName)
        {
            SqDocument doc = new SqDocument(fileName);

            Xceed.Wpf.AvalonDock.Layout.LayoutDocument layoutDoc = new Xceed.Wpf.AvalonDock.Layout.LayoutDocument();
            layoutDoc.Content = doc;
            layoutDoc.Closed += layoutDoc_Closed;
            m_CodeDocumentPane.InsertChildAt(0, layoutDoc);
            doc.Loaded += (s, e) =>
            {
                layoutDoc.Title = System.IO.Path.GetFileName(doc.DocumentFileName);
            };
            m_DockingManager.ActiveContent = doc;
        }
Esempio n. 6
0
 void SaveDocument(SqDocument doc)
 {
     doc.Save();
 }
Esempio n. 7
0
		void SaveDocument(SqDocument doc)
		{
			doc.Save();
		}
Esempio n. 8
0
		private void m_DockingManager_ActiveContentChanged(object sender, EventArgs e)
		{
			var content = m_DockingManager.ActiveContent as SqDocument;
			if (content != null)
			{
				ActiveDocument = content as SqDocument;
			}
		}
Esempio n. 9
0
		void layoutDoc_Closed(object sender, EventArgs e)
		{
			var doc = (sender as LayoutDocument);
			if (doc.Content != null && ActiveDocument == doc.Content)
			{
				ActiveDocument = null;
			}
		}