Beispiel #1
0
        static void Main()
        {
            TasksManager tasksManager = new TasksManager(WinformsViewsManager.GetDefaultConfig());

            tasksManager.StartTask(typeof(MainTask));
            Application.Run(Application.OpenForms[0]);
        }
Beispiel #2
0
        static void Main()
        {
            MVCConfiguration config = WinformsViewsManager.GetDefaultConfig();

            (new TasksManager(config)).StartTask(typeof(MainTask));

            Application.Run(Application.OpenForms[0]);
        }
        new public static MVCConfiguration GetDefaultConfig()
        {
            MVCConfiguration defaultConf = WinformsViewsManager.GetDefaultConfig();

            defaultConf.ViewsAssembly    = Assembly.GetCallingAssembly();
            defaultConf.ViewsManagerType = typeof(OutlookLikeViewsManager);
            return(defaultConf);
        }
        public void TestGetDefaultConfig()
        {
            MVCConfiguration defaultConf = WinformsViewsManager.GetDefaultConfig();

            Assert.AreEqual(typeof(DefaultTaskInfoProvider), defaultConf.TaskInfoProviderType);
            Assert.AreEqual(typeof(WinformsViewInfosProvider), defaultConf.ViewInfosProviderType);
            Assert.AreEqual(typeof(WinformsViewsManager), defaultConf.ViewsManagerType);
            Assert.AreEqual(Assembly.GetExecutingAssembly(), defaultConf.ViewsAssembly);
            Assert.AreNotSame(defaultConf, WinformsViewsManager.GetDefaultConfig());
        }
        static void Main()
        {
            //try
            //{
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            TasksManager tasksManager = new TasksManager(WinformsViewsManager.GetDefaultConfig());

            tasksManager.StartTask(typeof(POSContainerTask));
            //tasksManager.StartTask(typeof(ProcessSaleTask));
            //tasksManager.StartTask(typeof(PaymentTask));
            //tasksManager.StartTask(typeof(DefineCoversTask));
            //tasksManager.StartTask(typeof(TableViewTask));
            Application.Run(Application.OpenForms[0]);
            //}
            //catch (Exception ex)
            //{
            //    MessageBox.Show(ex.Message);
            //}
        }