WriteLicenseV2() private method

private WriteLicenseV2 ( string path, string netsealId, string username, string password ) : void
path string
netsealId string
username string
password string
return void
Example #1
0
        private void exportLicenseToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (var folderDialog = new FolderBrowserDialog())
            {
                var result = folderDialog.ShowDialog();

                if (result == System.Windows.Forms.DialogResult.OK)
                {
                    var path = folderDialog.SelectedPath;
                    var licenseWriter = new LicenseWriter();

                    int counter = 0;
                    for (var index = 0; index < ltvLicenses.SelectedIndices.Count; index++)
                    {
                        var license = this.Licenses[ltvLicenses.SelectedIndices[index]];
                        licenseWriter.WriteLicenseV2(
                            path + "\\" + license.LicenseName,
                            license.ID,
                            license.Username,
                            license.Sha1Password);

                        counter++;
                    }
                    Logger.LogInformation("Exported " + counter + " licenses");
                }
            }
        }