Skip to content

Commit

Permalink
Init-3
Browse files Browse the repository at this point in the history
  • Loading branch information
Belim committed Jul 13, 2024
1 parent 47523cd commit 871e955
Show file tree
Hide file tree
Showing 21 changed files with 1,013 additions and 27 deletions.
114 changes: 114 additions & 0 deletions src/xd-AntiSpy/AboutForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions src/xd-AntiSpy/AboutForm.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using System;
using System.Diagnostics;
using System.Windows.Forms;
using xdAntiSpy.Locales;

namespace xdAntiSpy
{
public partial class AboutForm : Form
{
public AboutForm()
{
InitializeComponent();
InitializeLocalizedStrings();
}

private void btnOK_Click(object sender, EventArgs e)
{
this.Close();
}

private void InitializeLocalizedStrings()
{
lblAbout.Text = Strings.formAbout_lblAbout;
linkOpenDonationPage.Text = Strings.formAbout_linkDonation;
}

private void linkOpenDonationPage_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
string paypalUrl = "https://www.paypal.com/donate?hosted_button_id=MY7HX4QLYR4KG";
try
{
Process.Start(new ProcessStartInfo
{
FileName = paypalUrl,
UseShellExecute = true
});
MessageBox.Show("Thank you for your support! 💖", "Thank You!", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception)
{
MessageBox.Show("Unable to open the donation page. Please try again later.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}
132 changes: 132 additions & 0 deletions src/xd-AntiSpy/AboutForm.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="lblAbout.Text" xml:space="preserve">
<value>(c)2024 A Belim app creation
While there's no guarantee xD-Antispy will work perfectly on your system, I've tested it extensively. Remember, it's a one-person project and I'm just human.

This tool is open source and will always be free. I'm committed to keeping it updated and improving.

xD-Antispy is a modern fork of the classic XP-Antispy for Windows 11, evolving to meet today's privacy challenges.

xD-Antispy – because privacy settings should make you smile!

-Belim-</value>
</data>
</root>
14 changes: 14 additions & 0 deletions src/xd-AntiSpy/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Binary file added src/xd-AntiSpy/AppIcon.ico
Binary file not shown.
Binary file added src/xd-AntiSpy/AppIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions src/xd-AntiSpy/Helpers/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ private void UpdateStatusMenuItem(string message, Color color)
// Limit length of the status message to 80 chars
string statusMessage = message.Length > 80 ? message.Substring(0, 80) + "..." : message;

statusMenuItem.Text = $"{statusMessage}"; // Last log:
statusMenuItem.Text = $"{statusMessage}"; // Last log:
statusMenuItem.ForeColor = color;
}
}

}
}
}
3 changes: 1 addition & 2 deletions src/xd-AntiSpy/Helpers/OSHelper.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System;
using Microsoft.Win32;
using System.Collections.ObjectModel;
using System.Management.Automation;
using System.Threading.Tasks;
using Microsoft.Win32;

namespace OSHelper
{
Expand Down
4 changes: 2 additions & 2 deletions src/xd-AntiSpy/Helpers/Updater.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Windows.Forms;
using System.Drawing;
using xdAntiSpy;

namespace Updater
Expand Down Expand Up @@ -72,4 +72,4 @@ public static bool IsInet()
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/xd-AntiSpy/Helpers/Utils.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.Win32;
using System.Windows.Forms;
using System;
using System.Diagnostics;
using System.Windows.Forms;

namespace xdAntiSpy
{
Expand Down
12 changes: 8 additions & 4 deletions src/xd-AntiSpy/Helpers/Views.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using xdAntiSpy;
using System.Linq;
using System.Linq;
using System.Windows.Forms;
using xdAntiSpy;

namespace Views
{
Expand All @@ -25,9 +25,13 @@ public static void SetView(Control View)
// Handle the back navigation
public static void GoBack()
{
var mainForm = Application.OpenForms.OfType<MainForm>().Single();
if (INavPage == null)
return;

mainForm.pnlForm.Controls.Clear();
if (INavPage != null) mainForm.pnlForm.Controls.Add(INavPage);
mainForm.pnlForm.Controls.Add(INavPage);
mainForm.ActiveControl = INavPage;
mainForm.Focus();
}
}
}
2 changes: 1 addition & 1 deletion src/xd-AntiSpy/Locales/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 871e955

Please sign in to comment.