diff --git a/Sources/Linaris/LocalFilesPage.xaml b/Sources/Linaris/LocalFilesPage.xaml
index a83d2a5..f10fd12 100644
--- a/Sources/Linaris/LocalFilesPage.xaml
+++ b/Sources/Linaris/LocalFilesPage.xaml
@@ -27,14 +27,12 @@
-
-
+
-
+
-
diff --git a/Sources/Linaris/LocalFilesPage.xaml.cs b/Sources/Linaris/LocalFilesPage.xaml.cs
index 16eb533..3bb9b05 100644
--- a/Sources/Linaris/LocalFilesPage.xaml.cs
+++ b/Sources/Linaris/LocalFilesPage.xaml.cs
@@ -34,7 +34,6 @@ namespace Linaris
void ResetAll(object sender, EventArgs e)
{
ResetSubMenus(sender, e);
- ResetRenaming(sender, e);
}
void ResetSubMenus(object sender, EventArgs e)
@@ -45,15 +44,6 @@ namespace Linaris
}
ResetPlaylistMenu(sender, e);
}
-
- void ResetRenaming(object sender, EventArgs e)
- {
- foreach (var CustomTitle in customTitles)
- {
- CustomTitle.IsRenaming = false;
- CustomTitle.Name = CustomTitle.NewName;
- }
- }
void ResetPlaylistMenu(object sender, EventArgs e)
{
@@ -207,34 +197,6 @@ namespace Linaris
// Change methods
- void RenameCustomTitle(object sender, EventArgs e)
- {
- ResetSubMenus(sender, e);
- if (sender is Button button)
- {
- if (button.BindingContext is CustomTitle customTitle)
- {
- if (!customTitle.IsRenaming)
- {
- ResetRenaming(sender, e);
- customTitle.IsRenaming = true;
- }
- else
- {
- ResetRenaming(sender, e);
- }
- }
- }
- else if (sender is Entry entry)
- {
- if (entry.BindingContext is CustomTitle customTitle)
- {
- ResetRenaming(sender, e);
- customTitle.Name = customTitle.NewName;
- }
- }
- }
-
private async void ChangeImage(object sender, EventArgs e)
{
var result = await FilePicker.PickAsync(new PickOptions
diff --git a/Sources/Linaris/PlaylistsPage.xaml b/Sources/Linaris/PlaylistsPage.xaml
index 059257d..998dde8 100644
--- a/Sources/Linaris/PlaylistsPage.xaml
+++ b/Sources/Linaris/PlaylistsPage.xaml
@@ -27,14 +27,12 @@
-
-
+
-
+
-
diff --git a/Sources/Linaris/PlaylistsPage.xaml.cs b/Sources/Linaris/PlaylistsPage.xaml.cs
index 8d4faea..37945ef 100644
--- a/Sources/Linaris/PlaylistsPage.xaml.cs
+++ b/Sources/Linaris/PlaylistsPage.xaml.cs
@@ -37,7 +37,6 @@ public partial class PlaylistsPage : ContentPage
void ResetAll(object sender, EventArgs e)
{
ResetSubMenus(sender, e);
- ResetRenaming(sender, e);
IsNewPlaylist = false;
}
@@ -49,22 +48,6 @@ public partial class PlaylistsPage : ContentPage
}
}
- void ResetRenaming(object sender, EventArgs e)
- {
- foreach (var Playlist in playlists)
- {
- Playlist.IsRenaming = false;
- if (!CheckRenaming(Playlist))
- {
- Playlist.NewName = Playlist.Name;
- }
- else
- {
- Playlist.Name = Playlist.NewName;
- }
- }
- }
-
// Add methods
@@ -127,41 +110,6 @@ public partial class PlaylistsPage : ContentPage
// Change methods
- void RenamePlaylist(object sender, EventArgs e)
- {
- ResetSubMenus(sender, e);
- if (sender is Button button)
- {
- if (button.BindingContext is Playlist playlist)
- {
- if (!playlist.IsRenaming)
- {
- ResetRenaming(sender, e);
- playlist.IsRenaming = true;
- }
- else
- {
- ResetRenaming(sender, e);
- }
- }
- }
- else if (sender is Entry entry)
- {
- if (entry.BindingContext is Playlist playlist)
- {
- if (!CheckRenaming(playlist))
- {
- entry.TextColor = Color.FromRgb(255,0,0);
- }
- else
- {
- ResetRenaming(sender, e);
- playlist.Name = playlist.NewName;
- }
- }
- }
- }
-
private async void ChangeImage(object sender, EventArgs e)
{
var result = await FilePicker.PickAsync(new PickOptions
@@ -198,35 +146,6 @@ public partial class PlaylistsPage : ContentPage
return false;
}
- // Check methods
-
- void CheckNewName(object sender, EventArgs e)
- {
- if (sender is Entry entry)
- {
- if (entry.BindingContext is Playlist playlist)
- {
- if (!CheckRenaming(playlist))
- {
- entry.TextColor = Color.FromRgb(255, 0, 0);
- }
- else
- {
- entry.TextColor = Color.FromRgb(255, 255, 255);
- }
- }
- }
- }
-
- bool CheckRenaming(Playlist playlist)
- {
- if (playlist.NewName.Length > Manager.MAX_NAME_LENGTH || string.IsNullOrWhiteSpace(playlist.NewName) || HasSameName(playlist.NewName))
- {
- return false;
- }
- return true;
- }
-
// Navigation
async void GoToPlaylist(object sender, EventArgs e)
diff --git a/Sources/Model/CustomTitle.cs b/Sources/Model/CustomTitle.cs
index 83d2676..50b9054 100644
--- a/Sources/Model/CustomTitle.cs
+++ b/Sources/Model/CustomTitle.cs
@@ -53,21 +53,6 @@ public class CustomTitle : Title, INotifyPropertyChanged
private bool isPlaylistMenuVisible = false;
- public bool IsRenaming
- {
- get => isRenaming;
- set
- {
- if (isRenaming != value)
- {
- isRenaming = value;
- }
- OnPropertyChanged();
- }
- }
-
- private bool isRenaming = false;
-
public bool IsNewPlaylistMenuVisible
{
get => isNewPlaylistMenuVisible;
diff --git a/Sources/Model/Playlist.cs b/Sources/Model/Playlist.cs
index f4441c3..da4862e 100644
--- a/Sources/Model/Playlist.cs
+++ b/Sources/Model/Playlist.cs
@@ -31,21 +31,6 @@ public class Playlist : INotifyPropertyChanged
private string name = Manager.DEFAULT_NAME;
- public string NewName
- {
- get => newName;
-
- set
- {
- if (value != null && value.Length < Manager.MAX_NAME_LENGTH)
- {
- newName = value;
- }
- }
- }
-
- private string newName = Manager.DEFAULT_NAME;
-
public string Description
{
get => description;
@@ -148,25 +133,9 @@ public class Playlist : INotifyPropertyChanged
private bool isSubMenuVisible;
- public bool IsRenaming
- {
- get => isRenaming;
- set
- {
- if (isRenaming != value)
- {
- isRenaming = value;
- }
- OnPropertyChanged();
- }
- }
-
- private bool isRenaming = false;
-
public Playlist(string nom, string description, string imageURL)
{
Name = nom;
- NewName = nom;
Description = description;
ImageURL = imageURL;
}
diff --git a/Sources/Model/Title.cs b/Sources/Model/Title.cs
index 9327bad..573c967 100644
--- a/Sources/Model/Title.cs
+++ b/Sources/Model/Title.cs
@@ -30,17 +30,6 @@ public class Title
private string name = Manager.DEFAULT_NAME;
- public string NewName
- {
- get => newName;
- set
- {
- newName = value;
- }
- }
-
- private string newName = Manager.DEFAULT_NAME;
-
public string ImageURL
{
get => imageURL;
@@ -81,7 +70,6 @@ public class Title
public Title(string nom, string file_Name, string informations)
{
Name = nom;
- NewName = nom;
ImageURL = file_Name;
Information = informations;
}