Beispiel #1
0
        private void MenuFileOpenFLVER_Click(object sender, RoutedEventArgs e)
        {
            var browseDialog = new OpenFileDialog()
            {
                Filter = "All Files (*.*)|*.*",
                Title  = "Open FLVER Model or BND",
            };

            if (browseDialog.ShowDialog() == true)
            {
                var loadedFile = SFHelper.ReadFile <FLVER>(this, browseDialog.FileName);
                TextBlockRunCurrentlyEditing.Text = loadedFile.Uri;
                LoadFLVER(loadedFile.Uri, (FLVER)loadedFile.File);
            }
        }
Beispiel #2
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     if (!string.IsNullOrWhiteSpace(AutoLoadFlverPath))
     {
         try
         {
             var loadedFile = SFHelper.ReadFile <FLVER>(this, AutoLoadFlverPath);
             TextBlockRunCurrentlyEditing.Text = loadedFile.Uri;
             LoadFLVER(loadedFile.Uri, (FLVER)loadedFile.File);
         }
         catch (Exception ex)
         {
             MessageBox.Show($"Unable to open file; Exception encountered:\n\n{ex}");
         }
     }
 }