Beispiel #1
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     try
     {
         VistaGlass.ExtendGlass(this, -1, -1, -1, -1);
     }
     // If not Vista, paint background white.
     catch             //(DllNotFoundException)
     {
         this.Background = SystemColors.MenuBarBrush;
     }
 }
Beispiel #2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            this.CommandBindings.AddRange(Programme.Instance.CommandBindings);
            this.CommandBindings.Add(new CommandBinding(MessengerCommands.ToggleShowOfflineContacts,
                                                        new ExecutedRoutedEventHandler(ShowOfflineBinding_Executed)));
            this.CommandBindings.Add(new CommandBinding(MessengerCommands.ToggleShowGroups,
                                                        new ExecutedRoutedEventHandler(ShowGroupsBinding_Executed)));

            // fix: binding not working every time
            IsShowOffline = Settings.Default.ShowOffline;
            IsShowGroups  = Settings.Default.ShowGroups;

            try
            {
                VistaGlass.ExtendGlass(this, -1, -1, -1, -1);
            }
            catch //(DllNotFoundException)
            {
                this.Background = SystemColors.MenuBarBrush;
            }

            this.DataContext = this;

            //Programme.Instance.Contacts.CollectionChanged += Contacts_CollectionChanged;
            //Programme.Instance.Contacts.ItemPropertyChanged += Contacts_ItemPropertyChanged;
            //ContactList.DataContextChanged += ContactList_DataContextChanged;
            //contactsView = new ListCollectionView(Programme.Instance.Contacts);
            //ContactList.ItemsSource = contactsView;
            //this.UpdateSorting();

            state.DataContext = Programme.Instance.Endpoint.SelfPresentity.Availability;

            Programme.Instance.Endpoint.SelfPresentity.PropertyChanged += SelfPresentity_PropertyChanged;

            Programme.Instance.Endpoint.Presentities.Groups.CollectionChanged += Groups_CollectionChanged;
            foreach (string groupName in Programme.Instance.Endpoint.Presentities.Groups)
            {
                AddGroup(groupName);
            }
        }