private void bt_Click(object sender, EventArgs e) { LabelX bt = sender as LabelX; switch (bt.Name) { case "btn_Home": //加载备注 lb_Remark.Text = INIHelper.Read(tb_code.Text, "REMARK", "", ParaService._iniSoftwarePath); MainMenuPageChange(bt, Home); break; case "btn_DataAna": MainMenuPageChange(bt, DataAna); break; case "btn_Manual": MainMenuPageChange(bt, Manual); break; case "btn_MStatus": MainMenuPageChange(bt, MachinStatus); break; case "btn_ParaSet": MainMenuPageChange(bt, ParaSet); ParaService.Install().GetInfo(this.tabCTLPara); break; case "btn_Alarm": MainMenuPageChange(bt, Alarm); break; } }
void initPager() { this.pager1.PageChanged += new WHC.Pager.WinControl.PageChangedEventHandler(pager1_PageChanged); ButtonX btnExport = (ButtonX)pager1.Controls[0]; btnExport.Visible = false; ButtonX btnCurrent = (ButtonX)pager1.Controls[1]; btnCurrent.Visible = false; ButtonX btn2 = (ButtonX)pager1.Controls[2]; ButtonX btn3 = (ButtonX)pager1.Controls[3]; ButtonX btn4 = (ButtonX)pager1.Controls[4]; ButtonX btn5 = (ButtonX)pager1.Controls[5]; PanelEx p = (PanelEx)pager1.Controls[7]; LabelX lab = (LabelX)p.Controls[0]; btn2.Height = 20; btn3.Height = 20; btn4.Height = 20; btn5.Height = 20; p.Height = 40; lab.Height = 30; pager1.PageSize = 10; pager1_PageChanged(null, null); }
/// <summary> /// 创建设备状态控件 /// </summary> /// <param name="list"></param> private void CreateEquipmentStatus(List <CmcsCMEquipment> list) { flpanEquipments.SuspendLayout(); foreach (CmcsCMEquipment cMEquipment in list) { UCtrlSignalLight uCtrlSignalLight = new UCtrlSignalLight() { Anchor = AnchorStyles.Left, Width = 16, Height = 16, Tag = cMEquipment.EquipmentCode, Padding = new System.Windows.Forms.Padding(10, 0, 0, 0) }; SetSystemStatusToolTip(uCtrlSignalLight); flpanEquipments.Controls.Add(uCtrlSignalLight); LabelX lblMachineName = new LabelX() { Text = cMEquipment.EquipmentName, Tag = cMEquipment.EquipmentCode, AutoSize = true, Anchor = AnchorStyles.Left, Font = new Font("Segoe UI", 10f, FontStyle.Regular) }; flpanEquipments.Controls.Add(lblMachineName); } flpanEquipments.ResumeLayout(); }
private bool KiemTra(LabelX maktx, DateTimePicker ngay, ComboBoxEx hoatdong, TextBoxX ghichu) { if (maktx.Text == "") { MessageBox.Show("Mã KTX không hợp lệ", "ky Luat"); return(false); } if (ngay.Value > DateTime.Now) { MessageBox.Show("Ngày không hợp lệ", "ky Luat"); ngay.Value = DateTime.Now; ngay.Focus(); return(false); } if (hoatdong.SelectedIndex < 0) { MessageBox.Show("Chưa chọn Hoạt động", "ky Luat"); hoatdong.Focus(); return(false); } if (ghichu.Text == "") { MessageBox.Show("Chưa nhập Lý do kỹ luật", "ky Luat"); ghichu.Focus(); return(false); } return(true); }
/// <summary> /// 创建皮带采样机 /// </summary> private void CreateEquStatus() { flpanEquState.SuspendLayout(); foreach (string cMEquipmentCode in sampleMachineCodes) { LabelX lblMachineName = new LabelX() { Text = cMEquipmentCode, AutoSize = true, Anchor = AnchorStyles.Left, Font = new Font("Segoe UI", 14.25f, FontStyle.Bold) }; flpanEquState.Controls.Add(lblMachineName); LabelX uCtrlSignalLight = new LabelX() { Tag = cMEquipmentCode, AutoSize = true, Anchor = AnchorStyles.Left, Font = new Font("Segoe UI", 14.25f, FontStyle.Bold), Padding = new System.Windows.Forms.Padding(10, 0, 0, 0) }; SetSystemStatusToolTip(uCtrlSignalLight); flpanEquState.Controls.Add(uCtrlSignalLight); } flpanEquState.ResumeLayout(); if (this.flpanEquState.Controls.Count == 0) { MessageBoxEx.Show("皮带采样机或制样机参数未设置!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
public void Dispose() { LineV.Detach(); LineH.Detach(); LabelX.Detach(); LabelY.Detach(); }
void label_MouseEnter(object sender, EventArgs e) { LabelX label = (LabelX)sender; label.Font = new Font(label.Font, FontStyle.Underline); Cursor = Cursors.Hand; }
void label_MouseLeave(object sender, EventArgs e) { LabelX label = (LabelX)sender; label.Font = new Font(label.Font, FontStyle.Regular); Cursor = Cursors.Default; }
/////////////////////// http://www.csharp-examples.net/inputbox/ ////////////////////// public static DialogResult InputBox(string title, string promptText, ref string value) { Office2007Form form = new Office2007Form(); LabelX label = new LabelX(); DevComponents.DotNetBar.Controls.TextBoxX textBox = new DevComponents.DotNetBar.Controls.TextBoxX(); ButtonX buttonOk = new ButtonX(); ButtonX buttonCancel = new ButtonX(); form.Text = title; label.Text = promptText; textBox.Text = value; textBox.Border.Class = "TextBoxBorder"; textBox.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; textBox.Location = new System.Drawing.Point(240, 151); textBox.Name = "textbox"; textBox.ReadOnly = false; textBox.Size = new System.Drawing.Size(275, 20); textBox.TabIndex = 1; buttonOk.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; buttonOk.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; buttonCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; buttonCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; buttonOk.Text = "OK"; buttonCancel.Text = "Cancel"; buttonOk.DialogResult = DialogResult.OK; buttonCancel.DialogResult = DialogResult.Cancel; label.SetBounds(9, 20, 372, 13); textBox.SetBounds(12, 36, 372, 20); buttonOk.SetBounds(228, 72, 75, 23); buttonCancel.SetBounds(309, 72, 75, 23); label.AutoSize = true; textBox.Anchor = textBox.Anchor | AnchorStyles.Right; buttonOk.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; form.ClientSize = new Size(396, 107); form.Controls.AddRange(new Control[] { label, textBox, buttonOk, buttonCancel }); form.ClientSize = new Size(Math.Max(300, label.Right + 10), form.ClientSize.Height); form.FormBorderStyle = FormBorderStyle.FixedDialog; form.StartPosition = FormStartPosition.CenterScreen; form.MinimizeBox = false; form.MaximizeBox = false; form.AcceptButton = buttonOk; form.CancelButton = buttonCancel; form.EnableGlass = false; DialogResult dialogResult = form.ShowDialog(); value = textBox.Text; return(dialogResult); }
private void InitializeComponent() { this.connectedFlag = new PictureBox(); this.lblinfoConnection = new LabelX(); ((ISupportInitialize)this.connectedFlag).BeginInit(); base.SuspendLayout(); this.connectedFlag.BackColor = Color.Transparent; this.connectedFlag.Location = new Point(0, 0); this.connectedFlag.Margin = new Padding(0); this.connectedFlag.Name = "connectedFlag"; this.connectedFlag.Size = new Size(23, 18); this.connectedFlag.SizeMode = PictureBoxSizeMode.StretchImage; this.connectedFlag.TabIndex = 1; this.connectedFlag.TabStop = false; this.lblinfoConnection.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right); this.lblinfoConnection.get_BackgroundStyle().set_CornerType(1); this.lblinfoConnection.Location = new Point(29, 0); this.lblinfoConnection.Name = "lblinfoConnection"; this.lblinfoConnection.Size = new Size(147, 19); this.lblinfoConnection.TabIndex = 2; base.AutoScaleDimensions = new SizeF(96f, 96f); base.AutoScaleMode = AutoScaleMode.Dpi; this.BackColor = Color.FromArgb(240, 240, 240); base.Controls.Add(this.lblinfoConnection); base.Controls.Add(this.connectedFlag); this.ForeColor = Color.FromArgb(38, 47, 57); base.Name = "InfoFlagUserControl"; base.Size = new Size(188, 29); ((ISupportInitialize)this.connectedFlag).EndInit(); base.ResumeLayout(false); }
private void InitializeComponent() { this.btnClose = new ButtonX(); this.labelX1 = new LabelX(); this.labelX2 = new LabelX(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); ((System.ComponentModel.ISupportInitialize) this.pictureBox1).BeginInit(); base.SuspendLayout(); this.btnClose.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; this.btnClose.ColorTable = eButtonColor.OrangeWithBackground; this.btnClose.Location = new System.Drawing.Point(268, 361); this.btnClose.Name = "btnClose"; this.btnClose.Size = new System.Drawing.Size(75, 26); this.btnClose.Style = eDotNetBarStyle.StyleManagerControlled; this.btnClose.TabIndex = 0; this.btnClose.Text = "谢谢支持"; this.btnClose.Click += new System.EventHandler(this.btnClose_Click); this.labelX1.BackgroundStyle.CornerType = eCornerType.Square; this.labelX1.Font = new System.Drawing.Font("SimSun", 15.75f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134); this.labelX1.Location = new System.Drawing.Point(26, 13); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(573, 49); this.labelX1.TabIndex = 1; this.labelX1.Text = "支付宝手机钱包扫描以下二维码捐助"; this.labelX2.BackgroundStyle.CornerType = eCornerType.Square; this.labelX2.Font = new System.Drawing.Font("SimSun", 14.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134); this.labelX2.ForeColor = System.Drawing.SystemColors.Desktop; this.labelX2.Location = new System.Drawing.Point(44, 322); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(203, 39); this.labelX2.Style = eDotNetBarStyle.StyleManagerControlled; this.labelX2.TabIndex = 3; this.labelX2.Text = "<font color=\"DarkOliveGreen\">作者QQ:364250783</font>"; this.pictureBox1.Image = HzHospitalRegister.Properties.Resources.alipay; this.pictureBox1.Location = new System.Drawing.Point(198, 64); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(250, 250); this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pictureBox1.TabIndex = 2; this.pictureBox1.TabStop = false; base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.ClientSize = new System.Drawing.Size(625, 396); base.Controls.Add(this.labelX2); base.Controls.Add(this.pictureBox1); base.Controls.Add(this.labelX1); base.Controls.Add(this.btnClose); this.DoubleBuffered = true; this.Font = new System.Drawing.Font("Segoe UI", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0); base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; base.MaximizeBox = false; base.MinimizeBox = false; base.Name = "DonateForm"; base.ShowIcon = false; base.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "捐助软件"; ((System.ComponentModel.ISupportInitialize) this.pictureBox1).EndInit(); base.ResumeLayout(false); }
private void lblButton_MouseLeave(object sender, EventArgs e) { if (_IsEnable) { LabelX lblSender = ((LabelX)sender); lblSender.BackgroundImage = null; } }
public void UpdateLabel(LabelX label, string val) { InvokeLabel d = new InvokeLabel(UpdateCurFile); label.Invoke(d, new object[2] { val, label }); }
private void lblButton_MouseUp(object sender, MouseEventArgs e) { if (IsEnable) { LabelX lblSender = ((LabelX)sender); lblSender.PaddingLeft = ItemPaddingLeft; lblSender.PaddingTop = ItemPaddingTop; } }
private void lblButton_MouseHover(object sender, EventArgs e) { if (ItemHoverImage != null && _IsEnable) { LabelX lblSender = ((LabelX)sender); lblSender.BackgroundImage = ItemHoverImage; lblSender.BackgroundImageLayout = ItemHoverImageLayout; } }
public RoleUnitDecorator(LabelX lbl, ComboBoxEx cboRoles, ComboBoxEx cboUnits, bool needUnAssignedItem) { this.lbl = lbl; this.cboRoles = cboRoles; this.cboUnits = cboUnits; this.needUnAssignedItem = needUnAssignedItem; initialize(); }
static private void BuildMessageBox(string title) { newMessageBox = new MsgBox(); newMessageBox.Text = title; newMessageBox.Size = new System.Drawing.Size(308, 146); newMessageBox.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; //newMessageBox.ShowIcon = false; //newMessageBox.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; //newMessageBox.Paint += new PaintEventHandler(newMessageBox_Paint); //newMessageBox.BackColor = System.Drawing.Color.White; TableLayoutPanel tlp = new TableLayoutPanel(); tlp.RowCount = 3; tlp.ColumnCount = 0; tlp.Dock = System.Windows.Forms.DockStyle.Fill; tlp.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15)); tlp.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); tlp.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40)); frmTitle = new LabelX(); frmTitle.Dock = System.Windows.Forms.DockStyle.Fill; frmMessage = new LabelX(); frmMessage.Dock = System.Windows.Forms.DockStyle.Fill; frmMessage.Text = "hiii"; frmMessage.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); frmMessage.PaddingBottom = 16; largeIcon = new IntPtr[250]; smallIcon = new IntPtr[250]; pIcon = new PictureBox(); ExtractIconEx("shell32.dll", 0, largeIcon, smallIcon, 250); flpButtons = new FlowLayoutPanel(); flpButtons.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; flpButtons.Dock = System.Windows.Forms.DockStyle.Fill; // flpButtons.Anchor = AnchorStyles.Right; TableLayoutPanel tlpMessagePanel = new TableLayoutPanel(); tlpMessagePanel.Dock = System.Windows.Forms.DockStyle.Fill; tlpMessagePanel.ColumnCount = 2; tlpMessagePanel.RowCount = 0; tlpMessagePanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 50)); tlpMessagePanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); tlpMessagePanel.Controls.Add(pIcon); tlpMessagePanel.Controls.Add(frmMessage); tlp.Controls.Add(frmTitle); tlp.Controls.Add(tlpMessagePanel); tlp.Controls.Add(flpButtons); newMessageBox.Controls.Add(tlp); }
private void InitializeComponent() { this.lbMessage = new LabelX(); this.btnOK = new ButtonX(); this.lkMail = new System.Windows.Forms.LinkLabel(); base.SuspendLayout(); this.lbMessage.BackColor = System.Drawing.Color.Transparent; this.lbMessage.BackgroundStyle.CornerType = eCornerType.Square; this.lbMessage.Font = new System.Drawing.Font("SimSun", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134); this.lbMessage.ForeColor = System.Drawing.Color.Black; this.lbMessage.Location = new System.Drawing.Point(12, 22); this.lbMessage.Name = "lbMessage"; this.lbMessage.Size = new System.Drawing.Size(371, 133); this.lbMessage.TabIndex = 0; this.lbMessage.Text = "<div>杭州预约挂号辅助软件</div><div> </div><div>软件版本: V1.1.0</div><div></div><div>版权所有:Copyright© 2015 日行一米</div><div></div><div></div><div> </div><div>本软件是免费软件,使用过程中如果什么问题,请发送</div><div>内容到以下邮箱</div>"; this.lbMessage.TextLineAlignment = System.Drawing.StringAlignment.Near; this.btnOK.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; this.btnOK.ColorTable = eButtonColor.OrangeWithBackground; this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.btnOK.Location = new System.Drawing.Point(162, 186); this.btnOK.Name = "btnOK"; this.btnOK.Size = new System.Drawing.Size(75, 23); this.btnOK.Style = eDotNetBarStyle.StyleManagerControlled; this.btnOK.TabIndex = 1; this.btnOK.Text = "确定"; this.lkMail.AccessibleRole = System.Windows.Forms.AccessibleRole.Document; this.lkMail.AutoSize = true; this.lkMail.BackColor = System.Drawing.Color.FromArgb(254, 254, 254); this.lkMail.Font = new System.Drawing.Font("SimSun", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134); this.lkMail.ForeColor = System.Drawing.Color.Black; this.lkMail.LinkColor = System.Drawing.Color.IndianRed; this.lkMail.Location = new System.Drawing.Point(98, 157); this.lkMail.Name = "lkMail"; this.lkMail.Size = new System.Drawing.Size(200, 16); this.lkMail.TabIndex = 2; this.lkMail.TabStop = true; this.lkMail.Text = "*****@*****.**"; this.lkMail.Click += new System.EventHandler(this.lkMail_Click); base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 12f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.ClientSize = new System.Drawing.Size(395, 217); base.Controls.Add(this.lkMail); base.Controls.Add(this.btnOK); base.Controls.Add(this.lbMessage); this.DoubleBuffered = true; base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; base.MaximizeBox = false; base.MinimizeBox = false; base.Name = "AboutForm"; base.ShowIcon = false; base.ShowInTaskbar = false; base.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "关于"; base.ResumeLayout(false); base.PerformLayout(); }
private void ParaSetPageChange(LabelX labelX, TabPage PageName) { //参数设置菜单内容背景置灰 bt_OEEPara.BackColor = Color.Gainsboro; bt_Serial.BackColor = Color.Gainsboro; //参数设置菜单选中按钮背景置绿 labelX.BackColor = Color.Turquoise; //显示对应按钮的用户界面(使用TabControl 的page实现) tabCTLPara.SelectedTab = PageName; }
public void ClearPicture() { LabelX.Hide(); LabelY.Hide(); PointXY.Hide(); m_Grapic.Clear(Color.White); PicWafer.Refresh(); }
/// <summary> /// Constructor /// </summary> public DataGridViewLabelXColumn() { CellTemplate = new DataGridViewLabelXCell(); _LabelX = new LabelX(); _LabelX.CreateControl(); _LabelX.Visible = false; HookEvents(true); }
private void lblButton_MouseDown(object sender, MouseEventArgs e) { if (_IsEnable) { LabelX lblSender = ((LabelX)sender); lblSender.PaddingLeft = ItemPaddingLeft + 1; lblSender.PaddingTop = ItemPaddingTop + 1; } //ButtonClick(e); }
void label_MouseClick(object sender, MouseEventArgs e) { LabelX label = (LabelX)sender; int columnIndex = int.Parse((label).Tag.ToString()); Point pt = e.Location; pt.Offset(label.Location); MouseEventArgs a = new MouseEventArgs(e.Button, e.Clicks, pt.X, pt.Y, e.Delta); Columns[columnIndex].RaiseClick(a); }
public NewDataField(LabelX newDataLabel, TextBoxX newDataText) { _code_text.Add("401", " 新學號:"); _code_text.Add("402", " 新姓名:"); _code_text.Add("403", " 新性別:"); _code_text.Add("404", " 新籍貫:"); _code_text.Add("405", " 新生日:"); _code_text.Add("407", "新身分證號:"); _newDataLabel = newDataLabel; _newDataText = newDataText; }
private void AddLabel(LayoutGroup group, string text, bool bold) { var control = new LabelX() { Text = text, FontBold = bold, Size = new Size(LayoutControl1.Width - 6, 16) }; control.Size = TextRenderer.MeasureText(text, new Font(control.Font, FontStyle.Bold), control.Size); AddControlToGroup(null, group, control); }
public void UpdateTextLabel(LabelX labelX, string text) { if (labelX.InvokeRequired) { labelX.BeginInvoke( new MethodInvoker( delegate { UpdateTextLabel(labelX, text); })); } else { labelX.Text = text; } }
private void SetColumns(IEnumerable <IColumn> columns, LabelX label) { var sb = new StringBuilder(); sb.AppendLine("Columns in Key:"); foreach (var column in columns) { sb.AppendLine(column.Name); } label.Text = sb.ToString(); }
public void SuaHoatDong(LabelX maktx, DateTimePicker ngay, ComboBoxEx hoatdong, TextBoxX ghichu, string maktxcu, int mahdcu) { if (KiemTra(maktx, ngay, hoatdong, ghichu)) { HoatDongSVInfo info = new HoatDongSVInfo(); HoatDongSinhVienData hddata = new HoatDongSinhVienData(); info.SinhVien.MaKTX = maktx.Text; info.Ngay = ngay.Value; info.GhiChu = ghichu.Text; info.HoatDong.MaHoatDong = Convert.ToInt32(hoatdong.SelectedValue); hddata.SuaHoatDong(info, maktxcu, mahdcu); } }
private void buttonX1_Click(object sender, EventArgs e) { PageSliderPage page = new PageSliderPage(); pageSlider1.Controls.Add(page); LabelX label = new LabelX(); label.Height = 32; label.Text = "Another page slider page..."; label.Dock = DockStyle.Top; page.Controls.Add(label); // Select it pageSlider1.SelectedPage = page; }
private void bt_OEEPara_Click(object sender, EventArgs e) { LabelX lab = sender as LabelX; switch (lab.Name) { case "bt_OEEPara": ParaSetPageChange(lab, Para); break; case "bt_Serial": ParaSetPageChange(lab, SerialPortPara); break; } }
private void MainMenuPageChange(LabelX labelX, TabPage PageName) { //主界面按钮背景置灰 btn_Home.BackColor = Color.Gainsboro; btn_DataAna.BackColor = Color.Gainsboro; btn_Manual.BackColor = Color.Gainsboro; btn_MStatus.BackColor = Color.Gainsboro; btn_ParaSet.BackColor = Color.Gainsboro; btn_Alarm.BackColor = Color.Gainsboro; btn_Login.BackColor = Color.Gainsboro; //主界面选中按钮背景置绿 labelX.BackColor = Color.DarkSeaGreen; //显示对应按钮的用户界面(使用TabControl 的page实现) tabCtlMainMenu.SelectedTab = PageName; }