/// <summary> /// 磁贴控件 /// </summary> /// <param name="item"></param> /// <param name="tileMouseClick"></param> public Tile(Info.TileItem item, System.Windows.Forms.MouseEventHandler tileMouseClick) { Size = new System.Drawing.Size(285, (285 - 8)/2); BackColor = item.BColor; BackgroundImage = item.PluginBg; BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; var logo = new Fase.HPrevImg( this, new System.Drawing.Size(60, 60), new System.Drawing.Point((Width - 60)/2, (Height - 70)/2), item.PluginLogo, System.Windows.Forms.PictureBoxSizeMode.StretchImage, BaseAnchor.AnchorFill ); var title = new Fase.HLabel( this, item.Title, new System.Drawing.Font(BasePublic.KcpFrmFont, 12F), new System.Drawing.Size(Width, 27), new System.Drawing.Point(0, Height - 27), item.FColor, item.BColor, BaseAlign.AlignMiddleLeft, BaseAnchor.AnchorBottomFill ); logo.MouseClick += tileMouseClick; title.MouseClick += tileMouseClick; Tag = item; }
public RadioSigleBox( System.Windows.Forms.Control parentpal, string rdbtext, bool isChecked, bool single, string group, float fla, int flo, System.Drawing.Size size, System.Drawing.Point point, System.Drawing.Font font, System.Drawing.Color forecolor, System.Drawing.Color backcolor, System.Windows.Forms.AnchorStyles anchorstyle, System.Windows.Forms.MouseEventHandler touchRadio ) { Group = group; Single = single; Size = size; Location = point; Tag = Group; Value = rdbtext; Checked = isChecked; Radiotap = new Fase.HLabel ( this, isChecked ? @"þ" : @"¨", new System.Drawing.Font(@"Wingdings", fla), new System.Drawing.Size(size.Height - 6 - flo, size.Height), new System.Drawing.Point(0, 0), forecolor, backcolor, BaseAlign.AlignMiddleCenter, anchorstyle ); var radiodesc = new Fase.HLabel ( this, rdbtext, font, new System.Drawing.Size(size.Width - Radiotap.Width, size.Height), new System.Drawing.Point(Radiotap.Location.X + Radiotap.Width, -1), forecolor, backcolor, System.Drawing.ContentAlignment.MiddleLeft, anchorstyle ); Radiotap.MouseDown += touchRadio; radiodesc.MouseDown += touchRadio; CheckedChanged += RadioSigleBox_CheckedChanged; parentpal.Controls.Add(this); }