Exemple #1
0
        private static ChatOverlaySettingsModel[] CreateDefaultChatOverlaySettings()
        {
            var overlay = new ChatOverlaySettingsModel()
            {
                Name            = DefaultChatOverlayName,
                X               = 20,
                Y               = 20,
                W               = 640,
                H               = 480,
                IsLock          = false,
                Scale           = 1.0d,
                BackgroundColor = Colors.Black,
                Opacity         = 0.6d,
                PCNameStyle     = PCNameStyles.FullName,
            };

            var chatPages = new SuspendableObservableCollection <ChatPageSettingsModel>()
            {
                new ChatPageSettingsModel()
                {
                    Name = "ALL",
                    ParentOverlaySettings = overlay,
                    HandledChannels       = HandledChatChannelModel.CreateDefaultHandledChannels(true),
                    IgnoreFilters         = FilterModel.CreateDefualtIgnoreFilters(),
                }
            };

            overlay.ChatPages = chatPages;

            return(new[] { overlay });
        }
Exemple #2
0
 public SettingsViewSource(UITableView tableView, SuspendableObservableCollection <GroupedSettingsViewModel> itemsSource)
 {
     tableView.RegisterClassForCellReuse(typeof(SettingCell), SettingCell.Key);
     tableView.RegisterClassForCellReuse(typeof(ButtonSettingCell), ButtonSettingCell.Key);
     tableView.RegisterClassForCellReuse(typeof(ToggleSettingCell), ToggleSettingCell.Key);
     ItemsSource = itemsSource;
 }
Exemple #3
0
        public ChatLogsModel()
        {
            lock (ActiveBuffers)
            {
                ActiveBuffers.Add(this);
            }

            this.buffer = new Lazy <SuspendableObservableCollection <ChatLogModel> >(() =>
            {
                var b = new SuspendableObservableCollection <ChatLogModel>(InnerList);

                if (WPFHelper.IsDesignMode)
                {
                    this.CreateDesigntimeChatLogs(b);
                }

                b.CollectionChanged += this.Buffer_CollectionChanged;

                return(b);
            });
        }
Exemple #4
0
        public SettingsViewModel()
        {
            _meetingService        = App.Instance.GetInstance <IMeetingService>();
            _authenService         = App.Instance.GetInstance <IAuthentificationService>();
            _backgroundTaskService = App.Instance.BackgroundTaskService;

            //TODO : localisation
            SettingsList = new SuspendableObservableCollection <GroupedSettingsViewModel>();
            SettingsList.Add(new GroupedSettingsViewModel("ACRA", new List <SettingViewModel>
            {
                new ToggleSettingViewModel("Intégration dans le calendrier", new RelayCommand <bool>(ToggleIntegrationCalendar), ApplicationSettings.IsIntegrationToCalendarEnabled),
                new ToggleSettingViewModel("Intégration dans les rappels", new RelayCommand <bool>(ToggleIsIntegrationReminder), ApplicationSettings.IsIntegrationToReminderEnabled),
                new ToggleSettingViewModel("Mise à jour en arrière-plan", new RelayCommand <bool>(ToggleBackgroundUpdate), ApplicationSettings.IsBackgroundUpdateEnabled),
            }));
            //TODO : localisation
            SettingsList.Add(new GroupedSettingsViewModel(OnlineSettings.Identity, new List <SettingViewModel>
            {
                new ButtonSettingViewModel("Déconnexion", new RelayCommand(LogOutAction))
                {
                    ColorStyle          = ColorStyle.Danger,
                    HorizontalAlignment = SettingsHorizontalAlignment.Center
                }
            }));
        }
Exemple #5
0
 public MeetingsViewSource(UITableView tableView, SuspendableObservableCollection <GroupedMeetingViewModel> itemsSource)
 {
     tableView.RegisterClassForCellReuse(typeof(MeetingCell), MeetingCell.Key);
     ItemsSource = itemsSource;
 }
Exemple #6
0
 public UseFullLinksViewSource(UITableView tableView, SuspendableObservableCollection <UseFullLinkViewModel> itemsSource)
     : base()
 {
     tableView.RegisterClassForCellReuse(typeof(UseFullLinkCell), UseFullLinkCell.Key);
     ItemsSource = itemsSource;
 }
 private static void RaiseCollectionChanged(SuspendableObservableCollection <int> sut)
 {
     sut.Add(-1);
 }
Exemple #8
0
 public UseFullLinksViewModel()
 {
     _useFullLinkService = App.Instance.GetInstance <IUseFullLinkService>();
     UseFullLinks        = new SuspendableObservableCollection <UseFullLinkViewModel>();
 }