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

C# CheckBox类代码示例

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

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



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

示例1: OnCreate

    protected async override void OnCreate(Bundle bundle)
    {
      base.OnCreate(bundle);

      SetContentView(Resource.Layout.view_expense);

      dialog = ServiceContainer.Resolve<IMessageDialog>();

      var id = Intent.GetIntExtra("ID", -1);
      viewModel = ServiceContainer.Resolve<ExpenseViewModel>();
      await viewModel.Init(id);

      this.ActionBar.Title = viewModel.Title;
      viewModel.IsBusyChanged = (busy) =>
      {
        if (busy)
          AndHUD.Shared.Show(this, "Loading...");
        else
          AndHUD.Shared.Dismiss(this);
      };

      name = FindViewById<EditText>(Resource.Id.name);
      date = FindViewById<DatePicker>(Resource.Id.date);
      notes = FindViewById<EditText>(Resource.Id.notes);
      total = FindViewById<EditText>(Resource.Id.total);
      billable = FindViewById<CheckBox>(Resource.Id.billable);
      category = FindViewById<Spinner>(Resource.Id.category);
      category.Adapter = new ArrayAdapter<string>(this, global::Android.Resource.Layout.SimpleSpinnerDropDownItem, viewModel.Categories);
      category.SetSelection(viewModel.Categories.IndexOf(viewModel.Category));
      name.Text = viewModel.Name;
      date.DateTime = viewModel.Due;
      notes.Text = viewModel.Notes;
      total.Text = viewModel.Total;
      billable.Checked = viewModel.Billable;
    }
开发者ID:jv9,项目名称:MyExpenses,代码行数:35,代码来源:ExpenseActivity.cs


示例2: MainForm

	public MainForm ()
	{
		// 
		// _richTextBox
		// 
		_richTextBox = new RichTextBox ();
		_richTextBox.Dock = DockStyle.Top;
		_richTextBox.Height = 160;
		Controls.Add (_richTextBox);
		// 
		// _wordWrapCheckBox
		// 
		_wordWrapCheckBox = new CheckBox ();
		_wordWrapCheckBox.Checked = _richTextBox.WordWrap;
		_wordWrapCheckBox.Location = new Point (8, 170);
		_wordWrapCheckBox.Text = "WordWrap";
		_wordWrapCheckBox.CheckedChanged += new EventHandler (WordWrapCheckBox_CheckedChanged);
		Controls.Add (_wordWrapCheckBox);
		// 
		// MainForm
		// 
		ClientSize = new Size (300, 200);
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #81488";
		Load += new EventHandler (MainForm_Load);
	}
开发者ID:mono,项目名称:gert,代码行数:27,代码来源:MainForm.cs


示例3: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Settings);
            ActionBar.SetDisplayHomeAsUpEnabled(true);

            counter = 0;
            var prefs =
                AndroidAppPreferences.Create(Application.Context.GetSharedPreferences(KeySndrApplication.AppPreferencesId, FileCreationMode.Private));

            editIpView = FindViewById<EditText>(Resource.Id.ipEditText);
            editPortView = FindViewById<EditText>(Resource.Id.portEditText);
            useCacheView = FindViewById<CheckBox>(Resource.Id.enableCache);

            if (!string.IsNullOrEmpty(prefs.Ip))
                editIpView.Text = prefs.Ip;
            if (prefs.Port > 0)
                editPortView.Text = prefs.Port.ToString();
            useCacheView.Checked = prefs.UseCache;

            probe = new Probe("KeySndrServer");
            probe.BeaconsUpdated += Probe_BeaconsUpdated;


            t = new Timer(1000);
            t.Elapsed += TimerOnElapsed;
            if (Intent.Extras == null || !Intent.Extras.ContainsKey("search"))
                return;
        }
开发者ID:samiy-xx,项目名称:KeySndr.Clients,代码行数:29,代码来源:SettingsActivity.cs


示例4: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource

            SetContentView(Resource.Layout.Main);

            setupParent(FindViewById<LinearLayout>(Resource.Id.mainLayout));
            listViewGoodsMain = FindViewById<ListView>(Resource.Id.listViewGoodsMain);

            goodsItemsList = new List<GoodsItem>();
            goodsItemsList.Add(new GoodsItem() { Id = 1, Quantity = 1, Name = "Пельмешки"});
            goodsItemsList.Add(new GoodsItem() { Id = 2, Quantity = 2, Name = "Сосисоны" });

            myGoodsItemsAdapter = new GoodsItemsAdapter(this, goodsItemsList);
            listViewGoodsMain.Adapter = myGoodsItemsAdapter;

            var emptyText = FindViewById<TextView>(Resource.Id.textViewGoodsListEmpty);
            listViewGoodsMain.EmptyView = emptyText;

            editTextNewProduct = FindViewById<EditText>(Resource.Id.EditTextNewProduct);
            editTextNewProduct.EditorAction += editTextNewProduct_EditorAction;
            editTextNewProduct.Click += editTextNewProduct_Click;

            checkBoxRed = FindViewById<CheckBox>(Resource.Id.checkBoxRed);
            checkBoxRed.Click += checkBoxRed_Click;
        }
开发者ID:TkachenkoRoman,项目名称:GoodsListApp,代码行数:28,代码来源:MainActivity.cs


示例5: Initialize

 public static void Initialize()
 {
     ClearMenu = MainMenu.AddSubMenu("Clear", "Clear");
     ClearMenu.AddGroupLabel("Clear Options");
     _q = ClearMenu.Add("Clear.Q", new CheckBox("Use Q"));
     _w = ClearMenu.Add("Clear.W", new CheckBox("Use W"));
 }
开发者ID:RoachxD,项目名称:EloBuddy,代码行数:7,代码来源:Menu.cs


示例6: Misc

 static Misc()
 {
     // Initialize the menu values
     Menu = Config.Menu.AddSubMenu("Misc");
     _drawQ = Menu.Add("drawQ", new CheckBox("Draw Q"));
     _drawW = Menu.Add("drawW", new CheckBox("Draw W"));
     _drawE = Menu.Add("drawE", new CheckBox("Draw E"));
     _drawReadySpellsOnly = Menu.Add("drawReady", new CheckBox("Draw ready spells only"));
     Menu.AddSeparator();
     _ksW = Menu.Add("ksQ", new CheckBox("KS with W"));
     _ksR = Menu.Add("ksR", new CheckBox("KS with R"));
     Menu.AddSeparator();
     _useHeal = Menu.Add("useHeal", new CheckBox("Use Heal Smart"));
     _useQSS = Menu.Add("useQSS", new CheckBox("Use QSS"));
     Menu.AddSeparator();
     for (int i = 0; i < EntityManager.Heroes.Allies.Count; i++)
     {
         _useHealOn[i] = Menu.Add("useHeal" + i, new CheckBox("Use Heal to save " + EntityManager.Heroes.Allies[i].ChampionName));
     }
     Menu.AddSeparator();
     _useEOnGapcloser = Menu.Add("useEOnGapcloser", new CheckBox("Use E on Gapcloser", false));
     _EOnImmobileEnemy = Menu.Add("EOnImmobile", new CheckBox("Use E on immobile enemy"));
     _EOnSlowedEnemy = Menu.Add("EOnSlowed", new CheckBox("Use E on slowed enemy", false));
     _useEInterrupt = Menu.Add("EToInterrupt", new CheckBox("Use E as interrupt"));
     _interruptDangerLvl = Menu.Add("InterruptDangerLvl", new Slider("Interrupt Danger Lvl", 2, 1, 3));
     Menu.AddSeparator();
     _stealDrake = Menu.Add("stealDrake", new CheckBox("Try to steal Dragon"));
     _stealBaron = Menu.Add("stealBaron", new CheckBox("Try to steal Baron"));
     Menu.AddSeparator();
     _autolevelskills = Menu.Add("autolevelskills", new CheckBox("Autolevelskills"));
     _autoBuyStartingItems = Menu.Add("autoBuyStartingItems", new CheckBox("Autobuy Starting Items (SR only)"));
     Menu.AddSeparator();
     _useSkinHack = Menu.Add("useSkinHack", new CheckBox("Use Skinhack", false));
     _skinId = Menu.Add("skinId", new Slider("Skin ID", 6, 1, 14));
 }
开发者ID:TopGunner,项目名称:EloBuddy,代码行数:35,代码来源:Config.cs


示例7: btnSubmit_Click

    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (validateSelection() == false) return;

        bool saved = false;
        int i = 0;
        int questionid = 0;
        foreach (GridViewRow gr in gvwQuestionBank.Rows)
        {
            questionid = int.Parse(gvwQuestionBank.Rows[i].Cells[1].Text);
            CheckBox cb = new CheckBox();
            cb = (CheckBox)gr.Controls[0].FindControl("CheckBox1");
            if (cb.Checked)
            {
                InsertQuestionDetails(questionid);
                saved = true;
            }

            i = i + 1;

        }
        if (saved == true)
            lblMessage.Text = "saved Successfully";
        else lblMessage.Text = "no item selected";
    }
开发者ID:rajalekshminovasoft,项目名称:CJ,代码行数:25,代码来源:CopyPhotoQuesToAnotherVariable.ascx.cs


示例8: Game_OnStart

        private static void Game_OnStart(EventArgs args)
        {
            if (Player.Instance.Hero != Champion.Shaco && Player.Instance.Hero != Champion.Leblanc)
                return;

            CloneMenu = MainMenu.AddMenu("Clone control", "yodagodEOQ");
            Chat.Print(Player.Instance.ChampionName + " clone controller loaded", Color.White);

            Control = CloneMenu.Add("Clone", new CheckBox("Control clone"));
            CloneMenu.AddGroupLabel("You can select a target with left click");
            Mode = CloneMenu.Add("Mode", new Slider("", 2, 0, 2));
            Mode.DisplayName = "If health > 40%:" + Modes[Mode.CurrentValue];
            Mode.OnValueChange += delegate
                (ValueBase<int> sender, ValueBase<int>.ValueChangeArgs Args)
            {
                sender.DisplayName = "If health > 40%:" + Modes[Args.NewValue];
            };

            Mode2 = CloneMenu.Add("Mode2", new Slider("", 0, 0, 2));
            Mode2.DisplayName = "If health < 40%:" + Modes[Mode2.CurrentValue];
            Mode2.OnValueChange += delegate
                (ValueBase<int> sender, ValueBase<int>.ValueChangeArgs Args)
            {
                sender.DisplayName = "If health < 40%:" + Modes[Args.NewValue];
            };
            Range = CloneMenu.Add("Range", new Slider("Get targets within {0} range", 2000, 1, 10000));
            

            Game.OnUpdate += ControlClone;

            GameObject.OnCreate += CreateClone;
            GameObject.OnDelete += DeleteClone;
        }
开发者ID:alvothefirst,项目名称:EloBuddy,代码行数:33,代码来源:Program.cs


示例9: OnCreateView

        public override View OnCreateView(LayoutInflater Inflater, ViewGroup container,
                Bundle savedInstanceState) {
            View v = Inflater.Inflate(R.Layout.fragment_menu, container, false);

            // Make sure the two menu fragments are created.
            FragmentManager fm = GetChildFragmentManager();
            FragmentTransaction ft = fm.BeginTransaction();
            mFragment1 = fm.FindFragmentByTag("f1");
            if (mFragment1 == null) {
                mFragment1 = new FragmentMenuSupport.MenuFragment();
                ft.Add(mFragment1, "f1");
            }
            mFragment2 = fm.FindFragmentByTag("f2");
            if (mFragment2 == null) {
                mFragment2 = new FragmentMenuSupport.Menu2Fragment();
                ft.Add(mFragment2, "f2");
            }
            ft.Commit();
        
            // Watch check box clicks.
            mCheckBox1 = (CheckBox)v.FindViewById(R.Id.menu1);
            mCheckBox1.Click += (o, a) => UpdateFragmentVisibility();
            mCheckBox2 = (CheckBox)v.FindViewById(R.Id.menu2);
            mCheckBox2.Click += (o, a) => UpdateFragmentVisibility();
        
            // Make sure fragments start out with correct visibility.
            UpdateFragmentVisibility();

            return v;
        }
开发者ID:Xtremrules,项目名称:dot42,代码行数:30,代码来源:FragmentMenuFragmentSupport.cs


示例10: OnCreate

 protected override async void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     SetContentView(Resource.Layout.Login);
     GlobalServices.XjtuSite.Account.IsLoggedInChanged += Account_IsLoggedInChanged;
     if (!await UpdateAccountStatus())
     {
         userNameView = FindViewById<EditText>(Resource.Id.accountNameEdit);
         passwordView = FindViewById<EditText>(Resource.Id.passwordEdit);
         savePasswordCheckBox = FindViewById<CheckBox>(Resource.Id.savePasswordCheckbox);
         loginButton = FindViewById<Button>(Resource.Id.loginButton);
         //ÔØÈëÉèÖá£
         using (var pref = GetPreferences(FileCreationMode.Private))
         {
             userNameView.Text = pref.GetString("userName", "");
             passwordView.Text = pref.GetString("password", "");
             savePasswordCheckBox.Checked = pref.GetBoolean("savePassword", false);
         }
         if (!string.IsNullOrWhiteSpace(userNameView.Text)) passwordView.RequestFocus();
         //ÕìÌýʼþ¡£
         EventHandler<TextChangedEventArgs> userNamePasswordChanged = (_, e) =>
         {
             loginButton.Enabled = !string.IsNullOrWhiteSpace(userNameView.Text) &&
                                   !string.IsNullOrEmpty(passwordView.Text);
         };
         userNameView.TextChanged += userNamePasswordChanged;
         passwordView.TextChanged += userNamePasswordChanged;
         savePasswordCheckBox.CheckedChange += SavePasswordCheckBox_CheckedChange;
         loginButton.Click += LoginButton_Click;
     }
 }
开发者ID:CXuesong,项目名称:App2,代码行数:31,代码来源:LoginActivity.cs


示例11: btnDelete_Click

    protected void btnDelete_Click(object sender, EventArgs e)
    {
        CheckBox cb = new CheckBox();
        bool flag = false;

        for (int i = 0; i < GridView1.Rows.Count; i++)
        {
            cb = (CheckBox)GridView1.Rows[i].FindControl("CheckBox1");
            if (cb.Checked)
            {
                objbusinesskeywordbal.BusinessKeywordId = Convert.ToInt32(GridView1.Rows[i].Cells[3].Text);
                objbusinesskeyworddal.DeleteBusinessKeyword(objbusinesskeywordbal);
                flag = true;
            }
        }
        if (flag == true)
        {
            Response.Write("<script>alert('Records deleted');</script>");
        }
        else
        {
            Response.Write("<script>alert('Please select record to delete');</script>");
        }
        bindgrid();
    }
开发者ID:MShah890,项目名称:InstaSearch-A-Business-Search-Website,代码行数:25,代码来源:businesskeyword.aspx.cs


示例12: OnActivityCreated

		public override void OnActivityCreated (Bundle savedInstanceState)
		{
			base.OnActivityCreated (savedInstanceState);

			View decorView = Activity.Window.DecorView;
			var parentView = (ViewGroup)Activity.Window.DecorView
				.FindViewById (Resource.Id.sample_main_layout);

			mLowProfileCheckBox = new CheckBox (Activity);
			mLowProfileCheckBox.Text = "Enable Low Profile mode.";
			parentView.AddView (mLowProfileCheckBox);

			mHideNavCheckbox = new CheckBox (Activity);
			mHideNavCheckbox.Checked = true;
			mHideNavCheckbox.Text = "Hide Navigation bar";
			parentView.AddView (mHideNavCheckbox);

			mHideStatusBarCheckBox = new CheckBox (Activity);
			mHideStatusBarCheckBox.Checked = true;
			mHideStatusBarCheckBox.Text = "Hide Status Bar";
			parentView.AddView (mHideStatusBarCheckBox);

			mImmersiveModeCheckBox = new CheckBox (Activity);
			mImmersiveModeCheckBox.Text = "Enable Immersive Mode.";
			parentView.AddView (mImmersiveModeCheckBox);

			mImmersiveModeStickyCheckBox = new CheckBox (Activity);
			mImmersiveModeStickyCheckBox.Text = "Enable Immersive Mode (Sticky)";
			parentView.AddView (mImmersiveModeStickyCheckBox);
		}
开发者ID:CHANDAN145,项目名称:monodroid-samples,代码行数:30,代码来源:AdvancedImmersiveModeFragment.cs


示例13: OnCreate

		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			SetContentView(Resource.Layout.action_bar_fragment_menu);

			// Make sure the two menu fragments are created.
			var fm = SupportFragmentManager;
			var ft = fm.BeginTransaction();
			mFragment1 = (MenuFragment)fm.FindFragmentByTag("f1");
			if (mFragment1 == null) {
				mFragment1 = new MenuFragment();
				ft.Add(mFragment1, "f1");
			}
			mFragment2 = (Menu2Fragment)fm.FindFragmentByTag("f2");
			if (mFragment2 == null) {
				mFragment2 = new Menu2Fragment();
				ft.Add(mFragment2, "f2");
			}
			ft.Commit();

			// Watch check box clicks.
			mCheckBox1 = (CheckBox)FindViewById(Resource.Id.menu1);
			mCheckBox1.Click += OnClickListener_OnClick;
			mCheckBox2 = (CheckBox)FindViewById(Resource.Id.menu2);
			mCheckBox2.Click += OnClickListener_OnClick;
			mCheckBox3 = (CheckBox)FindViewById(Resource.Id.menu3);
			mCheckBox3.Click += OnClickListener_OnClick;
			mHasOptionsMenu = (CheckBox)FindViewById(Resource.Id.has_options_menu);
			mHasOptionsMenu.Click += OnClickListener_OnClick;
			mMenuVisibility = (CheckBox)FindViewById(Resource.Id.menu_visibility);
			mMenuVisibility.Click += OnClickListener_OnClick;

			// Make sure fragments start out with correct visibility.
			UpdateFragmentVisibility();
		}
开发者ID:SNest,项目名称:KitchenHelper,代码行数:35,代码来源:ActionBarFragmentMenu.cs


示例14: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        List<Event> events = Event.GetAllEvents();

        foreach (Event selectedEvent in events)
        {
            Panel pnlEvent = new Panel();
            pnlEvent.ID = selectedEvent.ID.ToString();
            pnlEvent.Attributes.Add("class", "panel");
            CheckBox chkbxEventName = new CheckBox();
            chkbxEventName.ID = "chkbx" + selectedEvent.Name;
            chkbxEventName.Text = selectedEvent.Name;
            pnlEvent.Controls.Add(chkbxEventName);
            for (int i = 0; i < selectedEvent.MaxTeamSize; i++)
            {
                TextBox txtbxTTID = new TextBox();
                txtbxTTID.ID = "TTID" + (i + 1).ToString() + selectedEvent.ID;
                txtbxTTID.Attributes.Add("placeholder", "TTID " + (i + 1).ToString());
                txtbxTTID.Attributes.Add("style", "display:none;");
                pnlEvent.Controls.Add(txtbxTTID);
                RegularExpressionValidator rev = new RegularExpressionValidator();
                rev.ControlToValidate = txtbxTTID.ClientID;
                rev.Attributes.Add("style", "display:none;");
                rev.ValidationExpression = "\\d{4}";
                rev.ErrorMessage = "*";
                pnlEvent.Controls.Add(rev);
            }
            pnlEvents.Controls.Add(pnlEvent);
        }
    }
开发者ID:priyanshu92,项目名称:EventManagementSystem,代码行数:30,代码来源:EventRegister.aspx.cs


示例15: OnCreateView

		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			Dialog.SetTitle (GetString (Resource.String.sign_in));
			var v = inflater.Inflate (Resource.Layout.fingerprint_dialog_container, container, false);
			mCancelButton = (Button)v.FindViewById (Resource.Id.cancel_button);
			mCancelButton.Click += (object sender, EventArgs e) => Dismiss ();

			mSecondDialogButton = (Button)v.FindViewById (Resource.Id.second_dialog_button);
			mSecondDialogButton.Click += (object sender, EventArgs e) => {
				if (mStage == Stage.Fingerprint) {
					GoToBackup ();
				} else {
					VerifyPassword ();
				}
			};

			mFingerprintContent = v.FindViewById (Resource.Id.fingerprint_container);
			mBackupContent = v.FindViewById (Resource.Id.backup_container);
			mPassword = v.FindViewById<EditText> (Resource.Id.password);
			mPassword.SetOnEditorActionListener (this);
			mPasswordDescriptionTextView = v.FindViewById<TextView> (Resource.Id.password_description);
			mUseFingerprintFutureCheckBox = v.FindViewById<CheckBox> (Resource.Id.use_fingerprint_in_future_check);
			mNewFingerprintEnrolledTextView = v.FindViewById<TextView> (Resource.Id.new_fingerprint_enrolled_description);
			mFingerprintUiHelper = mFingerprintUiHelperBuilder.Build (
				(ImageView)v.FindViewById (Resource.Id.fingerprint_icon),
				(TextView)v.FindViewById (Resource.Id.fingerprint_status), this);
			UpdateStage ();

			// If fingerprint authentication is not available, switch immediately to the backup
			// (password) screen.
			if (!mFingerprintUiHelper.IsFingerprintAuthAvailable)
				GoToBackup ();

			return v;
		}
开发者ID:nick30935n,项目名称:monodroid-samples,代码行数:35,代码来源:FingerprintAuthenticationDialogFragment.cs


示例16: btnAssign_Click

    protected void btnAssign_Click(object sender, EventArgs e)
    {
        if (ddlAdminList.SelectedIndex == 0 || ddlOrganizations.SelectedIndex == 0)
        { lblMessage.Text = "Please select organization/Admin"; return; }

        bool assignstatus = false;

        int userid = int.Parse(ddlAdminList.SelectedValue);

        dataclass.Procedure_DeletUserPermissions(userid);
        int i = 0;
        int menuid = 0;
        foreach (GridViewRow gr in gvwUserPermissions.Rows)
        {
            menuid = int.Parse(gvwUserPermissions.Rows[i].Cells[1].Text);
            CheckBox cb = new CheckBox();
            cb = (CheckBox)gr.Controls[0].FindControl("CheckBox1");
            if (cb.Checked)
            {
                assignstatus = true;
                dataclass.Procedure_UserPermissions(userid, menuid, createdby);
            }

            i = i + 1;
        } Session["admIndex_type"] = null; Session["orgIndex_type"] = null;
        if (assignstatus == true)
        {lblMessage.Text = "permission(s) saved Successfully";resetValues(0);}
        else lblMessage.Text = "no permission(s) assign for the selected organization admin";
    }
开发者ID:rajalekshminovasoft,项目名称:talentscout12-4-2014,代码行数:29,代码来源:SpecialAdminPermissions.ascx.cs


示例17: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            m_dataManager = DataManager.GetDataManager();

            m_connectionButton = FindViewById<Button>(Resource.Id.connectButton);
            m_login = FindViewById<EditText>(Resource.Id.loginField);
            m_password = FindViewById<EditText>(Resource.Id.passwordField);
            m_checkBox = FindViewById<CheckBox>(Resource.Id.rememberPass);

            // Store user data
            if (m_dataManager.RetreiveData<bool>("loginCheckBox") == true)
            {
                m_login.Text = m_dataManager.RetreiveData<string>("login");
                m_password.Text = m_dataManager.RetreiveData<string>("password");
                m_checkBox.Checked = m_dataManager.RetreiveData<bool>("loginCheckBox");
            }

            StartService(new Intent(this, typeof(NetworkService)));
            BindService(new Intent(this, typeof(NetworkService)), this, Bind.AutoCreate);

            m_connectionButton.Click += delegate {
                m_netwokService.SetLoginInfo(m_login.Text, m_password.Text);
                m_netwokService.LoginEvent += OnLogin;
                m_netwokService.Login();
            };
        }
开发者ID:Naphtaline,项目名称:EpiMessenger,代码行数:29,代码来源:MainActivity.cs


示例18: rendreNewView

    private void rendreNewView(DataTable dt)
    {
        CheckBox cb;
        
        foreach (DataRow row in dt.Rows)
        {
            //<asp:CheckBox ID="CheckBox1" runat="server" />
            cb = new CheckBox();
            cb.ID = "pid_" + ((int)row["PermissionId"]).ToString() + "_" + RoleList.SelectedValue;
            cb.Text = (string)row["Label"] + " (" + (string)row["PermissionUniqueString"] + ")";
            if ((bool)row["enabled"])
            {
                cb.Checked = true;
            }
            else
            {
                cb.Checked = false;
            }
            panel.Controls.Add(cb);
            panel.Controls.Add(br());
        }

        Button btnSave = new Button();
        btnSave.Text = "Save";
        btnSave.Click += new EventHandler(this.Savebtn_Click);
        panel.Controls.Add(btnSave);
        panel.Controls.Add(br());
    }
开发者ID:queer1,项目名称:Gaymer2.0,代码行数:28,代码来源:Roles.aspx.cs


示例19: OnCreate

        /// <summary>
        /// Called when [create].
        /// </summary>
        /// <param name="bundle">The bundle.</param>
        protected override void OnCreate(Bundle bundle)
        {
            try
            {
                base.OnCreate(bundle);
                this.RequestWindowFeature(WindowFeatures.NoTitle);
                SetContentView(Resource.Layout.Login);
                var loginButton = FindViewById<Button>(Resource.Id.btnLogin);
                loginButton.Click += loginButton_Click;
                txtUserName = FindViewById<EditText>(Resource.Id.txtUserName);
                txtPassword = FindViewById<EditText>(Resource.Id.txtPassword);
                chkRememberMe = FindViewById<CheckBox>(Resource.Id.chkRememberMe);
                ResetControl();
                txtUserName.Text = DecurtisDomain;
                txtUserName.SetSelection(txtUserName.Text.Length);
                if (ApplicationData.User != null && !string.IsNullOrEmpty(ApplicationData.User.LoginName))
                {
                    txtUserName.Text = ApplicationData.User.LoginName;
                }
            }
            catch (Exception e)
            {
                AlertMessage(GetString(Resource.String.Error), e.Message.ToString());
            }

            // Create your application here
        }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:31,代码来源:LoginActivity.cs


示例20: btndelete_Click

    protected void btndelete_Click(object sender, EventArgs e)
    {
        CheckBox cb = new CheckBox();

        bool flag = false;

        for(int i=0;i<GridView1.Rows.Count;i++)
        {
            cb=(CheckBox)GridView1.Rows[i].FindControl("CheckBox1");

            if(cb.Checked)
            {
                objareabal.AreaId = Convert.ToInt32(GridView1.Rows[i].Cells[3].Text);

                objareadal.DeleteArea(objareabal);

                flag = true;
            }


        }

        if(flag)
        {
            Response.Write("<script>Alert('Records Deleted');</script>");
        }
        else
        {
            Response.Write("<script>alert('Please Select Record to Delete')</script>");
        }

        bindgrid();

    }
开发者ID:MShah890,项目名称:Eventica,代码行数:34,代码来源:Area.aspx.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# CheckState类代码示例发布时间:2022-05-24
下一篇:
C# Check类代码示例发布时间: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