Ejemplo n.º 1
0
        public void Initialize(CompositionContainer composition)
        {
            sourcesWindow = composition.GetExportedValue<SourcesWindow> ();
            sourceWindow = composition.GetExportedValue<SourceWindow> ();
            windowManager.Add (sourcesWindow);
            windowManager.Add (sourceWindow);
            log = composition.GetExportedValue<LogWindow> ();
            //			windowManager.Add (log);
            windowManager.Add (composition.GetExportedValue<CallstackWindow> ());
            windowManager.Add (composition.GetExportedValue<LocalsWindow> ());
            windowManager.Add (composition.GetExportedValue<BreakpointsWindow> ());
            windowManager.Add (composition.GetExportedValue<ExecutionWindow> ());

            if (HasArguments ())
                session.Port = SdbPortFromCommandLine ();

            //else
            //{
            //    var f = new StreamReader (File.Open (@"C:\debug.log", FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
            //    var str = f.ReadLine ();
            //    f.Close ();
            //    session.Port = int.Parse (str.Substring ("Listening on 0.0.0.0:".Length, 5));
            //}

            log.WriteLine ("Connecting to " + session.Port);

            Camera.main.backgroundColor = new Color (0.125f, 0.125f, 0.125f, 0);
            Application.runInBackground = true;

            AdjustLayout ();

            //			if (!HasArguments ())
            //				return;

            session.TraceCallback += s => Trace (s);
            typeProvider.BasePath = ProjectPathFromCommandLine ();

            sourcesWindow.StartRefreshing ();

            session.Start ();
        }
Ejemplo n.º 2
0
        public MainWindow(
			IDebuggerSession session,
			ISourcesProvider sourcesProvider,
			SourcesWindow sourcesWindow,
			SourceWindow sourceWindow,
			LogWindow log,
			CallStackDisplay callStackDisplay,
			ExecutionWindow executionWindow,
			DebuggerWindowManager windowManager
		)
        {
            this.log = log;
            this.callStackDisplay = callStackDisplay;
            this.executionWindow = executionWindow;
            this.sourcesWindow = sourcesWindow;
            this.sourceWindow = sourceWindow;
            this.session = session;
            this.windowManager = windowManager;

            if (HasArguments ())
                this.session.Port = SdbPortFromCommandLine ();

            Camera.main.backgroundColor = new Color (0.125f, 0.125f, 0.125f, 0);
            Application.runInBackground = true;

            AdjustLayout ();

            if (!HasArguments ())
                return;

            this.session.TraceCallback += s => Trace (s);
            sourcesProvider.Path = ProjectPathFromCommandLine ();

            sourcesWindow.StartRefreshing ();

            session.Start ();
        }