7 Commits

Author SHA1 Message Date
Martin Barker
25110f29bc updated system to be less resource hungry 2023-11-07 18:55:22 +00:00
Martin Barker
66ffeb4fb8 Merge branch 'main' of https://github.com/barkermn01/TwitchNotify 2023-11-07 18:32:55 +00:00
Martin Barker
6266bc65e7 trying to get on startup working correctly 2023-11-07 00:43:10 +00:00
Martin Barker (Keatran)
6e14b08e6f Update Readme.md 2023-02-24 14:09:46 +00:00
Martin Barker (Keatran)
948e857158 Update Readme.md 2023-02-24 03:46:47 +00:00
Martin Barker (Keatran)
5130a58196 Update Readme.md 2023-02-24 03:44:52 +00:00
Martin Barker
ac7e305de5 Removed border from DataGrid 2023-02-24 03:26:52 +00:00
7 changed files with 52 additions and 43 deletions

View File

@@ -549,8 +549,7 @@ end;
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{7774CEEE-6785-48B9-BA35-6B842F947A21} AppId={{7774CEEE-6785-48B9-BA35-6B842F947A21}
AppName=Twitchy AppName=Twitchy
AppVersion=0.4.0 AppVersion=0.5
;AppVerName={#MyAppName} {#MyAppVersion}
DefaultDirName={autopf}\Twitchy DefaultDirName={autopf}\Twitchy
DisableProgramGroupPage=yes DisableProgramGroupPage=yes
LicenseFile=.\TwitchDesktopNotifications\Lisence.rtf LicenseFile=.\TwitchDesktopNotifications\Lisence.rtf
@@ -560,6 +559,7 @@ OutputDir=.\SetupFiles
OutputBaseFilename=TwitchySetup OutputBaseFilename=TwitchySetup
SetupIconFile=.\TwitchDesktopNotifications\Assets\icon.ico SetupIconFile=.\TwitchDesktopNotifications\Assets\icon.ico
UninstallDisplayIcon=.\TwitchDesktopNotifications\Assets\icon.ico UninstallDisplayIcon=.\TwitchDesktopNotifications\Assets\icon.ico
WizardSmallImageFile=.\TwitchDesktopNotifications\Assets\twitch.bmp
Compression=lzma Compression=lzma
SolidCompression=yes SolidCompression=yes
WizardStyle=modern WizardStyle=modern
@@ -571,16 +571,17 @@ SourceDir=.\
Name: "english"; MessagesFile: "compiler:Default.isl" Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks] [Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "autostarticon"; Description: "{cm:AutoStartProgram,Twitchy}"; GroupDescription: "{cm:AdditionalIcons}";
[Files] [Files]
Source: "TwitchDesktopNotifications\bin\x64\ReleaseSign\net6.0-windows10.0.17763.0\Twitchy.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "TwitchDesktopNotifications\bin\Release\net6.0-windows10.0.17763.0\Twitchy.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "TwitchDesktopNotifications\bin\x64\ReleaseSign\net6.0-windows10.0.17763.0\Microsoft.Toolkit.Uwp.Notifications.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "TwitchDesktopNotifications\bin\Release\net6.0-windows10.0.17763.0\Microsoft.Toolkit.Uwp.Notifications.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "TwitchDesktopNotifications\bin\x64\ReleaseSign\net6.0-windows10.0.17763.0\Microsoft.Windows.SDK.NET.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "TwitchDesktopNotifications\bin\Release\net6.0-windows10.0.17763.0\Microsoft.Windows.SDK.NET.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "TwitchDesktopNotifications\bin\x64\ReleaseSign\net6.0-windows10.0.17763.0\Twitchy.deps.json"; DestDir: "{app}"; Flags: ignoreversion Source: "TwitchDesktopNotifications\bin\Release\net6.0-windows10.0.17763.0\Twitchy.deps.json"; DestDir: "{app}"; Flags: ignoreversion
Source: "TwitchDesktopNotifications\bin\x64\ReleaseSign\net6.0-windows10.0.17763.0\Twitchy.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "TwitchDesktopNotifications\bin\Release\net6.0-windows10.0.17763.0\Twitchy.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "TwitchDesktopNotifications\bin\x64\ReleaseSign\net6.0-windows10.0.17763.0\Twitchy.runtimeconfig.json"; DestDir: "{app}"; Flags: ignoreversion Source: "TwitchDesktopNotifications\bin\Release\net6.0-windows10.0.17763.0\Twitchy.runtimeconfig.json"; DestDir: "{app}"; Flags: ignoreversion
Source: "TwitchDesktopNotifications\bin\x64\ReleaseSign\net6.0-windows10.0.17763.0\WinRT.Runtime.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "TwitchDesktopNotifications\bin\Release\net6.0-windows10.0.17763.0\WinRT.Runtime.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "TwitchDesktopNotifications\bin\x64\ReleaseSign\net6.0-windows10.0.17763.0\Assets\icon.ico"; DestDir: "{app}\Assets"; Flags: ignoreversion Source: "TwitchDesktopNotifications\bin\Release\net6.0-windows10.0.17763.0\Assets\icon.ico"; DestDir: "{app}\Assets"; Flags: ignoreversion
Source: "TwitchDesktopNotifications\bin\x64\ReleaseSign\net6.0-windows10.0.17763.0\Assets\twitch.png"; DestDir: "{app}\Assets"; Flags: ignoreversion Source: "TwitchDesktopNotifications\bin\Release\net6.0-windows10.0.17763.0\Assets\twitch.png"; DestDir: "{app}\Assets"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: "netcorecheck.exe"; Flags: dontcopy noencryption Source: "netcorecheck.exe"; Flags: dontcopy noencryption
Source: "netcorecheck_x64.exe"; Flags: dontcopy noencryption Source: "netcorecheck_x64.exe"; Flags: dontcopy noencryption

View File

@@ -1,6 +1,8 @@
# Twitchy # Twitchy
The Twitch windows desktop notification system. The Twitch windows desktop notification system.
[![Paypal Donate Btn](https://user-images.githubusercontent.com/37368/221199123-871cff69-fdb5-4dc3-8f3c-35efff4ce670.png)](https://www.paypal.com/donate/?hosted_button_id=9YUH3GCJ83A4G)
## Not affiliated with Twitch or Amazon ## Not affiliated with Twitch or Amazon
## Installation ## Installation
@@ -11,21 +13,26 @@ The Twitch windows desktop notification system.
**How to Manage Ignores:** **How to Manage Ignores:**
1. Click "Manage Ignores" from the right click notification area icon 1. Click "Manage Ignores" from the right click notification area icon
![Image of Context Menu from Notification / Tray Icon ](https://user-images.githubusercontent.com/37368/220464000-3aa632e0-1eb8-4be0-8d06-613bf9ea96f6.png) ![Image of Context Menu from Notification / Tray Icon](https://user-images.githubusercontent.com/37368/221084256-c9317bbf-ec39-48ee-8d02-325997d0d200.png)
2, the following form will open where you can manage streamers that should be ignored 2, the following form will open where you can manage streamers that should be ignored
![image of manage ignores UI](https://user-images.githubusercontent.com/37368/220468049-70bb423d-e16c-49ff-a9e7-4135df9ebc15.png) ![Image of Ignored Streamers UI](https://user-images.githubusercontent.com/37368/221084417-165afc63-1926-41f0-be36-e18e8c46318f.png)
_Something to note:_ _Something to note:_
Making changes inside the form is saved automatically Making changes inside the form is saved automatically
Streamers won't appear in the form until they have been seen Streamers won't appear in the form until they have been seen
**How to Exit:** **How to Exit:**
To exit you will have a Notification Icon / Tray icon where you can quit the application. To exit you will have a Notification Icon / Tray icon where you can quit the application.
![Image of Context Menu from Notification / Tray Icon ](https://user-images.githubusercontent.com/37368/220464000-3aa632e0-1eb8-4be0-8d06-613bf9ea96f6.png) ![Image of Context Menu from Notification / Tray Icon](https://user-images.githubusercontent.com/37368/221084256-c9317bbf-ec39-48ee-8d02-325997d0d200.png)
**What it looks like:**
![Example of notification ](https://user-images.githubusercontent.com/37368/221086733-3a379a9b-6630-4edd-a7e5-e43815e47609.png)
## Development ## Development
@@ -58,6 +65,15 @@ Project Requests `CommunityToolkit-MainLatest` NuGET Package Source
6. Click Update 6. Click Update
7. Click Ok 7. Click Ok
### Thanks
A Huge Thanks to [CaspersGG](https://twitch.tv/CaspersGG) for coming up with this idea.
Thanks to the following streamers for testing and promoting this application:
1. [Uprisen](https://twitch.tv/uprisen)
2. [Anthogator](https://www.twitch.tv/anthogator)
3. [Strife98](https://www.twitch.tv/strife98)
4. [petfriendamy_](https://www.twitch.tv/petfriendamy_)
5. [Roxas997](https://www.twitch.tv/roxas997)
6. [Anthogator](https://www.twitch.tv/anthogator)
## License ## License

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@@ -80,7 +80,7 @@
Grid.Column="1" Grid.Column="1"
Grid.RowSpan="1" Grid.Row="3" Grid.RowSpan="1" Grid.Row="3"
CanUserResizeColumns="False" CanUserResizeColumns="False"
x:Name="dgrdIgnore" ItemsSource="{Binding StreamersToIgnore}" AutoGenerateColumns="False" CanUserAddRows="False" RowHeaderWidth="0" HeadersVisibility="Column" Background="#FF333333"> x:Name="dgrdIgnore" ItemsSource="{Binding StreamersToIgnore}" AutoGenerateColumns="False" CanUserAddRows="False" RowHeaderWidth="0" HeadersVisibility="Column" Background="#FF333333" BorderBrush="#FF333333">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridCheckBoxColumn Header="Ignore" Binding="{Binding IsIgnored}" IsReadOnly="False" Width="50"> <DataGridCheckBoxColumn Header="Ignore" Binding="{Binding IsIgnored}" IsReadOnly="False" Width="50">
</DataGridCheckBoxColumn> </DataGridCheckBoxColumn>

View File

@@ -1,14 +1,16 @@
// See https://aka.ms/new-console-template for more information // See https://aka.ms/new-console-template for more information
using Microsoft.Toolkit.Uwp.Notifications;
using System.Drawing; using System.Drawing;
using System.Reflection.Metadata; using System.Reflection.Metadata;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text.Json; using System.Text.Json;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Forms;
using System.Windows.Media; using System.Windows.Media;
using System.Threading;
using TwitchDesktopNotifications; using TwitchDesktopNotifications;
using TwitchDesktopNotifications.Core; using TwitchDesktopNotifications.Core;
using TwitchDesktopNotifications.JsonStructure; using TwitchDesktopNotifications.JsonStructure;
using Windows.UI.Core.Preview;
internal class Program internal class Program
{ {
@@ -18,7 +20,7 @@ internal class Program
private static NotifyIcon notifyIcon; private static NotifyIcon notifyIcon;
private static ContextMenuStrip cms; private static ContextMenuStrip cms;
private static ManageIgnores manageIgnores; private static ManageIgnores? manageIgnores;
public static void Ws_CodeRecived(object? sender, EventArgs e) public static void Ws_CodeRecived(object? sender, EventArgs e)
{ {
@@ -82,14 +84,11 @@ internal class Program
} }
} }
} }
[STAThread] [STAThread]
private static void Main(string[] args) private static void Main(string[] args)
{ {
try try
{ {
var timer = new PeriodicTimer(TimeSpan.FromSeconds(10));
notifyIcon = new NotifyIcon(); notifyIcon = new NotifyIcon();
notifyIcon.Icon = new Icon("Assets/icon.ico"); notifyIcon.Icon = new Icon("Assets/icon.ico");
notifyIcon.Text = "Twitch Notify"; notifyIcon.Text = "Twitch Notify";
@@ -113,21 +112,20 @@ internal class Program
TriggerAuthentication(); TriggerAuthentication();
} }
Thread thread = new Thread(() => var autoEvent = new AutoResetEvent(false);
{ var timer = new System.Threading.Timer((Object? stateInfo) => {
while (true) if (DataStore.GetInstance().Store != null)
{ {
Thread.Sleep(10000); TwitchFetcher.GetInstance().GetLiveFollowingUsers();
if (DataStore.GetInstance().Store != null)
{
TwitchFetcher.GetInstance().GetLiveFollowingUsers();
}
} }
}); }, autoEvent, 1000, 500);
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
Application.Run(); Application.Run();
Application.ApplicationExit += (object? sender, EventArgs e) => {
ToastNotificationManagerCompat.Uninstall();
};
} }
catch (Exception e) { catch (Exception e) {
Logger.GetInstance().Writer.WriteLineAsync(e.ToString()); Logger.GetInstance().Writer.WriteLineAsync(e.ToString());

View File

@@ -72,14 +72,9 @@ $appArgs = 'sign',
$appArgs = $appArgs + $files; $appArgs = $appArgs + $files;
#run the signtool #run the signtool
#signtool $appArgs; signtool $appArgs;
# once files are signed package into zip # once files are signed package into zip
Get-ChildItem './' | where { $_.Name -notin 'sign.ps1'} | Compress-Archive -DestinationPath 'Twitchy.zip' -Update Get-ChildItem './' | where { $_.Name -notin 'sign.ps1'} | Compress-Archive -DestinationPath 'Twitchy.zip' -Update
$setupArgs =
'/pu+',
'/DSourceDir=TwitchDesktopNotifications\bin\x64\ReleaseSign\net6.0-windows10.0.17763.0\',
'../../../../../setup.iss';
iscc $setupArgs
Exit $LASTEXITCODE Exit $LASTEXITCODE

View File

@@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Twitchy" #define MyAppName "Twitchy"
#define MyAppVersion "0.4.0" #define MyAppVersion "0.5"
#define MyAppExeName "Twitchy.exe" #define MyAppExeName "Twitchy.exe"
#ifndef MyAppTargetFramework #ifndef MyAppTargetFramework
@@ -22,7 +22,6 @@
AppId={{7774CEEE-6785-48B9-BA35-6B842F947A21} AppId={{7774CEEE-6785-48B9-BA35-6B842F947A21}
AppName={#MyAppName} AppName={#MyAppName}
AppVersion={#MyAppVersion} AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
DefaultDirName={autopf}\{#MyAppName} DefaultDirName={autopf}\{#MyAppName}
DisableProgramGroupPage=yes DisableProgramGroupPage=yes
LicenseFile=.\TwitchDesktopNotifications\Lisence.rtf LicenseFile=.\TwitchDesktopNotifications\Lisence.rtf
@@ -32,6 +31,7 @@ OutputDir=.\SetupFiles
OutputBaseFilename=TwitchySetup OutputBaseFilename=TwitchySetup
SetupIconFile=.\TwitchDesktopNotifications\Assets\icon.ico SetupIconFile=.\TwitchDesktopNotifications\Assets\icon.ico
UninstallDisplayIcon=.\TwitchDesktopNotifications\Assets\icon.ico UninstallDisplayIcon=.\TwitchDesktopNotifications\Assets\icon.ico
WizardSmallImageFile=.\TwitchDesktopNotifications\Assets\twitch.bmp
Compression=lzma Compression=lzma
SolidCompression=yes SolidCompression=yes
WizardStyle=modern WizardStyle=modern
@@ -45,6 +45,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks] [Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "autostarticon"; Description: "{cm:AutoStartProgram,{#MyAppName}}"; GroupDescription: "{cm:AdditionalIcons}";
[Files] [Files]
Source: "{#SourceDir}{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion Source: "{#SourceDir}{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
@@ -65,13 +66,11 @@ Source: "netcorecheck_x64.exe"; Flags: dontcopy noencryption
[Icons] [Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{commonstartup}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: autostarticon
[Run] [Run]
Filename: {app}\{cm:AppName}.exe; Description: {cm:LaunchProgram,{cm:AppName}}; Flags: nowait postinstall skipifsilent Filename: {app}\{cm:AppName}.exe; Description: {cm:LaunchProgram,{cm:AppName}}; Flags: nowait postinstall skipifsilent
[Registry]
Root: HKCU; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "Twitchy"; ValueData: """{app}\{#MyAppExeName}"""; Flags: uninsdeletevalue
[CustomMessages] [CustomMessages]
AppName=Twitchy AppName=Twitchy
LaunchProgram=Start Twitchy after finishing installation LaunchProgram=Start Twitchy after finishing installation