• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Label类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Label的典型用法代码示例。如果您正苦于以下问题:C# Label类的具体用法?C# Label怎么用?C# Label使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Label类属于命名空间,在下文中一共展示了Label类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: PowerGrid

 /// <summary>
 /// Initializes a new instance of the <see cref="PowerGrid"/> class.
 /// </summary>
 public PowerGrid()
 {
     lblFooter = new Label();
     PagerStyle.Mode = PagerMode.NumericPages;
     PagerStyle.BackColor = Color.Gainsboro;
     PagerStyle.PageButtonCount = 10;
     PagerStyle.HorizontalAlign = HorizontalAlign.Center;
     FooterStyle.BackColor = Color.Gainsboro;
     FooterStyle.HorizontalAlign = HorizontalAlign.Center;
     ShowFooter = true;
     AutoGenerateColumns = false;
     AllowPaging = true;
     PageSize = 7;
     CellSpacing = 2;
     CellPadding = 2;
     GridLines = GridLines.None;
     BorderColor = Color.Black;
     BorderStyle = BorderStyle.Solid;
     BorderWidth = 1;
     ForeColor = Color.Black;
     Font.Size = FontUnit.XXSmall;
     Font.Name = "Verdana";
     ItemStyle.BackColor = Color.Beige;
     AlternatingItemStyle.BackColor = Color.PaleGoldenrod;
     HeaderStyle.Font.Bold = true;
     HeaderStyle.BackColor = Color.Brown;
     HeaderStyle.ForeColor = Color.White;
     HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
     AllowSorting = true;
     Attributes["SortedAscending"] = "yes";
     ItemCreated += new DataGridItemEventHandler(OnItemCreated);
     SortCommand += new DataGridSortCommandEventHandler(OnSortCommand);
     PageIndexChanged += new DataGridPageChangedEventHandler(OnPageIndexChanged);
 }
开发者ID:divyang4481,项目名称:appleseedapp,代码行数:37,代码来源:PowerGrid.cs


示例2: Button1_Click

    protected void Button1_Click(object sender, EventArgs e)
    {
        Label l2 = new Label();
            Label1.Text = "";
            l2.Text = DateTime.Now.ToString();
             SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
             conn.Open();
             if (TextBox1.Text == null || TextBox1.Text == "") { Response.Write("Please share your thoughts"); }
             else
             {
            string insert = "INSERT INTO [uptext] (Dateandtime,blogdata) VALUES (@date,@blog)";
             SqlCommand comm = new SqlCommand(insert, conn);
             comm.Parameters.AddWithValue("@date", l2.Text);
             comm.Parameters.AddWithValue("@blog", TextBox1.Text);
             comm.ExecuteNonQuery();
             }
             string output = "SELECT * FROM [uptext] ";
             SqlCommand comm2 = new SqlCommand(output, conn);
             SqlDataReader datareader = comm2.ExecuteReader();
             while(datareader.Read())
             {
                 Label1.Text += datareader["Dateandtime"].ToString() + "<br />" + "<br />";
                 Label1.Text += datareader["blogdata"].ToString() + "<br /> " + "<br />";
             }

             datareader.Close();
             conn.Close();
    }
开发者ID:jeevan19973,项目名称:ictd4-unnayan,代码行数:28,代码来源:uploadtext.aspx.cs


示例3: gvStates_DataBound

    protected void gvStates_DataBound(object sender, EventArgs e)
    {
        for (int i = 0; i < gvStates.Rows.Count; i++)
        {
            // Copy id from 5th column to invisible label in last column
            Label id = new Label();
            id.Visible = false;
            id.Text = gvStates.Rows[i].Cells[4].Text;
            gvStates.Rows[i].Cells[4].Controls.Add(id);

            GridViewRow row = gvStates.Rows[i];

            // Set unique text box ID
            TextBox txtValue = ControlsHelper.GetChildControl(row, typeof(TextBox), "txtTaxValue") as TextBox;
            txtValue.ID = "txtTaxValue" + id.Text;

            // Set unique check box ID
            CheckBox chkIsFlat = ControlsHelper.GetChildControl(row, typeof(CheckBox), "chkIsFlatValue") as CheckBox;
            chkIsFlat.ID = "chkIsFlatValue" + id.Text;

            Label lblCurrency = ControlsHelper.GetChildControl(row, typeof(Label), "lblCurrency") as Label;
            if (lblCurrency != null)
            {
                chkIsFlat.InputAttributes["onclick"] = "switchCurrency(this.checked, '" + lblCurrency.ClientID + "')";
                chkIsFlat.InputAttributes["onchange"] = "switchCurrency(this.checked, '" + lblCurrency.ClientID + "')";
            }
        }
    }
开发者ID:KuduApps,项目名称:Kentico,代码行数:28,代码来源:TaxClass_State.aspx.cs


示例4: CreateControls

        private void CreateControls(Node node)
        {
            foreach(Node idx in node)
            {
                string caption = idx["Caption"].Get<string>();
                string value = idx["Value"].Get<string>();
                string type = idx["Type"].Get<string>();
                int position = idx["Position"].Get<int>();

                Panel pnl = new Panel();
                pnl.CssClass = "bordered-panel";

                Label cpt = new Label();
                cpt.CssClass = "label-caption";
                cpt.Text = caption;
                pnl.Controls.Add(cpt);

                Label val = new Label();
                val.CssClass = "label-value";
                val.Text = value;
                pnl.Controls.Add(val);

                // Rooting...
                wrpPnl.Controls.Add(pnl);
            }
        }
开发者ID:greaterwinner,项目名称:ra-brix,代码行数:26,代码来源:ViewWhiteboardDetails.ascx.cs


示例5: AddEvent

 private void AddEvent(object sender, Label label)
 {
     if (OnAdd != null)
     {
         OnAdd(sender, new LabelEventArg(label));
     }
 }
开发者ID:AlexSneg,项目名称:VIRD-1.0,代码行数:7,代码来源:LabelStorageAdapter.cs


示例6: Calendar1_DayRender

    protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
    {
        if (e.Day.IsWeekend)
        {
            //IsSelectable布尔属性控制日期是否可被选择
            e.Day.IsSelectable = false;
        }
        if (e.Day.IsOtherMonth)
        {
            //e.Cell属性代表一个日期框
            e.Cell.Text = "-";
        }

        //检查日期是否为3月5号。
        if (e.Day.Date.Day == 5 && e.Day.Date.Month == 3)
        {
            e.Cell.BackColor = System.Drawing.Color.Yellow;
            //向该列添加静态文本
            Label lbl = new Label();
            lbl.Text = "<br />学习雷锋好榜样!";
            e.Cell.Controls.Add(lbl);
        }
        Calendar1.SelectedDate = DateTime.Now.AddDays(2).Date;
        //下面的代码将使用SelectedDates选中2008年3月的每个星期天
        SelectedDatesCollection theDates = Calendar1.SelectedDates;
        theDates.Clear();
        theDates.Add(new DateTime(2008, 3, 2));
        theDates.Add(new DateTime(2008, 3, 9));
        theDates.Add(new DateTime(2008, 3, 16));
        theDates.Add(new DateTime(2008, 3, 23));
    }
开发者ID:AJLoveChina,项目名称:workAtQmm,代码行数:31,代码来源:Default.aspx.cs


示例7: UpdateLabel

 private void UpdateLabel(Label lbl)
 {
     //为了模拟大数据量的处理延迟,这里调用Sleep方法将时间延迟三秒
     System.Threading.Thread.Sleep(10000);
     //更新服务器端时间
     lbl.Text = DateTime.Now.ToString();
 }
开发者ID:AJLoveChina,项目名称:workAtQmm,代码行数:7,代码来源:UpdateProgressDemo.aspx.cs


示例8: report_count_rows

 public void report_count_rows(Label ip_lbl, int ip_i_row_cout, string ip_str_default_message)
 {
     string ip_str_sum_row = "";
     ip_str_sum_row += ip_str_default_message + " (Có ";
     ip_str_sum_row += ip_i_row_cout + " bản ghi)";
     ip_lbl.Text = ip_str_sum_row;
 }
开发者ID:tudm,项目名称:QuanLyHanhChinh,代码行数:7,代码来源:F811_QuanLyChucNang.aspx.cs


示例9: FunctionEntry

 public FunctionEntry(Level level, Label label, Types.RECORD formals, Types.Type result)
 {
     Level = level;
     Label = label;
     Formals = formals;
     Result = result;
 }
开发者ID:Nxun,项目名称:Naive-Tiger,代码行数:7,代码来源:Semantics.Entry.cs


示例10: TestNavigationImplPop

		public async Task TestNavigationImplPop ()
		{
			NavigationPage nav = new NavigationPage ();
			
			Label child = new Label ();
			Page childRoot = new ContentPage {Content = child};

			Label child2 = new Label ();
			Page childRoot2 = new ContentPage {Content = child2};
			
			await nav.Navigation.PushAsync (childRoot);
			await nav.Navigation.PushAsync (childRoot2);

			bool fired = false;
			nav.Popped += (sender, e) => fired = true;
			var popped = await nav.Navigation.PopAsync ();

			Assert.True (fired);
			Assert.AreSame (childRoot, nav.CurrentPage);
			Assert.AreEqual (childRoot2, popped);

			await nav.PopAsync ();
			var last = await nav.Navigation.PopAsync ();

			Assert.IsNull (last);
		}
开发者ID:Costo,项目名称:Xamarin.Forms,代码行数:26,代码来源:NavigationUnitTest.cs


示例11: dlBind

    /// <summary>
    /// DataList控件绑定及分页
    /// </summary>
    /// <param name="intCount">每页显示的记录条数</param>
    /// <param name="ds">DataSet数据集</param>
    /// <param name="labPage">当前页码</param>
    /// <param name="labTPage">总页码</param>
    /// <param name="lbtnUp">上一页</param>
    /// <param name="lbtnNext">下一页</param>
    /// <param name="lbtnBack">最后一页</param>
    /// <param name="lbtnOne">第一页</param>
    /// <param name="dl">DataList控件对象</param>
    public static void dlBind(int intCount, DataSet ds, Label labPage, Label labTPage, LinkButton lbtnUp, LinkButton lbtnNext, LinkButton lbtnBack, LinkButton lbtnOne, Repeater dl)
    {
        int curpage = Convert.ToInt32(labPage.Text);
        PagedDataSource ps = new PagedDataSource();
        ps.DataSource = ds.Tables[0].DefaultView;
        ps.AllowPaging = true; //是否可以分页
        ps.PageSize = intCount; //显示的数量
        ps.CurrentPageIndex = curpage - 1; //取得当前页的页码

        lbtnNext.Visible = true;
        lbtnOne.Visible = true;
        lbtnBack.Visible = true;
        lbtnUp.Visible = true;

        lbtnNext.Enabled = true;
        lbtnBack.Enabled = true;
        lbtnOne.Enabled = true;
        if (curpage == 1)
        {
            lbtnOne.Visible = false;//不显示第一页按钮
            lbtnUp.Visible = false;//不显示上一页按钮
        }
        if (curpage == ps.PageCount)
        {
            lbtnNext.Visible = false;//不显示下一页
            lbtnBack.Visible = false;//不显示最后一页
        }
        labTPage.Text = Convert.ToString(ps.PageCount);
        dl.DataSource = ps;
           // dl.DataKeyField = "ID";
        dl.DataBind();
    }
开发者ID:gqb101112,项目名称:ZCoder,代码行数:44,代码来源:DataOperate.cs


示例12: Init

		protected override void Init ()
		{
			var entry = new Entry {
				Text = "Setec Astronomy",
				FontFamily = "Comic Sans MS",
				HorizontalTextAlignment = TextAlignment.Center,
				Keyboard = Keyboard.Chat
			};

			var label = new Label ();
			var binding = new Binding ("Text") { Source = entry };

			var otherEntry = new Entry ();
			var otherBinding = new Binding ("Text") { Source = entry, Mode = BindingMode.TwoWay };
			otherEntry.SetBinding (Entry.TextProperty, otherBinding);

			label.SetBinding (Label.TextProperty, binding);

			var explanation = new Label() {Text = @"The Text value of the entry at the top should appear in the label and entry below, regardless of whether 'IsPassword' is on. 
Changes to the value in the entry below should be reflected in the entry at the top."};

			var button = new Button { Text = "Toggle IsPassword" };
			button.Clicked += (sender, args) => { entry.IsPassword = !entry.IsPassword; };

			Content = new StackLayout {
				Children = { entry, button, explanation, label, otherEntry }
			};
		}
开发者ID:Costo,项目名称:Xamarin.Forms,代码行数:28,代码来源:IsPasswordToggleTest.cs


示例13: Init

        protected override void Init()
        {
            var label = new Label { Text = "Label" };
            var entry = new Entry { AutomationId = "entry" };
            var grid = new Grid();

            grid.Children.Add(label, 0, 0);
            grid.Children.Add(entry, 1, 0);
            var tableView = new TableView
            {
                Root = new TableRoot
                {
                    new TableSection
                    {
                        new ViewCell
                        {
                            View = grid
                        }
                    }
                }
            };

            Content = new StackLayout
            {
                Children = { tableView }
            };
        }
开发者ID:Costo,项目名称:Xamarin.Forms,代码行数:27,代码来源:Bugzilla36559.cs


示例14: btn_SearchUsernames_OnClick

    protected void btn_SearchUsernames_OnClick(object sender, EventArgs e)
    {
        int uID;
        bool result = Int32.TryParse(Request.QueryString["userID"].ToString(), out uID);
        DataTable DT = theCake.searchUsersByUserName(txt_usernameSearch.Text.Trim());

        if (DT.Rows.Count == 0) // No results found
        {
            TableRow TR0 = new TableRow();
            TableCell TC0 = new TableCell();
            Label no_res = new Label();
            no_res.Text = "No matches were found.";
            TC0.Controls.Add(no_res);
            TR0.Cells.Add(TC0);
            tbl_searchResults.Rows.Add(TR0);
        }

        if (DT.Rows.Count >= 1) // Results found
        {
            foreach (DataRow DR in DT.Rows)
            {
                TableRow TR1 = new TableRow();
                TableCell TC1 = new TableCell();
                Label username_res = new Label();
                username_res.Text = "<a href=\"UserProfile.aspx?userID=" + DR["ID"].ToString() + "\">" + DR["ownerAlias"].ToString() + "</a>";
                TC1.Controls.Add(username_res);
                TR1.Cells.Add(TC1);
                tbl_searchResults.Rows.Add(TR1);
            }
        }
    }
开发者ID:Ravai,项目名称:honey-badger,代码行数:31,代码来源:UserProfile.aspx.cs


示例15: FacebookLoginPage

        public FacebookLoginPage(FacebookConnection connection)
        {
            this.Title = "FacebookLoginPage";

         //   Connection = new FacebookConnection(key, secret, scope);
         //   connection.SignInCompleted += Connection_SignInCompleted;
            
            this._Connection = connection;

            this._Browser = new WebView();
			//_Browser.Source = new UrlWebViewSource() { Url = _Connection.LoginUri().AbsoluteUri };
            this._Connection.SignIn(this._Browser);

			Label lbl = new Label ()
			{ Text = "Connecting..." };
			lbl.SetBinding(Label.IsVisibleProperty, "IsVisible", BindingMode.OneWay, new BooleanInverterConverter());
            lbl.BindingContext = this._Browser;

            this._BaseLayout = new StackLayout()
            {
				Orientation = StackOrientation.Vertical,
				HorizontalOptions = LayoutOptions.FillAndExpand,
				VerticalOptions = LayoutOptions.FillAndExpand,
			};

            this._BaseLayout.Children.Add(lbl);
            this._BaseLayout.Children.Add(this._Browser);

            this._Browser.IsVisible = false;
                        	

            Padding = new Thickness(0, Device.OnPlatform(20, 0, 0), 0, 0);  // Accomodate iPhone status bar.
            Content = this._BaseLayout;
        }
开发者ID:pedroccrl,项目名称:Xamarin.Plugins-1,代码行数:34,代码来源:FacebookLoginPage.cs


示例16: IniciarComponentes

    public void IniciarComponentes()
    {
        lblSaludo = new Label();
        btSaludo = new Button();
        ttToolTip1 = new ToolTip();

        lblSaludo.Name = "lblSaludo";
        lblSaludo.Text = "Label";
        lblSaludo.Font = new Font("Microsoft Sans Serif", 14, FontStyle.Regular);
        lblSaludo.TextAlign = ContentAlignment.MiddleCenter;
        lblSaludo.Location = new Point(53, 48);
        lblSaludo.Size = new Size(187, 35);
        lblSaludo.TabIndex = 1;

        btSaludo.Name = "btSaludo";
        btSaludo.Text = "Haga &clic aquí";
        btSaludo.Location = new Point(53, 90);
        btSaludo.Size = new Size(187, 23);
        btSaludo.TabIndex = 0;
        ttToolTip1.SetToolTip(btSaludo, "Botón de pulsación");

        ClientSize = new Size(292, 191);
        Name = "Form1";
        Text = "Saludo";

        Controls.Add(lblSaludo);
        Controls.Add(btSaludo);
    }
开发者ID:ThirteenWolf,项目名称:Ejercicios,代码行数:28,代码来源:Ejercicio1.cs


示例17: StatLabel

        public StatLabel(string name)
            : base(name)
        {
            base.BackColor = Color.Transparent;

            lblAtk = new Label("lblAtk");
            lblAtk.BackColor = Color.Transparent;
            lblAtk.ForeColor = Color.WhiteSmoke;
            lblAtk.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 12);
            lblAtk.Location = new Point(5, 5);
            lblAtk.AutoSize = true;
            lblAtk.Text = "Atk";

            lblDef = new Label("lblDef");
            lblDef.BackColor = Color.Transparent;
            lblDef.ForeColor = Color.WhiteSmoke;
            lblDef.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 12);
            lblDef.Location = new Point(lblAtk.X + lblAtk.Width + 5, 5);
            lblDef.AutoSize = true;
            lblDef.Text = "Def";

            lblSpd = new Label("lblSpd");
            lblSpd.BackColor = Color.Transparent;
            lblSpd.ForeColor = Color.WhiteSmoke;
            lblSpd.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 12);
            lblSpd.Location = new Point(lblDef.X + lblDef.Width + 5, 5);
            lblSpd.AutoSize = true;
            lblSpd.Text = "Spd";

            lblSpclAtk = new Label("lblSpclAtk");
            lblSpclAtk.BackColor = Color.Transparent;
            lblSpclAtk.ForeColor = Color.WhiteSmoke;
            lblSpclAtk.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 12);
            lblSpclAtk.Location = new Point(lblSpd.X + lblSpd.Width + 5, 5);
            lblSpclAtk.AutoSize = true;
            lblSpclAtk.Text = "Sp. Atk";

            lblSpclDef = new Label("lblSpclDef");
            lblSpclDef.BackColor = Color.Transparent;
            lblSpclDef.ForeColor = Color.WhiteSmoke;
            lblSpclDef.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 12);
            lblSpclDef.Location = new Point(lblSpclAtk.X + lblSpclAtk.Width + 5, 5);
            lblSpclDef.AutoSize = true;
            lblSpclDef.Text = "Sp. Def";

            lblStats = new Label("lblStats");
            lblStats.BackColor = Color.Transparent;
            lblStats.ForeColor = Color.WhiteSmoke;
            lblStats.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 12);
            lblStats.Location = new Point(5, 5);
            lblStats.AutoSize = true;
            lblStats.Text = "Stats";

            this.AddWidget(lblStats);
               // this.AddWidget(lblAtk);
            //this.AddWidget(lblDef);
            //this.AddWidget(lblSpd);
            //this.AddWidget(lblSpclAtk);
            //this.AddWidget(lblSpclDef);
        }
开发者ID:blastboy,项目名称:Client,代码行数:60,代码来源:StatLabel.cs


示例18: HelloWindow

    public HelloWindow () {
      border = 2;

      label1 = new Label();
      label1.Text = catalog.GetString("Hello, world!");
      label1.ClientSize = new Size(label1.PreferredWidth, label1.PreferredHeight);
      Controls.Add(label1);

      label2 = new Label();
      label2.Text =
        String.Format(
            catalog.GetString("This program is running as process number {0}."),
            Process.GetCurrentProcess().Id);
      label2.ClientSize = new Size(label2.PreferredWidth, label2.PreferredHeight);
      Controls.Add(label2);

      ok = new Button();
      Label okLabel = new Label();
      ok.Text = okLabel.Text = "OK";
      ok.ClientSize = new Size(okLabel.PreferredWidth + 12, okLabel.PreferredHeight + 4);
      ok.Click += new EventHandler(Quit);
      Controls.Add(ok);

      Size total = ComputePreferredSizeWithoutBorder();
      LayoutControls(total.Width, total.Height);
      ClientSize = new Size(border + total.Width + border, border + total.Height + border);
    }
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:27,代码来源:hello.cs


示例19: btnAttendance_Click

    //protected void chkFullance_CheckedChanged(object sender, EventArgs e)
    //{
    //    if (chkFullance.Checked)
    //    {
    //        foreach (GridViewRow gvr in dgrid.Rows)
    //        {
    //            Label lblStudID = new Label();
    //            lblStudID = (Label)gvr.Cells[0].FindControl("lblStaffID");
    //            DataSet ds1 = new DataSet();
    //            int month = Convert.ToInt32(ddlMonth.Items[ddlMonth.SelectedIndex].Value);
    //            int year = Convert.ToInt32(ddlYear.Items[ddlYear.SelectedIndex].Value);
    //            int noofWorkingdays = Convert.ToInt32(txtnoofworkingdays.Text);
    //            TextBox txtNoOfDaysPresents = new TextBox();
    //            txtNoOfDaysPresents = (TextBox)gvr.Cells[2].FindControl("txtDaysPresent");
    //            int leavedays;
    //            ds1 = objStaff.GetStaffAttendanceByLeaves(Convert.ToInt32(lblStudID.Text), month, year);
    //            leavedays =Convert.ToInt32(ds1.Tables[0].Rows[0][2].ToString());
    //            txtNoOfDaysPresents.Text = Convert.ToString((noofWorkingdays - leavedays));
    //        }
    //    }
    //    if (chkFullance.Checked==false)
    //    {
    //        foreach (GridViewRow gvr in dgrid.Rows)
    //        {
    //            TextBox txtNoOfDaysPresents = new TextBox();
    //            TextBox txtnoofworkingdays = new TextBox();
    //            txtNoOfDaysPresents = (TextBox)gvr.Cells[2].FindControl("txtDaysPresent");
    //            txtNoOfDaysPresents.Text = txtnoofworkingdays.Text;
    //        }
    //    }
    //}
    protected void btnAttendance_Click(object sender, EventArgs e)
    {
        foreach (GridViewRow gvr in dgrid.Rows)
        {
            Label lblStudID = new Label();
            lblStudID = (Label)gvr.Cells[0].FindControl("lblStaffID");
            DataSet ds1 = new DataSet();
            int month = Convert.ToInt32(ddlMonth.Items[ddlMonth.SelectedIndex].Value);
            int year = Convert.ToInt32(ddlYear.Items[ddlYear.SelectedIndex].Value);
            int noofWorkingdays = Convert.ToInt32(txtnoofworkingdays.Text);
            TextBox txtNoOfDaysPresents = new TextBox();
            txtNoOfDaysPresents = (TextBox)gvr.Cells[2].FindControl("txtDaysPresent");
            int leavedays;
            ds1 = objStaff.GetStaffAttendanceByLeaves(Convert.ToInt32(lblStudID.Text), month, year);
            if (ds1.Tables.Count > 0)
            {
                if (ds1.Tables[0].Rows.Count > 0)
                {
                    leavedays = Convert.ToInt32(ds1.Tables[0].Rows[0][2].ToString());
                    txtNoOfDaysPresents.Text = Convert.ToString((noofWorkingdays - leavedays));
                }
                else
                {
                    txtNoOfDaysPresents.Text = txtnoofworkingdays.Text;
                }
            }
            txtNoOfDaysPresents.Enabled = false;

        }
    }
开发者ID:ganreddy,项目名称:college,代码行数:61,代码来源:StaffAttendance.aspx.cs


示例20: MainWindow

    public MainWindow()
        : base(Gtk.WindowType.Toplevel)
    {
        Application.Init ();

            this.Resize(640,480);
            //menu bar very top
            MenuBar mb = new MenuBar ();
            Menu fileMenu = new Menu ();
            MenuItem menuItem = new MenuItem ("_File");
            menuItem.Submenu = fileMenu;
            mb.Append(menuItem);
            MenuItem menuFileQuit = new MenuItem("Quit");
            fileMenu.Append(menuFileQuit);
            vboxMain.PackStart(mb,false,false,0);

            //toolbar
            Toolbar tbTop = new Toolbar ();
            //toolbutton Staff
            ToolButton tbStaff = new ToolButton (Gtk.Stock.OrientationPortrait);
            tbStaff.Label="Staff";
            tbStaff.IsImportant=true;
            tbStaff.Clicked += HandleTbStaffClicked;
            tbTop.Insert(tbStaff,0);
            //toolbutton Clients
            ToolButton tbClients = new ToolButton (Gtk.Stock.About);
            tbClients.Label="Clients";
            tbClients.IsImportant=true;
            tbClients.Clicked+= HandleTbClientsClicked;
            tbTop.Insert(tbClients,1);
            //media bar
            Label lbMediaTemp = new Label ();
            lbMediaTemp.Text="Media holder";
            lbMediaTemp.Show();
            //pack the toolbar and media bar in the top hbox//
            hbTop.PackStart(tbTop);
            hbTop.PackStart(lbMediaTemp);
            //pack the top hbox in the main vbox
            vboxMain.PackStart(hbTop,false,false,1);
            // horizontal pane
            verticalPane.Position=200;
            verticalPane.Pack1(scrollWindowLeft,false,false);
            verticalPane.Pack2(scrollWindowRight,false,false);
            vboxMain.PackStart(verticalPane);
            scrollWindowLeft.Add(viewPortLeft);

            scrollWindowRight.Add(viewPortRight);
            Label lbMain = new Label ();
            lbMain.Text= "main";
            viewPortRight.Add(lbMain);
            verticalPane.ShowAll();
            //status bar very bottom
            Statusbar sb = new Statusbar ();
            vboxMain.PackStart(sb,false,false,1);

            this.Add(vboxMain);
            //hb1.Add(tbTop);
            this.ShowAll ();
        Build ();
    }
开发者ID:stemartincouk,项目名称:gsalon,代码行数:60,代码来源:MainWindow.cs



注:本文中的Label类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# LabelStatement类代码示例发布时间:2022-05-24
下一篇:
C# LabMS类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap