Inheritance: ButtonBase, System.ComponentModel.IComponent, System.IDisposable, IOleControl, IOleObject, IOleInPlaceObject, IOleInPlaceActiveObject, IOleWindow, IViewObject, IViewObject2, IPersist, IPersistStreamInit, IPersistPropertyBag, IPersistStorage, IQuickActivate, ISupportOleDropSource, IDropTarget, System.ComponentModel.ISynchronizeInvoke, IWin32Window, System.Windows.Forms.Layout.IArrangedElement, IBindableComponent
Example #1
0
    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;
    }
Example #2
0
	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);
	}
        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;
        }
        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;
        }
Example #5
0
 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"));
 }
Example #6
0
 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));
 }
    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";
    }
Example #8
0
 protected void btnBook_Click(object sender, EventArgs e)
 {
     _objShoppingHelper = GetShoppingHelperObject();
     if (_objShoppingHelper == null || _objShoppingHelper.HotelDetails == null)
     {
         ErrorRedirect("search.aspx", "Please select hotel first!");
         return;
     }
     _lstHotelInfoIdChecked = new List<TextValue>();
     foreach (RepeaterItem item in rptrRooms.Items)
     {
         hdnFldHotelInfoIdP = (HiddenField)item.FindControl("hdnFldHoyelInfoId");
         hdnFldNumberOfPassengersP = (HiddenField)item.FindControl("hdnFldNumberOfPassengers");
         ckbRoomCheckP = (CheckBox)item.FindControl("ckbBookRoom");
         if (ckbRoomCheckP.Checked)
         {
             _lstHotelInfoIdChecked.Add(new TextValue { Text = hdnFldNumberOfPassengersP.Value, Value = hdnFldHotelInfoIdP.Value });
         }
     }
     index = 0;
     foreach (var x in _objShoppingHelper.HotelDetails.RoomDetails)
     {
         paxCount = (x.Adults + x.Kids + x.Infants).ToString();
         x.HotelInfoId = long.Parse(_lstHotelInfoIdChecked.Where(y => y.Text == paxCount).First().Value);
         index += 1;
     }
     Response.Redirect("book.aspx");
 }
Example #9
0
        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;
        }
        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;
        }
Example #11
0
 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;
     }
 }
    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();
    }
Example #13
0
	public MainForm ()
	{
		// 
		// _normalCheckBox
		// 
		_normalCheckBox = new CheckBox ();
		_normalCheckBox.Checked = true;
		_normalCheckBox.Location = new Point (55, 8);
		_normalCheckBox.Size = new Size (60, 20);
		_normalCheckBox.Text = "Normal";
		Controls.Add (_normalCheckBox);
		// 
		// _buttonCheckBox
		// 
		_buttonCheckBox = new CheckBox ();
		_buttonCheckBox.Appearance = Appearance.Button;
		_buttonCheckBox.Checked = true;
		_buttonCheckBox.Location = new Point (170, 8);
		_buttonCheckBox.Size = new Size (60, 20);
		_buttonCheckBox.Text = "Button";
		Controls.Add (_buttonCheckBox);
		// 
		// MainForm
		// 
		ClientSize = new Size (300, 50);
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #82657";
		Load += new EventHandler (MainForm_Load);
	}
		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);
		}
		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();
		}
    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);
        }
    }
		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;
		}
    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";
    }
Example #19
0
	public MainForm ()
	{
		// 
		// _textBox
		// 
		_textBox = new TextBox ();
		_textBox.Dock = DockStyle.Top;
		_textBox.Height = 100;
		_textBox.Multiline = true;
		Controls.Add (_textBox);
		// 
		// _multilineCheckBox
		// 
		_multilineCheckBox = new CheckBox ();
		_multilineCheckBox.Checked = true;
		_multilineCheckBox.Location = new Point (8, 110);
		_multilineCheckBox.Size = new Size (100, 20);
		_multilineCheckBox.Text = "Multiline";
		_multilineCheckBox.CheckedChanged += new EventHandler (MultilineCheckBox_CheckedChanged);
		Controls.Add (_multilineCheckBox);
		// 
		// MainForm
		// 
		ClientSize = new Size (300, 135);
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #82749";
		Load += new EventHandler (MainForm_Load);
	}
Example #20
0
        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();
            };
        }
Example #21
0
    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());
    }
Example #22
0
        /// <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
        }
Example #23
0
    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();

    }
Example #24
0
    /// <summary>
    /// 发送内部短信和手机短信
    /// </summary>
    /// <param name="MailChk">内部短信选择框</param>
    /// <param name="SmsChk">手机短信选择框</param>
    /// <param name="ContentStr">发送消息内容</param>
    /// <param name="ToUserList">接收人列表</param>
    public static void SendMessage(CheckBox MailChk,CheckBox SmsChk,string ContentStr,string ToUserList)
    {
        if (SmsChk.Checked == true)
        {
            //发送手机信息
            //Mobile.SendSMS("系统消息", ToUserList, ContentStr);
            string WrongUser = Mobile.UserToTel(ToUserList, ContentStr);    //发送人名,发送内容
        }

        string[] UserListStr = ToUserList.Split(',');
        for (int i = 0; i < UserListStr.Length; i++)
        {
            if (MailChk.Checked == true)
            {
                //发送内部信息
                ZWL.BLL.ERPLanEmail MyMail = new ZWL.BLL.ERPLanEmail();
                MyMail.EmailContent = ContentStr;
                MyMail.EmailState = "未读";
                MyMail.EmailTitle = ContentStr;
                MyMail.FromUser = "系统消息";
                MyMail.FuJian = "";
                MyMail.TimeStr = DateTime.Now;
                MyMail.ToUser = UserListStr[i].ToString();
                MyMail.Add();
            }
        }
    }
Example #25
0
 private void DrawCreateToonMenu()
 {
     DarkGUI.Instance.ClearAllUI();
     var charName = new TextBox("charName", new Rect(XCentre - 50, YCentre, 100, 50));
     var isMale = new CheckBox("isMale?", new Rect(XCentre - 50, YCentre - 50, 100, 50));
     new Button("Create!", XCentre - 50, YCentre - 150).OnClick += delegate(Button sender) { _network.Send(new CreateCharacter() { Name = charName.Text, isMale = isMale.Checked }); };
 }
		private void InitView()
		{
			//设置标题栏
			var img_header_back = FindViewById<ImageView> (Resource.Id.img_header_back);
			img_header_back.Click += (sender, e) => 
			{
				this.Finish();
				OverridePendingTransition(Android.Resource.Animation.SlideInLeft,Android.Resource.Animation.SlideOutRight);
			};
			var tv_back = FindViewById<TextView> (Resource.Id.tv_back);
			tv_back.Text = "返回";
			var tv_desc = FindViewById<TextView> (Resource.Id.tv_desc);
			tv_desc.Text = "银行卡信息";

			edit_cardOwnerName = FindViewById<EditText> (Resource.Id.edit_cardOwnerName);
			edit_IdCardNo = FindViewById<EditText> (Resource.Id.edit_IdCardNo);
			edit_bankopenloc = FindViewById<EditText> (Resource.Id.edit_bankopenloc);
			edit_bankbranch = FindViewById<EditText> (Resource.Id.edit_bankbranch);
			edit_bankCardNo = FindViewById<EditText> (Resource.Id.edit_bankCardNo);
			edit_prePhoneNo = FindViewById<EditText> (Resource.Id.edit_prePhoneNo);
			edit_Code = FindViewById<EditText> (Resource.Id.edit_Code);
			img_choosebank = FindViewById<ImageView> (Resource.Id.img_choosebank);

			tv_SendCodeStatusShow = FindViewById<TextView> (Resource.Id.tv_SendCodeStatusShow);

			cb_defaut_bank = FindViewById<CheckBox> (Resource.Id.cb_defaut_bank);
			btn_Send = FindViewById<Button> (Resource.Id.btn_Send);
			btn_Add = FindViewById<Button> (Resource.Id.btn_Add);

			//选择银行卡
			img_choosebank.Click += (sender, e) => 
			{
				var intent = new Intent(this,typeof(ChooseBankTypeActivity));
				var requestCode = 0;  
				StartActivityForResult(intent,requestCode);
			};
			//安全码验证
			edit_Code.TextChanged += (sender, e) => 
			{
				if(edit_Code.Text.Length>0)
					btn_Add.Enabled = true;
				else
					btn_Add.Enabled =false;
			};
			//初始化计时器,启动
			mc = new MyCount(this,60000,1000);
			//发送验证码
			btn_Send.Click += (sender, e) => 
			{
				tv_SendCodeStatusShow.Visibility = ViewStates.Invisible;
				btn_Send.Enabled = false;
				SendCode();
			};

			//添加银行卡信息
			btn_Add.Click += (sender, e) => 
			{
				AddBank();
			};
		}
Example #27
0
	public MainForm ()
	{
		_checkedListBox = new CheckedListBox ();
		_checkedListBox.Dock = DockStyle.Top;
		_checkedListBox.Font = new Font (_checkedListBox.Font.FontFamily, _checkedListBox.Font.Height + 8);
		_checkedListBox.Height = 120;
		Controls.Add (_checkedListBox);
		// 
		// _threeDCheckBox
		// 
		_threeDCheckBox = new CheckBox ();
		_threeDCheckBox.Checked = _checkedListBox.ThreeDCheckBoxes;
		_threeDCheckBox.FlatStyle = FlatStyle.Flat;
		_threeDCheckBox.Location = new Point (8, 125);
		_threeDCheckBox.Text = "3D checkboxes";
		_threeDCheckBox.CheckedChanged += new EventHandler (ThreeDCheckBox_CheckedChanged);
		Controls.Add (_threeDCheckBox);
		// 
		// MainForm
		// 
		ClientSize = new Size (300, 150);
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #82100";
		Load += new EventHandler (MainForm_Load);
	}
Example #28
0
 static DebugMenu()
 {
     MenuDebug = Config.Menu.AddSubMenu("Debug");
     MenuDebug.AddLabel("This is for debugging purposes only.");
     _debugChat = MenuDebug.Add("debugChat", new CheckBox("Show debug messages in chat", false));
     _debugConsole = MenuDebug.Add("debugConsole", new CheckBox("Show debug messages in console", false));
 }
Example #29
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			SetContentView (Resource.Layout.Main);

			mCustomConfig = FindViewById <CheckBox> (Resource.Id.custom_app_limits);
		
			bool customChecked = 
				PreferenceManager.GetDefaultSharedPreferences (this).GetBoolean (
					CUSTOM_CONFIG_KEY, false);

			if (customChecked) mCustomConfig.Checked = true;

			mMultiEntryValue = FindViewById <TextView> (Resource.Id.multi_entry_id);
			mChoiceEntryValue = FindViewById <TextView> (Resource.Id.choice_entry_id);
			mBooleanEntryValue = FindViewById <TextView> (Resource.Id.boolean_entry_id);

			/**
    		* Saves custom app restriction to the shared preference.
    	 	*
    		* This flag is used by {@code GetRestrictionsReceiver} to determine if a custom app
    	 	* restriction activity should be used.
    	 	*
    	 	* @param view
    	 	*/
			mCustomConfig.Click += delegate (object sender, EventArgs e) {
				var editor = PreferenceManager.GetDefaultSharedPreferences (this).Edit ();
				editor.PutBoolean (CUSTOM_CONFIG_KEY, mCustomConfig.Checked).Commit ();
			};
		}
Example #30
0
        public BuildElement(BuildCreator bc, Menu menu, LoLItem item, int index, ShopActionType action)
        {
            this.action = action;
            this.bc = bc;
            this.item = item;
            p = index;

            upBox = new CheckBox("up", false);
            removeBox = new CheckBox("remove", false);
            itemName = new Label(" ");
            costSlots = new Label(" ");

            PropertyInfo property2 = typeof (CheckBox).GetProperty("Size");

            property2.GetSetMethod(true).Invoke(itemName, new object[] {new Vector2(400, 0)});
            property2.GetSetMethod(true).Invoke(costSlots, new object[] {new Vector2(400, 0)});
            property2.GetSetMethod(true).Invoke(upBox, new object[] {new Vector2(40, 20)});
            property2.GetSetMethod(true).Invoke(removeBox, new object[] {new Vector2(80, 20)});


            menu.Add(position + "nam" + RandGen.r.Next(), itemName);
            menu.Add(position + "cs" + RandGen.r.Next(), costSlots);
            menu.Add(position + "up" + RandGen.r.Next(), upBox);
            menu.Add(position + "rem" + RandGen.r.Next(), removeBox);
            updateText();

            upBox.CurrentValue = false;
            removeBox.CurrentValue = false;
            upBox.OnValueChange += upBox_OnValueChange;
            removeBox.OnValueChange += removeBox_OnValueChange;
            property = typeof (CheckBox).GetProperty("Position");
        }