public override void ZoomFont(Control control, ZoomFontInfo infos) { C1TileControl tc = control as C1TileControl; if (tc != null) { if (tc.TextSize != 0f) { tc.TextSize *= infos.DeltaFactor; } if (tc.GroupTextSize != 0f) { tc.GroupTextSize *= infos.DeltaFactor; } else { tc.GroupFont = infos.Zoom(tc.GroupFont); } ZoomFont(tc.DefaultTemplate.Elements, infos); foreach (Template template in tc.Templates) { ZoomFont(template.Elements, infos); } } base.ZoomFont(control, infos); }
private void initTileCategory() { TileCat = new C1TileControl(); TileCat.Dock = DockStyle.Fill; TileCat.Font = fEdit; TileCat.Orientation = LayoutOrientation.Horizontal; grRec = new Group(); TileCat.Groups.Add(this.grRec); //peRec = new C1.Win.C1Tile.PanelElement(); //ieRec = new C1.Win.C1Tile.ImageElement(); tempRec = new C1.Win.C1Tile.Template(); imageElementRec = new C1.Win.C1Tile.ImageElement(); peCat = new C1.Win.C1Tile.PanelElement(); ieOrd = new C1.Win.C1Tile.ImageElement(); teOrd = new TextElement(); teOrd.Font = fEdit; teCat = new TextElement(); teCat.BackColorSelector = C1.Win.C1Tile.BackColorSelector.Unbound; teCat.ForeColor = System.Drawing.Color.Black; teCat.ForeColorSelector = C1.Win.C1Tile.ForeColorSelector.Unbound; teCat.SingleLine = true; imageElementRec.ImageLayout = C1.Win.C1Tile.ForeImageLayout.Stretch; //imageElementRec. //peOrd = new PanelElement(); //peOrd.Alignment = System.Drawing.ContentAlignment.BottomLeft; //peOrd.Children.Add(ieOrd); //peOrd.Children.Add(teOrd); //peOrd.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6); //peCat.BackColor = tileFoodsNameColor; peCat.Children.Add(teCat); peCat.Dock = System.Windows.Forms.DockStyle.Top; peCat.Padding = new System.Windows.Forms.Padding(4, 2, 4, 2); //TileCat.DefaultTemplate.Elements.Add(peOrd); TileCat.Templates.Add(this.tempRec); tempRec.Elements.Add(imageElementRec); tempRec.Elements.Add(peCat); //tempRec.Elements.Add(pnFoodsPrice); tempRec.Name = "tempFlickrrec"; TileCat.ScrollOffset = 0; TileCat.SurfaceContentAlignment = System.Drawing.ContentAlignment.TopLeft; TileCat.Padding = new System.Windows.Forms.Padding(0); TileCat.GroupPadding = new System.Windows.Forms.Padding(20); //TileCat.BackColor = tileCatColor; // tab recommend color //TileCat.Templates.Add(this.tempRec); //pnTilImage.BackColor = tilecolor; pnTilImage.Controls.Add(TileCat); setTileCategory(); //for (int i = 0; i < dtCat.Rows.Count; i++) //{ // LoadFoods(false, i, dtCat.Rows[i]["foods_cat_id"].ToString()); //} }
// Initializes the UI from the base components in AppView class public void InitUi() { //Panel panel1 = AppView.GetPanel(); panel1.Paint += new PaintEventHandler(PanelPaint); //Split Container mainSplitContainer = AppView.GetSplitContainer(); Controls.Add(mainSplitContainer); Controls.Add(mainSplitContainer); //init Search EditText searchBox = AppView.GetSearchBox(); searchBox.TextChanged += new EventHandler(OnTextChanged); panel1.Controls.Add(searchBox); //init Search Picture box searchImagePictureBox = AppView.GetSearchImagePictureBox(); searchImagePictureBox.Click += new EventHandler(this.OnSearchClicked); // Table LayoutPanel tableLayoutPanel = AppView.GetTableLayoutPanel(); tableLayoutPanel.Controls.Add(panel1, 1, 0); tableLayoutPanel.Controls.Add(searchImagePictureBox, 2, 0); mainSplitContainer.Panel1.Controls.Add(tableLayoutPanel); //init Export PDF Btn exportImage = AppView.GetExportPDFButton(); exportImage.Click += new EventHandler(this.OnExportClick); exportImage.Paint += new PaintEventHandler(this.ExportImagePaint); tableLayoutPanel.Controls.Add(this.exportImage, 0, 0); // init Border label1 = AppView.GetBorder(); mainSplitContainer.Panel2.Controls.Add(label1); //init status label statusLabel = AppView.GetStausLabel(); mainSplitContainer.Panel2.Controls.Add(statusLabel); //Groups group1 = AppView.GetGroup(); //init C1Tile imageTileControl = AppView.GetTileCntrol(); imageTileControl.Groups.Add(group1); imageTileControl.TileChecked += new EventHandler <TileEventArgs>(OnTileChecked); imageTileControl.TileUnchecked += new EventHandler <TileEventArgs>(OnTileUnchecked); mainSplitContainer.Panel2.Controls.Add(this.imageTileControl); //ProgressBar toolStripProgressBar1 = AppView.GetProgressBarTool(); //init Status Bar statusStrip = AppView.GetStatusStrip(); statusStrip.Items.AddRange(new ToolStripItem[] { toolStripProgressBar1 }); mainSplitContainer.Panel2.Controls.Add(statusStrip); }
//CONTROLLING THE TILE GROUP C1TileControl addTileControl() { _imageTileControl = new C1TileControl(); _imageTileControl.AllowChecking = true; _imageTileControl.AllowRearranging = true; _imageTileControl.BackColor = Color.Lavender; _imageTileControl.CellHeight = 78; _imageTileControl.CellSpacing = 18; _imageTileControl.CellWidth = 73; panelElement1.Alignment = ContentAlignment.BottomLeft; panelElement1.Children.Add(imageElement1); panelElement1.Children.Add(textElement1); panelElement1.Margin = new Padding(10, 6, 10, 6); _imageTileControl.DefaultTemplate.Elements.Add(panelElement1); _imageTileControl.Dock = DockStyle.Fill; _imageTileControl.Groups.Add(addGroup()); _imageTileControl.Location = new Point(0, 0); _imageTileControl.Name = "_imageTileControl"; _imageTileControl.Size = new Size(780, 705); _imageTileControl.SurfacePadding = new Padding(12, 4, 12, 4); _imageTileControl.SwipeDistance = 20; _imageTileControl.SwipeRearrangeDistance = 98; //ADDING CURSOR HAND WHEN HOVER ON TILE CONTROL _imageTileControl.Cursor = Cursors.Hand; //GIVING VERTICAL LAYOUT TO THE TILE CONTROL _imageTileControl.Orientation = LayoutOrientation.Vertical; _imageTileControl.TabIndex = 1; _imageTileControl.Text = ""; //EVENTS _imageTileControl.TileChecked += new EventHandler <TileEventArgs>(imageTileControlTileChecked); _imageTileControl.TileUnchecked += new EventHandler <TileEventArgs>(imageTileControlTileUnchecked); _imageTileControl.Paint += new PaintEventHandler(imageTileControlPaint); return(_imageTileControl); }
public static C1TileControl GetTileCntrol() { C1TileControl imageTileControl = new C1TileControl { AllowChecking = true, AllowRearranging = true, CellHeight = 78, CellSpacing = 11, CellWidth = 78, Dock = DockStyle.Fill, Location = new Point(0, 0), Name = "imageTileControl", Orientation = LayoutOrientation.Vertical, Padding = new Padding(0), Size = new Size(784, 573), SurfacePadding = new Padding(12, 4, 12, 4), SwipeDistance = 20, SwipeRearrangeDistance = 98, TabIndex = 1, TextSize = 0F }; return(imageTileControl); }
//-------------------------------------------------------------------------// private void InitializeComponent() { //----------------ALL THE OBJECTS OF THE ELEMENT------------------------ PanelElement panelElement1 = new PanelElement(); ImageElement imageElement1 = new ImageElement(); TextElement textElement1 = new TextElement(); this.tableLayoutPanel1 = new TableLayoutPanel(); this.panel1 = new Panel(); this.panel4 = new Panel(); this.pictureBox2 = new PictureBox(); this.statusStrip1 = new StatusStrip(); this.toolStripProgressBar1 = new ToolStripProgressBar(); this.panel2 = new Panel(); this._search = new PictureBox(); this._searchBox = new MaskedTextBox(); this.panel3 = new Panel(); this._exportImage = new PictureBox(); this._imageTileControl = new C1TileControl(); this.group1 = new Group(); this.tile1 = new Tile(); this.tile2 = new Tile(); this.tile3 = new Tile(); this.imagePdfDocument = new C1PdfDocument(); this.button = new Button(); //------------------------------------------------------------// //------------------- splitContainer1------------------------------------- this.splitContainer1 = new SplitContainer(); //properties splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; splitContainer1.IsSplitterFixed = true; splitContainer1.Location = new System.Drawing.Point(0, 0); splitContainer1.Margin = new System.Windows.Forms.Padding(2); splitContainer1.Name = "splitContainer1"; splitContainer1.Orientation = Orientation.Horizontal; // splitContainer1.Panel1 add control this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel1); // splitContainer1 Panel2 this.splitContainer1.Panel2.Controls.Add(this.statusStrip1); this.splitContainer1.Panel2.Controls.Add(this.panel2); this.splitContainer1.Panel2.Controls.Add(this._searchBox); this.splitContainer1.Panel2.Controls.Add(this.panel3); this.splitContainer1.Panel2.Controls.Add(this._imageTileControl); this.splitContainer1.Size = new System.Drawing.Size(764, 749); this.splitContainer1.SplitterDistance = 40; this.splitContainer1.TabIndex = 0; // ----------------------------tableLayoutPanel1------------ this.tableLayoutPanel1.ColumnCount = 3; this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 37.5F)); this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 37.5F)); this.tableLayoutPanel1.Controls.Add(this.panel1, 1, 0); this.tableLayoutPanel1.Dock = DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 1; this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); this.tableLayoutPanel1.Size = new System.Drawing.Size(764, 40); this.tableLayoutPanel1.TabIndex = 0; //---------- panel1 // this.panel1.Controls.Add(this.panel4); this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Location = new System.Drawing.Point(194, 3); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(280, 34); this.panel1.TabIndex = 0; //------------------- panel4------------- this.panel4.Controls.Add(this.pictureBox2); this.panel4.Dock = System.Windows.Forms.DockStyle.Fill; this.panel4.Location = new System.Drawing.Point(0, 0); this.panel4.Name = "panel4"; this.panel4.Size = new System.Drawing.Size(280, 34); this.panel4.TabIndex = 0; // --------------------PICTURE BOX 2----------------------------------------- this.pictureBox2.Dock = DockStyle.Fill; this.pictureBox2.Image = global::ImageGalleryProject.Properties.Resources.iconimages; this.pictureBox2.Location = new System.Drawing.Point(0, 0); this.pictureBox2.Margin = new Padding(0); this.pictureBox2.Name = "pictureBox2"; this.pictureBox2.Size = new System.Drawing.Size(280, 34); this.pictureBox2.SizeMode = PictureBoxSizeMode.CenterImage; this.pictureBox2.TabIndex = 1; this.pictureBox2.TabStop = false; //------------------------------ statusStrip1---------------------------- this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripProgressBar1 }); this.statusStrip1.Location = new System.Drawing.Point(0, 683); this.statusStrip1.Name = "statusStrip1"; this.statusStrip1.Size = new System.Drawing.Size(764, 22); this.statusStrip1.TabIndex = 3; this.statusStrip1.Text = "statusStrip1"; this.statusStrip1.Visible = false; // ----------------------toolStripProgress bar---------------- this.toolStripProgressBar1.Name = "toolStripProgressBar1"; this.toolStripProgressBar1.Size = new System.Drawing.Size(100, 16); this.toolStripProgressBar1.Style = ProgressBarStyle.Marquee; // ------------------panel2-------------------- this.panel2.Controls.Add(this._search); this.panel2.Location = new System.Drawing.Point(679, 19); this.panel2.Margin = new Padding(2, 12, 45, 12); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(31, 20); this.panel2.TabIndex = 1; //----------------------------SEARCH BTN------------------------------ this._search.Anchor = ((AnchorStyles)((((AnchorStyles.Top | AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._search.Image = global::ImageGalleryProject.Properties.Resources.searchimg; this._search.Location = new System.Drawing.Point(0, 0); this._search.Margin = new Padding(0); this._search.Name = "_search"; this._search.Size = new System.Drawing.Size(31, 20); this._search.SizeMode = PictureBoxSizeMode.Zoom; this._search.TabIndex = 0; this._search.TabStop = false; //event this._search.Click += new System.EventHandler(this._search_ClickAsync); // -----------------------------searchBox-------------------------- this._searchBox.Anchor = ((AnchorStyles)((((AnchorStyles.Top | AnchorStyles.Bottom) | AnchorStyles.Left) | AnchorStyles.Right))); this._searchBox.Location = new System.Drawing.Point(421, 19); this._searchBox.Name = "_searchBox"; this._searchBox.Size = new System.Drawing.Size(244, 20); this._searchBox.TabIndex = 1; this._searchBox.Text = "Search Image"; //----------------------------------- panel3----------------------- this.panel3.Controls.Add(this._exportImage); this.panel3.Location = new System.Drawing.Point(35, 19); this.panel3.Name = "panel3"; this.panel3.Size = new System.Drawing.Size(147, 29); this.panel3.TabIndex = 2; //----------------------------exportImage----------------- this._exportImage.Dock = DockStyle.Fill; this._exportImage.Image = global::ImageGalleryProject.Properties.Resources.exprt; this._exportImage.Location = new System.Drawing.Point(0, 0); this._exportImage.Margin = new Padding(0); this._exportImage.Name = "_exportImage"; this._exportImage.Size = new System.Drawing.Size(147, 29); this._exportImage.SizeMode = PictureBoxSizeMode.StretchImage; this._exportImage.TabIndex = 3; this._exportImage.TabStop = false; // events this._exportImage.Click += new System.EventHandler(this._exportImage_Click); this._exportImage.Paint += new PaintEventHandler(this._exportImage_Paint); // ------------------------------imageTileControl--------------------- this._imageTileControl.AllowChecking = true; this._imageTileControl.AllowDrop = true; this._imageTileControl.AllowRearranging = true; this._imageTileControl.Anchor = ((AnchorStyles)((((AnchorStyles.Top | AnchorStyles.Bottom) | AnchorStyles.Left) | AnchorStyles.Right))); this._imageTileControl.CellHeight = 78; this._imageTileControl.CellSpacing = 11; panelElement1.Alignment = System.Drawing.ContentAlignment.BottomLeft; panelElement1.Children.Add(imageElement1); panelElement1.Children.Add(textElement1); panelElement1.Margin = new Padding(10, 6, 10, 6); this._imageTileControl.DefaultTemplate.Elements.Add(panelElement1); this._imageTileControl.Groups.Add(this.group1); this._imageTileControl.Location = new System.Drawing.Point(0, -4); this._imageTileControl.Name = "_imageTileControl"; this._imageTileControl.Size = new System.Drawing.Size(764, 709); this._imageTileControl.SurfacePadding = new Padding(12, 4, 12, 4); this._imageTileControl.SwipeDistance = 20; this._imageTileControl.SwipeRearrangeDistance = 98; this._imageTileControl.TabIndex = 1; //events this._imageTileControl.TileChecked += new System.EventHandler <TileEventArgs>(this._imageTileControl_TileChecked); this._imageTileControl.TileUnchecked += new System.EventHandler <TileEventArgs>(this._imageTileControl_TileUnchecked); this._imageTileControl.Paint += new PaintEventHandler(this._imageTileControl_Paint); // group1 // this.group1.Name = "group1"; this.group1.Tiles.Add(this.tile1); this.group1.Tiles.Add(this.tile2); this.group1.Tiles.Add(this.tile3); // // tile1 // this.tile1.BackColor = System.Drawing.Color.LightCoral; this.tile1.Name = "tile1"; this.tile1.Text = "Tile 1"; // // tile2 // this.tile2.BackColor = System.Drawing.Color.Teal; this.tile2.Name = "tile2"; this.tile2.Text = "Tile 2"; // // tile3 // this.tile3.BackColor = System.Drawing.Color.SteelBlue; this.tile3.Name = "tile3"; this.tile3.Text = "Tile 3"; // ----------------imagePdfDocument-------------------- this.imagePdfDocument.DocumentInfo.Author = ""; this.imagePdfDocument.DocumentInfo.CreationDate = new System.DateTime(((long)(0))); this.imagePdfDocument.DocumentInfo.Creator = ""; this.imagePdfDocument.DocumentInfo.Keywords = ""; this.imagePdfDocument.DocumentInfo.Producer = "ComponentOne C1Pdf"; this.imagePdfDocument.DocumentInfo.Subject = ""; this.imagePdfDocument.DocumentInfo.Title = ""; this.imagePdfDocument.MaxHeaderBookmarkLevel = 0; this.imagePdfDocument.PdfVersion = "1.3"; this.imagePdfDocument.RefDC = null; this.imagePdfDocument.RotateAngle = 0F; this.imagePdfDocument.UseFastTextOut = true; this.imagePdfDocument.UseFontShaping = true; //----------- button---------- this.button.Location = new System.Drawing.Point(0, 0); this.button.Name = "button"; this.button.Size = new System.Drawing.Size(75, 23); this.button.TabIndex = 0; this.button.Text = "Search"; //------------------ ImageGallery------------------- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(764, 749); this.Controls.Add(this.splitContainer1); this.MaximumSize = new System.Drawing.Size(810, 810); this.MinimizeBox = false; this.Name = "ImageGallery"; this.ShowIcon = false; this.StartPosition = FormStartPosition.CenterParent; this.Text = "ImageGallery"; this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.Panel2.ResumeLayout(false); this.splitContainer1.Panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); this.splitContainer1.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false); this.panel1.ResumeLayout(false); this.panel4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); this.statusStrip1.ResumeLayout(false); this.statusStrip1.PerformLayout(); this.panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this._search)).EndInit(); this.panel3.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this._exportImage)).EndInit(); this.ResumeLayout(false); //---------------------ADD COMPONENT TO FORM-------------------- ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); this.panel1.SuspendLayout(); this.panel4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); this.statusStrip1.SuspendLayout(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this._search)).BeginInit(); this.panel3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this._exportImage)).BeginInit(); this.SuspendLayout(); }
private void initTC() { dtCat = mposC.mposDB.foocDB.selectAll(); dtRec = mposC.mposDB.foocDB.selectAll(); tC = new C1DockingTab(); tC.Dock = System.Windows.Forms.DockStyle.Fill; tC.Location = new System.Drawing.Point(0, 266); tC.Name = "c1DockingTab1"; tC.Size = new System.Drawing.Size(669, 200); tC.TabIndex = 0; tC.TabsSpacing = 5; tC.Font = fEdit1; pnOrder.Controls.Add(tC); tabPage = new C1DockingTabPage[dtCat.Rows.Count + 1]; TileFoods = new C1TileControl[dtCat.Rows.Count + 1]; gr1 = new Group[dtCat.Rows.Count + 1]; tabPage[0] = new C1DockingTabPage(); tabPage[0].Location = new System.Drawing.Point(1, 24); tabPage[0].Name = "c1DockingTabPage1"; tabPage[0].Size = new System.Drawing.Size(667, 175); tabPage[0].TabIndex = 0; tabPage[0].Text = "Recommend"; tabPage[0].Name = "Page0"; tC.Controls.Add(tabPage[0]); TileRec = new C1TileControl(); TileRec.Dock = DockStyle.Fill; if (mposC.iniC.TileFoodsOrientation.Equals("0")) { TileRec.Orientation = LayoutOrientation.Horizontal; } else { TileRec.Orientation = LayoutOrientation.Vertical; } grRec = new Group(); TileRec.Groups.Add(this.grRec); grRec = new Group(); panelElement1 = new C1.Win.C1Tile.PanelElement(); imageElement1 = new C1.Win.C1Tile.ImageElement(); tempFlickr = new C1.Win.C1Tile.Template(); imageElement8 = new C1.Win.C1Tile.ImageElement(); textElement1 = new C1.Win.C1Tile.TextElement(); pnFoodsName = new C1.Win.C1Tile.PanelElement(); pnFoodsPrice = new C1.Win.C1Tile.PanelElement(); txtFoodsName = new C1.Win.C1Tile.TextElement(); txtFoodsPrice = new C1.Win.C1Tile.TextElement(); imageElement8.ImageLayout = C1.Win.C1Tile.ForeImageLayout.ScaleOuter; txtFoodsName.BackColorSelector = C1.Win.C1Tile.BackColorSelector.Unbound; txtFoodsName.ForeColor = System.Drawing.Color.Black; txtFoodsName.ForeColorSelector = C1.Win.C1Tile.ForeColorSelector.Unbound; txtFoodsName.SingleLine = true; pnFoodsName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(160)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); pnFoodsName.Children.Add(txtFoodsName); pnFoodsName.Dock = System.Windows.Forms.DockStyle.Top; pnFoodsName.Padding = new System.Windows.Forms.Padding(4, 2, 4, 2); pnFoodsPrice.AlignmentOfContents = System.Drawing.ContentAlignment.MiddleRight; pnFoodsPrice.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); //panelElement11.Children.Add(panelElement12); pnFoodsPrice.Children.Add(txtFoodsPrice); pnFoodsPrice.Dock = System.Windows.Forms.DockStyle.Bottom; pnFoodsPrice.FixedHeight = 32; txtFoodsPrice.BackColorSelector = C1.Win.C1Tile.BackColorSelector.Unbound; txtFoodsPrice.Margin = new System.Windows.Forms.Padding(0, 0, 37, 0); txtFoodsPrice.TextSelector = C1.Win.C1Tile.TextSelector.Text1; textElement1.Font = fEdit; TileRec.Font = fEdit; panelElement1.Alignment = System.Drawing.ContentAlignment.BottomLeft; panelElement1.Children.Add(imageElement1); panelElement1.Children.Add(textElement1); panelElement1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6); TileRec.DefaultTemplate.Elements.Add(panelElement1); TileRec.Templates.Add(this.tempFlickr); //TileFoods = new C1TileControl(); TileRec.Name = "tilerec"; TileRec.Dock = DockStyle.Fill; //pnOrder.Controls.Add(TileFoods); this.tempFlickr.Elements.Add(imageElement8); this.tempFlickr.Elements.Add(pnFoodsName); this.tempFlickr.Elements.Add(pnFoodsPrice); this.tempFlickr.Name = "tempFlickrrec"; TileRec.ScrollOffset = 0; TileRec.SurfaceContentAlignment = System.Drawing.ContentAlignment.TopLeft; TileRec.Padding = new System.Windows.Forms.Padding(0); TileRec.GroupPadding = new System.Windows.Forms.Padding(20); tabPage[0].Controls.Add(TileRec); for (int i = 1; i < dtCat.Rows.Count + 1; i++) { //if (i == 0) //{ //} //else //{ //if (i == dtCat.Rows.Count) continue; tabPage[i] = new C1DockingTabPage(); gr1[i] = new Group(); tabPage[i].Location = new System.Drawing.Point(1, 24); //tabPage.Name = "c1DockingTabPage"+i; tabPage[i].Size = new System.Drawing.Size(667, 175); tabPage[i].TabIndex = 0; tabPage[i].Text = dtCat.Rows[i - 1]["foods_cat_name"].ToString(); tabPage[i].Name = "Page" + i; //tabPage[i].Font = fEditB; tC.Controls.Add(tabPage[i]); TileFoods[i] = new C1TileControl(); if (i == 1) { intptr = TileFoods[i].Handle; } if (mposC.iniC.TileFoodsOrientation.Equals("0")) { TileFoods[i].Orientation = LayoutOrientation.Horizontal; } else { TileFoods[i].Orientation = LayoutOrientation.Vertical; } TileFoods[i].Groups.Add(this.gr1[i]); panelElement1 = new C1.Win.C1Tile.PanelElement(); imageElement1 = new C1.Win.C1Tile.ImageElement(); tempFlickr = new C1.Win.C1Tile.Template(); imageElement8 = new C1.Win.C1Tile.ImageElement(); textElement1 = new C1.Win.C1Tile.TextElement(); pnFoodsName = new C1.Win.C1Tile.PanelElement(); pnFoodsPrice = new C1.Win.C1Tile.PanelElement(); txtFoodsName = new C1.Win.C1Tile.TextElement(); txtFoodsPrice = new C1.Win.C1Tile.TextElement(); imageElement8.ImageLayout = C1.Win.C1Tile.ForeImageLayout.ScaleOuter; txtFoodsName.BackColorSelector = C1.Win.C1Tile.BackColorSelector.Unbound; txtFoodsName.ForeColor = System.Drawing.Color.Black; txtFoodsName.ForeColorSelector = C1.Win.C1Tile.ForeColorSelector.Unbound; txtFoodsName.SingleLine = true; pnFoodsName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(160)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); pnFoodsName.Children.Add(txtFoodsName); pnFoodsName.Dock = System.Windows.Forms.DockStyle.Top; pnFoodsName.Padding = new System.Windows.Forms.Padding(4, 2, 4, 2); pnFoodsPrice.AlignmentOfContents = System.Drawing.ContentAlignment.MiddleRight; pnFoodsPrice.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); //panelElement11.Children.Add(panelElement12); pnFoodsPrice.Children.Add(txtFoodsPrice); pnFoodsPrice.Dock = System.Windows.Forms.DockStyle.Bottom; pnFoodsPrice.FixedHeight = 32; txtFoodsPrice.BackColorSelector = C1.Win.C1Tile.BackColorSelector.Unbound; txtFoodsPrice.Margin = new System.Windows.Forms.Padding(0, 0, 37, 0); txtFoodsPrice.TextSelector = C1.Win.C1Tile.TextSelector.Text1; textElement1.Font = fEdit; TileFoods[i].Font = fEdit; panelElement1.Alignment = System.Drawing.ContentAlignment.BottomLeft; panelElement1.Children.Add(imageElement1); panelElement1.Children.Add(textElement1); panelElement1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6); TileFoods[i].DefaultTemplate.Elements.Add(panelElement1); TileFoods[i].Templates.Add(this.tempFlickr); //TileFoods = new C1TileControl(); TileFoods[i].Name = "tile" + i; TileFoods[i].Dock = DockStyle.Fill; //pnOrder.Controls.Add(TileFoods); this.tempFlickr.Elements.Add(imageElement8); this.tempFlickr.Elements.Add(pnFoodsName); this.tempFlickr.Elements.Add(pnFoodsPrice); this.tempFlickr.Name = "tempFlickr"; TileFoods[i].ScrollOffset = 0; TileFoods[i].SurfaceContentAlignment = System.Drawing.ContentAlignment.TopLeft; TileFoods[i].Padding = new System.Windows.Forms.Padding(0); TileFoods[i].GroupPadding = new System.Windows.Forms.Padding(20); tabPage[i].Controls.Add(TileFoods[i]); //} } }