void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.LanguagesSelectionDialog = ((MetroDemo.ExampleWindows.CertificatesDialog)(target)); return; case 2: this.CertificateList = ((System.Windows.Controls.DataGrid)(target)); return; case 3: this.OkButton = ((System.Windows.Controls.Button)(target)); #line 94 "..\..\..\..\Windows\CertificatesDialog.xaml" this.OkButton.Click += new System.Windows.RoutedEventHandler(this.OkButton_Click); #line default #line hidden return; case 4: this.CancelButton = ((System.Windows.Controls.Button)(target)); #line 95 "..\..\..\..\Windows\CertificatesDialog.xaml" this.CancelButton.Click += new System.Windows.RoutedEventHandler(this.CancelButton_OnClick); #line default #line hidden return; } this._contentLoaded = true; }
private void OpenCertificateBrowser_OnClick(object sender, RoutedEventArgs e) { try { certificatesDialog = new CertificatesDialog(); GlobalObjects.ViewModel.SetCertificates(); if (GlobalObjects.ViewModel.Certificates != null) { var certificateList = GlobalObjects.ViewModel.Certificates; certificatesDialog.CertificateList.ItemsSource = certificateList; } certificatesDialog.Closing += CertificatesDialog_Closing; certificatesDialog.Launch(); } catch (Exception ex) { LogErrorMessage(ex); } }