Beispiel #1
0
        private void Init()
        {
            // Hide advanced panel.
            PrintGroupBox.Height -= AdvancedPanel.Height;
            CloseButton.Location  = new Point(CloseButton.Location.X, CloseButton.Location.Y - AdvancedPanel.Height);
            this.Height          -= AdvancedPanel.Height;

            // Define columns for bar code list view.
            BarCodeListView.Columns.Add("Registered bar codes", (BarCodeListView.Width / 2) - 12);
            BarCodeListView.Columns.Add(TEXT_COLUMN_NAME, (BarCodeListView.Width / 2) - 12);

            // Print bar code properties.
            BarCodeHeightComboBox.SelectedItem = "Tall";
            BarCodeWidthComboBox.SelectedItem  = "Narrow";
            OffsetX.Value = LabelPrinter.GetDefaultBarCodeOffsetX();
            OffsetY.Value = LabelPrinter.GetDefaultBarCodeOffsetY();
            BarCodeTypeComboBox.SelectedIndex = 0;
            PrintModeComboBox.SelectedIndex   = 0;
            PrintServerNameTextBox.Text       = LabelPrinter.GetDefaultPrintServerName();

            IGenericContainer container = null;

            container = ContainerManager.GetUncontainedContainer();
            if (IsNotNull(container))
            {
                BarCodeListView.BeginUpdate();
                BarCodeListView.Items.Add(new BarCodeListViewItem(container));
                BarCodeListView.EndUpdate();
            }
            else
            {
                ShowWarning("Could not find the Uncontained object!");
            }
            PrintButton.Enabled = IsNotEmpty(BarCodeListView.Items);
        }