Beispiel #1
0
        public QueueDataView()
        {
            Name = "PrintQueueControl";

            SetDisplayAttributes();
            AddWatermark();
            ScrollArea.HAnchor |= Agg.UI.HAnchor.ParentLeftRight;

            AutoScroll                  = true;
            topToBottomItemList         = new FlowLayoutWidget(FlowDirection.TopToBottom);
            topToBottomItemList.Name    = "PrintQueueControl TopToBottom";
            topToBottomItemList.HAnchor = Agg.UI.HAnchor.Max_FitToChildren_ParentWidth;
            base.AddChild(topToBottomItemList);

            for (int i = 0; i < QueueData.Instance.Count; i++)
            {
                PrintItemWrapper item      = QueueData.Instance.GetPrintItemWrapper(i);
                QueueRowItem     queueItem = new QueueRowItem(item, this);
                AddChild(queueItem);
            }

            this.MouseLeaveBounds += new EventHandler(control_MouseLeaveBounds);
            QueueData.Instance.SelectedIndexChanged.RegisterEvent(SelectedIndexChanged, ref unregisterEvents);
            QueueData.Instance.ItemAdded.RegisterEvent(ItemAddedToQueue, ref unregisterEvents);
            QueueData.Instance.ItemRemoved.RegisterEvent(ItemRemovedFromToQueue, ref unregisterEvents);
            QueueData.Instance.OrderChanged.RegisterEvent(QueueOrderChanged, ref unregisterEvents);

            PrinterConnectionAndCommunication.Instance.ActivePrintItemChanged.RegisterEvent(PrintItemChange, ref unregisterEvents);

            WidescreenPanel.PreChangePanels.RegisterEvent(SaveCurrentlySelctedItemIndex, ref unregisterEvents);

            selectedQueueItemIndex = Math.Min(selectedQueueItemIndex, QueueData.Instance.Count - 1);
            SelectedIndex          = selectedQueueItemIndex;
        }
Beispiel #2
0
        public QueueDataView()
        {
            Name = "PrintQueueControl";

            SetDisplayAttributes();
            AddWatermark();
            ScrollArea.HAnchor |= Agg.UI.HAnchor.ParentLeftRight;

            AutoScroll                  = true;
            topToBottomItemList         = new FlowLayoutWidget(FlowDirection.TopToBottom);
            topToBottomItemList.Name    = "PrintQueueControl TopToBottom";
            topToBottomItemList.HAnchor = Agg.UI.HAnchor.Max_FitToChildren_ParentWidth;
            base.AddChild(topToBottomItemList);

            for (int i = 0; i < QueueData.Instance.Count; i++)
            {
                PrintItemWrapper item      = QueueData.Instance.GetPrintItemWrapper(i);
                QueueRowItem     queueItem = new QueueRowItem(item, this);
                AddChild(queueItem);
            }

            QueueData.Instance.ItemAdded.RegisterEvent(ItemAddedToQueue, ref unregisterEvents);
            QueueData.Instance.ItemRemoved.RegisterEvent(ItemRemovedFromToQueue, ref unregisterEvents);
            QueueData.Instance.OrderChanged.RegisterEvent(QueueOrderChanged, ref unregisterEvents);
        }
Beispiel #3
0
        public QueueDataView()
        {
            Name = "PrintQueueControl";

            SetDisplayAttributes();
            AddWatermark();
            ScrollArea.HAnchor = HAnchor.ParentLeftRight;

            AutoScroll                  = true;
            topToBottomItemList         = new FlowLayoutWidget(FlowDirection.TopToBottom);
            topToBottomItemList.Name    = "PrintQueueControl TopToBottom";
            topToBottomItemList.HAnchor = HAnchor.ParentLeftRight;
            base.AddChild(topToBottomItemList);

            for (int i = 0; i < QueueData.Instance.ItemCount; i++)
            {
                PrintItemWrapper item      = QueueData.Instance.GetPrintItemWrapper(i);
                QueueRowItem     queueItem = new QueueRowItem(item, this);
                AddChild(queueItem);
            }

            QueueData.Instance.SelectedIndexChanged.RegisterEvent(SelectedIndexChanged, ref unregisterEvents);
            QueueData.Instance.ItemAdded.RegisterEvent(ItemAddedToQueue, ref unregisterEvents);
            QueueData.Instance.ItemRemoved.RegisterEvent(ItemRemovedFromQueue, ref unregisterEvents);
            QueueData.Instance.OrderChanged.RegisterEvent(QueueOrderChanged, ref unregisterEvents);

            PrinterConnectionAndCommunication.Instance.ActivePrintItemChanged.RegisterEvent(PrintItemChange, ref unregisterEvents);

            SelectedIndexChanged(null, null);
        }
Beispiel #4
0
        private void ItemAddedToQueue(object sender, EventArgs e)
        {
            IndexArgs        addedIndexArgs = e as IndexArgs;
            PrintItemWrapper item           = QueueData.Instance.GetPrintItemWrapper(addedIndexArgs.Index);
            QueueRowItem     queueItem      = new QueueRowItem(item, this);

            AddChild(queueItem, addedIndexArgs.Index);
        }
Beispiel #5
0
 void exportButton_Click(object sender, EventArgs mouseEvent)
 {
     //Open export options
     if (queueDataView.SelectedItems.Count == 1)
     {
         QueueRowItem libraryItem = queueDataView.SelectedItems[0];
         OpenExportWindow(libraryItem.PrintItemWrapper);
     }
 }
Beispiel #6
0
 private void exportButton_Click(object sender, EventArgs mouseEvent)
 {
     //Open export options
     if (QueueData.Instance.SelectedCount == 1)
     {
         QueueRowItem libraryItem = queueDataView.GetQueueRowItem(QueueData.Instance.SelectedIndex);
         if (libraryItem != null)
         {
             OpenExportWindow(libraryItem.PrintItemWrapper);
         }
     }
 }
Beispiel #7
0
        public QueueRowItem GetPrintQueueItem(int index)
        {
            if (index >= 0 && index < topToBottomItemList.Children.Count)
            {
                GuiWidget    itemHolder = topToBottomItemList.Children[index];
                QueueRowItem child      = (QueueRowItem)itemHolder.Children[0];

                return(child);
            }

            return(null);
        }
Beispiel #8
0
 void PrintItemSelectionChanged(object sender, EventArgs e)
 {
     if (!queueDataView.EditMode)
     {
         // Set the selection to the selected print item.
         QueueRowItem selectedItem = queueDataView.SelectedItem as QueueRowItem;
         if (selectedItem != null)
         {
             if (this.queueDataView.SelectedItems.Count > 0 ||
                 !this.queueDataView.SelectedItems.Contains(selectedItem))
             {
                 this.queueDataView.ClearSelectedItems();
                 this.queueDataView.SelectedItems.Add(selectedItem);
             }
         }
     }
 }
		private void ItemAddedToQueue(object sender, EventArgs e)
		{
			IndexArgs addedIndexArgs = e as IndexArgs;
			PrintItemWrapper item = QueueData.Instance.GetPrintItemWrapper(addedIndexArgs.Index);
			QueueRowItem queueItem = new QueueRowItem(item, this);
			AddChild(queueItem, addedIndexArgs.Index);

			EnsureSelection();
		}
Beispiel #10
0
		public QueueDataView()
		{
			Name = "PrintQueueControl";

			SetDisplayAttributes();
			AddWatermark();
			ScrollArea.HAnchor = HAnchor.ParentLeftRight;

			AutoScroll = true;
			topToBottomItemList = new FlowLayoutWidget(FlowDirection.TopToBottom);
			topToBottomItemList.Name = "PrintQueueControl TopToBottom";
			topToBottomItemList.HAnchor = HAnchor.ParentLeftRight;
			base.AddChild(topToBottomItemList);

			for (int i = 0; i < QueueData.Instance.Count; i++)
			{
				PrintItemWrapper item = QueueData.Instance.GetPrintItemWrapper(i);
				QueueRowItem queueItem = new QueueRowItem(item, this);
				AddChild(queueItem);
			}

			this.MouseLeaveBounds += new EventHandler(control_MouseLeaveBounds);
			QueueData.Instance.SelectedIndexChanged.RegisterEvent(SelectedIndexChanged, ref unregisterEvents);
			QueueData.Instance.ItemAdded.RegisterEvent(ItemAddedToQueue, ref unregisterEvents);
			QueueData.Instance.ItemRemoved.RegisterEvent(ItemRemovedFromToQueue, ref unregisterEvents);
			QueueData.Instance.OrderChanged.RegisterEvent(QueueOrderChanged, ref unregisterEvents);

			PrinterConnectionAndCommunication.Instance.ActivePrintItemChanged.RegisterEvent(PrintItemChange, ref unregisterEvents);

			WidescreenPanel.PreChangePanels.RegisterEvent(SaveCurrentlySelctedItemIndex, ref unregisterEvents);

			selectedQueueItemIndex = Math.Min(selectedQueueItemIndex, QueueData.Instance.Count - 1);
			SelectedIndex = selectedQueueItemIndex;
			EnsureSelection();
		}
		public QueueDataView()
		{
			Name = "PrintQueueControl";

			SetDisplayAttributes();
			AddWatermark();
			ScrollArea.HAnchor = HAnchor.ParentLeftRight;

			AutoScroll = true;
			topToBottomItemList = new FlowLayoutWidget(FlowDirection.TopToBottom);
			topToBottomItemList.Name = "PrintQueueControl TopToBottom";
			topToBottomItemList.HAnchor = HAnchor.ParentLeftRight;
			base.AddChild(topToBottomItemList);

			for (int i = 0; i < QueueData.Instance.ItemCount; i++)
			{
				PrintItemWrapper item = QueueData.Instance.GetPrintItemWrapper(i);
				QueueRowItem queueItem = new QueueRowItem(item, this);
				AddChild(queueItem);
			}

			QueueData.Instance.SelectedIndexChanged.RegisterEvent(SelectedIndexChanged, ref unregisterEvents);
			QueueData.Instance.ItemAdded.RegisterEvent(ItemAddedToQueue, ref unregisterEvents);
			QueueData.Instance.ItemRemoved.RegisterEvent(ItemRemovedFromQueue, ref unregisterEvents);
			QueueData.Instance.OrderChanged.RegisterEvent(QueueOrderChanged, ref unregisterEvents);

			PrinterConnectionAndCommunication.Instance.ActivePrintItemChanged.RegisterEvent(PrintItemChange, ref unregisterEvents);

			SelectedIndexChanged(null, null);
		}