Beispiel #1
0
        public void writeSystemSettings()
        {
            try
            {
                string _currentLocationId = "";
                try
                {
                    _currentLocationId = cboCurrentLocation.SelectedValue.ToString();
                }
                catch { }

                string _StringToWrite = "CurrentLocationId:" + _currentLocationId +
                                        ";CurrentConnection:" + cboCurrentConnection.Text;
                _StringToWrite = loCryptorEngine.EncryptString(_StringToWrite);
                System.IO.TextWriter writeFile = new StreamWriter(".../Main/text/SystemSettings.txt");
                writeFile.WriteLine(_StringToWrite);
                writeFile.Flush();
                writeFile.Close();
                writeFile = null;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 public void LicenseCertificateWrite(string pLicenseNo)
 {
     try
     {
         string _StringToWrite = "ApplicationName:" + lblApplicationName.Text + ";ProcessorId:" + GlobalFunctions.GetProcessorId() + ";" + "ExpiryDate:01/01/9999;" + "LicenseNo:" + pLicenseNo;
         _StringToWrite = loCryptorEngine.EncryptString(_StringToWrite);
         System.IO.TextWriter writeFile = new StreamWriter(".../Main/text/LicenseCertificate.txt");
         writeFile.WriteLine(_StringToWrite);
         writeFile.Flush();
         writeFile.Close();
         writeFile = null;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }