Ejemplo n.º 1
0
        public void Setup()
        {
            _formSpecsDictionary = FormSpecsSetup.FormSpecsDictionary;
            var appSettings = new ApplicationSettings("url", new DummySmsSender(),
                                                      new DummyEmailSender(), _formSpecsDictionary);
            var calendarSettings = new CalendarSettings
            {
                DefaultBlockDuration = 60,
                MaxBlockDuration     = 120,
                MinBlockDuration     = 30,
                Services             = new List <Service>()// needs to be valued after data available
            };

            _allSettings = new AllSettings(appSettings, calendarSettings);
            var calendarId  = "anything";
            var calendarDay = new CalendarDay(calendarId, DateTimeOffset.Now, 1);
            var block       = new Block(1, DateTimeOffset.Now, TimeSpan.FromHours(1), 1,
                                        BlockType.Available, calendarId);

            _allSettings.CurrentBlockParameters = new CurrentBlockParameters(block, calendarDay,
                                                                             "", false, DateTimeOffset.MinValue, DateTimeOffset.MaxValue);
            // Because FormSpecsDictionary is static, always use .Clone
            var formSpecs = _formSpecsDictionary[_formSpecName].Clone();

            _testFormProcessor = (DemoFormProcessor)formSpecs.FormProcessor;
            _testFormElements  = formSpecs.Elements;
            _formId            = formSpecs.FormId;
        }
Ejemplo n.º 2
0
        protected override void ExecuteCmdlet()
        {
            base.ExecuteCmdlet();

            Hashtable requestParameters = new Hashtable()
            {
                { "SolutionName", SolutionManagementHelper.GetSolutionUniqueName(_repository, Id, false) },
                { "ExportAutoNumberingSettings", AutoNumberingSettings.ToBool() },
                { "ExportCalendarSettings", CalendarSettings.ToBool() },
                { "ExportCustomizationSettings", CustomizationSettings.ToBool() },
                { "ExportEmailTrackingSettings", EmailTrackingSettings.ToBool() },
                { "ExportGeneralSettings", GeneralSettings.ToBool() },
                { "ExportIsvConfig", IsvConfig.ToBool() },
                { "ExportMarketingSettings", MarketingSettings.ToBool() },
                { "ExportOutlookSynchronizationSettings", OutlookSynchronizationSettings.ToBool() },
                { "ExportRelationshipRoles", RelationshipRoles.ToBool() },
                { "Managed", Managed.ToBool() }
            };

            if (_context != null)
            {
                _context.SetParametersOnRequest(requestParameters);
            }

            OrganizationResponse response = _repository.Execute("ExportSolution", requestParameters);

            File.WriteAllBytes(Path, (byte[])response.Results["ExportSolutionFile"]);
        }
Ejemplo n.º 3
0
        public CalendarMonth(DateTime selectedMonth,
                             DateTime selectedDate,
                             Action <DateTime> onSelectDate,
                             CalendarPaints paints,
                             CalendarRules calendarRules,
                             CalendarSettings calendarSettings)
        {
            _onSelectDate     = onSelectDate;
            _calendarSettings = calendarSettings;

            var firstDay            = selectedMonth.GetFirstDayOfMonth();
            var firstDayOfFirstWeek = firstDay.AddDays(-firstDay.GetDayPositionInWeek());
            var lastDay             = new DateTime(selectedMonth.Year, selectedMonth.Month, DateTime.DaysInMonth(selectedMonth.Year, selectedMonth.Month));
            var lastDayOfLastWeek   = lastDay.AddDays(CalendarDrawer.DAYS_PER_WEEK - 1 - lastDay.GetDayPositionInWeek());
            var totalDays           = (lastDayOfLastWeek - firstDayOfFirstWeek).Days + 1;
            var totalWeeks          = (totalDays) / CalendarDrawer.DAYS_PER_WEEK;

            for (var d = 0; d < totalDays; d++)
            {
                var day = firstDayOfFirstWeek.AddDays(d);
                Add(new CalendarDay(day, selectedMonth, CalendarDrawer.MAX_DISPLAYED_WEEKS, paints, calendarRules, SelectDate, selectedDate.Date == day.Date));
            }
            Add(new SkiaGrid(1, 1, CalendarDrawer.DAYS_PER_WEEK, paints.PaintLine, 0, CalendarDrawer.HeaderHeight));

            Add(new SkiaGrid(totalWeeks, CalendarDrawer.MAX_DISPLAYED_WEEKS, CalendarDrawer.DAYS_PER_WEEK, paints.PaintLine, CalendarDrawer.HeaderHeight));
            Add(new CalendarWeekDays(paints.PaintHeaderDay, _calendarSettings));
        }
Ejemplo n.º 4
0
        void LoadMessageItem2List(string userPK, string userArchivePath)
        {
            var msg = string.Empty;

            try
            {
                this.Connect();
                var monthsBack = CalendarSettings.GetAppointmentAge();
                var toDate     = DateTime.Today.AddYears(1);
                var fromDate   = DateTime.Today.AddMonths(monthsBack * -1);
                var from       = fromDate.ToString("M-d-yyyy H:m:s");
                var to         = toDate.ToString("M-d-yyyy H:m:s");
                var filter     = $"OnlyEMail StatusTime=\"{from} - {to}\"{char.MinValue}";
                var calArchive = this.myAccount.GetArchive(userArchivePath);
                if (calArchive == null)
                {
                    msg = $"Den Kalenderordner '{userArchivePath}' gibt es nicht.";
                    throw new ApplicationException(msg);
                }
                var items = calArchive.GetArchiveEntries(filter);
                List <MessageItem2> list = new List <MessageItem2>();
                foreach (var item in items)
                {
                    list.Add(item as MessageItem2);
                }
                this.myMsgItm2Dictionary.Add(userPK, list);
            }
            catch (Exception)
            {
                msg = $"Ich konnte auf das Archiv {userArchivePath} auf dem DAVID Server nicht zugreifen.";
                throw new ApplicationException(msg);
            }
        }
Ejemplo n.º 5
0
        public int SynchronizeCalendar()
        {
            int itemsUpdated = 0;

            if (ConnectToCalendar)
            {
                CalendarSettings calendarSettings = storage.ClientFolder.GetCalendarSettings(user);
                if (calendarSettings != null)
                {
                    DateTime lastSyncTime;
                    if (calendarSettings.LastSync == null)
                    {   // first-time, use consent token last modified date
                        UserCredential googleConsent = user.GetCredential(UserCredential.GoogleConsent);
                        lastSyncTime = googleConsent.LastModified;
                    }
                    else
                    {
                        lastSyncTime = (DateTime)calendarSettings.LastSync;
                    }
                    calendarSettings.LastSync = DateTime.UtcNow;
                    itemsUpdated = SynchronizeCalendar(lastSyncTime);
                }
            }
            return(itemsUpdated);
        }
        private CalendarSettings CreateCalendar()
        {
            var calendar = new CalendarSettings()
            {
                Defaults = new CalendarDefaultSettings
                {
                    { "FirstDay", new[] { new DateRangeSettings {
                                              Start = "2020-01-01", Finish = "2020-01-01"
                                          } } },
                    { "SecondWeek", new[] { new DateRangeSettings {
                                                Start = "2020-01-06", Finish = "2020-01-12"
                                            } } },
                    { "AllFebruary", new[] { new DateRangeSettings {
                                                 Start = "2020-02-01", Finish = "2020-02-29"
                                             } } }
                },
                DayOverrides = new CalendarDayOverrideSettings
                {
                    { "Weekends", new[] { "Saturday", "Sunday" } }
                },
                DayOverridesExclusions = new CalendarDayOverrideExclusionSettings {
                    "AllFebruary"
                }
            };

            return(calendar);
        }
 public SkiaPressGestureRecognizer(SKCanvasView view,
                                   Action <SKTouchEventArgs> onTouchAction,
                                   CalendarSettings calendarSettings)
 {
     _view             = view;
     _onTouchAction    = onTouchAction;
     _calendarSettings = calendarSettings;
 }
Ejemplo n.º 8
0
 public async Task SetNotificationsInCalendar(CalendarSettings settings)
 {
     // todo for all lessons from settings calculate firetime
     // todo for all firetimes set event in calendar
     // for firetime in firetimes
     //  todo create method to set events on certain weeks
     throw new NotImplementedException();
 }
Ejemplo n.º 9
0
 static HxCalendar()
 {
     Defaults = new CalendarSettings()
     {
         MinDate = DefaultMinDate,
         MaxDate = DefaultMaxDate
     };
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Static constructor
 /// </summary>
 static Settings()
 {
     UI            = new UISettings();
     G15           = new G15Settings();
     IGB           = new IGBSettings();
     Proxy         = new ProxySettings();
     Updates       = new UpdateSettings();
     Calendar      = new CalendarSettings();
     Exportation   = new ExportationSettings();
     Notifications = new NotificationSettings();
 }
        private CalendarSettings CreateMalformedCalendar()
        {
            var malformedCalendar = new CalendarSettings()
            {
                Defaults               = null,
                DayOverrides           = null,
                DayOverridesExclusions = null
            };

            return(malformedCalendar);
        }
Ejemplo n.º 12
0
 protected override void OnInitialized()
 {
     base.OnInitialized();
     _is24 = AllParams.Is24;
     _currentBlockParameters = AllParams.CurrentBlockParameters;
     _calendarSettings       = AllParams.CalendarSettings;
     _block      = _currentBlockParameters.Block;
     _startLimit = _currentBlockParameters.StartLimit;
     _endLimit   = _currentBlockParameters.EndLimit;
     _isAdmin    = _currentBlockParameters.IsAdmin;
 }
Ejemplo n.º 13
0
        public CalendarWeekDays(SKPaint paint, CalendarSettings calendarSettings)
        {
            _paint            = paint;
            _calendarSettings = calendarSettings;

            _daysOfWeek = Enum.GetValues(typeof(DayOfWeek))
                          .Cast <DayOfWeek>()
                          .Select(d => (((int)d + 1) % 7))
                          .Select(d => _calendarSettings.Culture.DateTimeFormat.DayNames[d].ToUpper())
                          .Select(d => d.Substring(0, 1))
                          .ToList();
        }
Ejemplo n.º 14
0
 public CalendarDrawer(CalendarSettings calendarSettings,
                       Action invalidate,
                       Action <MonthSelectionState> onMonthChange,
                       UIColor cellColor,
                       float marginH = 0,
                       float marginV = 0)
     : base(invalidate, cellColor.ToSKColor(), marginH, marginV)
 {
     _calendarSettings = calendarSettings;
     _onMonthChange    = onMonthChange;
     _paints           = new CalendarPaints(calendarSettings);
     _selectedDate     = _currentMonth = calendarSettings.SelectedDate;
     ChangeMonth(0);
 }
Ejemplo n.º 15
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            CalendarSettings settings = new CalendarSettings(DateTime.Today, DateTime.Today.Add(TimeSpan.FromDays(365)))
            {
                Culture         = new CultureInfo("en"),
                DateMonthFormat = "MMMM yyyy"
            };

            CalendarView calendarView = CalendarView.Create(settings);

            this.CalendarContentView.AddSubview(calendarView);
            calendarView.FillParent();
            calendarView.AdjustCalendarView();
        }
Ejemplo n.º 16
0
        /// <summary>
        /// Static constructor.
        /// </summary>
        static Settings()
        {
            UI                          = new UISettings();
            G15                         = new G15Settings();
            Proxy                       = new ProxySettings();
            Updates                     = new UpdateSettings();
            Calendar                    = new CalendarSettings();
            Exportation                 = new ExportationSettings();
            MarketPricer                = new MarketPricerSettings();
            Notifications               = new NotificationSettings();
            LoadoutsProvider            = new LoadoutsProviderSettings();
            PortableEveInstallations    = new PortableEveInstallationsSettings();
            CloudStorageServiceProvider = new CloudStorageServiceProviderSettings();

            EveMonClient.TimerTick += EveMonClient_TimerTick;
        }
 public Task CalendarInit(string elementName, CalendarSettings settings, DotNetObjectReference <ComponentBase> dotNetRef = null)
 {
     try
     {
         jsRuntime.InvokeAsync <ElementReference>(
             "BlazorFullCalendar.interop.calendarInit",
             elementName,
             settings.ToJson(),
             dotNetRef
             );
         return(Task.CompletedTask);
     }
     catch
     {
         return(Task.CompletedTask);
     }
 }
Ejemplo n.º 18
0
        public SerializableSettings()
        {
            Plans               = new List <SerializablePlan>();
            Accounts            = new List <SerializableAccount>();
            Characters          = new List <SerializableSettingsCharacter>();
            MonitoredCharacters = new List <MonitoredCharacterSettings>();

            APIProviders  = new SerializableAPIProviders();
            Notifications = new NotificationSettings();
            Exportation   = new ExportationSettings();
            Scheduler     = new SerializableScheduler();
            Calendar      = new CalendarSettings();
            Updates       = new UpdateSettings();
            Proxy         = new ProxySettings();
            IGB           = new IGBSettings();
            G15           = new G15Settings();
            UI            = new UISettings();
        }
Ejemplo n.º 19
0
        public async Task CalendarInitAsync(CalendarSettings settings, DotNetObjectReference <FullCalendar> dotNetRef)
        {
            try
            {
                await _jsRuntime.InvokeVoidAsync(
                    "BlazorFullCalendar.addFCWrapperInstance",
                    _calendarDivId,
                    settings.ToJson(),
                    dotNetRef
                    );

                return;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                return;
            }
        }
Ejemplo n.º 20
0
 public SerializableSettings()
 {
     m_plans                     = new Collection <SerializablePlan>();
     m_apiKeys                   = new Collection <SerializableAPIKey>();
     m_characters                = new Collection <SerializableSettingsCharacter>();
     m_monitoredCharacters       = new Collection <MonitoredCharacterSettings>();
     CloudStorageServiceProvider = new CloudStorageServiceProviderSettings();
     PortableEveInstallations    = new PortableEveInstallationsSettings();
     Notifications               = new NotificationSettings();
     APIProviders                = new APIProvidersSettings();
     LoadoutsProvider            = new LoadoutsProviderSettings();
     MarketPricer                = new MarketPricerSettings();
     Exportation                 = new ExportationSettings();
     Scheduler                   = new SchedulerSettings();
     Calendar                    = new CalendarSettings();
     Updates                     = new UpdateSettings();
     Proxy = new ProxySettings();
     G15   = new G15Settings();
     UI    = new UISettings();
 }
Ejemplo n.º 21
0
        public static CalendarView Create(CalendarSettings calendarSettings)
        {
            CalendarView calendarView = Runtime.GetNSObject(NSBundle.MainBundle.LoadNib("CalendarView", null, null).ValueAt(0)) as CalendarView;

            calendarView._calendarSettings = calendarSettings;
            calendarView._calendarGridView = new SKCanvasView();
            calendarView._calendarDrawer   = new CalendarDrawer(calendarSettings, calendarView._calendarGridView.SetNeedsDisplay, calendarView.OnMonthChanged, calendarView._calendarSettings.BackgroundCellColor);

            calendarView.CalendarGridWrapperView.AddSubview(calendarView._calendarGridView);
            calendarView._calendarGridView.PaintSurface += calendarView.OnPaintSurface;
            calendarView._calendarGridView.SetNeedsDisplay();
            calendarView._calendarGridView.AddGestureRecognizer(new SkiaPressGestureRecognizer(calendarView._calendarGridView, calendarView.OnSliderTouchOrMove, calendarSettings));

            calendarView.NextButton.TouchUpInside += calendarView.OnNextButtonPressed;
            calendarView.PrevButton.TouchUpInside += calendarView.OnPrevButtonPressed;

            calendarView.MonthName.Font = SFFonts.UISFMedium();

            return(calendarView);
        }
        protected override CalendarSettings GetCalendarSettings()
        {
            CalendarSettings calendarSettings = base.GetCalendarSettings();

            //overriding the way EventItems is populated, check GetCalendarSettings
            if (calendarSettings.Mode == CalendarMode.Json)
            {
                Item item;
                if (this.Rendering.DataSourceItem == null)
                {
                    item = this.Context.Item;
                }
                else
                {
                    item = this.Rendering.DataSourceItem;
                }
                this.EventItems = (IEnumerable <Item>)item.Axes.SelectItems("//*[@@templateid = '" + Sitecore.XA.Feature.Events.Templates.CalendarEvent.ID + "']");
            }

            return(calendarSettings);
        }
        private CalendarSettings CreateInvalidCalendar()
        {
            var invalidCalendar = new CalendarSettings()
            {
                Defaults = new CalendarDefaultSettings
                {
                    { "", new[] { new DateRangeSettings {
                                      Start = "", Finish = ""
                                  } } }
                },
                DayOverrides = new CalendarDayOverrideSettings
                {
                    { "", new[] { "" } }
                },
                DayOverridesExclusions = new CalendarDayOverrideExclusionSettings {
                    null
                }
            };

            return(invalidCalendar);
        }
Ejemplo n.º 24
0
 public CalendarService(IOptions <CalendarSettings> calendarSettings)
 {
     _calendarSettings = calendarSettings.Value;
 }
Ejemplo n.º 25
0
 public AllSettings(IApplicationSettings applicationSettings,
                    CalendarSettings calendarSettings)
 {
     ApplicationSettings = applicationSettings;
     CalendarSettings    = calendarSettings;
 }
Ejemplo n.º 26
0
 public Calendar(CalendarSettings settings)
     : base(settings)
 {
 }
Ejemplo n.º 27
0
 public Calendar(CalendarSettings settings, ViewContext context, IViewDataContainer viewDataContainer)
     : base(settings, context, viewDataContainer)
 {
 }
Ejemplo n.º 28
0
 public PaletColors(CalendarSettings calendarSettings)
 {
     _calendarSettings = calendarSettings;
 }
 /// <summary>
 /// Main constructor.
 /// </summary>
 /// <param name="calendar">The value for the <see cref="Calendar"/> property.</param>
 public ScheduleNameResolver(CalendarSettings calendar)
 {
     Calendar = calendar ?? throw new ArgumentNullException(nameof(calendar));
 }
Ejemplo n.º 30
0
 /// <summary>
 /// Erzeugt eine neue Instanz der CalendarSettingsView Klasse.
 /// </summary>
 public CalendarSettingsView(CalendarSettings calendarSettings)
 {
     InitializeComponent();
     this.myCalendarSettings = calendarSettings;
     this.InitializeData();
 }