コード例 #1
0
        public DocumentViewModel(
            IDialogService dialogService,
            IWindowManager windowManager,
            ISiteContextGenerator siteContextGenerator,
            Func<string, IMetaWeblogService> getMetaWeblog,
            ISettingsProvider settingsProvider,
            IDocumentParser documentParser)
        {
            this.dialogService = dialogService;
            this.windowManager = windowManager;
            this.siteContextGenerator = siteContextGenerator;
            this.getMetaWeblog = getMetaWeblog;
            this.settingsProvider = settingsProvider;
            this.documentParser = documentParser;

            FontSize = GetFontSize();

            title = "New Document";
            Original = "";
            Document = new TextDocument();
            Post = new Post();
            timer = new DispatcherTimer();
            timer.Tick += TimerTick;
            timer.Interval = delay;
        }
コード例 #2
0
        public DocumentViewModel(
            IDialogService dialogService,
            IWindowManager windowManager,
            ISiteContextGenerator siteContextGenerator,
            Func <string, IMetaWeblogService> getMetaWeblog,
            ISettingsProvider settingsProvider,
            IDocumentParser documentParser)
        {
            this.dialogService        = dialogService;
            this.windowManager        = windowManager;
            this.siteContextGenerator = siteContextGenerator;
            this.getMetaWeblog        = getMetaWeblog;
            this.settingsProvider     = settingsProvider;
            this.documentParser       = documentParser;

            FontSize   = GetFontSize();
            IndentType = settingsProvider.GetSettings <MarkPadSettings>().IndentType;

            Title          = "New Document";
            Original       = "";
            Document       = new TextDocument();
            Post           = new Post();
            timer          = new DispatcherTimer();
            timer.Tick    += TimerTick;
            timer.Interval = delay;
        }
コード例 #3
0
        public DocumentFactoryTests()
        {
            dialogService        = Substitute.For <IDialogService>();
            eventAggregator      = Substitute.For <IEventAggregator>();
            siteContextGenerator = Substitute.For <ISiteContextGenerator>();
            blogService          = Substitute.For <IBlogService>();
            windowManager        = Substitute.For <IWindowManager>();
            webDocumentService   = new Lazy <IWebDocumentService>(() => Substitute.For <IWebDocumentService>());
            fileSystem           = TestObjectMother.GetFileSystem();

            documentFactory = new DocumentFactory(dialogService, eventAggregator, siteContextGenerator, blogService, windowManager, webDocumentService,
                                                  fileSystem);
        }
コード例 #4
0
        public DocumentFactoryTests()
        {
            dialogService = Substitute.For<IDialogService>();
            eventAggregator = Substitute.For<IEventAggregator>();
            siteContextGenerator = Substitute.For<ISiteContextGenerator>();
            blogService = Substitute.For<IBlogService>();
            windowManager = Substitute.For<IWindowManager>();
            webDocumentService = new Lazy<IWebDocumentService>(() => Substitute.For<IWebDocumentService>());
            fileSystem = TestObjectMother.GetFileSystem();

            documentFactory = new DocumentFactory(dialogService, eventAggregator, siteContextGenerator, blogService, windowManager, webDocumentService,
                                                  fileSystem);
        }
コード例 #5
0
        public DocumentViewModel(IDialogService dialogService, ISettingsService settings, IWindowManager windowManager, ISiteContextGenerator siteContextGenerator)
        {
            this.dialogService = dialogService;
            this.settings = settings;
            this.windowManager = windowManager;
            this.siteContextGenerator = siteContextGenerator;

            title = "New Document";
            Original = "";
            Document = new TextDocument();
            Post = new Post();
            timer = new DispatcherTimer();
            timer.Tick += TimerTick;
            timer.Interval = delay;
        }
コード例 #6
0
 public DocumentFactory(
     IDialogService dialogService, 
     IEventAggregator eventAggregator,
     ISiteContextGenerator siteContextGenerator, 
     IBlogService blogService, 
     IWindowManager windowManager, 
     Lazy<IWebDocumentService> webDocumentService, 
     IFileSystem fileSystem)
 {
     this.dialogService = dialogService;
     this.eventAggregator = eventAggregator;
     this.siteContextGenerator = siteContextGenerator;
     this.blogService = blogService;
     this.windowManager = windowManager;
     this.webDocumentService = webDocumentService;
     this.fileSystem = fileSystem;
 }
コード例 #7
0
 public DocumentFactory(
     IDialogService dialogService,
     IEventAggregator eventAggregator,
     ISiteContextGenerator siteContextGenerator,
     IBlogService blogService,
     IWindowManager windowManager,
     Lazy <IWebDocumentService> webDocumentService,
     IFileSystem fileSystem)
 {
     this.dialogService        = dialogService;
     this.eventAggregator      = eventAggregator;
     this.siteContextGenerator = siteContextGenerator;
     this.blogService          = blogService;
     this.windowManager        = windowManager;
     this.webDocumentService   = webDocumentService;
     this.fileSystem           = fileSystem;
 }
コード例 #8
0
 public DocumentFactory(
     IDialogService dialogService,
     IEventAggregator eventAggregator,
     ISiteContextGenerator siteContextGenerator,
     IBlogService blogService,
     Func <OpenFromWebViewModel> openFromWebViewModelFactory,
     IWindowManager windowManager,
     Lazy <IWebDocumentService> webDocumentService)
 {
     this.dialogService               = dialogService;
     this.eventAggregator             = eventAggregator;
     this.siteContextGenerator        = siteContextGenerator;
     this.blogService                 = blogService;
     this.openFromWebViewModelFactory = openFromWebViewModelFactory;
     this.windowManager               = windowManager;
     this.webDocumentService          = webDocumentService;
 }
コード例 #9
0
 public DocumentFactory(
     IDialogService dialogService, 
     Func<string, IMetaWeblogService> getMetaWeblog, 
     IEventAggregator eventAggregator,
     ISiteContextGenerator siteContextGenerator, 
     IBlogService blogService, 
     Func<OpenFromWebViewModel> openFromWebViewModelFactory,
     IWindowManager windowManager)
 {
     this.dialogService = dialogService;
     this.getMetaWeblog = getMetaWeblog;
     this.eventAggregator = eventAggregator;
     this.siteContextGenerator = siteContextGenerator;
     this.blogService = blogService;
     this.openFromWebViewModelFactory = openFromWebViewModelFactory;
     this.windowManager = windowManager;
 }