mirror of
https://github.com/yck1509/ConfuserEx
synced 2026-06-08 18:29:44 +00:00
34 lines
909 B
C#
34 lines
909 B
C#
using System;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using ConfuserEx.ViewModel;
|
|
using Ookii.Dialogs.Wpf;
|
|
|
|
namespace ConfuserEx.Views {
|
|
public partial class ProjectModuleView : Window {
|
|
readonly ProjectModuleVM module;
|
|
|
|
public ProjectModuleView(ProjectModuleVM module) {
|
|
InitializeComponent();
|
|
this.module = module;
|
|
DataContext = module;
|
|
PwdBox.IsEnabled = !string.IsNullOrEmpty(PathBox.Text);
|
|
}
|
|
|
|
void Done(object sender, RoutedEventArgs e) {
|
|
DialogResult = true;
|
|
}
|
|
|
|
void PathBox_TextChanged(object sender, TextChangedEventArgs e) {
|
|
PwdBox.IsEnabled = !string.IsNullOrEmpty(PathBox.Text);
|
|
}
|
|
|
|
void ChooseSNKey(object sender, RoutedEventArgs e) {
|
|
var ofd = new VistaOpenFileDialog();
|
|
ofd.Filter = "Supported Key Files (*.snk, *.pfx)|*.snk;*.pfx|All Files (*.*)|*.*";
|
|
if (ofd.ShowDialog() ?? false) {
|
|
module.SNKeyPath = ofd.FileName;
|
|
}
|
|
}
|
|
}
|
|
} |