Exemplo n.º 1
0
        public Day(DateTime date)
        {
            // Set the date
            Date = date;

            // Fill the events collection and add an event listener
            Events = new AdvancedObservableCollection <Event>();
            SetEvents();
            State.Events.CollectionChanged += Events_CollectionChanged;
            State.EventsViewSource.View.CollectionChanged += Events_CollectionChanged;

            // Viewsource for the whole day events
            AfternoonViewSource = new CollectionViewSource {
                Source = Events
            };
            AfternoonViewSource.View.Filter = AfternoonViewSourceFilter;

            // Viewsource for the whole day events
            EveningViewSource = new CollectionViewSource {
                Source = Events
            };
            EveningViewSource.View.Filter = EveningViewSourceFilter;

            // Viewsource for the whole day events
            MiddayViewSource = new CollectionViewSource {
                Source = Events
            };
            MiddayViewSource.View.Filter = MiddayViewSourceFilter;

            // Viewsource for the whole day events
            WholeDayViewSource = new CollectionViewSource {
                Source = Events
            };
            WholeDayViewSource.View.Filter = WholeDayViewSourceFilter;
        }
Exemplo n.º 2
0
        public Day(DateTime date)
        {
            // Set the date
            Date = date;

            // Fill the events collection and add an event listener
            Events = new AdvancedObservableCollection<Event>();
            SetEvents();
            State.Events.CollectionChanged += Events_CollectionChanged;
            State.EventsViewSource.View.CollectionChanged += Events_CollectionChanged;

            // Viewsource for the whole day events
            AfternoonViewSource = new CollectionViewSource { Source = Events };
            AfternoonViewSource.View.Filter = AfternoonViewSourceFilter;

            // Viewsource for the whole day events
            EveningViewSource = new CollectionViewSource { Source = Events };
            EveningViewSource.View.Filter = EveningViewSourceFilter;

            // Viewsource for the whole day events
            MiddayViewSource = new CollectionViewSource { Source = Events };
            MiddayViewSource.View.Filter = MiddayViewSourceFilter;

            // Viewsource for the whole day events
            WholeDayViewSource = new CollectionViewSource { Source = Events };
            WholeDayViewSource.View.Filter = WholeDayViewSourceFilter;
        }
Exemplo n.º 3
0
        public NotesState()
        {
            SelectedNotes = new AdvancedObservableCollection <Note>();
            Notes         = new AdvancedObservableCollection <Note>();

            NotesViewSource = new CollectionViewSource {
                Source = Notes
            };
            NotesViewSource.View.Filter = NotesViewSourceFilter;

            new CollectionObserverDelegate <ChannelInstance>(ChannelsManager.Channels, delegate(ChannelInstance channel)
            {
                channel.IsVisibleChanged += delegate { NotesViewSource.View.Refresh(); };
            });

            Sort = new SortHelper(NotesViewSource);
            Sort.LoadSettings();

            Filter = new FilterHelper(NotesViewSource);
            Filter.LoadSettings();

            SelectedNotes.CollectionChanged += delegate
            {
                OnPropertyChanged("SelectedNote");

                OnSelectionChanged();
            };
        }
Exemplo n.º 4
0
 public UserStatus()
 {
     DateCreated = DateTime.Now;
     Children = new AdvancedObservableCollection<UserStatus>();
     Attachments = new AdvancedObservableCollection<UserStatusAttachment>();
     StatusKey = Guid.NewGuid().GetHash();
 }
Exemplo n.º 5
0
 public Person()
 {
     PersonKey = Guid.NewGuid().GetHash();
     Profiles  = new AdvancedObservableCollection <Profile>();
     Messages  = new AdvancedObservableCollection <Message>();
     Documents = new AdvancedObservableCollection <Document>();
 }
Exemplo n.º 6
0
        public DocumentsState()
        {
            SelectedDocuments = new AdvancedObservableCollection <Document>();

            DocumentsViewSource = new CollectionViewSource {
                Source = Documents
            };

            DocumentSort = new SortHelper(DocumentsViewSource, "Documents");
            DocumentSort.LoadSettings();
            DocumentFilter = new FilterHelper(DocumentsViewSource);

            DocumentsViewSource.View.Filter = DocumentsViewSourceFilter;

            ImagesViewSource = new CollectionViewSource {
                Source = Documents
            };

            ImageSort = new SortHelper(ImagesViewSource, "Images");
            ImageSort.LoadSettings();

            ImageFilter = new FilterHelper(ImagesViewSource);

            ImagesViewSource.View.Filter = ImagesViewSourceFilter;

            SelectedDocuments.CollectionChanged += delegate
            {
                OnPropertyChanged("SelectedDocument");

                OnSelectionChanged();
            };
        }
Exemplo n.º 7
0
 public Person()
 {
     PersonKey = Guid.NewGuid().GetHash();
     Profiles = new AdvancedObservableCollection<Profile>();
     Messages = new AdvancedObservableCollection<Message>();
     Documents = new AdvancedObservableCollection<Document>();
 }
Exemplo n.º 8
0
        public DocumentsState()
        {
            SelectedDocuments = new AdvancedObservableCollection<Document>();

            DocumentsViewSource = new CollectionViewSource { Source = Documents };

            DocumentSort = new SortHelper(DocumentsViewSource, "Documents");
            DocumentSort.LoadSettings();
            DocumentFilter = new FilterHelper(DocumentsViewSource);

            DocumentsViewSource.View.Filter = DocumentsViewSourceFilter;

            ImagesViewSource = new CollectionViewSource { Source = Documents };

            ImageSort = new SortHelper(ImagesViewSource, "Images");
            ImageSort.LoadSettings();

            ImageFilter = new FilterHelper(ImagesViewSource);

            ImagesViewSource.View.Filter = ImagesViewSourceFilter;

            SelectedDocuments.CollectionChanged += delegate
               	{
               		OnPropertyChanged("SelectedDocument");

               		OnSelectionChanged();
               	};
        }
Exemplo n.º 9
0
 public UserStatus()
 {
     DateCreated = DateTime.Now;
     Children    = new AdvancedObservableCollection <UserStatus>();
     Attachments = new AdvancedObservableCollection <UserStatusAttachment>();
     StatusKey   = Guid.NewGuid().GetHash();
 }
Exemplo n.º 10
0
        public ContactsState()
        {
            mailbox = VirtualMailBox.Current;

            SelectedPersons = new AdvancedObservableCollection <Person>();

            PersonsViewSource = new CollectionViewSource {
                Source = VirtualMailBox.Current.Persons
            };
            PersonsViewSource.View.Filter = ContactsViewSourceFilter;

            Sort = new SortHelper(PersonsViewSource);
            Sort.LoadSettings();

            Filter = new FilterHelper(PersonsViewSource);

            SelectedPersons.CollectionChanged += delegate
            {
                OnPropertyChanged("SelectedPerson");

                OnSelectionChanged();
            };

            EventBroker.Subscribe(AppEvents.SyncContactsFinished, () => Thread.CurrentThread.ExecuteOnUIThread(() => PersonsViewSource.View.Refresh()));
        }
Exemplo n.º 11
0
 public Document()
 {
     DocumentKey = Guid.NewGuid().GetHash();
     DateCreated = DateTime.Now;
     Versions = new AdvancedObservableCollection<DocumentVersion>();
     LabelsList = new AdvancedObservableCollection<Label>();
     ContentSynced = true;
 }
Exemplo n.º 12
0
 public Document()
 {
     DocumentKey   = Guid.NewGuid().GetHash();
     DateCreated   = DateTime.Now;
     Versions      = new AdvancedObservableCollection <DocumentVersion>();
     LabelsList    = new AdvancedObservableCollection <Label>();
     ContentSynced = true;
 }
        public MessageEditControl()
        {
            InitializeComponent();

            recipients = new CustomCompositeCollection<SourceAddress>(To, CC, BCC);
            attachedFiles = new AdvancedObservableCollection<AttachmentDataHelper>();

            DataContext = this;
        }
Exemplo n.º 14
0
        public SoftProfilesControl(Person person)
        {
            Person   = person;
            Profiles = new AdvancedObservableCollection <Profile>();

            InitializeComponent();

            DataContext = this;
        }
        public MessageEditControl()
        {
            InitializeComponent();

            recipients    = new CustomCompositeCollection <SourceAddress>(To, CC, BCC);
            attachedFiles = new AdvancedObservableCollection <AttachmentDataHelper>();

            DataContext = this;
        }
        public SoftProfilesControl(Person person)
        {
            Person = person;
            Profiles = new AdvancedObservableCollection<Profile>();

            InitializeComponent();

            DataContext = this;
        }
        public SearchProfilesControl()
        {
            mailbox = VirtualMailBox.Current;

            InitializeComponent();

            DataContext = this;

            Profiles = new AdvancedObservableCollection<Profile>();
        }
Exemplo n.º 18
0
        public SearchProfilesControl()
        {
            mailbox = VirtualMailBox.Current;

            InitializeComponent();

            DataContext = this;

            Profiles = new AdvancedObservableCollection <Profile>();
        }
Exemplo n.º 19
0
        private PropertyGridItemVm transformDelegate_Items(AdvancedObservableCollection <PropertyGridItemVm> collection, object entry)
        {
            var result = new PropertyGridItemVm();

            result.Utility        = Utility;
            result.DataProp.Value = (PropertyGridItemUtilityData)entry;
            result.CustomExpandCommand.AddSink(CustomExpandAggregateCommand);
            result.GroupName = result.DataProp.Value?.GroupName;
            return(result);
        }
Exemplo n.º 20
0
        public DetailsView()
        {
            InitializeComponent();

            Messages = new AdvancedObservableCollection<Message>();
            MessagesViewSource = new CollectionViewSource { Source = Messages };
            MessagesViewSource.SortDescriptions.Add(new SortDescription("SortDate", ListSortDirection.Ascending));
            MessagesViewSource.View.Filter = MessageViewSourceFilter;

            DataContext = this;
        }
Exemplo n.º 21
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LauncherState"/> class.
        /// </summary>
        private LauncherState()
        {
            ChannelFactory<IClientAutomationService> factory
                = new ChannelFactory<IClientAutomationService>(
                    new NetNamedPipeBinding(), "net.pipe://localhost/Inbox2AutomationService");

            channel = factory.CreateChannel();
            selectedFiles = new AdvancedObservableCollection<FileInfo>();
            selectedAddresses = new AdvancedObservableCollection<SourceAddress>();
            selectedUris = new AdvancedObservableCollection<Uri>();
        }
Exemplo n.º 22
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LauncherState"/> class.
        /// </summary>
        private LauncherState()
        {
            ChannelFactory <IClientAutomationService> factory
                = new ChannelFactory <IClientAutomationService>(
                      new NetNamedPipeBinding(), "net.pipe://localhost/Inbox2AutomationService");

            channel           = factory.CreateChannel();
            selectedFiles     = new AdvancedObservableCollection <FileInfo>();
            selectedAddresses = new AdvancedObservableCollection <SourceAddress>();
            selectedUris      = new AdvancedObservableCollection <Uri>();
        }
Exemplo n.º 23
0
        public DetailsView()
        {
            InitializeComponent();

            Messages           = new AdvancedObservableCollection <Message>();
            MessagesViewSource = new CollectionViewSource {
                Source = Messages
            };
            MessagesViewSource.SortDescriptions.Add(new SortDescription("SortDate", ListSortDirection.Ascending));
            MessagesViewSource.View.Filter = MessageViewSourceFilter;

            DataContext = this;
        }
Exemplo n.º 24
0
        public static string ToHumanFriendlyString(this AdvancedObservableCollection <SourceAddress> source)
        {
            if (source == null || source.Count == 0)
            {
                return(String.Empty);
            }

            if (source.Count == 1)
            {
                return(source[0].DisplayName);
            }

            return(String.Format("{0} and {1} other person(s)", source[0].DisplayName, source.Count - 1));
        }
Exemplo n.º 25
0
        public AppSettingsViewModel()
        {
            Languages = new AdvancedObservableCollection <Language>
            {
                new Language {
                    DisplayName = "Deutsch", LanguageCode = "de-DE"
                },
                new Language {
                    DisplayName = "English", LanguageCode = "en-US"
                }
            };

            SelectedLanguage =
                Languages.FirstOrDefault(l => l.LanguageCode == ApplicationLanguages.PrimaryLanguageOverride) ?? Languages.First();
        }
Exemplo n.º 26
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NotifyBalloon"/> class.
        /// </summary>
        public NotifyBalloon()
        {
            NewMessages           = new AdvancedObservableCollection <Message>();
            NewStatusUpdates      = new AdvancedObservableCollection <UserStatus>();
            NewSocialSearches     = new AdvancedObservableCollection <UserStatus>();
            VisibleMessages       = new AdvancedObservableCollection <Message>();
            VisibleStatusUpdates  = new AdvancedObservableCollection <UserStatus>();
            VisibleSocialSearches = new AdvancedObservableCollection <UserStatus>();

            InitializeComponent();

            DataContext = this;

            //TODO:
            //TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing);
        }
Exemplo n.º 27
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NotifyBalloon"/> class.
        /// </summary>
        public NotifyBalloon()
        {
            NewMessages = new AdvancedObservableCollection<Message>();
            NewStatusUpdates = new AdvancedObservableCollection<UserStatus>();
            NewSocialSearches = new AdvancedObservableCollection<UserStatus>();
            VisibleMessages = new AdvancedObservableCollection<Message>();
            VisibleStatusUpdates = new AdvancedObservableCollection<UserStatus>();
            VisibleSocialSearches = new AdvancedObservableCollection<UserStatus>();

            InitializeComponent();

            DataContext = this;

            //TODO:
            //TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing);
        }
Exemplo n.º 28
0
        public CalendarState()
        {
            // Set the viewsource of the events collection
            Events           = new AdvancedObservableCollection <Event>();
            EventsViewSource = new CollectionViewSource {
                Source = Events
            };
            EventsViewSource.View.Filter = CalendarViewSourceFilter;

            // Add channel turn off/on execution code
            new CollectionObserverDelegate <ChannelInstance>(ChannelsManager.Channels,
                                                             delegate(ChannelInstance channel)
            {
                channel.IsVisibleChanged += delegate { EventsViewSource.View.Refresh(); };
            });

            // Add sorters
            Sort = new SortHelper(EventsViewSource);
            Sort.LoadSettings();

            // Add filters
            Filter = new FilterHelper(EventsViewSource);
            Filter.LoadSettings();

            // Add selection for days
            SelectedDays = new AdvancedObservableCollection <Day>();
            SelectedDays.CollectionChanged += delegate
            {
                OnPropertyChanged("SelectedDay");
                OnSelectionChanged();
            };
            SelectedDaysViewSource = new CollectionViewSource {
                Source = Events
            };
            SelectedDaysViewSource.View.Filter = SelectedDaysViewSourceFilter;

            // Add selection for events
            SelectedEvents = new AdvancedObservableCollection <Event>();
            SelectedEvents.CollectionChanged += delegate
            {
                OnPropertyChanged("SelectedEvent");
                OnSelectionChanged();
            };
        }
Exemplo n.º 29
0
        public ConversationsState()
        {
            viewFilter = ViewFilter.Current;

            ActivityViewSource = new CollectionViewSource { Source = viewFilter.Messages };
            SelectedMessages = new AdvancedObservableCollection<Message>();

            SelectedMessages.CollectionChanged += delegate
            {
                OnPropertyChanged("SelectedMessage");

                OnSelectionChanged();
            };

            flipper = new Flipper(TimeSpan.FromSeconds(25), delegate
                {
                    // Todo run readstates syncornization if no receive task is currently running
                });
        }
Exemplo n.º 30
0
        public AdminControl()
        {
            InitializeComponent();

            Tasks = new AdvancedObservableCollection<IBackgroundTask>();

            timer = new DispatcherTimer(TimeSpan.FromSeconds(1),
                DispatcherPriority.Normal,
                delegate
                {
                    Application.Current.Dispatcher.BeginInvoke(
                        (Action)(() => Tasks.Replace(TaskQueue.Tasks.ToList())), DispatcherPriority.DataBind);
                },
                Dispatcher.CurrentDispatcher);

            timer.IsEnabled = true;

            DataContext = this;
        }
Exemplo n.º 31
0
        public AdminControl()
        {
            InitializeComponent();

            Tasks = new AdvancedObservableCollection <IBackgroundTask>();

            timer = new DispatcherTimer(TimeSpan.FromSeconds(1),
                                        DispatcherPriority.Normal,
                                        delegate
            {
                Application.Current.Dispatcher.BeginInvoke(
                    (Action)(() => Tasks.Replace(TaskQueue.Tasks.ToList())), DispatcherPriority.DataBind);
            },
                                        Dispatcher.CurrentDispatcher);

            timer.IsEnabled = true;

            DataContext = this;
        }
Exemplo n.º 32
0
        public Message()
        {
            MessageKey  = Guid.NewGuid().GetHash();
            Metadata    = new ChannelMetadata();
            DateCreated = DateTime.Now;

            To  = new SourceAddressCollection();
            CC  = new SourceAddressCollection();
            BCC = new SourceAddressCollection();

            SourceChannelId = 0;
            TargetChannelId = 0;

            Documents  = new AdvancedObservableCollection <Document>();
            LabelsList = new AdvancedObservableCollection <Label>();

            ReceiveLabels = new List <Label>();
            PostLabels    = new List <Label>();
            ContentSynced = true;
        }
Exemplo n.º 33
0
        public Message()
        {
            MessageKey = Guid.NewGuid().GetHash();
            Metadata = new ChannelMetadata();
            DateCreated = DateTime.Now;

            To = new SourceAddressCollection();
            CC = new SourceAddressCollection();
            BCC = new SourceAddressCollection();

            SourceChannelId = 0;
            TargetChannelId = 0;

            Documents = new AdvancedObservableCollection<Document>();
            LabelsList = new AdvancedObservableCollection<Label>();

            ReceiveLabels = new List<Label>();
            PostLabels = new List<Label>();
            ContentSynced = true;
        }
Exemplo n.º 34
0
        public ConversationsState()
        {
            viewFilter = ViewFilter.Current;

            ActivityViewSource = new CollectionViewSource {
                Source = viewFilter.Messages
            };
            SelectedMessages = new AdvancedObservableCollection <Message>();

            SelectedMessages.CollectionChanged += delegate
            {
                OnPropertyChanged("SelectedMessage");

                OnSelectionChanged();
            };

            flipper = new Flipper(TimeSpan.FromSeconds(25), delegate
            {
                // Todo run readstates syncornization if no receive task is currently running
            });
        }
        public RecipientsEditorControl()
        {
            InitializeComponent();

            InputCommands.Stub(this);

            mailbox = VirtualMailBox.VirtualMailBox.Current;
            recipients = new AdvancedObservableCollection<SourceAddress>();

            wordFlipper = new Flipper(TimeSpan.FromMilliseconds(400), ProcessCurrentWord);
            autocompleteFlipper = new Flipper(TimeSpan.FromMilliseconds(500), SearchContacts);

            // Default the validation is enabled
            ValidationEnabled = true;

            DataContext = this;

            var channel = ChannelsManager.GetDefaultChannel();

            if (channel != null)
                TargetChannel = channel;
        }
Exemplo n.º 36
0
        public ContactsState()
        {
            mailbox = VirtualMailBox.Current;

            SelectedPersons = new AdvancedObservableCollection<Person>();

            PersonsViewSource = new CollectionViewSource { Source = VirtualMailBox.Current.Persons };
            PersonsViewSource.View.Filter = ContactsViewSourceFilter;

            Sort = new SortHelper(PersonsViewSource);
            Sort.LoadSettings();

            Filter = new FilterHelper(PersonsViewSource);

            SelectedPersons.CollectionChanged += delegate
             	{
             		OnPropertyChanged("SelectedPerson");

             		OnSelectionChanged();
             	};

            EventBroker.Subscribe(AppEvents.SyncContactsFinished, () => Thread.CurrentThread.ExecuteOnUIThread(() => PersonsViewSource.View.Refresh()));
        }
 public MockProjectSettingsViewModel()
 {
     CameraModels = new AdvancedObservableCollection <ICameraModel>
     {
         new CameraViewModel
         {
             CameraType = "Camera 1", IconPath = @"TestImages/leopard1.jpg", Manufacturer = "Test",
             TimeZone   = TimeZoneInfo.Local
         },
         new CameraViewModel
         {
             CameraType = "Camera 2", IconPath = @"TestImages/leopard1.jpg", Manufacturer = "Test",
             TimeZone   = TimeZoneInfo.Local
         },
         new CameraViewModel
         {
             CameraType = "Camera 3", IconPath = @"TestImages/leopard1.jpg", Manufacturer = "Test",
             TimeZone   = TimeZoneInfo.Local
         },
         new CameraViewModel
         {
             CameraType = "Camera 4", IconPath = @"TestImages/leopard1.jpg", Manufacturer = "Test",
             TimeZone   = TimeZoneInfo.Local
         },
         new CameraViewModel
         {
             CameraType = "Camera 5", IconPath = @"TestImages/leopard1.jpg", Manufacturer = "Test",
             TimeZone   = TimeZoneInfo.Local
         },
         new CameraViewModel
         {
             CameraType = "Camera 6", IconPath = @"TestImages/leopard1.jpg", Manufacturer = "Test",
             TimeZone   = TimeZoneInfo.Local
         }
     };
 }
Exemplo n.º 38
0
 public MockMainPageViewModel()
 {
     Images = new AdvancedObservableCollection <IPhotoModel>
     {
         new PhotoModel {
             ImagePath = @"TestImages/leopard1.jpg", RedundantPhotos =
             {
                 new RedundantPhotoModel {
                     ImagePath = @"TestImages/leopard1.jpg"
                 },
                 new RedundantPhotoModel {
                     ImagePath = @"TestImages/leopard1.jpg"
                 },
                 new RedundantPhotoModel {
                     ImagePath = @"TestImages/leopard1.jpg"
                 }
             }
         },
         new PhotoModel {
             ImagePath = @"TestImages/leopard2.jpg"
         }
     };
     ShowRedundantPhotos = true;
 }
 public ProjectSettingsViewModel()
 {
     CameraModels = new AdvancedObservableCollection <ICameraModel>
     {
         new CameraViewModel
         {
             CameraType = "Camera 1", IconPath = new Uri("ms-appx:///Assets/leopard1.jpg").LocalPath, Manufacturer = "Test",
             TimeZone   = TimeZoneInfo.Local
         },
         new CameraViewModel
         {
             CameraType = "Camera 2", IconPath = new Uri("ms-appx:///Assets/leopard1.jpg").AbsolutePath, Manufacturer = "Test",
             TimeZone   = TimeZoneInfo.Local
         },
         new CameraViewModel
         {
             CameraType = "Camera 3", IconPath = @"TestImages/leopard1.jpg", Manufacturer = "Test",
             TimeZone   = TimeZoneInfo.Local
         },
         new CameraViewModel
         {
             CameraType = "Camera 4", IconPath = @"TestImages/leopard1.jpg", Manufacturer = "Test",
             TimeZone   = TimeZoneInfo.Local
         },
         new CameraViewModel
         {
             CameraType = "Camera 5", IconPath = @"TestImages/leopard1.jpg", Manufacturer = "Test",
             TimeZone   = TimeZoneInfo.Local
         },
         new CameraViewModel
         {
             CameraType = "Camera 6", IconPath = @"TestImages/leopard1.jpg", Manufacturer = "Test",
             TimeZone   = TimeZoneInfo.Local
         }
     };
 }
Exemplo n.º 40
0
        public RecipientsEditorControl()
        {
            InitializeComponent();

            InputCommands.Stub(this);

            mailbox    = VirtualMailBox.VirtualMailBox.Current;
            recipients = new AdvancedObservableCollection <SourceAddress>();

            wordFlipper         = new Flipper(TimeSpan.FromMilliseconds(400), ProcessCurrentWord);
            autocompleteFlipper = new Flipper(TimeSpan.FromMilliseconds(500), SearchContacts);

            // Default the validation is enabled
            ValidationEnabled = true;

            DataContext = this;

            var channel = ChannelsManager.GetDefaultChannel();

            if (channel != null)
            {
                TargetChannel = channel;
            }
        }
Exemplo n.º 41
0
 private ProgressManager()
 {
     ProgressGroups = new AdvancedObservableCollection <ProgressGroup>();
 }
Exemplo n.º 42
0
 public Conversation()
 {
     Messages = new AdvancedObservableCollection <Message>();
     Expanded = new AdvancedObservableCollection <Message>();
 }
Exemplo n.º 43
0
 private ProgressManager()
 {
     ProgressGroups = new AdvancedObservableCollection<ProgressGroup>();
 }
Exemplo n.º 44
0
 public PhotoModel()
 {
     Description     = string.Empty;
     ImageName       = Path.GetFileName(ImagePath);
     RedundantPhotos = new AdvancedObservableCollection <IRedundantPhotoModel>();
 }
Exemplo n.º 45
0
        public override void GetItems(int pageSize, int pageIndex)
        {
            CurrentQuestion = new TestQuestion();
            Items           = new AdvancedObservableCollection <TestAnswer>();


            switch (pageIndex)
            {
            case 1:
            {
                var correctAnswers =
                    QuestionsGenerator.GenerateFirstQuestion(null);
                var answerId = wrongAnswerId(PageIndex, correctAnswers);

                CurrentQuestion = QuestionsGenerator.GenerateFirstQuestion(answerId);

                break;
            }

            case 2:
            {
                var correctAnswers =
                    QuestionsGenerator.GenerateSecondQuestion(null);
                var answerId = wrongAnswerId(PageIndex, correctAnswers);

                CurrentQuestion = QuestionsGenerator.GenerateSecondQuestion(answerId);

                break;
            }

            case 3:
            {
                var correctAnswers =
                    QuestionsGenerator.GenerateThirdQuestion(null);
                var answerId = wrongAnswerId(PageIndex, correctAnswers);

                CurrentQuestion = QuestionsGenerator.GenerateThirdQuestion(answerId);
                break;
            }

            case 4:
            {
                var correctAnswers =
                    QuestionsGenerator.GenerateFourthQuestion(null);
                var answerId = wrongAnswerId(PageIndex, correctAnswers);

                CurrentQuestion = QuestionsGenerator.GenerateFourthQuestion(answerId);
                break;
            }

            case 5:
            {
                var correctAnswers =
                    QuestionsGenerator.GenerateFifthQuestion(null);
                var answerId = wrongAnswerId(PageIndex, correctAnswers);


                CurrentQuestion = QuestionsGenerator.GenerateFifthQuestion(answerId);
                break;
            }

            case 6:
            {
                var correctAnswers =
                    QuestionsGenerator.GenerateSixthQuestion(null);
                var answerId = wrongAnswerId(PageIndex, correctAnswers);


                CurrentQuestion = QuestionsGenerator.GenerateSixthQuestion(answerId);
                break;
            }
            }

            Items.AddRange(CurrentQuestion.Answers);
            AddQuestionToList(CurrentQuestion);
        }
Exemplo n.º 46
0
 static ChannelsManager()
 {
     _Channels = new AdvancedObservableCollection<ChannelInstance>();
     _ChannelProperties = AdditionalChannelProperties.GetConfiguration();
 }
Exemplo n.º 47
0
 public Progress()
 {
     ProgressGroups = new AdvancedObservableCollection<ProgressGroup>();
 }
Exemplo n.º 48
0
 private Label()
 {
     Messages  = new AdvancedObservableCollection <Message>();
     Documents = new AdvancedObservableCollection <Document>();
 }
Exemplo n.º 49
0
 public Conversation()
 {
     Messages = new AdvancedObservableCollection<Message>();
     Expanded = new AdvancedObservableCollection<Message>();
 }
Exemplo n.º 50
0
        public void AddSource(AdvancedObservableCollection <T> list)
        {
            AddRange(list);

            list.CollectionChanged += Inner_CollectionChanged;
        }