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

View File

@@ -1,6 +1,8 @@
# Twitchy
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
## Installation
@@ -11,21 +13,26 @@ The Twitch windows desktop notification system.
**How to Manage Ignores:**
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
![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:_
Making changes inside the form is saved automatically
Streamers won't appear in the form until they have been seen
**How to Exit:**
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
@@ -58,6 +65,15 @@ Project Requests `CommunityToolkit-MainLatest` NuGET Package Source
6. Click Update
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@@ -80,7 +80,7 @@
Grid.Column="1"
Grid.RowSpan="1" Grid.Row="3"
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>
<DataGridCheckBoxColumn Header="Ignore" Binding="{Binding IsIgnored}" IsReadOnly="False" Width="50">
</DataGridCheckBoxColumn>

View File

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

View File

@@ -72,14 +72,9 @@ $appArgs = 'sign',
$appArgs = $appArgs + $files;
#run the signtool
#signtool $appArgs;
signtool $appArgs;
# once files are signed package into zip
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

View File

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