Example #1
0
        public void TestAssignedNavigatorType()
        {
            mvcConfig.NavigatorType = typeof(StubNavigator);
            TasksManager tm = new TasksManager(mvcConfig);
            ITask startedTask = tm.StartTask(typeof(StubTask));
            Assert.IsInstanceOfType(typeof(StubNavigator), startedTask.Navigator);

            ti.NavigatorType = typeof(StubNavigatorTwo);
            startedTask = tm.StartTask(typeof(StubTask));
            Assert.IsInstanceOfType(typeof(StubNavigatorTwo), startedTask.Navigator);
        }
Example #2
0
        static void Main()
        {
            // login
            new LoginForm().ShowDialog();

            if (LoginForm.loginType=="software")
            {
                if (!DatabaseHelper.IsDatabaseAlive())
                {
                    MessageBox.Show("亲,数据库服务没有启动~,请检查MongoDB服务是否已经正常启动了");

                    Application.Exit();
                    return;
                }

                TasksManager tasksManager = new TasksManager(WinformsViewsManager.
                                                         GetDefaultConfig());
                tasksManager.StartTask(typeof(SaleTask));

                Application.Run(Application.OpenForms[0]);
            }
            else if(LoginForm.loginType=="spider")
            {
                startSpiderGame();

            }
        }
Example #3
0
 static void Main()
 {
     CreateTestData();
     TasksManager tasksManager = new TasksManager(MobileformsViewsManager.GetDefaultConfig());
     ITask task = tasksManager.StartTask(typeof(MainTask));
     Application.Run(MobileformsViewsManager.LastActivatedForm);
 }
Example #4
0
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     CreateTestData();
     TasksManager tasksManager = new TasksManager(SilverlightViewsManager.
                                                  GetDefaultConfig());
     tasksManager.StartTask(typeof(MainTask));
 }
Example #5
0
        static void Main()
        {
            CreateTestData();
            TasksManager tasksManager = new TasksManager(WinformsViewsManager.
                                                         GetDefaultConfig());
            tasksManager.StartTask(typeof(MainTask));

            Application.Run(Application.OpenForms[0]);
        }
Example #6
0
        static void Main()
        {
            TasksManager tm = new TasksManager(MVCConfiguration.GetDefault());
            tm.Config.ViewsManagerType = typeof(SimpleFormsViewsManager);

            tm.StartTask(typeof(MainTask));

            Application.Run(Application.OpenForms[0]);
        }