public void CreateTableCellControls(List <TableCellObject> cellObjects)
        {
            int totalCell = cellObjects.Count;

            AddTableCells(totalCell);
            if (totalCell == 2)
            {
                string temp = "";
            }
            if (totalCell > 0)
            {
                for (int i = 0; i < totalCell; i++)
                {
                    TableCell       cell        = (TableCell)this.Controls[i];
                    TableCellObject cellObj     = (TableCellObject)cellObjects[i];
                    string          elementType = cellObj.Element.ElementType;
                    PropertyPage    page        = cellObj.CreatePropertyPage();
                    if (cellObj.Element != null && page != null)
                    {
                        page.Properties = cellObj.Element.Properties;
                        cell.Element    = page;
                    }
                }
            }
        }
示例#2
0
 private void elementLayoutDesigner1_OnTableCellClick(TableCell tableCell)
 {
     if (this.ctrl != null)
     {
         this.elementLayoutDesigner1.AddElement(this.ctrl);
     }
     this.ctrl = null;
 }
        public void AddElementFromControl(PropertyPage propertyPage)
        {
            ElementObject o = new ElementObject();

            o.ElementType = propertyPage.GetElementID();
            o.Properties  = propertyPage.Properties;
            this.Element  = o;
        }
        private void Cc_DoubleClick(object sender, EventArgs e)
        {
            PropertyPage propertyPage = (PropertyPage)((UserControl)sender).Tag;

            propertyPage.ShowConfigurationWindow();

            //commonPropertyControl.ShowConfigureProperties();
        }
 public void AddElement(PropertyPage ctrl)
 {
     if (this.CurrentTableCell != null)
     {
         this.CurrentTableCell.Element = ctrl;
     }
     else
     {
         MessageBox.Show("No Selected cell. Please, select one cell.");
     }
 }
        public PropertyPage CreatePropertyPage()
        {
            PropertyPage page     = null;
            string       elemType = this.Element.ElementType;

            if (elemType == Settings.Default.CHECKBOXGROUP)
            {
                page = new CheckboxPropertyPage();
            }
            else if (elemType == Settings.Default.DATETIME)
            {
                page = new DateTimePropertyPage();
            }
            else if (elemType == Settings.Default.RADIOGROUP)
            {
                page = new RadioGroupPropertyPage();
            }
            else if (elemType == Settings.Default.SELECTBOX)
            {
                page = new SelectBoxPropertyPage();
            }
            else if (elemType == Settings.Default.GRID)
            {
                page = new GridPropertyPage();
            }
            else if (elemType == Settings.Default.TABPAGES)
            {
                page = new TabPagesPropertyPage();
            }
            else if (elemType == Settings.Default.TEXTAREA)
            {
                page = new TextareaPropertyPage();
            }
            else if (elemType == Settings.Default.TEXTBOX)
            {
                page = new TextboxPropertyPage();
            }
            else if (elemType == Settings.Default.FILEUPLOAD)
            {
                page = new FileUploadPropertyPage();
            }
            else if (elemType == Settings.Default.BUTTON)
            {
                page = new ButtonPropertyPage();
            }

            return(page);
        }
        private void ElementPadCtrl1_OnClickEventHandler(PropertyPage ctrl)
        {
            FormElementConfiguration frm = new FormElementConfiguration();

            frm.PropertyConfigurator = ctrl.PropertyConfigurator;
            frm.ShowDialog();
            if (frm.IsCancel == false)
            {
                CommonPropertyConfigurator configurator = (CommonPropertyConfigurator)frm.PropertyConfigurator;
                configurator.Fill(ctrl.Properties);
                SelectedpropertyPage = ctrl;
            }
            else
            {
                SelectedpropertyPage = null;
            }
        }
        private void grid_CellClick(object sender, System.Windows.Forms.DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 3)
            {
                PropertyPage page = null;
                if (grid.Rows[e.RowIndex].Cells[e.ColumnIndex].Tag != null)
                {
                    page = (PropertyPage)grid.Rows[e.RowIndex].Cells[e.ColumnIndex].Tag;
                }

                FormInputTypeConfigure frm = new FormInputTypeConfigure();
                frm.SelectedpropertyPage = page;
                frm.ShowDialog();
                if (frm.IsCanceled == false)
                {
                    grid.Rows[e.RowIndex].Cells[e.ColumnIndex].Tag = frm.SelectedpropertyPage;
                }
            }
        }
 public DatetimePropertyConfigurator(PropertyPage propertyPage) : base(propertyPage)
 {
     InitializeComponent();
 }
 public BaseDrawer(PropertyPage page)
 {
     this.PropertyPage = page;
 }
示例#11
0
 public FileUploadDrawer(PropertyPage page) : base(page)
 {
     InitializeComponent();
 }
 public TextAreaDrawer(PropertyPage page) : base(page)
 {
     InitializeComponent();
 }
 public CommonPropertyConfigurator(PropertyPage propertyPage)
 {
     this.PropertyPage = propertyPage;
     InitializeComponent();
 }
 public ButtonConfigurator(PropertyPage propertyPage) : base(propertyPage)
 {
     InitializeComponent();
 }
 public RadioGroupDrawer(PropertyPage page) : base(page)
 {
     InitializeComponent();
 }
 public SelectBoxConfigurator(PropertyPage propertyPage) : base(propertyPage)
 {
     InitializeComponent();
 }
 public GridConfigurator(PropertyPage page) : base(page)
 {
     InitializeComponent();
 }
 public FileUploadConfigurator(PropertyPage propertyPage) : base(propertyPage)
 {
     InitializeComponent();
 }
 public CheckboxGroupDrawer(PropertyPage page) : base(page)
 {
     InitializeComponent();
 }
 public TabPageDrawer(PropertyPage page) : base(page)
 {
     InitializeComponent();
 }
 public SelectBoxDrawer(PropertyPage page) : base(page)
 {
     InitializeComponent();
 }
示例#22
0
 public TextAreaConfigurator(PropertyPage propertyPage) : base(propertyPage)
 {
     InitializeComponent();
 }
 public ButtonDrawer(PropertyPage page) : base(page)
 {
     InitializeComponent();
 }
 public DatetimeDrawer(PropertyPage page) : base(page)
 {
     InitializeComponent();
 }
示例#25
0
 private void elementPadCtrl1_OnClickEventHandler(PropertyPage ctrl)
 {
     this.ctrl = ctrl;
 }