Skip to content

Commit 88bf1ef

Browse files
committed
Added notification to some conditions
1 parent 8cb5733 commit 88bf1ef

9 files changed

Lines changed: 6 additions & 24 deletions

File tree

CutCode.CrossPlatform/App.axaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
33
xmlns:local="using:CutCode.CrossPlatform"
44
xmlns:sys="using:System"
5-
xmlns:sty="using:FluentAvalonia.Styling"
6-
xmlns:ui="using:FluentAvalonia.UI.Controls"
7-
xmlns:uip="using:FluentAvalonia.UI.Controls.Primitives"
85
x:Class="CutCode.CrossPlatform.App">
96
<Application.DataTemplates>
107
<local:ViewLocator/>
@@ -20,8 +17,6 @@
2017
<Application.Styles>
2118
<FluentTheme Mode="Dark"/>
2219

23-
<StyleInclude Source="avares://Aura.UI.FluentTheme/AuraUI.xaml"/>
24-
2520
<StyleInclude Source="/Styles/ButtonStyles.axaml"/>
2621
<StyleInclude Source="/Styles/ScrollBarStyles.axaml"/>
2722
<StyleInclude Source="/Styles/TextBoxStyles.axaml"/>

CutCode.CrossPlatform/CutCode.CrossPlatform.csproj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,12 @@
1414
</ItemGroup>
1515
<ItemGroup>
1616
<PackageReference Include="Aura.UI" Version="0.1.5-dev-03" />
17-
<PackageReference Include="Aura.UI.FluentTheme" Version="0.1.5-dev-03" />
18-
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.2.0-preview.1" />
1917
<PackageReference Include="Avalonia" Version="0.10.11" />
2018
<PackageReference Include="Avalonia.Desktop" Version="0.10.11" />
2119
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
2220
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="0.10.10" />
2321
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.11" />
24-
<PackageReference Include="FluentAvaloniaUI" Version="1.1.6" />
25-
<PackageReference Include="Material.Avalonia" Version="2.5.0.33-nightly" />
2622
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
27-
<PackageReference Include="Projektanker.Icons.Avalonia" Version="3.5.0" />
28-
<PackageReference Include="Projektanker.Icons.Avalonia.FontAwesome" Version="3.5.0" />
2923
<PackageReference Include="sqlite-net-pcl" Version="1.8.116" />
3024
</ItemGroup>
3125
<ItemGroup>

CutCode.CrossPlatform/Program.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
using Avalonia;
33
using Avalonia.Controls.ApplicationLifetimes;
44
using Avalonia.ReactiveUI;
5-
using Projektanker.Icons.Avalonia;
6-
using Projektanker.Icons.Avalonia.FontAwesome;
7-
85
namespace CutCode.CrossPlatform
96
{
107
class Program
@@ -15,7 +12,6 @@ class Program
1512
[STAThread]
1613
public static void Main(string[] args)
1714
{
18-
IconProvider.Register<FontAwesomeIconProvider>();
1915

2016
BuildAvaloniaApp()
2117
.StartWithClassicDesktopLifetime(args);

CutCode.CrossPlatform/ViewModels/AddViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
using CutCode.CrossPlatform.ViewModels;
1313
using CutCode.CrossPlatform.Views;
1414
using CutCode.DataBase;
15-
using FluentAvalonia.UI.Controls;
1615
using Newtonsoft.Json;
1716
using ReactiveUI;
1817

@@ -170,10 +169,11 @@ public async void Save()
170169
PageService.Current.ExternalPage = codeViewPage;
171170
Title = "";
172171
Cells.Clear();
172+
NotificationManager.CreateNotification("Notification", "New code is successfully created", 3);
173173
}
174174
else
175175
{
176-
// do notification thing to fill empty fields
176+
NotificationManager.CreateNotification("Warning", "Please Fill the Empty fields", 2);
177177
}
178178

179179
}

CutCode.CrossPlatform/ViewModels/CodeCardViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public async void Delete()
195195
{
196196
IsPopupOpen = false;
197197
var delete = DataBaseManager.Current.DelCode(Code);
198-
// if it wasn't deleted, we will show notificaiton
198+
if(!delete) NotificationManager.Current.CreateNotification("Error", "Error, Unable to delete the code!", 3);
199199
}
200200
}
201201
}

CutCode.CrossPlatform/ViewModels/CodeViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,12 @@ public async void Save()
249249
}
250250
else
251251
{
252-
// do notification
252+
NotificationManager.CreateNotification("Error", "Error, Unable to save the changes", 5);
253253
}
254254
}
255255
else
256256
{
257-
// do notification
257+
NotificationManager.CreateNotification("Warning", "Please Fill the Empty fields", 2);
258258
}
259259
}
260260

@@ -280,7 +280,7 @@ public async void FavouriteCommand()
280280
}
281281
else
282282
{
283-
// do notification
283+
NotificationManager.Current.CreateNotification("Error", "Error, Unable to save the changes!", 3);
284284
}
285285

286286
}

CutCode.CrossPlatform/ViewModels/MainWindowViewModel.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
using CutCode.CrossPlatform.Models;
1616
using CutCode.CrossPlatform.Views;
1717
using CutCode.DataBase;
18-
using Material.Styles.Themes;
1918

2019
namespace CutCode.CrossPlatform.ViewModels
2120
{

CutCode.CrossPlatform/ViewModels/SettingsViewModel.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
using CutCode.CrossPlatform.Interfaces;
1414
using CutCode.CrossPlatform.Models;
1515
using CutCode.DataBase;
16-
using Material.Dialog;
1716

1817
namespace CutCode.CrossPlatform.ViewModels
1918
{

CutCode.CrossPlatform/Views/CodeCellView.axaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
33
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5-
xmlns:exts="using:Aura.UI.ExtensionProperties"
65
xmlns:avEdit="using:AvaloniaEdit"
76
xmlns:cv="using:Avalonia.Markup.Xaml.Converters"
87
xmlns:vm="using:CutCode.CrossPlatform.ViewModels"

0 commit comments

Comments
 (0)