Example #1
0
        private void ItemListOnSelect(object sender, SelectionChangedEventArgs e)
        {
            if (items_list.SelectedItem != null)
            {
                if (current_category == null)
                {
                    current_category       = (DBItemCategories)items_list.SelectedItems[0];
                    category_label.Content = current_category.name;
                    getItemList(current_category.ID);
                    updateTabOptions();

                    categoryBackButton.Visibility = Visibility.Visible;
                }

                else
                {
                    current_item = (DBItems)items_list.SelectedItem;
                    item_image_name_label.Content = current_item.name;
                    current_item_image.Source     = new BitmapImage(new Uri(@"/images/items/" + current_item.image_path, UriKind.Relative));
                }
            }

            if (current_category == null)
            {
                items_list.UnselectAll();
            }
        }
Example #2
0
 private void CategoryBackOnClick(object sender, RoutedEventArgs e)
 {
     categoryBackButton.Visibility = Visibility.Hidden;
     category_label.Content        = "Categories";
     current_category = null;
     fillCategories();
     showExcOptions(0);
 }
Example #3
0
        private void initItemOptions(Item item)
        {
            if (item == null)
            {
                return;
            }

            current_category = DBItemCategories.findCategory(item.category);
            current_item     = DBItems.findItem(item.category, item.index);

            getItemList(item.category);
            items_list.SelectedIndex = item.index;
            items_list.ScrollIntoView(items_list.SelectedIndex);

            initBasicOptions(item);
            initExcOptions(item);
        }
Example #4
0
        private void ItemListOnSelect(object sender, SelectionChangedEventArgs e)
        {
            if (items_list.SelectedItem != null)
            {
                if (current_category == null)
                {
                    current_category =  (DBItemCategories)items_list.SelectedItems[0];
                    category_label.Content = current_category.name;
                    getItemList(current_category.ID);
                    updateTabOptions();

                    categoryBackButton.Visibility = Visibility.Visible;
                }

                else
                {
                    current_item = (DBItems)items_list.SelectedItem;
                    item_image_name_label.Content = current_item.name;
                    current_item_image.Source = new BitmapImage(new Uri(@"/images/items/" + current_item.image_path, UriKind.Relative));
                }
            }

            if(current_category == null) items_list.UnselectAll();
        }
Example #5
0
        private void initItemOptions(Item item)
        {
            if (item == null) return;

            current_category = DBItemCategories.findCategory(item.category);
            current_item = DBItems.findItem(item.category, item.index);

            getItemList(item.category);
            items_list.SelectedIndex = item.index;
            items_list.ScrollIntoView(items_list.SelectedIndex);

            initBasicOptions(item);
            initExcOptions(item);
        }
Example #6
0
 private void CategoryBackOnClick(object sender, RoutedEventArgs e)
 {
     categoryBackButton.Visibility = Visibility.Hidden;
     category_label.Content = "Categories";
     current_category = null;
     fillCategories();
     showExcOptions(0);
 }