Beispiel #1
0
        public override void Init(object initData)
        {
            base.Init(initData);

            var systemSettings = AppSettingsService.Get <SystemSettings>(MyAppConstants.SystemSettings);

            if (!systemSettings.PortalDisableMyWork)
            {
                MenuPageItems.Add(new MenuPageItem {
                    Title = "My Tasks", Icon = "menu_1.png", PageType = typeof(DashboardPageModel), WidgetConfiguration = WidgetConfigurations.MyTasksWidgetConfiguration
                });
            }

            if (!systemSettings.PortalDisableMyRecords)
            {
                MenuPageItems.Add(new MenuPageItem {
                    Title = "My Records", Icon = "menu_2.png", PageType = typeof(DashboardPageModel), WidgetConfiguration = WidgetConfigurations.MyRecordsWidgetConfiguration
                });
            }

            if (!systemSettings.PortalDisableIncidents)
            {
                MenuPageItems.Add(new MenuPageItem {
                    Title = "Event Reports", Icon = "menu_3.png", PageType = typeof(DashboardPageModel), WidgetConfiguration = WidgetConfigurations.EventReportsWidgetConfiguration
                });
            }

            MenuPageItems.Add(new MenuPageItem {
                Title = "Offline", Icon = "menu_4.png", PageType = typeof(MainTabPageModel), WidgetConfiguration = WidgetConfigurations.MyTasksWidgetConfiguration
            });
        }
Beispiel #2
0
        /// <summary>
        /// Der Konstruktor wird private gesetzut. Die Klasse kann nun von
        /// außen nicht mehr instanziert werden.
        /// </summary>
        /// <remarks>
        /// In dieser Methode wird <code>AppSettingsService</code> verwendet um die Base-Url
        /// zur API aus der appsettings.config zu laden und zu setzen.
        /// </remarks>
        private RestService()
        {
            Assembly           assembly = GetType().Assembly;
            AppSettingsService appSettingsServiceBase = new AppSettingsService();

            appSettingsServiceBase.Assembly = assembly;

            base.BaseUrl = appSettingsServiceBase.Get("ServiceUrl");
        }
Beispiel #3
0
        public override void Init(object initData)
        {
            base.Init(initData);

            WidgetConfiguration = initData as WidgetConfiguration;
            User = new User {
                FullName = WidgetConfiguration.PageTitle
            };
            AppSettings = AppSettingsService.Get <AppSettings>(MyAppConstants.AppSettings);

            InitWidgets();
        }