final touches, hopefully no major mistakes

This commit is contained in:
Royce551 2021-08-18 22:10:53 -05:00
parent 508c1504c8
commit 3ae5aac25e
9 changed files with 21 additions and 16 deletions

View file

@ -51,12 +51,16 @@ namespace FRESHMusicPlayer.ViewModels
{
Player = new();
StartThings();
#if DEBUG // allow multiple instances of FMP in debug (at the expense of stability with heavy library use)
var library = new LiteDatabase($"Filename=\"{Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FRESHMusicPlayer", "database.fdb2")}\";Connection=shared");
#elif !DEBUG
var library = new LiteDatabase(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FRESHMusicPlayer", "database.fdb2"));
#endif
Library = new Library(library);
InitializeLibrary();
}
public const string ProjectName = "FRESHMusicPlayer for Mac and Linux Release Candidate 1";
public const string ProjectName = "FRESHMusicPlayer";
private string windowTitle = ProjectName;
public string WindowTitle
{
@ -872,7 +876,7 @@ namespace FRESHMusicPlayer.ViewModels
var tracks = new List<string>();
if (Player.FileLoaded) tracks.Add(Player.FilePath);
else tracks = Player.Queue.Queue;
new Views.TagEditor.TagEditor().SetStuff(Player, Library).SetInitialFiles(tracks).Show();
new Views.TagEditor.TagEditor().SetStuff(Player, Library).SetInitialFiles(tracks).Show(Window);
}
#endregion
}

View file

@ -29,12 +29,13 @@ namespace FRESHMusicPlayer.ViewModels
{
new(Properties.Resources.Automatic, "automatic"),
new("English", "en"),
new("Danish", "da"),
new("German", "de"),
new("Vietnamese", "vi"),
new("Arabic (Saudi Arabia)", "ar")
};
public string Version => MainWindowViewModel.ProjectName;
public string Version => $"FRESHMusicPlayer {Assembly.GetEntryAssembly().GetName().Version} for Mac and Linux";
public DisplayLanguage Language
{

View file

@ -5,7 +5,7 @@
xmlns:controls="clr-namespace:FRESHMusicPlayer.Controls.BlurryImage"
xmlns:vm="using:FRESHMusicPlayer.ViewModels"
xmlns:resx ="clr-namespace:FRESHMusicPlayer.Properties"
mc:Ignorable="d" Width="500" Height="300"
mc:Ignorable="d" Width="500" Height="300" Icon="/Assets/icon.ico" ShowInTaskbar="False"
x:Class="FRESHMusicPlayer.Views.Lyrics" WindowStartupLocation="CenterOwner" Closing="OnClosing"
Title="{x:Static resx:Resources.Lyrics}">
<Window.DataContext>

View file

@ -5,7 +5,7 @@
xmlns:vm="using:FRESHMusicPlayer.ViewModels"
xmlns:resx ="clr-namespace:FRESHMusicPlayer.Properties"
mc:Ignorable="d" SizeToContent="Height" Width="600" CanResize="False"
x:Class="FRESHMusicPlayer.Views.PlaylistManagement"
x:Class="FRESHMusicPlayer.Views.PlaylistManagement" Icon="/Assets/icon.ico"
Title="{x:Static resx:Resources.PlaylistManagement}">
<Window.DataContext>

View file

@ -5,7 +5,7 @@
xmlns:resx ="clr-namespace:FRESHMusicPlayer.Properties"
xmlns:vm="using:FRESHMusicPlayer.ViewModels.TagEditor"
mc:Ignorable="d" Width="600" Height="400"
x:Class="FRESHMusicPlayer.Views.TagEditor.IntegrationDisambiguation"
x:Class="FRESHMusicPlayer.Views.TagEditor.IntegrationDisambiguation" Icon="/Assets/icon.ico"
Title="{x:Static vm:TagEditorViewModel.WindowName}" CanResize="False" WindowStartupLocation="CenterOwner">
<Window.DataContext>

View file

@ -4,7 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" Width="600" Height="450"
x:Class="FRESHMusicPlayer.Views.TagEditor.ReleaseIntegrationPage"
xmlns:resx ="clr-namespace:FRESHMusicPlayer.Properties"
xmlns:resx ="clr-namespace:FRESHMusicPlayer.Properties" Icon="/Assets/icon.ico"
xmlns:vm="using:FRESHMusicPlayer.ViewModels.TagEditor"
Title="{Binding Album}">

View file

@ -5,7 +5,7 @@
xmlns:resx ="clr-namespace:FRESHMusicPlayer.Properties"
xmlns:vm="using:FRESHMusicPlayer.ViewModels.TagEditor"
mc:Ignorable="d" Height="451" Width="600"
x:Class="FRESHMusicPlayer.Views.TagEditor.TagEditor" Closing="OnClosing"
x:Class="FRESHMusicPlayer.Views.TagEditor.TagEditor" Closing="OnClosing" Icon="/Assets/icon.ico" WindowStartupLocation="CenterOwner"
Title="{Binding WindowTitle}">
<Window.DataContext>

View file

@ -4,7 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="using:FRESHMusicPlayer.ViewModels"
mc:Ignorable="d" SizeToContent="Height" Width="450" WindowStartupLocation="CenterOwner"
x:Class="FRESHMusicPlayer.Views.TextEntryBox"
x:Class="FRESHMusicPlayer.Views.TextEntryBox" Icon="/Assets/icon.ico" ShowInTaskbar="False"
Title="">
<Window.DataContext>
<vm:TextEntryBoxViewModel/>

View file

@ -87,7 +87,7 @@ namespace FRESHMusicPlayer
LiteDatabase library;
try
{
#if DEBUG // allow multiple instances of FMP in debug
#if DEBUG // allow multiple instances of FMP in debug (at the expense of stability with heavy library use)
library = new LiteDatabase($"Filename=\"{Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FRESHMusicPlayer", "database.fdb2")}\";Connection=shared");
#elif !DEBUG
library = new LiteDatabase(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FRESHMusicPlayer", "database.fdb2"));