Ejemplo n.º 1
0
        public VisualElementPreviewer(EntityPropertyExpositor ExpoSymbolLineBrush, EntityPropertyExpositor ExpoSymbolLineThickness,
                                      EntityPropertyExpositor ExpoSymbolLineDash, EntityPropertyExpositor ExpoSymbolMainBackground,
                                      EntityPropertyExpositor ExpoConnectorsLineBrush = null, EntityPropertyExpositor ExpoConnectorsLineThickness  = null,
                                      EntityPropertyExpositor ExpoConnectorsLineDash  = null, EntityPropertyExpositor ExpoConnectorsMainBackground = null)
        {
            InitializeComponent();

            this.ExpoSymbolLineBrush      = ExpoSymbolLineBrush;
            this.ExpoSymbolLineThickness  = ExpoSymbolLineThickness;
            this.ExpoSymbolLineDash       = ExpoSymbolLineDash;
            this.ExpoSymbolMainBackground = ExpoSymbolMainBackground;

            this.ExpoConnectorsLineBrush      = ExpoConnectorsLineBrush;
            this.ExpoConnectorsLineThickness  = ExpoConnectorsLineThickness;
            this.ExpoConnectorsLineDash       = ExpoConnectorsLineDash;
            this.ExpoConnectorsMainBackground = ExpoConnectorsMainBackground;

            this.CbxDetailsPoster.Checked   += ShowPreview;
            this.CbxDetailsPoster.Unchecked += ShowPreview;

            this.LvsPredefStyle.MaxWidth = ((Domain.BaseStylesForegroundColors.Count / 2.0) * WidgetsHelper.COLOR_SAMPLE_SIZE.Width) + 36;
            this.LvsPredefStyle.LbxSelector.ItemsSource       = WidgetsHelper.GenerateGraphicStyleSamples();
            this.LvsPredefStyle.LbxSelector.SelectionChanged += LbxSelector_SelectionChanged;

            this.PopupSelectPredefStyle.MaxWidth = this.LvsPredefStyle.MaxWidth;
        }
Ejemplo n.º 2
0
        public override void OnReceive(Context context, Intent intent)
        {
            // We don't need to do any async code, since notifying the widget manager
            // automatically creates a service that will do the async work, so there's no
            // need to create a service just for receiving this alarm.

            // Updating the widget does the following...
            // (1) Updates the widget
            // (2) Schedules the next alarm that will call this again in the future to update again
            WidgetsHelper.UpdateScheduleWidget();
        }
Ejemplo n.º 3
0
        private async void UpdateSettings()
        {
            try
            {
                if (ViewModel.Account == null)
                {
                    return;
                }

                ViewModel.Account.MainTileSettings.ShowHomework       = _switchTasks.Checked;
                ViewModel.Account.MainTileSettings.ShowExams          = _switchEvents.Checked;
                ViewModel.Account.MainTileSettings.SkipItemsOlderThan = GetSkipNumber();

                await AccountsManager.Save(ViewModel.Account);

                WidgetsHelper.UpdateAgendaWidget();
            }
            catch (Exception ex)
            {
                TelemetryExtension.Current?.TrackException(ex);
            }
        }
Ejemplo n.º 4
0
 public override Task UpdateScheduleTile(AccountDataItem account, AccountDataStore data)
 {
     WidgetsHelper.UpdateScheduleWidget();
     return(Task.FromResult(true));
 }
 public override Task UpdateTileNotificationsForAccountAsync(AccountDataItem account, AccountDataStore data)
 {
     WidgetsHelper.UpdateAllWidgets();
     return(Task.FromResult(true));
 }
 public override Task UpdatePrimaryTileNotificationsAsync()
 {
     // This gets called upon account log off
     WidgetsHelper.UpdateAllWidgets();
     return(Task.FromResult(true));
 }