예제 #1
0
        private void StyleRibbonMenuButtonUser_Click (object sender, RoutedEventArgs e) {
            RibbonMenuItem ribbonMenuItemSender = (RibbonMenuItem)sender;

            userClicked = (UserItem)ribbonMenuItemSender.DataContext;

            comboBoxCollection.Items.Clear();

            listViewTrackersData.ItemsSource = null;
            listViewTrackers.ItemsItemSource = null;


            MapCommand mapCommand = new MapCommand();
            mapCommand.Name = "ClearTracker";
            map.processCommand(webBrowserMap, mapCommand);


            foreach (Collection collection in userClicked.getUser().Collections) {
                comboBoxCollection.Items.Add(collection);
            }
            comboBoxCollection.DisplayMemberPath = "Name";

            ribbonMenuButtonUser.Label = userClicked.Username;
            comboBoxCollection.SelectedIndex = 0;
        }
예제 #2
0
        private void MetroWindow_Loaded (object sender, RoutedEventArgs e) {
            //Initialized
            this.Title = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name + " - " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;

            List<UserItem> userItems = new List<UserItem>();
            foreach (User user in company.Users) {
                UserItem userItem = new UserItem(user);
                userItems.Add(userItem);
            }

            ribbonMenuButtonUser.ItemsSource = userItems;
            labelCompany.Content = this.company.DisplayName;
            labelUser.Content = this.user.Username;
            labelDatabaseHost.Content = this.database.IpAddress.ToString();
        }