Ejemplo n.º 1
0
        public void TestConstructor()
        {
            MVCConfiguration mvcConfig = new MVCConfiguration();
            TasksManager     tm        = new TasksManager(mvcConfig);

            Assert.AreSame(mvcConfig, tm.Config);
        }
Ejemplo n.º 2
0
        static void Main()
        {
            MVCConfiguration config = WinformsViewsManager.GetDefaultConfig();

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

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

            defaultConf.ViewsAssembly    = Assembly.GetCallingAssembly();
            defaultConf.ViewsManagerType = typeof(OutlookLikeViewsManager);
            return(defaultConf);
        }
Ejemplo n.º 4
0
        public void TestGetDefault()
        {
            MVCConfiguration defaultConf = MVCConfiguration.GetDefault();

            Assert.AreEqual(typeof(DefaultTaskInfoProvider), defaultConf.TaskInfoProviderType);
            Assert.AreEqual(typeof(DefaultViewInfosProvider), defaultConf.ViewInfosProviderType);
            Assert.AreEqual(Assembly.GetExecutingAssembly(), defaultConf.ViewsAssembly);
            Assert.AreNotSame(defaultConf, MVCConfiguration.GetDefault());
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Returns the default MVCConfiguration instance (obtained via
        /// <see cref="MVCConfiguration.GetDefault">MVCConfiguration.GetDefault</see>) with
        /// <see cref="MVCConfiguration.ViewInfosProviderType"/> set to
        /// <see cref="WinformsViewInfosProvider"/> and
        /// <see cref="MVCConfiguration.ViewsManagerType"/> set to <see cref="WinformsViewsManager"/>.
        /// </summary>
        #endregion
        public static MVCConfiguration GetDefaultConfig()
        {
            MVCConfiguration defaultConf = MVCConfiguration.GetDefault();

            defaultConf.ViewsAssembly         = Assembly.GetCallingAssembly();
            defaultConf.ViewInfosProviderType = typeof(WinformsViewInfosProvider);
            defaultConf.ViewsManagerType      = typeof(WinformsViewsManager);
            return(defaultConf);
        }
Ejemplo n.º 6
0
        static void Main()
        {
            var tm = new TasksManager(MVCConfiguration.GetDefault());

            tm.Config.ViewsManagerType = typeof(SimpleFormsViewsManager);

            tm.StartTask(typeof(MainTask));

            Application.Run(Application.OpenForms[0]);
        }
Ejemplo n.º 7
0
        static void Main()
        {
            MVCConfiguration cfg = OutlookLikeViewsManager.GetDefaultConfig();

            cfg.ViewsAssemblies.Add(Assembly.Load(
                                        "MVCSharp.Examples.AdvancedCustomization.SeparateViews"));
            cfg.TaskInfoProviderType  = typeof(TaskInfoByAttributesProviderEx);
            cfg.ViewInfosProviderType = typeof(ViewInfosPrividerEx);
            (new TasksManager(cfg)).StartTask(typeof(MainTask));
            Application.Run(Application.OpenForms[0]);
        }
Ejemplo n.º 8
0
 public void TestSetUp()
 {
     mvcConfig = new MVCConfiguration();
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Creates a tasks manager and links it to the MVCConfiguration
 /// instance passed as parameter.
 /// </summary>
 #endregion
 public TasksManager(MVCConfiguration mvcConfig)
 {
     this.Config = mvcConfig;
 }