Example #1
0
 public AddNoteViewModel(INoteService NoteService)
 {
     this.NoteService = NoteService;
     this.Note = new Note();
     this.AddNoteCommand = new RelayCommand<Note>(AddNote);
     this.InitializeCommand = new RelayCommand(Initialize);
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NoteApiController"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 public NoteApiController(IMerchelloContext merchelloContext)
     : base(merchelloContext)
 {
     Mandate.ParameterNotNull(merchelloContext, "merchelloContext");
     _noteService = merchelloContext.Services.NoteService;
     _merchelloHelper = new MerchelloHelper(merchelloContext.Services);
 }
Example #3
0
        public NoteController(INoteService noteService, IUserService userService
 , ILogService logService
            )
            : base(userService, logService)
        {
            this.serviceNote = noteService;
        }
Example #4
0
 public LeadController(
     ILeadService LeadService,
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     INoteService noteService,
     IActivityService activityService,
     ISaleService saleService,
     ITaskService taskService,
     ViewDataHelper viewdataHelper,
     ICampaignService campaignService,
     ITagService tagService)
 {
     _leadService = LeadService;
     _contactService = contactService;
     _membershipService = membershipService;
     _roleService = roleService;
     _noteService = noteService;
     _activityService = activityService;
     _saleService = saleService;
     _taskService = taskService;
     _viewdataHelper = viewdataHelper;
     _campaignService = campaignService;
     _tagService = tagService;
 }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InvoiceApiController"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 public InvoiceApiController(IMerchelloContext merchelloContext)
     : base(merchelloContext)
 {
     _storeSettingService = MerchelloContext.Services.StoreSettingService as StoreSettingService;
     _invoiceService = merchelloContext.Services.InvoiceService;
     _noteService = merchelloContext.Services.NoteService;
     _merchello = new MerchelloHelper(merchelloContext, false);
 }
 public PersonalNotesController(
     ICategoryService categoryService,
     INoteService noteService,
     IVideoService videoService)
 {
     this.categoryService = categoryService;
     this.noteService = noteService;
     this.videoService = videoService;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="CopyOriginalCustomerNotesToFirstNote"/> class.
        /// </summary>
        public CopyOriginalCustomerNotesToFirstNote()
            : base(ApplicationContext.Current.DatabaseContext.SqlSyntax, Umbraco.Core.Logging.Logger.CreateWithDefaultLog4NetConfiguration())
        {
            var dbContext = ApplicationContext.Current.DatabaseContext;
            _database = dbContext.Database;
            _sqlSyntax = dbContext.SqlSyntax;

            _noteService = MerchelloContext.Current.Services.NoteService;
        }
Example #8
0
        public NoteListViewModel(INoteService noteService)
        {
            this.NoteService = noteService;
            this.UpdateNoteListCommand = new RelayCommand(UpdateNoteList);
            this.DeleteNoteCommand = new RelayCommand<Note>(DeleteNote);

            UpdateNoteList();
            Messenger.Default.Register<NewNoteMessage>(this, AddNoteHandler);
            Messenger.Default.Register<EditNoteMessage>(this, EditNoteHandler);
        }
 public NoteController(
     INoteService NoteService, 
     IContactService contactService, 
     ILeadService leadService, 
     IQuoteService quoteService,
     IMembershipService membershipService)
 {
     _noteService = NoteService;
     _contactService = contactService;
     _leadService = leadService;
     _quoteService = quoteService;
     _membershipService = membershipService;
 }
Example #10
0
        public static NoteController GetInitialisedNotesController(INoteService noteService)
        {
            var controller = new NoteController(noteService)
            {
                Request = new HttpRequestMessage {RequestUri = new Uri("http://localhost/api/")},
                Configuration = new HttpConfiguration()
            };

            controller.Configuration.MapHttpAttributeRoutes();
            controller.Configuration.EnsureInitialized();

            return controller;
        }
        /// <summary>
        /// Creates a new instance of <c>NotesBrowserModel</c>.
        /// </summary>
        public NotesBrowserModel(IUnityContainer container) {
            OpenNoteCommand = new DelegateCommand<Note>(OpenNote);
            DeleteSelectedNoteCommand = new DelegateCommand<object>(
                DeleteSelectedNote, CanDeleteSelectedNote);
            CreateNewNoteCommand = new DelegateCommand<object>(CreateNewNote);

            view = new NotesBrowser(this);
            service = container.Resolve<INoteService>();
            documentController = container.Resolve<IDocumentController>(
                ControllerNames.DocumentController);

            Notes = new ObservableCollection<Note>();
            LoadAllNotes();
        }
        public FamilyTreeServiceFactory(IUnitOfWork unitOfWork, ICacheProvider cache)
        {
            Requires.NotNull(unitOfWork);
            Requires.NotNull(cache);

            _citationService = new CitationService(unitOfWork);
            _familyService = new FamilyService(unitOfWork);
            _individualService = new IndividualService(unitOfWork);
            _factService = new FactService(unitOfWork);
            _multimediaService = new MultimediaLinkService(unitOfWork);
            _noteService = new NoteService(unitOfWork);
            _repositoryService = new RepositoryService(unitOfWork);
            _sourceService = new SourceService(unitOfWork);
            _treeService = new TreeService(unitOfWork);
        }
Example #13
0
 public ContactsController(
     INoteService noteService, 
     IContactService contactService, 
     ILeadService leadService, 
     IQuoteService quoteService,
     IMembershipService membershipService,
     IActivityService activityService,
     ViewDataHelper initHelper)
 {
     _noteService = noteService;
     _contactService = contactService;
     _leadService = leadService;
     _quoteService = quoteService;
     _membershipService = membershipService;
     _activityService = activityService;
     _initHelper = initHelper;
 }
 public QuoteController(
     ILeadService LeadService, 
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     INoteService noteService,
     IActivityService activityService,
     IQuoteService quoteService,
     IInvoiceService invoiceService)
 {
     _leadService = LeadService;
     _contactService = contactService;
     _membershipService = membershipService;
     _roleService = roleService;
     _noteService = noteService;
     _activityService = activityService;
     _quoteService = quoteService;
     _invoiceService = invoiceService;
 }
Example #15
0
 public SaleController(
     ILeadService LeadService,
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     INoteService noteService,
     IActivityService activityService,
     ISaleService saleService,
     ViewDataHelper initHelper,
     ITagService tagService)
 {
     _leadService = LeadService;
     _contactService = contactService;
     _membershipService = membershipService;
     _roleService = roleService;
     _noteService = noteService;
     _activityService = activityService;
     _saleService = saleService;
     _initHelper = initHelper;
     _tagService = tagService;
 }
Example #16
0
 public InvoiceController(
     ILeadService LeadService,
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     INoteService noteService,
     IActivityService activityService,
     IInvoiceService invoiceService,
     ISaleService saleService,
     ViewDataHelper initHelper)
 {
     _leadService = LeadService;
     _contactService = contactService;
     _membershipService = membershipService;
     _roleService = roleService;
     _noteService = noteService;
     _activityService = activityService;
     _saleService = saleService;
     _invoiceService = invoiceService;
     _initHelper = initHelper;
 }
 public NotesControllerTests()
 {
     _noteService = new TestNoteService();
     _controller  = new NotesController(_noteService);
     ((TestNoteService)_noteService).Controller = _controller;
 }
Example #18
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_noteService != null)
                {
                    _noteService.Dispose();
                    _noteService = null;
                }
            }

            base.Dispose(disposing);
        }
Example #19
0
 /// <summary>
 /// Create a controller and set the service
 /// </summary>
 public NoteController(INoteService service)
 {
     _service = service;
 }
Example #20
0
 /// <summary>
 /// Creates the DataController using Structure Map to inject the dependencies
 /// </summary>
 /// <param name="noteService">The structure map injected note service.</param>
 public DataController(INoteService noteService)
 {
     _noteService = noteService;
 }
Example #21
0
        public SettingsAdvancedViewModel(IBackupService backupService, IDialogService dialogService, INoteService noteService, IEventAggregator eventAggregator)
        {
            // Injection
            this.eventAggregator = eventAggregator;
            this.backupService   = backupService;
            this.dialogService   = dialogService;
            this.noteService     = noteService;

            // Commands
            this.BackupCommand                = new DelegateCommand(() => this.Backup());
            this.ImportCommand                = new DelegateCommand(() => this.Import());
            this.RestoreCommand               = new DelegateCommand(() => this.Restore());
            this.OpenStorageLocationCommand   = new DelegateCommand(() => Actions.TryOpenPath(ApplicationPaths.CurrentNoteStorageLocation));
            this.ChangeStorageLocationCommand = new DelegateCommand(async() => { await this.ChangeStorageLocationAsync(false, false); });
            this.MoveStorageLocationCommand   = new DelegateCommand(async() => { await this.ChangeStorageLocationAsync(false, true); });
            this.ResetStorageLocationCommand  = new DelegateCommand(async() => { await this.ChangeStorageLocationAsync(true, false); });

            // Event handlers
            this.noteService.StorageLocationChanged += (sender, e) => OnPropertyChanged(() => this.StorageLocation);

            // Initialize
            this.LoadNumberOfNotesInJumplist();
            this.LoadCheckBoxStates();
        }
 public SearchController(ISearchService searchService, INoteService noteService,IVideoService videoService)
 {
     this.searchService = searchService;
     this.noteService = noteService;
     this.videoService = videoService;
 }
 public NoteController(INoteService noteService)
 {
     this.noteService = noteService;
 }
Example #24
0
        public NotesListsViewModel(IEventAggregator eventAggregator, INoteService noteService, IAppearanceService appearanceService, IJumpListService jumpListService, ISearchService searchService, IDialogService dialogService, I18nService i18nService, IBackupService backupService)
        {
            // Injection
            this.eventAggregator   = eventAggregator;
            this.noteService       = noteService;
            this.appearanceService = appearanceService;
            this.jumpListService   = jumpListService;
            this.searchService     = searchService;
            this.dialogService     = dialogService;
            this.i18nService       = i18nService;
            this.backupService     = backupService;

            // PubSub events
            this.eventAggregator.GetEvent <TriggerLoadNoteAnimationEvent>().Subscribe((_) =>
            {
                this.TriggerRefreshNotesAnimation = false;
                this.TriggerRefreshNotesAnimation = true;
            });

            this.eventAggregator.GetEvent <SettingChangeStorageLocationFromMainChangedEvent>().Subscribe((_) => OnPropertyChanged(() => this.ShowChangeStorageLocationButton));
            this.eventAggregator.GetEvent <RefreshJumpListEvent>().Subscribe((_) => this.jumpListService.RefreshJumpListAsync(this.noteService.GetRecentlyOpenedNotes(SettingsClient.Get <int>("Advanced", "NumberOfNotesInJumpList")), this.noteService.GetFlaggedNotes()));

            this.eventAggregator.GetEvent <OpenNoteEvent>().Subscribe(noteTitle =>
            {
                if (!string.IsNullOrEmpty(noteTitle))
                {
                    this.SelectedNote = new NoteViewModel {
                        Title = noteTitle
                    }
                }
                ;
                this.OpenSelectedNote();
            });

            // Event handlers
            this.i18nService.LanguageChanged        += LanguageChangedHandler;
            this.noteService.FlagUpdated            += async(noteId, isFlagged) => { await this.UpdateNoteFlagAsync(noteId, isFlagged); };
            this.noteService.StorageLocationChanged += (_, __) => this.RefreshNotebooksAndNotes();
            this.backupService.BackupRestored       += (_, __) => this.RefreshNotebooksAndNotes();
            this.noteService.NotesChanged           += (_, __) => Application.Current.Dispatcher.Invoke(() => { this.RefreshNotes(); });
            this.searchService.Searching            += (_, __) => TryRefreshNotesOnSearch();

            this.NoteFilter = ""; // Must be set before RefreshNotes()

            // Initialize notebooks
            this.RefreshNotebooksAndNotes();

            // Commands
            this.DeleteNoteCommand             = new DelegateCommand <object>(async(obj) => await this.DeleteNoteAsync(obj));
            this.ToggleNoteFlagCommand         = new DelegateCommand <object>((obj) => this.ToggleNoteFlag(obj));
            this.DeleteNotebookCommand         = new DelegateCommand <object>((obj) => this.DeleteNotebook(obj));
            this.EditNotebookCommand           = new DelegateCommand <object>((obj) => this.EditNotebook(obj));
            this.DeleteSelectedNotebookCommand = new DelegateCommand(() => this.DeleteSelectedNotebook());
            this.EditSelectedNotebookCommand   = new DelegateCommand(() => this.EditSelectedNotebook());
            this.DeleteSelectedNoteCommand     = new DelegateCommand(async() => await this.DeleteSelectedNoteAync());
            this.ChangeStorageLocationCommand  = new DelegateCommand(async() => await this.ChangeStorageLocationAsync(false));
            this.ResetStorageLocationCommand   = new DelegateCommand(async() => await this.ChangeStorageLocationAsync(true));

            this.NewNotebookCommand = new DelegateCommand <string>((_) => this.NewNotebook());
            Common.Prism.ApplicationCommands.NewNotebookCommand.RegisterCommand(this.NewNotebookCommand);

            this.NewNoteCommand = new DelegateCommand <object>(param => this.NewNote(param));
            Common.Prism.ApplicationCommands.NewNoteCommand.RegisterCommand(this.NewNoteCommand);

            this.ImportNoteCommand = new DelegateCommand <string>((_) => this.ImportNote());
            Common.Prism.ApplicationCommands.ImportNoteCommand.RegisterCommand(this.ImportNoteCommand);

            this.NavigateBetweenNotesCommand = new DelegateCommand <object>(NavigateBetweenNotes);
            Common.Prism.ApplicationCommands.NavigateBetweenNotesCommand.RegisterCommand(this.NavigateBetweenNotesCommand);

            // Process jumplist commands
            this.ProcessJumplistCommands();
        }
Example #25
0
 /// <summary />
 public NoteTests()
 {
     _noteService     = TestInitializer.Provider.GetService <INoteService>();
     _databaseContext = TestInitializer.Provider.GetService <DatabaseContext>();
     _noteDataFactory = TestInitializer.Provider.GetService <NoteDataFactory>();
 }
Example #26
0
        private static void RunCycle(IUserService userService, IBookService bookService, INoteService noteService)
        {
            string[] input;

            do
            {
                Console.Write(">");
                input = CommandLineParser.Parse(Console.ReadLine(), 3);
                switch (input[0]?.ToLower())
                {
                case "adduser":
                {
                    AddUser(userService, input[1], input[2]);
                    break;
                }

                case "login":
                {
                    Login(userService, input[1], input[2]);
                    break;
                }

                case "userslist":
                {
                    UsersList(userService);
                    break;
                }

                case "deleteuser":
                {
                    DeleteUser(userService, bookService, noteService);
                    break;
                }

                case "addnote":
                {
                    AddNote(noteService, bookService, userService, input[1], input[2]);
                    break;
                }

                case "noteslist":
                {
                    NotesList(bookService, noteService, userService, input[1]);
                    break;
                }

                case "changenote":
                {
                    ChangeNote(bookService, noteService, userService, input[1], input[2]);
                    break;
                }

                case "deletenote":
                {
                    DeleteNote(bookService, noteService, userService, input[1]);
                    break;
                }

                case "addbook":
                {
                    AddBook(bookService, userService, input[1]);
                    break;
                }

                case "bookslist":
                {
                    BooksList(bookService, userService);
                    break;
                }

                case "changebook":
                {
                    ChangeBook(bookService, userService, input[1], input[2]);
                    break;
                }

                case "deletebook":
                {
                    DeleteBook(bookService, userService, input[1]);
                    break;
                }

                case "commands":
                case "help":
                {
                    DisplayCommands();
                    break;
                }

                case "clear":
                {
                    Console.Clear();
                    break;
                }

                case "quit":
                {
                    return;
                }

                default:
                {
                    Console.WriteLine("Ошибка выбора!");
                    break;
                }
                }
            }while (input[0] != "quit");
        }
Example #27
0
 public NoteController(INoteService noteService, IMapper mapper)
 {
     NoteService = noteService;
     Mapper      = mapper;
 }
Example #28
0
 public UsersController()
 {
     this.userService = new UserService();
     this.noteService = new NoteService();
 }
Example #29
0
 public NoteController(IOrganizerDbContext organizerDbContext, INoteService <INoteDto> noteService)
 {
     _organizerDbContext = organizerDbContext;
     _noteService        = noteService;
 }
Example #30
0
 public NotesController(INoteService context)
 {
     _noteService = context;
 }
Example #31
0
 public HomeController(ILogger <HomeController> logger,
                       INoteService noteService)
 {
     _logger      = logger;
     _noteService = noteService;
 }
Example #32
0
 public SearchController(ISearchService searchService, INoteService noteService, IVideoService videoService)
 {
     this.searchService = searchService;
     this.noteService   = noteService;
     this.videoService  = videoService;
 }
 public GetNotesHandler(INoteService noteService)
 {
     _noteService = noteService;
 }
Example #34
0
 public ExportCmd(IConsole console, INoteService noteService)
 {
     _console     = console;
     _noteService = noteService;
 }
 public NoteController(INoteService noteService)
 {
     _noteService = noteService;
 }
Example #36
0
 public NoteController(IEmployeeService employeeService, INoteService noteService)
     : base(employeeService)
 {
     this._noteService     = noteService;
     this._employeeService = employeeService;
 }
Example #37
0
 public EditNoteViewModel(INoteService NoteService)
 {
     this.NoteService = NoteService;
     this.InitializeCommand = new RelayCommand<string>(Initialize);
     this.SaveNoteCommand = new RelayCommand<Note>(SaveNote);
 }
 public BusinessLogicDispatcher()
 {
     service = new LocalNoteService();
 }
Example #39
0
 public NotesController(INoteService noteService)
 {
     this._noteService = noteService;
 }
 public NotesIndexModelBuilder(INoteService notesService, IUserService userService)
 {
     _notesService = notesService;
     _userService = userService;
 }
Example #41
0
 public NoteController(INoteService mockService)
 {
     _noteService = mockService;
 }
 public EditNoteModelBuilder(INoteService notesService, IUserService userService)
 {
     _notesService = notesService;
     _userService = userService;
 }
Example #43
0
        public NoteController(INoteService noteService)
        {
            Check.If(noteService).IsNotNull();

            _noteService = noteService;
        }
Example #44
0
 public NotesController()
 {
     ns = NinjectKernel.Kernel.Get <INoteService>();
 }
Example #45
0
 public AdminController(INoteService noteService, ICategoryService categoryService)
 {
     _noteService     = noteService;
     _categoryService = categoryService;
 }
Example #46
0
 public NoteController(INoteService noteService)
 {
     _noteService = noteService;
 }
Example #47
0
 public NotesController(INoteService noteService)
 {
     service = noteService;
 }
Example #48
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CompanyController"/> class.
 /// </summary>
 /// <param name="loggerService">The logger service.</param>
 /// <param name="crmManagerService">The CRM manager service.</param>
 /// <param name="userService">The user service.</param>
 /// <param name="noteService">The note service.</param>
 /// <param name="commonService">The common service.</param>
 /// <param name="youfferMessageService">The youffer message service.</param>
 /// <param name="oppService">The opp service.</param>
 /// <param name="youfferContactService">The youffer contact service.</param>
 /// <param name="youfferLeadService">The youffer lead service.</param>
 /// <param name="youfferFeedbackService">The youffer feedback service.</param>
 /// <param name="mapperFactory">The Mapper Factory</param>
 /// <param name="youfferNoteService">The youffer note service.</param>
 /// <param name="youfferInterestService"> The youffer interest service </param>
 /// <param name="pushMessageService">The push message service</param>
 public CompanyController(ILoggerService loggerService, ICRMManagerService crmManagerService, IUserService userService, INoteService noteService, ICommonService commonService, IYoufferMessageService youfferMessageService, IOpportunityService oppService, IYoufferContactService youfferContactService, IYoufferLeadService youfferLeadService, IYoufferFeedbackService youfferFeedbackService, IMapperFactory mapperFactory, IYoufferNoteService youfferNoteService, IYoufferInterestService youfferInterestService, IPushMessageService pushMessageService)
     : base(loggerService)
 {
     this.mapperFactory = mapperFactory;
     this.crmManagerService = crmManagerService;
     this.userService = userService;
     this.noteService = noteService;
     this.commonService = commonService;
     this.youfferMessageService = youfferMessageService;
     this.oppService = oppService;
     this.youfferContactService = youfferContactService;
     this.youfferLeadService = youfferLeadService;
     this.youfferFeedbackService = youfferFeedbackService;
     this.youfferNoteService = youfferNoteService;
     this.youfferInterestService = youfferInterestService;
     this.pushMessageService = pushMessageService;
 }
Example #49
0
 public NoteController(INoteService noteService, IGuardService guardService)
 {
     _noteService  = noteService;
     _guardService = guardService;
 }
 public NotesController(INoteService _service)
 {
     this.service = _service;
 }
 public RobotsController(INoteService note, IOptionsSnapshot <NoteSettings> settings)
 {
     _note     = note;
     _settings = settings;
 }
        public SettingsAppearanceViewModel(IAppearanceService appearanceService, II18nService i18nService, INoteService noteService, IEventAggregator eventAggregator)
        {
            this.appearanceService = appearanceService;
            this.i18nService       = i18nService;
            this.noteService       = noteService;
            this.eventAggregator   = eventAggregator;

            // ColorSchemes
            this.GetColorSchemes();

            // Languages
            this.GetLanguagesAsync();

            // CheckBoxStates
            this.LoadCheckBoxStates();

            // Event handling
            this.appearanceService.ColorSchemesChanged += ColorSchemesChangedHandler;
            this.i18nService.LanguagesChanged          += (sender, e) => this.GetLanguagesAsync();

            this.ColorSchemesDirectory = System.IO.Path.Combine(SettingsClient.ApplicationFolder(), ApplicationPaths.ColorSchemesSubDirectory);
        }
Example #53
0
 public Handler(INoteService noteService)
 {
     _noteService = noteService;
 }
Example #54
0
 public NoteController(INoteService service) :
     base(service)
 {
 }
 public NotesController(INoteService noteService, IMapper mapper)
 {
     _noteService = noteService;
     _mapper      = mapper;
 }
 public NotesController(INoteService noteService, IUserService userService)
 {
     _noteService = noteService;
     _userService = userService;
 }
 public HomeController(IUserService userService, INoteService noteService)
 {
     this.userService = userService;
     this.noteService = noteService;
 }