예제 #1
0
        public Form1()
        {
            InitializeComponent();

            safeEngine      = new SafeEngine();
            txtPincode.Text = safeEngine.getDisplayText();
        }
예제 #2
0
        private void btnChange_Click(object sender, EventArgs e)
        {
            //Form testDialog = new Form();
            Form2 testDialog = new Form2();

            // Show testDialog as a modal dialog and determine if DialogResult = OK.
            if (testDialog.ShowDialog(this) == DialogResult.OK)
            {
                // Read the contents of testDialog's TextBox.
                safeEngine      = new SafeEngine(testDialog.txtNew.Text.Length, testDialog.txtNew.Text);
                txtPincode.Text = safeEngine.getDisplayText();
            }
            testDialog.Dispose();
        }