private void mnuGenStrongKey_Click(object sender, EventArgs e)
        {
            string initDir = null;

            if (!String.IsNullOrEmpty(Config.StrongKeyFile))
            {
                initDir = Path.GetDirectoryName(Config.StrongKeyFile);
            }

            string file = SimpleDialog.OpenFile(null, "Key Files(*.snk)|*.snk|All Files(*.*)|*.*", ".snk", false, initDir);

            if (!String.IsNullOrEmpty(file))
            {
                if (File.Exists(file))
                {
                    File.Delete(file);
                }

                SN sn = new SN();
                sn.Options.Host              = this;
                sn.Options.SourceDir         = Path.GetDirectoryName(file);
                sn.Options.rbCustomChecked   = true;
                sn.Options.AdditionalOptions = String.Format(" -k \"{0}\" ", file);
                sn.Options.TextInfoBox       = new TextBox();
                sn.Go();
                if (File.Exists(file))
                {
                    SimpleMessage.ShowInfo(String.Format("Key pair written to {0}", file));
                }
                else
                {
                    SimpleMessage.ShowInfo(String.Format("Failed to generate key file.\n\n{0}", sn.Options.TextInfoBox.Text));
                }
            }
        }
예제 #2
0
        private void Resign(string file, string keyFile)
        {
            SN sn = new SN();

            sn.Options.SourceDir   = Options.SourceDir;
            sn.Options.Host        = Options.Host;
            sn.Options.TextInfoBox = Options.TextInfoBox;

            sn.Options.Rows        = new string[] { file };
            sn.Options.rbRaChecked = true;
            sn.Options.KeyFile     = keyFile;
            sn.Options.ShowStartCompleteTextInfo = false;
            sn.Go();
        }
 private void SN()
 {
     SN sn = new SN(this.Options);
     sn.Go();
 }
        private void Resign(string file, string keyFile)
        {
            SN sn = new SN();
            sn.Options.SourceDir = Options.SourceDir;
            sn.Options.Host = Options.Host;
            sn.Options.TextInfoBox = Options.TextInfoBox;

            sn.Options.Rows = new string[] { file };
            sn.Options.rbRaChecked = true;
            sn.Options.KeyFile = keyFile;
            sn.Options.ShowStartCompleteTextInfo = false;
            sn.Go();
        }
        private void mnuGenStrongKey_Click(object sender, EventArgs e)
        {
            string initDir = null;
            if (!String.IsNullOrEmpty(Config.StrongKeyFile))
            {
                initDir = Path.GetDirectoryName(Config.StrongKeyFile);
            }

            string file = SimpleDialog.OpenFile(null, "Key Files(*.snk)|*.snk|All Files(*.*)|*.*", ".snk", false, initDir);
            if (!String.IsNullOrEmpty(file))
            {
                if (File.Exists(file)) File.Delete(file);

                SN sn = new SN();
                sn.Options.Host = this;
                sn.Options.SourceDir = Path.GetDirectoryName(file);
                sn.Options.rbCustomChecked = true;
                sn.Options.AdditionalOptions = String.Format(" -k \"{0}\" ", file);
                sn.Options.TextInfoBox = new TextBox();
                sn.Go();
                if (File.Exists(file))
                {
                    SimpleMessage.ShowInfo(String.Format("Key pair written to {0}", file));
                }
                else
                {
                    SimpleMessage.ShowInfo(String.Format("Failed to generate key file.\n\n{0}", sn.Options.TextInfoBox.Text));
                }
            }
        }
예제 #6
0
        private void SN()
        {
            SN sn = new SN(this.Options);

            sn.Go();
        }