private void button1_Click_1(object sender, EventArgs e) { error.Visible = false; if (email.Text == "" || password.Text == "") { error.Text = PARAM_MISSING; error.Visible = true; return; } Boolean confirmed = checkUserName(this.email.Text, this.password.Text); if (!confirmed) { error.Text = PASSWORD_DOESNT_MACH; error.Visible = true; return; } else { MessageBox.Show("Login successfull!\ncontinue to MyScreen"); } MainForm MainForm = new MainForm(); this.Hide(); MainForm.Show(); }
public ScaleForm(double pixels, double feet, MainForm mainform) { InitializeComponent(); m_pixels = pixels; m_feet = feet; this.pixelBox.Text = m_pixels.ToString(); this.feetBox.Text = m_feet.ToString(); m_mainform = mainform; }
public PathForm(MainForm parent) { InitializeComponent(); m_parent = parent; if (m_parent.Status != null) { TileList.DataSource = m_parent.Status.Path; } }
private void submit_Click(object sender, EventArgs e) { const string CONFIRMED = "confirmed"; if (confirmationCode.Text == "") { error.Text = NO_CONF_CODE; error.Visible = true; } User user = LocalData.getUserProperties(); using (var wb = new WebClient()) { var data = new NameValueCollection(); data["email"] = user.Email; data["c"] = confirmationCode.Text; var response = wb.UploadValues("http://my.jce.ac.il/~eranno/act/activate.php", "POST", data); //contains conf code String body = Encoding.UTF8.GetString(response); char code = body[0]; if (code == '1' || code == '2') { MessageBox.Show("Success code: " + body); error.Text = WORNG_CONF_CODE; error.Visible = true; return; } else { user.SecurityCode = CONFIRMED; String ok = LocalData.updateUser(user); //MessageBox.Show(ok); MessageBox.Show("Login successfull!\n\ncontinue to MyScreen"); //return; } } MainForm MainForm = new MainForm(); this.Hide(); MainForm.Show(); }
internal MainForm() { Form = this; InitializeComponent(); }
public FacingForm(MainForm parent) { InitializeComponent(); facingbox.Text = parent.Host.Status.Position.facing.ToString(); m_parent = parent; }