using SettingCore;
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Linq;
+using System.Runtime.CompilerServices;
using Tizen.Applications;
namespace SettingMainGadget.Apps
return listInfo.Where(a => a.Categories.Contains(category)).ToList();
}
+
+ public class ApplicationItemInfo : INotifyPropertyChanged
+ {
+ public event PropertyChangedEventHandler PropertyChanged;
+ public string AppId { get; }
+ public string PackageId { get; set; }
+ public string Name { get; set; }
+ public string IconPath { get; set; }
+ public long AppSize { get; set; }
+ public System.DateTime LastLaunchTime { get; set; }
+
+ private string size;
+ public string SizeToDisplay
+ {
+ get => size;
+ set
+ {
+ if (value != size)
+ {
+ size = value;
+ RaisePropertyChanged(nameof(SizeToDisplay));
+ }
+ }
+ }
+
+ public ApplicationItemInfo(string appid, string name, string iconPath, string size)
+ {
+ AppId = appid;
+ Name = name;
+ IconPath = iconPath;
+ SizeToDisplay = size;
+ }
+
+ /// <summary>
+ /// Raises PropertyChanged event.
+ /// </summary>
+ protected void RaisePropertyChanged([CallerMemberName] string propertyName = null)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
}
}