Esempio n. 1
0
        private void addColumn_Click(object sender, EventArgs e)
        {
            string name = this.columnNameTxtBx.Text;
            int width =999;
            int startIndex = (int)this.startIndexUpDw.Value;

            WidgetPickerWheel.PickerWheelColumn.ColumnAlignement alignement = WidgetPickerWheel.PickerWheelColumn.ColumnAlignement.left;

            if ( this.alignementCmbBx.SelectedItem.ToString().Equals("center"))
               alignement = WidgetPickerWheel.PickerWheelColumn.ColumnAlignement.center;
            else if (this.alignementCmbBx.SelectedItem.ToString().Equals("left"))
               alignement = WidgetPickerWheel.PickerWheelColumn.ColumnAlignement.left;
            else if (this.alignementCmbBx.SelectedItem.ToString().Equals("right"))
               alignement = WidgetPickerWheel.PickerWheelColumn.ColumnAlignement.right;

            if(!this.isAutoSizeChkBx.Checked)
                width = (int)this.columWidthUpDw.Value;

            WidgetPickerWheel.PickerWheelColumn col = new WidgetPickerWheel.PickerWheelColumn(name, startIndex, width, alignement);

            this.pickerWheel.Columns.Add(col);
            this.init();
        }
Esempio n. 2
0
        private void setColumnSelected(WidgetPickerWheel.PickerWheelColumn column)
        {
            this.columnSelected = column;

            if (this.columnSelected.Width < 999)
            {
                this.isAutoSizeChkBx.Checked = false;
                this.columWidthUpDw.Enabled = true;
                this.columWidthUpDw.Value = this.columnSelected.Width;
            }

            this.startIndexUpDw.Value = this.columnSelected.StartIndex;

            if (this.columnSelected.Alignement == WidgetPickerWheel.PickerWheelColumn.ColumnAlignement.center)
                this.alignementCmbBx.SelectedItem = "center";
            else if (this.columnSelected.Alignement == WidgetPickerWheel.PickerWheelColumn.ColumnAlignement.right)
                this.alignementCmbBx.SelectedItem = "right";
            else if (this.columnSelected.Alignement == WidgetPickerWheel.PickerWheelColumn.ColumnAlignement.left)
                this.alignementCmbBx.SelectedItem = "left";

            this.rowsListBx.Items.Clear();
            for (int i = 0; i < this.columnSelected.Datas.Count; i++)
            {
                this.rowsListBx.Items.Add(this.columnSelected.Datas[i]);
            }
        }
Esempio n. 3
0
        private void init()
        {
            this.columnSelected = null;
            this.columnsListBx.Items.Clear();
            this.rowsListBx.Items.Clear();

            this.widgetNameTxtBx.Text = this.pickerWheel.Name;

            for(int i = 0;i<this.pickerWheel.Columns.Count;i++)
            {
                this.columnsListBx.Items.Add(this.pickerWheel.Columns[i]);
            }
        }