Beispiel #1
0
        private void btn_left_Click(object sender, EventArgs e)
        {
            if (SelectedSKUIndex <= 0)
            {
                return;
            }

            Label temp = flp_sku.Controls[SelectedSKUIndex - 1] as Label;

            flp_sku.Controls.SetChildIndex(flp_sku.Controls[SelectedSKUIndex], SelectedSKUIndex - 1);
            flp_sku.Controls.SetChildIndex(temp, SelectedSKUIndex);
            SkuComponent tempComp = SkuComponents.ElementAt(SelectedSKUIndex - 1);

            SkuComponents[SelectedSKUIndex - 1] = SkuComponents[SelectedSKUIndex];
            SkuComponents[SelectedSKUIndex]     = tempComp;

            SelectedSKUIndex--;
        }
Beispiel #2
0
        private void btn_static_component_add_Click(object sender, EventArgs e)
        {
            if (tb_static_component.Text == "")
            {
                return;
            }

            Label l = new Label();

            l.Text = tb_static_component.Text;

            l.Font     = new Font(FontFamily.GenericMonospace, 8.0f);
            l.AutoSize = true;
            l.Click   += skuComponentClicked;
            flp_sku.Controls.Add(l);
            SkuComponent component = new SkuComponent();

            component.StaticText = tb_static_component.Text;
            SkuComponents.Add(component);

            tb_static_component.Text = "";
        }
Beispiel #3
0
        private void btn_prop_add_Click(object sender, EventArgs e)
        {
            Label l = new Label();

            if (lb_products.SelectedItem == null || lb_properties.SelectedItem == null)
            {
                return;
            }

            l.Text = "<" + lb_products.SelectedItem + "." + lb_properties.SelectedItem + ">";

            l.Font     = new Font(FontFamily.GenericMonospace, 8.0f);
            l.AutoSize = true;
            l.Click   += skuComponentClicked;
            flp_sku.Controls.Add(l);

            ProductProperty prop      = Products.ElementAt(lb_products.SelectedIndex).Properties.ElementAt(lb_properties.SelectedIndex);
            SkuComponent    component = new SkuComponent();

            component.Property = prop;
            SkuComponents.Add(component);
        }