Beispiel #1
0
        public AppContext(
            IApplicationContainer container,
            IProjectionDatabase projectionDatabase,
            IStyleService styleService,
            ITaskCollection tasks)
        {
            Logger.Current.Trace("In AppContext");
            if (container == null)
            {
                throw new ArgumentNullException("container");
            }
            if (styleService == null)
            {
                throw new ArgumentNullException("styleService");
            }
            if (tasks == null)
            {
                throw new ArgumentNullException("tasks");
            }

            _container          = container;
            _projectionDatabase = projectionDatabase;
            _styleService       = styleService;
            _tasks = tasks;
        }
Beispiel #2
0
        internal DockPanelCollection(object dockingManager, Form mainForm, IBroadcasterService broadcaster,
                                     IStyleService styleService)
        {
            if (mainForm == null)
            {
                throw new ArgumentNullException("mainForm");
            }
            if (broadcaster == null)
            {
                throw new ArgumentNullException("broadcaster");
            }
            if (styleService == null)
            {
                throw new ArgumentNullException("styleService");
            }

            _mainForm       = mainForm;
            _broadcaster    = broadcaster;
            _styleService   = styleService;
            _dockingManager = dockingManager as DockManager;

            if (_dockingManager == null)
            {
                throw new ApplicationException(
                          "Failed to initialize DockPanelCollection. No docking manager is provided.");
            }

            _dockingManager.VisibilityChanged += _dockingManager_VisibilityChanged;
        }
Beispiel #3
0
        public LayoutView(
            IAppContext context,
            PrintingPlugin plugin,
            IBroadcasterService broadcaster,
            IStyleService styleService,
            ElementsPresenter elements,
            PdfExportService pdfService
            )
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }
            if (broadcaster == null)
            {
                throw new ArgumentNullException("broadcaster");
            }
            if (styleService == null)
            {
                throw new ArgumentNullException("styleService");
            }
            if (elements == null)
            {
                throw new ArgumentNullException("elements");
            }
            if (pdfService == null)
            {
                throw new ArgumentNullException("pdfService");
            }

            _context      = context;
            _plugin       = plugin;
            _broadcaster  = broadcaster;
            _styleService = styleService;
            _elements     = elements;
            _pdfService   = pdfService;

            InitializeComponent();

            // there is no way to get it other than in context of some Control
            ScreenHelper.ScreenDpi = layoutControl1.GetScreenDpi();

            InitControls();

            AttachEventHandlers();

            InitDockPanels();

            InitMenus();

            RestorePreviousState();

            statusStripEx1.ContextMenuStrip = null;

            FormClosing += LayoutViewFormClosing;
        }
Beispiel #4
0
        public ConfigPresenter(IAppContext context, IConfigView view, IConfigService configService,
                               IStyleService styleService, IPluginManager pluginManger)
            : base(view)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (view == null)
            {
                throw new ArgumentNullException("view");
            }
            if (configService == null)
            {
                throw new ArgumentNullException("configService");
            }
            if (styleService == null)
            {
                throw new ArgumentNullException("styleService");
            }
            if (pluginManger == null)
            {
                throw new ArgumentNullException("pluginManger");
            }


            _context       = context;
            _configService = configService;
            _styleService  = styleService;
            _pluginManger  = pluginManger;


            view.PageShown += OnPageShown;
        }
Beispiel #5
0
 public StyleController(IStyleService styleService,
                        ITattooService tattooService,
                        ITattooViewModelService tattooViewModelService)
 {
     _styleService           = styleService;
     _tattooService          = tattooService;
     _tattooViewModelService = tattooViewModelService;
 }
Beispiel #6
0
 public BeersController(IBeerService beerService, IBreweryService breweryService, ICountryService countryService, IStyleService styleService, UserManager <User> userManager, IUserService userService)
 {
     this.beerService    = beerService ?? throw new ArgumentNullException(nameof(beerService));
     this.breweryService = breweryService ?? throw new ArgumentNullException(nameof(breweryService));
     this.countryService = countryService ?? throw new ArgumentNullException(nameof(countryService));
     this.styleService   = styleService ?? throw new ArgumentNullException(nameof(styleService));
     this.userManager    = userManager ?? throw new ArgumentNullException(nameof(userManager));
     this.userService    = userService ?? throw new ArgumentNullException(nameof(userService));
 }
        public GdalDriverOptionsView(IAppContext context, ParameterControlGenerator controlGenerator, IStyleService styleService)
            : base(context, controlGenerator)
        {
            if (styleService == null)
            {
                throw new ArgumentNullException("styleService");
            }
            _styleService = styleService;

            InitializeComponent();
        }
 public ViewModelService(
     ICategoryService categoryService,
     ISiteSettingsService settings,
     IStyleService styleService,
     IProductService productService)
 {
     _settings        = settings;
     _styleService    = styleService;
     _productService  = productService;
     _categoryService = categoryService;
 }
Beispiel #9
0
        public WebViewPageBase()
        {
            _widgetTemplateService    = HostContainer.GetInstance <IWidgetTemplateService>();
            _userService              = HostContainer.GetInstance <IUserService>();
            _localizedResourceService = HostContainer.GetInstance <IEzCMSLocalizedResourceService>();
            _siteSettingService       = HostContainer.GetInstance <ISiteSettingService>();
            _styleService             = HostContainer.GetInstance <IStyleService>();
            _scriptService            = HostContainer.GetInstance <IScriptService>();

            _currentController = (ControllerBase)HttpContext.Current.Items[FrameworkConstants.EzCurrentController];
        }
        public ShellViewModel(IEventAggregator eventAggragator, IDialogService dialogService, IMessageBoxService messageBoxService, IFontService fontService, IStyleService styleService, IRecentFilesService recentFilesService)
        {
            this.eventAggragator    = eventAggragator;
            this.dialogService      = dialogService;
            this.messageBoxService  = messageBoxService;
            this.recentFilesService = recentFilesService;
            this.styleService       = styleService;

            this.FontSizes   = fontService.GetFontSizes();
            this.FontNames   = fontService.GetFontNames();
            this.TableStyles = styleService.GetAllTableStyles();
            this.CellStyles  = styleService.GetAllCellStyles();
            this.GoodBadAndNeutralCellStyles = styleService.GetGoodBadAndNeutralCellStyles();
            this.DataAndModelCellStyles      = styleService.GetDataAndModelCellStyles();
            this.TitlesAndHeadingsCellStyles = styleService.GetTitlesAndHeadingsCellStyles();
            this.NumberFormatCellStyles      = styleService.GetNumberFormatCellStyles();
            this.ThemedCellStyles            = styleService.GetThemedCellStyles();

            this.IsUiPartEnabled = false;
            this.SetTitle();

            this.SelectedBackstageMenuItem = ShellParameters.NewTabName;

            // TFS 191000 - Workaround: do not initialize the value of the IsBackstageOpen property to true before the ribbon is loaded
            //this.IsBackstageOpened = true;

            this.ZoomLevel = 100;

            this.recentFilesService.SetRepositories(Properties.Settings.Default, p => Properties.Settings.Default.RecentFilesRepo, p => Properties.Settings.Default.RecentFoldersRepo);

            this.eventAggragator.GetEvent <FileOpenedEvent>().Subscribe(OnFileLoaded);
            this.eventAggragator.GetEvent <FileSavedEvent>().Subscribe(OnFileSaved);
            this.eventAggragator.GetEvent <NewDocumentEvent>().Subscribe(OnNewDocumentEvent);
            this.eventAggragator.GetEvent <TableAddedEvent>().Subscribe(OnTableAddedEvent);
            this.eventAggragator.GetEvent <CustomZoomLevelChangedEvent>().Subscribe(OnCustomZoomLevelChangedEvent);
            this.eventAggragator.GetEvent <PasswordToOpenEnteredEvent>().Subscribe(OnPasswordToOpenEnteredEvent);
            this.eventAggragator.GetEvent <PasswordToModifyEnteredEvent>().Subscribe(OnPasswordToModifyEnteredEvent);

            //Commands
            this.ShowNumberSettingsDialogCommand    = new DelegateCommand <object>(ExecuteShowNumberSettingsDialog);
            this.ShowFontSettingsDialogCommand      = new DelegateCommand <object>(ExecuteShowFontSettingsDialog);
            this.ShowFillSettingsDialogCommand      = new DelegateCommand <object>(ExecuteShowFillSettingsDialog);
            this.ShowAlignmnetSettingsDialogCommand = new DelegateCommand <object>(ExecuteShowAlignmnetSettingsDialog);
            this.ShowDimensionDialogCommand         = new DelegateCommand <DimensionDialogMode?>(ExecuteShowDimensionDialog);
            this.CloseDocumentCommand            = new DelegateCommand(ExecuteCloseDocument);
            this.FormatAsTableCommand            = new DelegateCommand <string>(ExecuteFormatAsTable);
            this.SaveDocumentCommand             = new DelegateCommand(ExecuteSaveDocument);
            this.CreateNewDocumentCommand        = new DelegateCommand <string>(CreateNewDocument);
            this.ShowZoomDialogCommand           = new DelegateCommand(ExecuteShowZoomDialog);
            this.ShowDataValidationDialogCommand = new DelegateCommand(ExecuteShowDataValidationDialog);

            this.PropertyChanged += OnPropertyChanged;
        }
 public ViewModelService(
     ICategoryService categoryService,
     ISiteSettingsService settings,
     IStyleService styleService,
     IProductService productService,
     IOptions <FeatureToggles> featureToggles)
 {
     _settings        = settings;
     _styleService    = styleService;
     _productService  = productService;
     _categoryService = categoryService;
     _featureToggles  = featureToggles.Value;
 }
Beispiel #12
0
 public AdminProductsController(
     IProductService productService,
     IImageService imageService,
     ISiteSettingsService siteSettingsService,
     IStyleService styleService,
     ICategoryService categoryService)
 {
     _productService      = productService;
     _imageService        = imageService;
     _siteSettingsService = siteSettingsService;
     _styleService        = styleService;
     _categoryService     = categoryService;
 }
Beispiel #13
0
 public AppView(IMainView parent, IStyleService styleService)
 {
     if (parent == null)
     {
         throw new ArgumentNullException("parent");
     }
     if (styleService == null)
     {
         throw new ArgumentNullException("styleService");
     }
     _parent                 = parent;
     _styleService           = styleService;
     AppViewFactory.Instance = this;
 }
Beispiel #14
0
        /// <summary>
        /// Register all styles into the global resources dictionary
        /// </summary>
        /// <param name="styleService">Style service</param>
        /// <returns></returns>
        public ResourceDictionary CreateStyles(IStyleService styleService)
        {
            var resources = new ResourceDictionary
            {
                { "botButtonPrimary", styleService.GetTemplate().GetButtonStyle(StyleType.Primary) },
                { "botButtonWarning", styleService.GetTemplate().GetButtonStyle(StyleType.Warning) },
                { "botButtonDanger", styleService.GetTemplate().GetButtonStyle(StyleType.Danger) },
                { "botEntryPrimary", styleService.GetTemplate().GetEntryStyle(StyleType.Primary) },
                { "botEditorPrimary", styleService.GetTemplate().GetEditorStyle(StyleType.Primary) },
                { "botPickerPrimary", styleService.GetTemplate().GetPickerStyle(StyleType.Primary) },
                { "botLabelPrimary", styleService.GetTemplate().GetLabelStyle(StyleType.Primary) },
                { "botSpanPrimary", styleService.GetTemplate().GetLabelStyle(StyleType.Primary) }
            };

            return(resources);
        }
Beispiel #15
0
 public AppContext(
     IApplicationContainer container,
     IStyleService styleService
     )
 {
     Logger.Current.Trace("In AppContext");
     if (container == null)
     {
         throw new ArgumentNullException("container");
     }
     if (styleService == null)
     {
         throw new ArgumentNullException("styleService");
     }
     Container     = container;
     _styleService = styleService;
 }
Beispiel #16
0
        public Overlay(IServiceRegistry services)
            : base(VisualStyle.Empty)
        {
            Contract.Requires <ArgumentNullException>(services != null, "services");

            this.services = services;
            device        = services.GetService <IDirect2DService>().Direct2DDevice;

            IsInside    = true;
            IsFocusable = true;

            TextTheme    = DefaultTextTheme;
            styleService = ToDispose(services.GetService <IStyleService>());
            theme        = styleService.GetTheme(DefaultControlTheme);

            EnteredElement = this;
            FocusedElement = this;
        }
        internal DockPanelCollection(object dockingManager, Form mainForm, IBroadcasterService broadcaster,
                                     IStyleService styleService)
        {
            if (mainForm == null)
            {
                throw new ArgumentNullException("mainForm");
            }
            if (broadcaster == null)
            {
                throw new ArgumentNullException("broadcaster");
            }
            if (styleService == null)
            {
                throw new ArgumentNullException("styleService");
            }

            _mainForm       = mainForm;
            _broadcaster    = broadcaster;
            _styleService   = styleService;
            _dockingManager = dockingManager as DockingManager;

            if (_dockingManager == null)
            {
                throw new ApplicationException(
                          "Failed to initialize DockPanelCollection. No docking manager is provided.");
            }

            _dockingManager.DragProviderStyle = DragProviderStyle.VS2012;
#if STYLE2010
            _dockingManager.VisualStyle = VisualStyle.Office2010;
#else
            _dockingManager.VisualStyle = VisualStyle.Default;
#endif

            _dockingManager.DockTabAlignment  = DockTabAlignmentStyle.Bottom;
            _dockingManager.ShowCaptionImages = false;

            _dockingManager.DockVisibilityChanged  += DockVisibilityChanged;
            _dockingManager.DockVisibilityChanging += DockVisibilityChanging;
        }
Beispiel #18
0
 public GdalConvertView(IAppContext context, ParameterControlGenerator controlGenerator, IStyleService styleService)
     : base(context, controlGenerator, styleService)
 {
     InitializeComponent();
 }
Beispiel #19
0
 public StyleAppService(IStyleService service) : base(service)
 {
     this.service = service;
 }
Beispiel #20
0
 public StyleController(
     IStyleService styleService
     )
 {
     _styleService = styleService;
 }
 public StyleController(IStyleService styleService)
 {
     _StyleService = styleService;
 }
 public StyleApiController(IStyleService styleService)
 {
     this.styleService = styleService ?? throw new ArgumentNullException(nameof(styleService));
 }
Beispiel #23
0
 public ResourcesController(IScriptService scriptService, IStyleService styleService)
 {
     _scriptService = scriptService;
     _styleService  = styleService;
 }
 public StyleController(ILogger <StyleController> logger, IStyleService styleService)
 {
     _styleService = styleService;
     _logger       = logger;
 }
Beispiel #25
0
 public StyleController(IStyleService styleService) :base()
 {
     _StyleService = styleService;
     Styles = new List<Style>();
 }
Beispiel #26
0
 public AppSettingsViewModel(IAppSettingsService appSettingsService, IGlobalizationService globalizationService, IStyleService styleService)
 {
     this.appSettingsService   = appSettingsService;
     this.globalizationService = globalizationService;
     this.styleService         = styleService;
 }
Beispiel #27
0
 public TattooViewModelService(ITattooService tattooService,
                               IStyleService styleService)
 {
     _tattooService = tattooService;
     _styleService  = styleService;
 }
 public AppSettingsViewModel(IAppSettingsService appSettingsService, IGlobalizationService globalizationService, IStyleService styleService)
 {
     this.appSettingsService = appSettingsService;
     this.globalizationService = globalizationService;
     this.styleService = styleService;
 }
Beispiel #29
0
 public StylesController(IStyleService styleService, IMapper mapper, ILogger <StylesController> logger)
 {
     _styleService = styleService;
     _mapper       = mapper;
     _logger       = logger;
 }