public void LaunchEmpty()
 {
     var runner = new CrossThreadRunner();
     runner.RunInSta(() =>
                         {
                             var configureWindow = new ConfigureWindow(new ConfigureWindowModel());
                             configureWindow.ShowDialog();
                         });
 }
Beispiel #2
0
    public void LaunchEmpty()
    {
        var runner = new CrossThreadRunner();

        runner.RunInSta(() =>
        {
            var configureWindow = new ConfigureWindow(new ConfigureWindowModel());
            configureWindow.ShowDialog();
        });
    }
 public void Launch()
 {
     var exception = GetException();
     var model = new ExceptionWindowModel
                                    {
                                        ExceptionText = exception.ExceptionHierarchyToString(),
                                    };
     var runner = new CrossThreadRunner();
     runner.RunInSta(() =>
                         {
                             var window = new ExceptionWindow(model);
                             window.ShowDialog();
                         });
 }
Beispiel #4
0
    public void Launch()
    {
        var exception = GetException();
        var model     = new ExceptionWindowModel
        {
            ExceptionText = exception.ExceptionHierarchyToString(),
        };
        var runner = new CrossThreadRunner();

        runner.RunInSta(() =>
        {
            var window = new ExceptionWindow(model);
            window.ShowDialog();
        });
    }
 public void LaunchExisting()
 {
     var runner = new CrossThreadRunner();
     runner.RunInSta(() =>
                         {
                             var configureWindow = new ConfigureWindow
                                 (new ConfigureWindowModel
                                      {
                                          EventInvokerName = "Foo",
                                          DependenciesDirectory = "bar",
                                          MessageImportance = MessageImportance.High,
                                      }
                                 );
                             configureWindow.ShowDialog();
                         });
 }
Beispiel #6
0
 public void LaunchExisting()
 {
     var runner = new CrossThreadRunner();
     runner.RunInSta(() =>
                         {
                             var configureWindow = new ConfigureWindow
                                 (new ConfigureWindowModel
                                  	{
                                  		Overwrite = false,
                                  		IncludeDebugSymbols = false,
                                  		MessageImportance = MessageImportance.High,
                                  	}
                                 );
                             configureWindow.ShowDialog();
                         });
 }
Beispiel #7
0
    public void LaunchExisting()
    {
        var runner = new CrossThreadRunner();

        runner.RunInSta(() =>
        {
            var configureWindow = new ConfigureWindow
                                      (new ConfigureWindowModel
            {
                EventInvokerName      = "Foo",
                DependenciesDirectory = "bar",
                MessageImportance     = MessageImportance.High,
            }
                                      );
            configureWindow.ShowDialog();
        });
    }
    public void LaunchExisting()
    {
        var runner = new CrossThreadRunner();

        runner.RunInSta(() =>
        {
            var configureWindow = new ConfigureWindow
                                      (new ConfigureWindowModel
            {
                Overwrite           = false,
                IncludeDebugSymbols = false,
                MessageImportance   = MessageImportance.High,
            }
                                      );
            configureWindow.ShowDialog();
        });
    }
Beispiel #9
0
        void View_CopyLogOutput(object sender, EventArgs e)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("IMPORTANT: In order to help us find out the source of this problem, please let us know what you were doing before the crash, or inform us of the steps to reproduce the problem.");
            sb.AppendLine();
            sb.AppendLine("System Information");
            sb.AppendLine("==================");

            sb.AppendLine("MGDF Version: " + Assembly.GetExecutingAssembly().GetName().Version);
            sb.AppendLine("OS: " + EnvironmentSettings.Current.OSName);
            sb.AppendLine("OS Architecture: " + EnvironmentSettings.Current.OSArchitecture + " bit");
            sb.AppendLine("RAM: " + EnvironmentSettings.Current.TotalMemory);
            sb.AppendLine("Processor Count: " + EnvironmentSettings.Current.ProcessorCount);
            sb.AppendLine();
            sb.AppendLine("Details");
            sb.AppendLine("=======");
            sb.AppendLine(_detail);
            sb.AppendLine();

            if (Game.Current != null)
            {
                sb.AppendLine("GamesManager Log output");
                sb.AppendLine("=======================");

                IFile gamesManagerLog = FileSystem.Current.GetFile(Path.Combine(Resources.GameUserDir, "GamesManagerLog.txt"));
                if (gamesManagerLog.Exists)
                {
                    using (var stream = gamesManagerLog.OpenStream(FileMode.Open, FileAccess.Read, FileShare.Read))
                    {
                        using (TextReader reader = new StreamReader(stream))
                        {
                            sb.Append(reader.ReadToEnd());
                        }
                    }
                }
            }

            var runner = new CrossThreadRunner();

            runner.RunInSTA(() => Clipboard.SetText(sb.ToString()));
        }
        protected override void OnPreProcess(object sender, PreProcessEventArgs args)
        {
            int threadID = AppDomain.GetCurrentThreadId();
            if(runningThreads[threadID]!=null
                || runningThreads.Count>0)
            {
                OutputDebugMessage("skipping method run from inside previous runner...");
                return ;
            }
            else
            {
                runningThreads[threadID]="some not null value";
            }

            OutputDebugMessage(threadID + ": Preparing to run method on separate thread and join it afterwards...");
            CrossThreadRunner runner  = new CrossThreadRunner(args.TargetObject,args.MethodCallMessage.MethodBase,args.MethodCallMessage.Args);
            runner.Run();
            OutputDebugMessage("Ran it on a separate thread...skipping actual method invocation on current thread");

            this.FlagCurrentMethodToBeSkipped(args);
        }
Beispiel #11
0
        void View_CopyLogOutput(object sender, EventArgs e)
        {
            var runner = new CrossThreadRunner();

            runner.RunInSTA(() => Clipboard.SetText(SubmitCoreErrorPresenter.GetLogContent(_game, _detail)));
        }