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; }
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; }
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(); }; }
public UserStatus() { DateCreated = DateTime.Now; Children = new AdvancedObservableCollection<UserStatus>(); Attachments = new AdvancedObservableCollection<UserStatusAttachment>(); StatusKey = Guid.NewGuid().GetHash(); }
public Person() { PersonKey = Guid.NewGuid().GetHash(); Profiles = new AdvancedObservableCollection <Profile>(); Messages = new AdvancedObservableCollection <Message>(); Documents = new AdvancedObservableCollection <Document>(); }
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(); }; }
public Person() { PersonKey = Guid.NewGuid().GetHash(); Profiles = new AdvancedObservableCollection<Profile>(); Messages = new AdvancedObservableCollection<Message>(); Documents = new AdvancedObservableCollection<Document>(); }
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(); }; }
public UserStatus() { DateCreated = DateTime.Now; Children = new AdvancedObservableCollection <UserStatus>(); Attachments = new AdvancedObservableCollection <UserStatusAttachment>(); StatusKey = Guid.NewGuid().GetHash(); }
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 Document() { DocumentKey = Guid.NewGuid().GetHash(); DateCreated = DateTime.Now; Versions = new AdvancedObservableCollection<DocumentVersion>(); LabelsList = new AdvancedObservableCollection<Label>(); ContentSynced = true; }
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; }
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>(); }
public SearchProfilesControl() { mailbox = VirtualMailBox.Current; InitializeComponent(); DataContext = this; Profiles = new AdvancedObservableCollection <Profile>(); }
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); }
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; }
/// <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>(); }
/// <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>(); }
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; }
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)); }
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(); }
/// <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); }
/// <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); }
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(); }; }
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 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; }
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; }
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; }
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; }
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; }
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 } }; }
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 } }; }
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; } }
private ProgressManager() { ProgressGroups = new AdvancedObservableCollection <ProgressGroup>(); }
public Conversation() { Messages = new AdvancedObservableCollection <Message>(); Expanded = new AdvancedObservableCollection <Message>(); }
private ProgressManager() { ProgressGroups = new AdvancedObservableCollection<ProgressGroup>(); }
public PhotoModel() { Description = string.Empty; ImageName = Path.GetFileName(ImagePath); RedundantPhotos = new AdvancedObservableCollection <IRedundantPhotoModel>(); }
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); }
static ChannelsManager() { _Channels = new AdvancedObservableCollection<ChannelInstance>(); _ChannelProperties = AdditionalChannelProperties.GetConfiguration(); }
public Progress() { ProgressGroups = new AdvancedObservableCollection<ProgressGroup>(); }
private Label() { Messages = new AdvancedObservableCollection <Message>(); Documents = new AdvancedObservableCollection <Document>(); }
public Conversation() { Messages = new AdvancedObservableCollection<Message>(); Expanded = new AdvancedObservableCollection<Message>(); }
public void AddSource(AdvancedObservableCollection <T> list) { AddRange(list); list.CollectionChanged += Inner_CollectionChanged; }