Exemplo n.º 1
0
        public OrderFormingScreen(SelectStage stage)
            : this()
        {
            _stage       = stage;
            _listControl = new ThumbnailListControl(Constants.OrderItemStyleName);

            if (!_listControl.Resources.MergedDictionaries.Contains(Resources))
            {
                _listControl.Resources.MergedDictionaries.Add(Resources);
            }

            _listControl.AddFilterTab(new ApplyAllFilter(), (string)TryFindResource(Constants.TabAllTextKey));

            foreach (PaperFormat format in ExecutionEngine.PriceManager.PaperFormats)
            {
                _listControl.AddFilterTab(new PaperSizeFilter(format), format.Name);
            }

            _listControl.ShowEmptyFilterTabs = false;

            ContentFrame.Content = _listControl;

            if (ExecutionEngine.Context.Contains(Constants.OrderContextName))
            {
                _orderInfoControl.SetSource((Order)ExecutionEngine.Context[Constants.OrderContextName]);
            }

            _listControl.List.ItemChanged += new EventHandler(ListItemContentChangedHandler);
            _listControl.SetItemsLayout(Constants.OrderFormingScreenItemsInRow, Constants.OrderFormingScreenItemsInColumn);
            _listControl.ShowSelectAllButton = false;

            _currentOrder = (Order)ExecutionEngine.Context[Constants.OrderContextName];
        }
Exemplo n.º 2
0
        public ThumbnailList(string itemStyleName, ThumbnailListControl hostControl)
        {
            _items         = new List <ThumbnailItem>();
            _filteredItems = new List <ThumbnailItem>();
            _visibleItems  = new ObservableCollection <ThumbnailItem>();

            _controlSize       = new Size();
            _thumbnailSize     = new Size();
            _lastAppliedFilter = new ApplyAllFilter();

            _itemsPerRow    = 4;
            _itemsPerColumn = 2;

            _thumbnailsLoader = new AsyncThumbnailsLoader(_filteredItems, this);
            ExecutionEngine.EventLogger.Write("ThumbnailList created");

            _itemStyleName = itemStyleName;
            _hostControl   = hostControl;
        }
Exemplo n.º 3
0
        public SelectScreen(Aurigma.PhotoKiosk.SelectStage stage)
            : this()
        {
            _selectStage = stage;
            _listControl = new ThumbnailListControl(Constants.SelectItemStyleName);

            if (_listControl.Resources.MergedDictionaries.Contains(Resources) == false)
            {
                _listControl.Resources.MergedDictionaries.Add(Resources);
            }

            _listControl.AddFilterTab(new ApplyAllFilter(), (string)TryFindResource(Constants.TabAllTextKey));
            _listControl.AddFilterTab(new ItemCheckedFilter(true), (string)TryFindResource(Constants.TabCheckedTextKey));
            _listControl.AddFilterTab(new ItemCheckedFilter(false), (string)TryFindResource(Constants.TabUncheckedTextKey));

            _listControl.ShowEmptyFilterTabs = false;

            _listControl.SetItemsLayout(Constants.SelectScreenItemsInRow, Constants.SelectScreenItemsInColumn);

            this.ContentFrame.Content = _listControl;

            _listControl.ListEmpty += ListEmptyHandler;
        }
Exemplo n.º 4
0
        private static void PageNumbersOffsetChangedHandler(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            ThumbnailListControl control = (ThumbnailListControl)sender;

            control.CurrentPageNumbersOffset = (double)e.NewValue;
        }