Esempio n. 1
0
        /// <summary>
        /// Add image.
        /// </summary>
        public void AddImage()
        {
            var builder   = new ViewBuilder();
            var viewModel = new ViewModel.AddImageViewModel(this.documentFormatter);

            builder.Build <AddImage, ViewModel.AddImageViewModel>(viewModel).ShowDialog();
        }
Esempio n. 2
0
        public static View FromBuilder(ViewBuilder vw)
        {
            var v = new View() { _view = vw.Build() };

            v._view.Dock = DockStyle.Fill;

            return v;
        }
		public static void RegisterAssemblies(IEnumerable<Assembly> assemblies)
		{
			var builder = new ViewBuilder();
			builder.AddAssemblies(assemblies.ToList());
			var designDocs = builder.Build();
			var ddManager = new DesignDocManager();
			ddManager.Create(designDocs);			
		}
Esempio n. 4
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            var viewName   = "MainView";
            var viewObject = ViewBuilder.Build <Window>(viewName, isViewModelAvailable: true);

            Application.Current.MainWindow = viewObject;
            Application.Current.MainWindow.Show();
        }
        public HourAndMinuteGridView(Dictionary <int, List <int> > minuteDictionary, DayType dayType)
        {
            InitializeComponent();

            var vb = new ViewBuilder();

            Content = vb.Build(minuteDictionary, dayType);
        }
Esempio n. 6
0
        public static void RegisterModelViews(IEnumerable <Assembly> assemblies)
        {
            var builder = new ViewBuilder();

            builder.AddAssemblies(assemblies.ToList());
            var designDocs = builder.Build();
            var ddManager  = new DesignDocManager();

            ddManager.Create(designDocs);
        }
Esempio n. 7
0
        public void BuildTest()
        {
            var vb = new ViewBuilder();
            var minuteDictionary = GetMinuteDictionary();

            var scrollView = vb.Build(minuteDictionary, DayType.Weekday);

            Assert.NotNull(scrollView);
            Assert.NotNull(scrollView.Content);
        }
 static void Main(string[] args)
 {
     var assemblies = ConfigParser.GetAssemblies();
     var builder = new ViewBuilder();
     builder.AddAssemblies(assemblies.ToList());
     var designDocs = builder.Build();
     var ddManager = new DesignDocManager();
     ddManager.Create(designDocs, (s) => Console.WriteLine("Created {0} design doc", s));
     var ddfManager = new DesignDocFileManager();
     ddfManager.Create(Environment.CurrentDirectory, designDocs);
     var runner = new ViewRunner();
     runner.Run(designDocs, (k, v, s) => Console.WriteLine("[{0}::{1}] Key {2}", k, v, s["key"]), 5);
 }
Esempio n. 9
0
        public void NavigateTo(string viewName, bool isViewModelAvailable = false)
        {
            if (string.IsNullOrEmpty(viewName))
            {
                throw new ArgumentException();
            }

            var viewObject = ViewBuilder.Build <Window>(viewName, isViewModelAvailable);

            if (viewObject != default(Window))
            {
                viewObject.Show();
            }
        }
Esempio n. 10
0
        public override DependencyObject CreateMainWindow()
        {
            var mainView = default(Window);

            if (!string.IsNullOrEmpty(mainViewName))
            {
                mainView = ViewBuilder.Build <Window>(mainViewName, isViewModelAvailable: true);
                if (mainView != default(Window))
                {
                    mainView.Show();
                }
            }

            return(mainView);
        }
Esempio n. 11
0
        static void Main(string[] args)
        {
            var assemblies = ConfigParser.GetAssemblies();
            var builder    = new ViewBuilder();

            builder.AddAssemblies(assemblies.ToList());
            var designDocs = builder.Build();
            var ddManager  = new DesignDocManager();

            ddManager.Create(designDocs, (s) => Console.WriteLine("Created {0} design doc", s));
            var ddfManager = new DesignDocFileManager();

            ddfManager.Create(Environment.CurrentDirectory, designDocs);
            var runner = new ViewRunner();

            runner.Run(designDocs, (k, v, s) => Console.WriteLine("[{0}::{1}] Key {2}", k, v, s["key"]), 5);
        }
Esempio n. 12
0
        protected virtual ViewLinkHelper createPageFor(IPageViewModel viewModel)
        {
            var view = ViewBuilder.Build <Page> (viewModel);

            return(new ViewLinkHelper(view, viewModel, this));
        }