public void MsgBoxButtons(String title, String msg, object btn2lst) { invisible(); Dialog.SetTitle(title); Button1.SetText("CANCEL", TextView.BufferType.Normal); Button2.SetText("OK", TextView.BufferType.Normal); Text1.Visibility = ViewStates.Visible; Button1.Visibility = ViewStates.Visible; Button2.Visibility = ViewStates.Visible; Button1.Click += delegate { }; Button2.Click += delegate { }; // btn1.SetOnClickListener (View.IOnClickListener );//{ public void onClick(View v){dialog.cancel();}}); // btn2.SetOnClickListener(btn2lst); Text1.SetText(msg, TextView.BufferType.Normal); try { Dialog.Show(); } catch (Exception err) { Log.Debug("xxx", err.Message); } }
public void MsgBoxButtons(String title, String msg, String button1name, String button2name, String button3name, EventHandler btn1lst, EventHandler btn2lst, EventHandler btn3lst, bool usesave) { invisible(); Dialog.SetTitle(title); Button1.SetText(button1name, TextView.BufferType.Normal); Button2.SetText(button2name, TextView.BufferType.Normal); Button3.SetText(button3name, TextView.BufferType.Normal); Text1.Visibility = ViewStates.Visible; Button1.Visibility = ViewStates.Visible; Button2.Visibility = ViewStates.Visible; Button3.Visibility = ViewStates.Visible; Button1.Click += btn1lst; Button2.Click += btn2lst; Button3.Click += btn3lst; Text1.SetText(msg, TextView.BufferType.Normal); if (usesave) { CheckBoxSaveText.Visibility = ViewStates.Visible; CheckBoxSave.Visibility = ViewStates.Visible; } try { Dialog.Show(); } catch (Exception err) { Log.Debug("xxx", err.Message); } }
void ReleaseDesignerOutlets() { if (Label1 != null) { Label1.Dispose(); Label1 = null; } if (Button1 != null) { Button1.Dispose(); Button1 = null; } if (Button2 != null) { Button2.Dispose(); Button2 = null; } if (Button3 != null) { Button3.Dispose(); Button3 = null; } }
void ReleaseDesignerOutlets() { if (GreetingLabel != null) { GreetingLabel.Dispose(); GreetingLabel = null; } if (Text1 != null) { Text1.Dispose(); Text1 = null; } if (Button1 != null) { Button1.Dispose(); Button1 = null; } if (FooterLabel != null) { FooterLabel.Dispose(); FooterLabel = null; } }
protected void txt_Clr1_TextChanged(object sender, EventArgs e) { try { double val = 0; clrval1 = 0; if (!(string.IsNullOrEmpty(txt_Clr1.Text))) { clrval1 = Convert.ToDouble(txt_Clr1.Text); } if (!(string.IsNullOrEmpty(txt_fat1.Text))) { fatval1 = Convert.ToDouble(txt_fat1.Text); } if ((clrval1 > 0) && (fatval1 > 0)) { val = (fatval1 * 0.21) + ((clrval1 / 4) + 0.36); } txt_SNF1.Text = val.ToString("f2"); //txt_Clr1.Focus(); // txt_SNF1.Text = snfval1.ToString(); txt_fat1.Text = fatval1.ToString(); txt_Clr1.Text = clrval1.ToString(); Button1.Focus(); } catch (Exception ex) { ex.ToString(); } }
private async Task AnimateButtons() { Button1.Scale = 0; Button2.Scale = 0; Button3.Scale = 0; Button4.Scale = 0; Button5.Scale = 0; Button6.Scale = 0; Button7.Scale = 0; Button8.Scale = 0; Button9.Scale = 0; Button0.Scale = 0; ButtonX.Scale = 0; await Task.Delay(300); var tasks = new Task[] { Button1.ScaleTo(1, 200), Button2.ScaleTo(1, 200), Button3.ScaleTo(1, 200), Button4.ScaleTo(1, 200), Button5.ScaleTo(1, 200), Button6.ScaleTo(1, 200), Button7.ScaleTo(1, 200), Button8.ScaleTo(1, 200), Button9.ScaleTo(1, 200), Button0.ScaleTo(1, 200), ButtonX.ScaleTo(1, 200) }; await Task.WhenAll(tasks); }
private void Form1_Load(object sender, EventArgs e) { this.DoubleBuffered = true; alphabetButtons = this.Controls.OfType <Button>().Except(new Button[] { Button1 }).ToArray(); Array.ForEach(alphabetButtons, b => b.Click += btn_click); Button1.PerformClick(); }
private void FixedUpdate() { if (!solved) { if (Input.GetMouseButtonDown(0)) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit rayCastHit; if (Physics.Raycast(ray.origin, ray.direction, out rayCastHit, Mathf.Infinity)) { Button1 one = rayCastHit.transform.GetComponent <Button1>(); if (one) { box.morgueAnswer += "1"; } if (box.MorgueAnswer() == "011100110110111101101110") { doorIsOpening = true; bedIsOpening = true; } } } } }
protected void Button1_Click(object sender, EventArgs e) { if (!IsPostBack) { if (Request.Cookies["txtPassword"] != null) { unbox.Text = Request.Cookies["txtPassword"].Value; Button2.Click += new EventHandler(Button2_Click); } else if (Session["pass"] != null) { unbox.Text = Session["pass"].ToString(); Button2.Click += new EventHandler(Button2_Click); } } if (Helper.userValid(unbox.Text) == "1") { user = unbox.Text; unbox.Text = ""; unbox.TextMode = TextBoxMode.Password; ulbl.Text = "Password "; rem.Visible = false; remlbl.Visible = false; Button1.Visible = false; Button1.Dispose(); Session["User"] = user; } else { errlbl.Text = "User Name doesnt exist"; } Button2.Visible = true; }
public override void ViewDidLoad() { base.ViewDidLoad(); // Perform any additional setup after loading the view, typically from a nib. Button1.SetImage(UIImage.FromFile("ConfResources/Images/appbar.people.png"), UIControlState.Normal); Button2.SetImage(UIImage.FromFile("ConfResources/Images/appbar.city.png"), UIControlState.Normal); Button3.SetImage(UIImage.FromFile("ConfResources/Images/appbar.bus.png"), UIControlState.Normal); Button4.SetImage(UIImage.FromFile("ConfResources/Images/appbar.questionmark.rest.png"), UIControlState.Normal); this.AddLangBindings(new Dictionary <object, string>() { { MainLabel, "Text AboutSQLBits" }, { Button1, "Title Sponsors" }, { Button2, "Title Exhibitors" }, { Button3, "Title Map" }, { Button4, "Title About" }, }); this.AddBindings(new Dictionary <object, string>() { { Button1, "TouchUpInside ShowSponsorsCommand" }, { Button2, "TouchUpInside ShowExhibitorsCommand" }, { Button3, "TouchUpInside ShowMapCommand" }, { Button4, "TouchUpInside ShowAboutCommand" }, }); NavigationItem.SetRightBarButtonItem(new UIBarButtonItem("Tweet", UIBarButtonItemStyle.Bordered, (sender, e) => ViewModel.DoShareGeneral()), false); }
protected void Qty_TextChanged(object sender, EventArgs e) { SPDiscount.Text = string.Format("{0:f2}", ((decimal.Parse(Qty.Text) * decimal.Parse(SpecialDiscount.ToString())))); //Amount.Text = string.Format("{0:f2}", (decimal.Parse(Qty.Text) * decimal.Parse(DP.Text))); Amount.Text = string.Format("{0:f2}", (decimal.Parse(DP.Text) * (decimal.Parse(Qty.Text)) - decimal.Parse(SPDiscount.Text))); Button1.Focus(); }
public void MsgBoxLogin(String login, String psw, View.IOnClickListener btn2lst) { invisible(); Dialog.SetTitle("Login/Password"); Edit1.SetText(login, TextView.BufferType.Normal); Edit2.SetText(psw, TextView.BufferType.Normal); Button1.SetText("CANCEL", TextView.BufferType.Normal); Button2.SetText("OK", TextView.BufferType.Normal); Text1.Visibility = ViewStates.Visible; Text1.SetText("Login", TextView.BufferType.Normal); Text2.Visibility = ViewStates.Visible; Text2.SetText("Password", TextView.BufferType.Normal); Button1.Visibility = ViewStates.Visible; Button2.Visibility = ViewStates.Visible; Edit1.Visibility = ViewStates.Visible; Edit2.Visibility = ViewStates.Visible; // btn1.SetOnClickListener (new View.IOnClickListener ());//{public void onClick(View v){dialog.cancel();}}); // btn2.SetOnClickListener(btn2lst); try { Dialog.Show(); } catch (Exception err) { Log.Debug("xxx", err.Message); } }
protected void txt_stockname_TextChanged(object sender, EventArgs e) { try { getstockcategory(); if ((ddl_stocktype.SelectedItem.Text == stocktype.Trim()) && (txt_stockname.Text == stockname.Trim())) { txt_stockname.Text = ""; lblmsg.Visible = true; lblmsg.ForeColor = System.Drawing.Color.Red; lblmsg.Text = "StockName Already Available..."; txt_stockname.Focus(); } else { Button1.Focus(); } } catch (Exception Ex) { lblmsg.Text = Ex.Message; lblmsg.Visible = true; } }
public override void ViewDidLoad() { base.ViewDidLoad(); NavigationItem.SetRightBarButtonItem(new UIBarButtonItem("Tweet", UIBarButtonItemStyle.Bordered, (sender, e) => ViewModel.ShareGeneralCommand.Execute()), false); // Perform any additional setup after loading the view, typically from a nib. Button1.SetImage(UIImage.FromFile("ConfResources/Images/appbar.calendar.png"), UIControlState.Normal); Button2.SetImage(UIImage.FromFile("ConfResources/Images/appbar.calendar.png"), UIControlState.Normal); Button3.SetImage(UIImage.FromFile("ConfResources/Images/appbar.calendar.png"), UIControlState.Normal); Button4.SetImage(UIImage.FromFile("ConfResources/Images/appbar.people.png"), UIControlState.Normal); Button5.SetImage(UIImage.FromFile("ConfResources/Images/appbar.database.png"), UIControlState.Normal); this.AddBindings(new Dictionary <object, string>() { { Label1, "{'Text':{'Path':'TextSource','Converter':'Language','ConverterParameter':'ByDay'}}" }, { Label2, "{'Text':{'Path':'TextSource','Converter':'Language','ConverterParameter':'BySpeaker'}}" }, { Label3, "{'Text':{'Path':'TextSource','Converter':'Language','ConverterParameter':'ByTopic'}}" }, { Button1, "{'Title':{'Path':'TextSource','Converter':'Language','ConverterParameter':'Thursday'}}" }, { Button2, "{'Title':{'Path':'TextSource','Converter':'Language','ConverterParameter':'Friday'}}" }, { Button3, "{'Title':{'Path':'TextSource','Converter':'Language','ConverterParameter':'Saturday'}}" }, { Button4, "{'Title':{'Path':'TextSource','Converter':'Language','ConverterParameter':'Speakers'}}" }, { Button5, "{'Title':{'Path':'TextSource','Converter':'Language','ConverterParameter':'Topics'}}" }, }); this.AddBindings(new Dictionary <object, string>() { { Button1, "{'TouchDown':{'Path':'ShowThursdayCommand'}}" }, { Button2, "{'TouchDown':{'Path':'ShowFridayCommand'}}" }, { Button3, "{'TouchDown':{'Path':'ShowSaturdayCommand'}}" }, { Button4, "{'TouchDown':{'Path':'ShowSpeakersCommand'}}" }, { Button5, "{'TouchDown':{'Path':'ShowTopicsCommand'}}" }, }); }
private void Tx_pwd_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == Convert.ToChar(Keys.Enter)) { Button1.PerformClick(); } }
public void FirstTime() { this.Dispatcher.Invoke(() => { if (stage == CaptureStage.Identify) { stage = CaptureStage.FirstTime; MainLabel.Text = "Eres nuevo"; Button1Label.Text = "Si"; Button1Label.Visibility = Visibility.Visible; Button1.Visibility = Visibility.Visible; Button2Label.Text = "No"; Button2Label.Visibility = Visibility.Visible; Button2.Visibility = Visibility.Visible; BottomPanel.Visibility = Visibility.Visible; BottomPanelText.Visibility = Visibility.Visible; BottomPanelText.Text = "Pienso que no te conozco. ¿Es la primera vez que te veo?"; BottomPanel.SetValue(Grid.RowProperty, 2); BottomPanelText.SetValue(Grid.RowProperty, 2); Button1Label.SetValue(Grid.RowProperty, 3); Button1.SetValue(Grid.RowProperty, 3); Button2Label.SetValue(Grid.RowProperty, 3); Button2.SetValue(Grid.RowProperty, 3); } }); }
public void Matched(int subject) { this.Dispatcher.Invoke(() => { if (stage == CaptureStage.Identify) { stage = CaptureStage.Matched; IdentityImage.Source = capture.GetIdentityBitmap(subject, 0); IdentityImage.Visibility = Visibility.Visible; MainLabel.Visibility = Visibility.Collapsed; Button1Label.Text = "Si"; Button1Label.Visibility = Visibility.Visible; Button1.Visibility = Visibility.Visible; Button2Label.Text = "No"; Button2Label.Visibility = Visibility.Visible; Button2.Visibility = Visibility.Visible; BottomPanel.Visibility = Visibility.Visible; BottomPanelText.Visibility = Visibility.Visible; BottomPanelText.Text = "Pienso que ya te conozco. ¿Eres tu la persona de esta foto?"; BottomPanel.SetValue(Grid.RowProperty, 2); BottomPanelText.SetValue(Grid.RowProperty, 2); Button1Label.SetValue(Grid.RowProperty, 3); Button1.SetValue(Grid.RowProperty, 3); Button2Label.SetValue(Grid.RowProperty, 3); Button2.SetValue(Grid.RowProperty, 3); } }); }
private void PersonLeaveAnimation() { stage = CaptureStage.Idle; Button1Label.Text = "Empezar"; Button1Label.Visibility = Visibility.Collapsed; Button1.Visibility = Visibility.Collapsed; Button2Label.Text = "No"; Button2Label.Visibility = Visibility.Collapsed; Button2.Visibility = Visibility.Collapsed; BottomPanel.Visibility = Visibility.Collapsed; BottomPanelText.Visibility = Visibility.Collapsed; BottomPanelText.Text = "Ubícate para que tu cabeza se alinee con la imagen. Presiona continuar cuando hayas terminado."; SmallLabel.Text = "Levanta tu mano y presiona el boton para empezar."; SmallLabel.Visibility = Visibility.Collapsed; MainLabel.Text = "Hola!\n¿Ya me conoces?"; MainLabel.Visibility = Visibility.Visible; VideoCapture.Visibility = Visibility.Collapsed; TemplateImage.Visibility = Visibility.Collapsed; IdentityImage.Visibility = Visibility.Collapsed; ImgReference.Visibility = Visibility.Collapsed; ImgReferenceBG.Visibility = Visibility.Collapsed; BottomPanel.SetValue(Grid.RowProperty, 3); BottomPanelText.SetValue(Grid.RowProperty, 3); Button1Label.SetValue(Grid.RowProperty, 3); Button1.SetValue(Grid.RowProperty, 3); Button2Label.SetValue(Grid.RowProperty, 3); Button2.SetValue(Grid.RowProperty, 3); string[] fromGradient = { "#ffd52941", "#ffe45f42", "#ffee894c", "#fff6b061", "#fffcd581" }; string[] toGradient = { "#ff1f719b", "#ff238aad", "#ff33a3bc", "#ff4cbcc9", "#ff6bd5d3" }; UIAnimations.GradientAnimation(1.0, fromGradient, toGradient, BGCanvas); }
public override void ViewDidLoad() { base.ViewDidLoad(); // Perform any additional setup after loading the view, typically from a nib. Button1.SetImage(UIImage.FromFile("ConfResources/Images/appbar.people.png"), UIControlState.Normal); Button2.SetImage(UIImage.FromFile("ConfResources/Images/appbar.city.png"), UIControlState.Normal); Button3.SetImage(UIImage.FromFile("ConfResources/Images/appbar.bus.png"), UIControlState.Normal); Button4.SetImage(UIImage.FromFile("ConfResources/Images/appbar.questionmark.rest.png"), UIControlState.Normal); this.AddBindings(new Dictionary <object, string>() { { MainLabel, "{'Text':{'Path':'TextSource','Converter':'Language','ConverterParameter':'AboutSQLBits'}}" }, { Button1, "{'Title':{'Path':'TextSource','Converter':'Language','ConverterParameter':'Sponsors'}}" }, { Button2, "{'Title':{'Path':'TextSource','Converter':'Language','ConverterParameter':'Exhibitors'}}" }, { Button3, "{'Title':{'Path':'TextSource','Converter':'Language','ConverterParameter':'Map'}}" }, { Button4, "{'Title':{'Path':'TextSource','Converter':'Language','ConverterParameter':'About'}}" }, }); this.AddBindings(new Dictionary <object, string>() { { Button1, "{'TouchDown':{'Path':'ShowSponsorsCommand'}}" }, { Button2, "{'TouchDown':{'Path':'ShowExhibitorsCommand'}}" }, { Button3, "{'TouchDown':{'Path':'ShowMapCommand'}}" }, { Button4, "{'TouchDown':{'Path':'ShowAboutCommand'}}" }, }); NavigationItem.SetRightBarButtonItem(new UIBarButtonItem("Tweet", UIBarButtonItemStyle.Bordered, (sender, e) => ViewModel.ShareGeneralCommand.Execute()), false); }
public static void Back(Object sender, EventArgs e) { ListBox.Hide(); Button1.Show(); Button2.Show(); Button3.Show(); Button4.Hide(); }
private void applyStyle() { Label1.ApplyStyle(primaryStyle); ListBox1.ApplyStyle(primaryStyle); Button1.ApplyStyle(primaryStyle); Table1.ApplyStyle(primaryStyle); TextBox1.ApplyStyle(primaryStyle); }
private void LoginForm_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { Button1.PerformClick(); e.Handled = true; } }
private void Form1_Closing(object sender, EventArgs e) { // Disconnects the Balance Board if it is still connected while the window is closing if (TextStatus.Text == "Status: Connected") { Button1.PerformClick(); } }
private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == 13) { Button1.PerformClick(); e.Handled = true; } }
void Page_Load(object sender, System.EventArgs e) { if (!Page.IsPostBack) { // Add data to the borderColorList, // backColorList, and foreColorList controls. ListItemCollection colors = new ListItemCollection(); colors.Add(Color.Black.Name); colors.Add(Color.Blue.Name); colors.Add(Color.Green.Name); colors.Add(Color.Orange.Name); colors.Add(Color.Purple.Name); colors.Add(Color.Red.Name); colors.Add(Color.White.Name); colors.Add(Color.Yellow.Name); backColorList.DataSource = colors; backColorList.DataBind(); foreColorList.DataSource = colors; foreColorList.DataBind(); //<Snippet4> // Add data to the borderStyleList control. ListItemCollection styles = new ListItemCollection(); Type styleType = typeof(BorderStyle); foreach (string s in Enum.GetNames(styleType)) { styles.Add(s); } //</Snippet4> // Add data to the borderWidthList control. ListItemCollection widths = new ListItemCollection(); for (int i = 0; i < 11; i++) { widths.Add(i.ToString() + "px"); } // Add data to the fontNameList control. // Add data to the fontSizeList control. ListItemCollection fontSizes = new ListItemCollection(); fontSizes.Add("Small"); fontSizes.Add("Medium"); fontSizes.Add("Large"); fontSizes.Add("10pt"); fontSizes.Add("14pt"); fontSizes.Add("20pt"); fontSizeList.DataSource = fontSizes; fontSizeList.DataBind(); //Set primaryStyle as the style for each control. Label1.ApplyStyle(primaryStyle); ListBox1.ApplyStyle(primaryStyle); Button1.ApplyStyle(primaryStyle); Table1.ApplyStyle(primaryStyle); TextBox1.ApplyStyle(primaryStyle); } }
//string userid = Common.common.sessionname; protected void Page_Load(object sender, EventArgs e) { if ((string)Session["userid"] == null) { Response.Redirect("~/LogIn.aspx"); } if (IsPostBack) { //SqlConnection connection = new SqlConnection(Common.common.strcon); //SqlCommand command = new SqlCommand("SELECT dp FROM Member WHERE Id = @Id", connection); //command.Parameters.AddWithValue("@Id", (string)Session["userid"]); //SqlDataReader reader; //connection.Open(); //reader = command.ExecuteReader(); //reader.Read(); //string url = "~/dp/" + reader["dp"]; //Image1.ImageUrl = url; error_label.Text = ""; } if (!IsPostBack) { if ((string)Session["newpassword"] != null) { string args = "{email:" + '"' + Session["email"].ToString() + '"' + ",password:"******"' + Session["password"].ToString() + '"' + ",newpassword:"******"' + Session["newpassword"].ToString() + '"' + ",name:" + '"' + Session["name"].ToString() + '"' + "}"; Page.ClientScript.RegisterStartupScript(Button1.GetType(), "test", "accountupdate(" + args + ");", true); } SqlConnection connection = new SqlConnection(Common.common.strcon); SqlCommand command = new SqlCommand("SELECT * FROM Member WHERE Id = @Id", connection); command.Parameters.AddWithValue("@Id", (string)Session["userid"]); try { SqlDataReader reader; connection.Open(); reader = command.ExecuteReader(); reader.Read(); string url = "~/dp/" + reader["dp"]; Image1.ImageUrl = url; TextBox1.Text = (string)reader["Name"]; Label11.Text = (string)reader["Email"]; TextBox3.Text = (string)reader["Phone"]; TextBox4.Text = (string)reader["status"]; TextBox5.Text = (string)reader["password"]; DropDownList1.Text = (string)reader["gender"]; TextBox8.Text = (string)reader["age"]; } catch (Exception err) { error_label.Text = "Error occured while getting data<br>Please try after some time" + err; } finally { connection.Close(); } } }
private void InputMouseMove(MouseEvent <HTMLCanvasElement> e) { Up.As <Events>().InputMove(e); Down.As <Events>().InputMove(e); Left.As <Events>().InputMove(e); Right.As <Events>().InputMove(e); Cancel.As <Events>().InputMove(e); Button1.As <Events>().InputMove(e); }
private void Form1_Load(object sender, EventArgs e) { DoubleBuffered = true; //Get the Buttons and save them, except the "New Game"-Button alphabetButtons = Controls.OfType <Button>().Except(new Button[] { Button1 }).ToArray(); Array.ForEach(alphabetButtons, b => b.Click += btn_click); //Well..Perform a click... Button1.PerformClick(); }
public CustomMessageBox() { InitializeComponent(); text.Text = MessageBoxReturn.text; Button1.Content = MessageBoxReturn.Button1; Button2.Content = MessageBoxReturn.Button2; MessageBoxReturn.Return = false; Button1.Focus(); }
private void InputKeyUp(KeyboardEvent e) { Up.As <Events>().InputUp(e); Down.As <Events>().InputUp(e); Left.As <Events>().InputUp(e); Right.As <Events>().InputUp(e); Cancel.As <Events>().InputUp(e); Button1.As <Events>().InputUp(e); }