public void TestConstructor() { MVCConfiguration mvcConfig = new MVCConfiguration(); TasksManager tm = new TasksManager(mvcConfig); Assert.AreSame(mvcConfig, tm.Config); }
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 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()); }
/// <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); }
static void Main() { var tm = new TasksManager(MVCConfiguration.GetDefault()); tm.Config.ViewsManagerType = typeof(SimpleFormsViewsManager); tm.StartTask(typeof(MainTask)); Application.Run(Application.OpenForms[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]); }
public void TestSetUp() { mvcConfig = new MVCConfiguration(); }
/// <summary> /// Creates a tasks manager and links it to the MVCConfiguration /// instance passed as parameter. /// </summary> #endregion public TasksManager(MVCConfiguration mvcConfig) { this.Config = mvcConfig; }