static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var main_form = new Main(); main_form.Show(); Application.Run(); }
public Verified(bool? isVerified) { if (isVerified.HasValue == null && isVerified == true) { Main frm = new Main(); frm.Show(); Close(); } InitializeComponent(); }
private void btnCreate_Click(object sender, EventArgs e) { using (var cn = new SqlConnection(@"Data Source=(LocalDB)\v11.0;AttachDbFilename" + "=|DataDirectory|\\DB.mdf; Integrated Security=True")) { string _sql = @"INSERT INTO [dbo].[Data] ([70617373776f7264]) VALUES (@70617373776f7264)"; var insertCmd = new SqlCommand(_sql, cn); insertCmd.Parameters .Add(new SqlParameter("@70617373776f7264", SqlDbType.VarChar)) .Value = SHA1.Encode(txtCreate.Text); cn.Open(); insertCmd.ExecuteNonQuery(); cn.Close(); } Main frm = new Main(); frm.Show(); Close(); }