예제 #1
0
 public MainWindow()
 {
     InitializeComponent();
     if (File.Exists("baseMtpDevice.xml"))
     {
         DefaultDeviceInfo = XmlDeviceData.Load("baseMtpDevice.xml");
     }
 }
예제 #2
0
 private void MenuItem_Click_2(object sender, RoutedEventArgs e)
 {
     try
     {
         OpenFileDialog dialog = new OpenFileDialog();
         dialog.Filter = "Xml file (*.xml)|*.xml";
         if (dialog.ShowDialog() == true)
         {
             DeviceInfo = XmlDeviceData.Load(dialog.FileName);
         }
         InitUi();
     }
     catch (Exception exception)
     {
         MessageBox.Show("Error loading file " + exception.Message);
     }
 }