Skip to content

Commit

Permalink
fixed issues with file selection
Browse files Browse the repository at this point in the history
  • Loading branch information
phasephasephase committed May 14, 2024
1 parent d9067d9 commit 59e7284
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion JiayiLauncher/Modals/NewMod.razor
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
using var dialog = new CommonOpenFileDialog(Strings.NewModSelectFile);
dialog.IsFolderPicker = false;
dialog.Multiselect = true;
dialog.DefaultExtension = "dll";
dialog.Filters.Add(new CommonFileDialogFilter(Strings.NewModDllDisplayName, "*.dll"));
dialog.Filters.Add(new CommonFileDialogFilter(Strings.NewModExeDisplayName, "*.exe"));

Expand Down
14 changes: 0 additions & 14 deletions JiayiLauncher/Settings/JiayiSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,6 @@ private string HexToColor(Color c)
"Export your mod collection to a file. You can share this with other people.")]
public (string, Action) ExportCollection { get; set; } = (Strings.Export, () =>
{
// var dialog = new SaveFileDialog
// {
// DefaultExt = "jiayi",
// Filter = "Jiayi mod collection (*.jiayi)|*.jiayi",
// InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
// Title = "Export mod collection"
// };
// if (dialog.ShowDialog() != true) return; // this is an action why do i have to return a bool
//
// var path = dialog.FileName;
//
// if (ModCollection.Current != null) ModCollection.Current.Export(path);
using var dialog = new CommonSaveFileDialog(Strings.SettingsExportCollection);
dialog.DefaultExtension = "jiayi";
dialog.Filters.Add(new CommonFileDialogFilter(Strings.SettingsExportCollectionFilter, "*.jiayi"));
Expand Down Expand Up @@ -184,7 +171,6 @@ public bool UseBackgroundImage
using var dialog = new CommonOpenFileDialog(Strings.SettingsSelectBackground);
dialog.Filters.Add(new CommonFileDialogFilter(Strings.SettingsSelectBackgroundImageFilter, "*.png;*.jpg;*.jpeg;*.gif;*.bmp"));
dialog.Filters.Add(new CommonFileDialogFilter(Strings.SettingsSelectBackgroundVideoFilter, "*.mp4;*.mov;*.webm"));
dialog.DefaultExtension = "png";
dialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
if (dialog.ShowDialog() != CommonFileDialogResult.Ok) return;
Expand Down

0 comments on commit 59e7284

Please sign in to comment.