Esempio n. 1
0
 private void btnLoadFile_Click(object sender, EventArgs e)
 {
     using (LoadCertFromFileForm frm = new LoadCertFromFileForm())
     {
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             _specifyCert        = frm.Certificate;
             textBoxSubject.Text = _specifyCert.Subject;
         }
     }
 }
Esempio n. 2
0
        private void viewCertToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (LoadCertFromFileForm frm = new LoadCertFromFileForm())
            {
                frm.NoPrivateKey = true;

                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    X509Certificate2UI.DisplayCertificate(frm.Certificate, this.Handle);
                }
            }
        }
Esempio n. 3
0
        private void btnLoadFileCert_Click(object sender, EventArgs e)
        {
            using (LoadCertFromFileForm frm = new LoadCertFromFileForm())
            {
                frm.NoPrivateKey = true;

                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    _templateCert  = frm.Certificate;
                    textBoxCN.Text = _templateCert.Subject;
                }
            }
        }
Esempio n. 4
0
        private X509Certificate2 LoadCertFromFile()
        {
            using (LoadCertFromFileForm frm = new LoadCertFromFileForm())
            {
                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    return frm.Certificate;
                }
            }

            return null;
        }
Esempio n. 5
0
        private void viewCertToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (LoadCertFromFileForm frm = new LoadCertFromFileForm())
            {
                frm.NoPrivateKey = true;

                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    X509Certificate2UI.DisplayCertificate(frm.Certificate, this.Handle);
                }
            }
        }
Esempio n. 6
0
        private void btnLoadFileCert_Click(object sender, EventArgs e)
        {
            using (LoadCertFromFileForm frm = new LoadCertFromFileForm())
            {
                frm.NoPrivateKey = true;

                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    _templateCert = frm.Certificate;
                    textBoxCN.Text = _templateCert.Subject;
                }
            }
        }
Esempio n. 7
0
 private void btnLoadFile_Click(object sender, EventArgs e)
 {
     using (LoadCertFromFileForm frm = new LoadCertFromFileForm())
     {
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             _specifyCert = frm.Certificate;
             textBoxSubject.Text = _specifyCert.Subject;
         }
     }
 }