Skip to content

Commit

Permalink
3.0.0 - HUGE update! RemindMe has been completely redesigned to make …
Browse files Browse the repository at this point in the history
…use of the MaterialSkin (Material Design) library (from IgnaceMaes / leocb)
  • Loading branch information
Stefangansevles committed Sep 16, 2020
1 parent 82412a9 commit aaeccc6
Show file tree
Hide file tree
Showing 386 changed files with 88,518 additions and 163,332 deletions.
22 changes: 14 additions & 8 deletions Business Logic Layer/BLFormLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Data_Access_Layer;
using WMPLib;
using System.Drawing;

using MaterialSkin.Controls;

namespace Business_Logic_Layer
{
Expand All @@ -20,7 +20,7 @@ private BLFormLogic() { }
/// </summary>
/// <param name="lv">The listview</param>
/// <param name="rem">The reminder</param>
public static void AddReminderToListview(ListView lv, Reminder rem)
public static void AddReminderToListview(object lv, Reminder rem, bool material)
{
if (BLReminder.IsValidReminder(rem) != null)
{
Expand Down Expand Up @@ -48,6 +48,8 @@ public static void AddReminderToListview(ListView lv, Reminder rem)
else
itm.SubItems.Add(Convert.ToDateTime(rem.PostponeDate).ToShortDateString() + " (p)");
}
if (material)
goto additems; //Skip adding other items to the listview, MaterialListView will stack them together and it will look bad

if (rem.EveryXCustom == null)
{
Expand Down Expand Up @@ -87,15 +89,19 @@ public static void AddReminderToListview(ListView lv, Reminder rem)
itm.ForeColor = Color.FromArgb(64, 64, 64);
}

lv.Items.Add(itm);
additems:
if(material)
((MaterialListView)lv).Items.Add(itm);
else
((ListView)lv).Items.Add(itm);
}

/// <summary>
/// Adds multiple reminders to the listview
/// </summary>
/// <param name="lv">The listview</param>
/// <param name="rem">The list of reminders</param>
public static void AddRemindersToListview(ListView lv, List<Reminder> reminderList)
public static void AddRemindersToListview(object lv, List<Reminder> reminderList, bool material)
{
List<Reminder> disabledReminders = new List<Reminder>(); //We're going to add the disabled reminders after all the enabled ones.

Expand All @@ -115,25 +121,25 @@ public static void AddRemindersToListview(ListView lv, List<Reminder> reminderLi
foreach (Reminder rem in list)
{
if (rem.Enabled == 1) //not disabled? add to listview
AddReminderToListview(lv, rem);
AddReminderToListview(lv, rem, material);
else
disabledReminders.Add(rem);
}

//Add disabled reminders to the bottom of the list
foreach (Reminder rem in disabledReminders)
AddReminderToListview(lv, rem);
AddReminderToListview(lv, rem, material);
}

/// <summary>
/// Gets the amount of minutes from a bunifu textbox string. Includes formats like h, for example 1h30 returns 90
/// </summary>
/// <param name="tb"></param>
/// <returns></returns>
public static int GetTextboxMinutes(Bunifu.Framework.UI.BunifuMetroTextbox tb)
public static int GetTextboxMinutes(Control tb)
{
try
{
{
int timerMinutes = 0;

//Text without the 'm'. We know the number after 'h' is in minutes, no need to keep it in the string
Expand Down
50 changes: 49 additions & 1 deletion Business Logic Layer/BLLocalDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@
namespace Business_Logic_Layer
{
public class BLLocalDatabase
{
{
public static bool HasAllTables()
{
return DLDatabase.HasAllTables();
}

public class ReadMessage
{
private ReadMessage() { }
Expand Down Expand Up @@ -436,5 +441,48 @@ public static void UpdateButtonSpacing(ButtonSpaces btn)
DLLocalDatabase.ButtonSpacing.UpdateButtonSpacing(btn);
}
}

public class Theme
{
private Theme() { }

public static Themes GetThemeById(long id)
{
return DLLocalDatabase.Theme.GetThemeById(id);
}

public static Themes DeleteThemeById(long id)
{
return DLLocalDatabase.Theme.DeleteThemeById(id);
}

public static List<Themes> GetThemes()
{
return DLLocalDatabase.Theme.GetThemes();
}

public static void InsertTheme(Themes theme)
{
if (theme != null)
DLLocalDatabase.Theme.InsertTheme(theme);
}
/// <summary>
/// Update the settings in the SQLite database
/// </summary>
/// <param name="set">The new settings object</param>
public static void UpdateTheme(Themes t)
{
if (t != null)
DLLocalDatabase.Theme.UpdateTheme(t);
}

public static void InsertDefaultThemes()
{
DLLocalDatabase.Theme.InsertDefaultThemes();
}



}
}
}
4 changes: 4 additions & 0 deletions Business Logic Layer/Business Logic Layer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@
<Project>{b15cf13c-05db-4346-adb0-704b0756c1e9}</Project>
<Name>Database.Entity</Name>
</ProjectReference>
<ProjectReference Include="..\MaterialSkin\MaterialSkin.csproj">
<Project>{0490685f-50a3-401f-9553-2f3ff6aa1a21}</Project>
<Name>MaterialSkin</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
4 changes: 2 additions & 2 deletions Business Logic Layer/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.105.2" newVersion="1.0.105.2" />
<bindingRedirect oldVersion="0.0.0.0-1.0.112.0" newVersion="1.0.112.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup></configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.105.2" newVersion="1.0.105.2" />
<bindingRedirect oldVersion="0.0.0.0-1.0.112.0" newVersion="1.0.112.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup></configuration>
27 changes: 22 additions & 5 deletions Business Logic Layer/bin/Debug/Database.Entity.dll.config
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0"/>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup><system.data>
<DbProviderFactories>


<remove invariant="System.Data.SQLite.EF6" /><add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" /><remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
</system.data>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.112.0" newVersion="1.0.112.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Binary file modified Business Logic Layer/bin/Debug/System.Data.SQLite.dll
Binary file not shown.
2 changes: 2 additions & 0 deletions Business Logic Layer/bin/Debug/System.Data.SQLite.dll.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@
<add key="PreLoadSQLite_BaseDirectory"
value="%PreLoadSQLite_AssemblyDirectory%\..\..\build\%PreLoadSQLite_TargetFramework%" />
</appSettings>

<dllmap dll="SQLite.Interop" target="SQLite.Interop.dll" />
</configuration>
Loading

0 comments on commit aaeccc6

Please sign in to comment.