Ejemplo n.º 1
0
 // SaveKeyToConfig Method
 // Save Key and Initialization Vectors (IV) for Encryption/Decryption
 public void SaveKeyToConfig()
 {
     Properties.Settings set = Properties.Settings.Default;
     set.AESKey = EncryptKey(rjndl.Key);
     set.AESIV  = EncryptKey(rjndl.IV);
     set.Save(); //Save the keys into application setting
 }
Ejemplo n.º 2
0
        private void configureCOMPortToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmComPort frmComPort = new frmComPort();

            frmComPort.ShowDialog();

            string selectedPort = frmComPort.selectedComPort;

            if (selectedPort != null)
            {
                port.ComName = selectedPort;

                //Save the ComName into application setting
                Properties.Settings set = Properties.Settings.Default;
                set.COMPort = selectedPort;
                set.Save();
            }
        }