예제 #1
0
        public Context()
        {
#if DEBUG
            Debugger.Launch();
#endif
            Certificates = GetCertificates();
            Certificate  = Certificates.FirstOrDefault();
            Input        = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
        }
        public void RefreshCertificates()
        {
            var originallySelected = this.SelectedCertificate;

            Certificates.Clear();
            var certStore = WindowsCertificateStore.LoadPersonalCurrentUser();

            certStore.GetCertificatesWithKey().ForEach(c => Certificates.Add(new CertificateItem(c)));

            if (originallySelected != null)
            {
                SelectedCertificate = Certificates.FirstOrDefault(c => c.CertificateWithKey.Certificate.Equals(originallySelected.CertificateWithKey.Certificate));
            }
        }
예제 #3
0
        public void RefreshCertificates()
        {
            var originallySelected = this.SelectedCertificate;

            Certificates.Clear();
            var certStore = WindowsCertificateStore.LoadPersonalCurrentUser();

            foreach (var item in certStore.GetCertificatesWithKey().Select(c => new CertificateItem(c)).OrderBy(i => i.ToString()))
            {
                Certificates.Add(item);
            }
            if (originallySelected != null)
            {
                SelectedCertificate = Certificates.FirstOrDefault(c => c.CertificateWithKey.Certificate.Equals(originallySelected.CertificateWithKey.Certificate));
            }
        }