Пример #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;
         }
     }
 }
Пример #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);
                }
            }
        }
Пример #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;
                }
            }
        }
Пример #4
0
        private X509Certificate2 LoadCertFromFile()
        {
            using (LoadCertFromFileForm frm = new LoadCertFromFileForm())
            {
                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    return frm.Certificate;
                }
            }

            return null;
        }
Пример #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);
                }
            }
        }
Пример #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;
                }
            }
        }
Пример #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;
         }
     }
 }