Beispiel #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();
                }
            }
        }
Beispiel #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;
            }
        }
Beispiel #3
0
        void layoutDoc_Closed(object sender, EventArgs e)
        {
            var doc = (sender as LayoutDocument);

            if (doc.Content != null && ActiveDocument == doc.Content)
            {
                ActiveDocument = null;
            }
        }
Beispiel #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;
		}
Beispiel #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;
        }
Beispiel #6
0
 void SaveDocument(SqDocument doc)
 {
     doc.Save();
 }
Beispiel #7
0
		void SaveDocument(SqDocument doc)
		{
			doc.Save();
		}
Beispiel #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;
			}
		}
Beispiel #9
0
		void layoutDoc_Closed(object sender, EventArgs e)
		{
			var doc = (sender as LayoutDocument);
			if (doc.Content != null && ActiveDocument == doc.Content)
			{
				ActiveDocument = null;
			}
		}