Beispiel #1
0
        private static void Main(string[] args)
        {
            MUI.Utils.DependencyMapper.Map();

            //typeof(Indexing.Indexer).GetType();

            var uiContext = new UIContext(600, 300);

            uiContext.RunOneFrame();

            var container = new Container()
                            .Register <ResourceManager, ResourceManager>(c => uiContext.ResourceManager)
                            .Register(uiContext)
                            .Register <UI, UI>()
            ;

            container.LoadPlugins("".FromAppRoot());

            SettingsRoot.Instance.Initialize(container);

            RegisterServices(container);

            // TODO: Remove (pries cache)
            //container.Resolve<Indexing.Indexer>().Query("conemu");

            uiContext.PushUI(container.Resolve <UI>());
            using (uiContext) uiContext.Run();

            //SettingsRoot.Instance.Save();
        }
Beispiel #2
0
 private void OnUIContextRun()
 {
     Task.Run(() =>
     {
         Debug.Assert(!UIContext.CheckAccess());
         Thread.Sleep(100);
         UIContext.Run(new Action(() =>
         {
             Debug.Assert(UIContext.CheckAccess());
             Thread.Sleep(100);
             throw new InvalidOperationException("Error on a background Task.");
         })).ObserveException();
     }).ObserveException();
 }