Compare commits
No commits in common. "master" and "4.5.0" have entirely different histories.
49 changed files with 159 additions and 867 deletions
|
@ -1,140 +0,0 @@
|
||||||
name: Dotnet Build
|
|
||||||
|
|
||||||
on: [push]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: win11
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
|
|
||||||
- name: MSBuild version
|
|
||||||
run: |
|
|
||||||
msbuild -version
|
|
||||||
|
|
||||||
- name: Extract project version
|
|
||||||
run: |
|
|
||||||
$version = Select-String -Path "WeeXnes/WeeXnes.csproj" -Pattern "<Version>(.+?)</Version>" | ForEach-Object {
|
|
||||||
($_ -match "<Version>(.+?)</Version>") | Out-Null
|
|
||||||
$matches[1]
|
|
||||||
}
|
|
||||||
Write-Output "Version extracted: $version"
|
|
||||||
"PROJECT_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding ASCII -Append
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: Test exported version variable
|
|
||||||
run: |
|
|
||||||
Write-Output "The extracted project version is: $env:PROJECT_VERSION"
|
|
||||||
if (-not $env:PROJECT_VERSION) {
|
|
||||||
Write-Error "PROJECT_VERSION variable is not set!"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: Restore Packages
|
|
||||||
run: nuget restore WeeXnes.sln
|
|
||||||
|
|
||||||
- name: Build Solution
|
|
||||||
run: |
|
|
||||||
msbuild WeeXnes.sln /p:DeleteExistingFiles=True /p:platform="Any CPU" /p:configuration="Release"
|
|
||||||
|
|
||||||
|
|
||||||
- name: Packing Zip
|
|
||||||
run: |
|
|
||||||
$zipName = "currentRelease_$env:PROJECT_VERSION.zip"
|
|
||||||
Compress-Archive -Path `
|
|
||||||
WeeXnes\bin\Release\WeeXnes.exe, `
|
|
||||||
WeeXnes\bin\Release\System.Drawing.Common.dll, `
|
|
||||||
WeeXnes\bin\Release\Wpf.Ui.dll, `
|
|
||||||
WeeXnes_UAC\bin\Release\WeeXnes_UAC.exe, `
|
|
||||||
WeeXnes\bin\Release\DiscordRPC.dll, `
|
|
||||||
WeeXnes\bin\Release\Newtonsoft.Json.dll, `
|
|
||||||
Autostart\bin\Release\Autostart.exe, `
|
|
||||||
WXPlugin\bin\Release\WXPlugin.dll, `
|
|
||||||
Update\bin\Release\Update.exe `
|
|
||||||
-CompressionLevel Optimal `
|
|
||||||
-DestinationPath $zipName
|
|
||||||
Write-Output "Created zip: $zipName"
|
|
||||||
|
|
||||||
- name: Prepare release directory
|
|
||||||
run: |
|
|
||||||
mkdir release
|
|
||||||
move currentRelease_$env:PROJECT_VERSION.zip release\
|
|
||||||
|
|
||||||
|
|
||||||
- name: Create Git tag
|
|
||||||
run: |
|
|
||||||
git config user.name "WeeXnes"
|
|
||||||
git config user.email "weexnes@weexnes.dev"
|
|
||||||
git tag $env:PROJECT_VERSION
|
|
||||||
git push origin $env:PROJECT_VERSION
|
|
||||||
|
|
||||||
- name: Upload Release Asset to Forgejo
|
|
||||||
env:
|
|
||||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
|
||||||
PROJECT_VERSION: ${{ env.PROJECT_VERSION }}
|
|
||||||
run: |
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
|
|
||||||
$owner = "WeeXnes"
|
|
||||||
$repo = "WeeXnesSuite"
|
|
||||||
$tag = "$env:PROJECT_VERSION"
|
|
||||||
$token = $env:RELEASE_TOKEN
|
|
||||||
$fileName = "currentRelease_$tag.zip"
|
|
||||||
$filePath = "release/$fileName"
|
|
||||||
|
|
||||||
$releaseUrl = "https://git.weexnes.dev/api/v1/repos/$owner/$repo/releases/tags/$tag"
|
|
||||||
try {
|
|
||||||
$release = Invoke-RestMethod -Uri $releaseUrl -Headers @{ Authorization = "token $token" }
|
|
||||||
Write-Host "Found existing release for tag $tag"
|
|
||||||
} catch {
|
|
||||||
Write-Host "Release for tag $tag not found, creating..."
|
|
||||||
$createReleaseUrl = "https://git.weexnes.dev/api/v1/repos/$owner/$repo/releases"
|
|
||||||
$body = @{
|
|
||||||
tag_name = $tag
|
|
||||||
name = $tag
|
|
||||||
draft = $false
|
|
||||||
prerelease = $false
|
|
||||||
} | ConvertTo-Json -Depth 3
|
|
||||||
$release = Invoke-RestMethod -Uri $createReleaseUrl -Headers @{ Authorization = "token $token"; "Content-Type" = "application/json" } -Method Post -Body $body
|
|
||||||
}
|
|
||||||
|
|
||||||
$releaseId = $release.id
|
|
||||||
Write-Host "Release ID: $releaseId"
|
|
||||||
|
|
||||||
$uploadUrl = "https://git.weexnes.dev/api/v1/repos/$owner/$repo/releases/$releaseId/assets?name=$fileName"
|
|
||||||
Write-Host "Uploading asset to $uploadUrl"
|
|
||||||
|
|
||||||
Add-Type -AssemblyName "System.Net.Http"
|
|
||||||
|
|
||||||
$fileBytes = [System.IO.File]::ReadAllBytes($filePath)
|
|
||||||
|
|
||||||
# Use static method to correctly instantiate ByteArrayContent
|
|
||||||
$byteContent = [System.Net.Http.ByteArrayContent]::new($fileBytes)
|
|
||||||
$byteContent.Headers.ContentType = [System.Net.Http.Headers.MediaTypeHeaderValue]::new("application/zip")
|
|
||||||
|
|
||||||
$form = [System.Net.Http.MultipartFormDataContent]::new()
|
|
||||||
$form.Add($byteContent, "attachment", $fileName)
|
|
||||||
|
|
||||||
$client = [System.Net.Http.HttpClient]::new()
|
|
||||||
$client.DefaultRequestHeaders.Authorization = [System.Net.Http.Headers.AuthenticationHeaderValue]::new("token", $token)
|
|
||||||
|
|
||||||
$response = $client.PostAsync($uploadUrl, $form).Result
|
|
||||||
$responseContent = $response.Content.ReadAsStringAsync().Result
|
|
||||||
|
|
||||||
if ($response.IsSuccessStatusCode) {
|
|
||||||
Write-Host "✅ Upload succeeded"
|
|
||||||
} else {
|
|
||||||
Write-Host "❌ Upload failed with status $($response.StatusCode)"
|
|
||||||
Write-Host "Response: $responseContent"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
81
.github/workflows/dotnet-framework.yml
vendored
Normal file
81
.github/workflows/dotnet-framework.yml
vendored
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
name: .NET Framework
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "master" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "master" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup MSBuild
|
||||||
|
uses: microsoft/setup-msbuild@v1
|
||||||
|
|
||||||
|
- name: Setup NuGet
|
||||||
|
uses: NuGet/setup-nuget@v1.1.1
|
||||||
|
|
||||||
|
- name: Navigate to Workspace
|
||||||
|
run: cd $GITHUB_WORKSPACE
|
||||||
|
|
||||||
|
- name: Restore Packages
|
||||||
|
run: nuget restore WeeXnes.sln
|
||||||
|
|
||||||
|
- name: Build Solution
|
||||||
|
run: |
|
||||||
|
msbuild.exe WeeXnes.sln /p:DeleteExistingFiles=True /p:platform="Any CPU" /p:configuration="Release"
|
||||||
|
|
||||||
|
|
||||||
|
- name: Format Xaml to XML
|
||||||
|
run: (gc Weexnes\WeeXnes.csproj) -replace ' ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"', '' | Out-File -encoding ASCII formatted.csproj
|
||||||
|
shell: pwsh
|
||||||
|
|
||||||
|
- uses: bbonkr/get-version-action@v1.0.4
|
||||||
|
id: get_version
|
||||||
|
with:
|
||||||
|
project: "formatted.csproj"
|
||||||
|
- name: logging
|
||||||
|
run: |
|
||||||
|
echo "Version=${{ steps.get_version.outputs.version }}"
|
||||||
|
|
||||||
|
- name: Packing Zip
|
||||||
|
run: Compress-Archive
|
||||||
|
D:\a\WeeXnesSuite\WeeXnesSuite\WeeXnes\bin\Release\WeeXnes.exe,
|
||||||
|
D:\a\WeeXnesSuite\WeeXnesSuite\WeeXnes\bin\Release\System.Drawing.Common.dll,
|
||||||
|
D:\a\WeeXnesSuite\WeeXnesSuite\WeeXnes\bin\Release\Wpf.Ui.dll,
|
||||||
|
D:\a\WeeXnesSuite\WeeXnesSuite\WeeXnes_UAC\bin\Release\WeeXnes_UAC.exe,
|
||||||
|
D:\a\WeeXnesSuite\WeeXnesSuite\WeeXnes\bin\Release\DiscordRPC.dll,
|
||||||
|
D:\a\WeeXnesSuite\WeeXnesSuite\WeeXnes\bin\Release\Newtonsoft.Json.dll,
|
||||||
|
D:\a\WeeXnesSuite\WeeXnesSuite\Autostart\bin\Release\Autostart.exe,
|
||||||
|
Update\bin\Release\Update.exe
|
||||||
|
-CompressionLevel Optimal -DestinationPath packed.zip
|
||||||
|
shell: pwsh
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
id: create_release
|
||||||
|
with:
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
release_name: v${{ steps.get_version.outputs.version }}
|
||||||
|
tag_name: ${{ steps.get_version.outputs.version }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
- name: Upload windows artifact
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: D:\a\WeeXnesSuite\WeeXnesSuite\packed.zip
|
||||||
|
asset_name: currentRelease_${{ steps.get_version.outputs.version }}.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<ApplicationIcon>wicns.ico</ApplicationIcon>
|
<ApplicationIcon>wicns.ico</ApplicationIcon>
|
||||||
<LangVersion>12</LangVersion>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using Wpf.Ui.Common;
|
|
||||||
using Wpf.Ui.Controls;
|
|
||||||
using WXPlugin.PluginCore;
|
|
||||||
|
|
||||||
namespace ExamplePlugin
|
|
||||||
{
|
|
||||||
public class ExamplePlugin : IPluginBase
|
|
||||||
{
|
|
||||||
public String Name { get; set; } = "Example Plugin";
|
|
||||||
public String Description { get; set; } = "This is an example plugin.";
|
|
||||||
|
|
||||||
public Page UiPage { get; set; } = new ExampleUi();
|
|
||||||
public NavigationItem NavIcon { get; set; } = new NavigationItem
|
|
||||||
{
|
|
||||||
Content = "Plugin",
|
|
||||||
Icon = SymbolRegular.Syringe20,
|
|
||||||
PageTag = "examplePlugin",
|
|
||||||
PageType = typeof(ExampleUi),
|
|
||||||
};
|
|
||||||
|
|
||||||
public void Execute()
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Initialize()
|
|
||||||
{
|
|
||||||
//throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,77 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
|
|
||||||
Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"/>
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{910F0FC8-B73D-449F-ADD7-C6CA147D9F05}</ProjectGuid>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>ExamplePlugin</RootNamespace>
|
|
||||||
<AssemblyName>ExamplePlugin</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="PresentationCore" />
|
|
||||||
<Reference Include="PresentationFramework" />
|
|
||||||
<Reference Include="System"/>
|
|
||||||
<Reference Include="System.Core"/>
|
|
||||||
<Reference Include="System.Data"/>
|
|
||||||
<Reference Include="System.Drawing.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Drawing.Common.6.0.0\lib\net461\System.Drawing.Common.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Xaml" />
|
|
||||||
<Reference Include="System.Xml"/>
|
|
||||||
<Reference Include="WindowsBase" />
|
|
||||||
<Reference Include="Wpf.Ui, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\WPF-UI.2.0.3\lib\net48\Wpf.Ui.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="ExamplePlugin.cs" />
|
|
||||||
<Compile Include="ExampleUi.xaml.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs"/>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\WXPlugin\WXPlugin.csproj">
|
|
||||||
<Project>{56bfe4e0-0d30-474a-b57b-cf08515ff66e}</Project>
|
|
||||||
<Name>WXPlugin</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Page Include="ExampleUi.xaml" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="packages.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets"/>
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
|
||||||
<Target Name="BeforeBuild">
|
|
||||||
</Target>
|
|
||||||
<Target Name="AfterBuild">
|
|
||||||
</Target>
|
|
||||||
-->
|
|
||||||
|
|
||||||
</Project>
|
|
|
@ -1,17 +0,0 @@
|
||||||
<Page x:Class="ExampleUi"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:local="clr-namespace:ExamplePlugin"
|
|
||||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
Title="AddRPCView" Height="Auto" Width="Auto"
|
|
||||||
Loaded="ExampleUi_OnLoaded">
|
|
||||||
<Grid>
|
|
||||||
<StackPanel>
|
|
||||||
<TextBlock Foreground="White">This is a Test Ui for the Example Plugin</TextBlock>
|
|
||||||
<TextBlock Name="TestLabel" Foreground="White" Text="{Binding LabelContent}"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
</Page>
|
|
|
@ -1,18 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
|
|
||||||
public partial class ExampleUi : Page
|
|
||||||
{
|
|
||||||
private int counter = 0;
|
|
||||||
public ExampleUi()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ExampleUi_OnLoaded(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
counter++;
|
|
||||||
TestLabel.Text = counter.ToString();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
[assembly: AssemblyTitle("ExamplePlugin")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("")]
|
|
||||||
[assembly: AssemblyProduct("ExamplePlugin")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright © 2025")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
|
||||||
// to COM components. If you need to access a type in this assembly from
|
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|
||||||
[assembly: Guid("910F0FC8-B73D-449F-ADD7-C6CA147D9F05")]
|
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
|
||||||
//
|
|
||||||
// Major Version
|
|
||||||
// Minor Version
|
|
||||||
// Build Number
|
|
||||||
// Revision
|
|
||||||
//
|
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
|
||||||
// by using the '*' as shown below:
|
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
|
@ -1,5 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="System.Drawing.Common" version="6.0.0" targetFramework="net48" />
|
|
||||||
<package id="WPF-UI" version="2.0.3" targetFramework="net48" />
|
|
||||||
</packages>
|
|
BIN
Images/home.png
BIN
Images/home.png
Binary file not shown.
Before Width: | Height: | Size: 80 KiB |
Binary file not shown.
Before Width: | Height: | Size: 63 KiB |
Binary file not shown.
Before Width: | Height: | Size: 46 KiB |
BIN
Images/rpc.png
BIN
Images/rpc.png
Binary file not shown.
Before Width: | Height: | Size: 62 KiB |
Binary file not shown.
Before Width: | Height: | Size: 88 KiB |
14
README.md
14
README.md
|
@ -1,5 +1,5 @@
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img width="100" height="100" src="https://raw.githubusercontent.com/WeeXnes/WeeXnesSuite/master/WeeXnes/Images/wicon.png">
|
<img width="100" height="100" src="https://cdn.discordapp.com/attachments/741123537582162020/965619554426437732/wicon.png">
|
||||||
<br>
|
<br>
|
||||||
<img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/WeeXnes/WeeXnesSuite?color=%23702e94">
|
<img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/WeeXnes/WeeXnesSuite?color=%23702e94">
|
||||||
|
|
||||||
|
@ -21,14 +21,14 @@ Uses:
|
||||||
|
|
||||||
<h3 align="center">Encrypted Key Manager and Custom Discord Rich Presence that you can configure for every Process you want</h3>
|
<h3 align="center">Encrypted Key Manager and Custom Discord Rich Presence that you can configure for every Process you want</h3>
|
||||||
<h2>Overview:</h2>
|
<h2>Overview:</h2>
|
||||||
<image src="https://raw.githubusercontent.com/WeeXnes/WeeXnesSuite/master/Images/home.png" height="400">
|
<image src="https://cdn.discordapp.com/attachments/741123537582162020/1117161497269907486/home.png" height="400">
|
||||||
<h2></h2>
|
<h2></h2>
|
||||||
|
|
||||||
|
|
||||||
<h3>Discord Rich Presence</h3>
|
<h3>Discord Rich Presence</h3>
|
||||||
Configurable DiscordRPC for every process you want. It detects if a process is started and starts the Rich Presence you configured for the Process (also has import/export functionality)
|
Configurable DiscordRPC for every process you want. It detects if a process is started and starts the Rich Presence you configured for the Process (also has import/export functionality)
|
||||||
<br>
|
<br>
|
||||||
<image src="https://raw.githubusercontent.com/WeeXnes/WeeXnesSuite/master/Images/rpc.png" height="400">
|
<image src="https://cdn.discordapp.com/attachments/741123537582162020/1117161498477871225/rpc.png" height="400">
|
||||||
<h2></h2>
|
<h2></h2>
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,23 +36,25 @@ Uses:
|
||||||
<h3>Key Manager</h3>
|
<h3>Key Manager</h3>
|
||||||
encrypted key manager with import/export functionality
|
encrypted key manager with import/export functionality
|
||||||
<br>
|
<br>
|
||||||
<image src="https://raw.githubusercontent.com/WeeXnes/WeeXnesSuite/master/Images/password_manager.png" height="400">
|
<image src="https://cdn.discordapp.com/attachments/741123537582162020/1117161497475432650/keys.png" height="400">
|
||||||
<h2></h2>
|
<h2></h2>
|
||||||
|
|
||||||
|
|
||||||
<h3>Password Generator</h3>
|
<h3>Password Generator</h3>
|
||||||
Password Generator. Generated passwords can be quickly saved to the Key Manager
|
Password Generator. Generated passwords can be quickly saved to the Key Manager
|
||||||
<br>
|
<br>
|
||||||
<image src="https://raw.githubusercontent.com/WeeXnes/WeeXnesSuite/master/Images/password_gen.png" height="400">
|
<image src="https://cdn.discordapp.com/attachments/741123537582162020/1117161497714491503/passwordgen.png" height="400">
|
||||||
<h2></h2>
|
<h2></h2>
|
||||||
|
|
||||||
|
|
||||||
<h3>Settings</h3>
|
<h3>Settings</h3>
|
||||||
Settings Showcase
|
Settings Showcase
|
||||||
<br>
|
<br>
|
||||||
<image src="https://raw.githubusercontent.com/WeeXnes/WeeXnesSuite/master/Images/settings.png" height="600">
|
<image src="https://cdn.discordapp.com/attachments/741123537582162020/1117161498771468439/settings.png" height="400">
|
||||||
|
|
||||||
|
|
||||||
|
coming soon:
|
||||||
|
- Modular Plugin Loader so anyone can extend the functionality of the programm easily
|
||||||
|
|
||||||
|
|
||||||
<h2>Supported by: <a href="https://www.jetbrains.com">JetBrains</a></h2>
|
<h2>Supported by: <a href="https://www.jetbrains.com">JetBrains</a></h2>
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<ApplicationIcon>wicns.ico</ApplicationIcon>
|
<ApplicationIcon>wicns.ico</ApplicationIcon>
|
||||||
<LangVersion>12</LangVersion>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using Wpf.Ui.Controls;
|
|
||||||
|
|
||||||
namespace WXPlugin.PluginCore
|
|
||||||
{
|
|
||||||
public interface IPluginBase
|
|
||||||
{
|
|
||||||
public String Name { get; set; }
|
|
||||||
public String Description { get; set; }
|
|
||||||
public Page UiPage { get; set; }
|
|
||||||
public NavigationItem NavIcon { get; set; }
|
|
||||||
public void Initialize();
|
|
||||||
public void Execute();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
[assembly: AssemblyTitle("WXPlugin")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("")]
|
|
||||||
[assembly: AssemblyProduct("WXPlugin")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright © 2025")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
|
||||||
// to COM components. If you need to access a type in this assembly from
|
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|
||||||
[assembly: Guid("56BFE4E0-0D30-474A-B57B-CF08515FF66E")]
|
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
|
||||||
//
|
|
||||||
// Major Version
|
|
||||||
// Minor Version
|
|
||||||
// Build Number
|
|
||||||
// Revision
|
|
||||||
//
|
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
|
||||||
// by using the '*' as shown below:
|
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
|
@ -1,67 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
|
|
||||||
Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"/>
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{56BFE4E0-0D30-474A-B57B-CF08515FF66E}</ProjectGuid>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>WXPlugin</RootNamespace>
|
|
||||||
<AssemblyName>WXPlugin</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<LangVersion>12</LangVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="PresentationCore" />
|
|
||||||
<Reference Include="PresentationFramework" />
|
|
||||||
<Reference Include="System"/>
|
|
||||||
<Reference Include="System.Core"/>
|
|
||||||
<Reference Include="System.Data"/>
|
|
||||||
<Reference Include="System.Drawing.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Drawing.Common.6.0.0\lib\net461\System.Drawing.Common.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Xml"/>
|
|
||||||
<Reference Include="WindowsBase" />
|
|
||||||
<Reference Include="Wpf.Ui, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\WPF-UI.2.0.3\lib\net48\Wpf.Ui.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="PluginCore\IPluginBase.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs"/>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="packages.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets"/>
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
|
||||||
<Target Name="BeforeBuild">
|
|
||||||
</Target>
|
|
||||||
<Target Name="AfterBuild">
|
|
||||||
</Target>
|
|
||||||
-->
|
|
||||||
|
|
||||||
</Project>
|
|
|
@ -1,5 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="System.Drawing.Common" version="6.0.0" targetFramework="net48" />
|
|
||||||
<package id="WPF-UI" version="2.0.3" targetFramework="net48" />
|
|
||||||
</packages>
|
|
12
WeeXnes.sln
12
WeeXnes.sln
|
@ -8,10 +8,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WeeXnes_UAC", "WeeXnes_UAC\
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Update", "Update\Update.csproj", "{133FF515-D605-4856-BA2E-5841BF47EC2F}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Update", "Update\Update.csproj", "{133FF515-D605-4856-BA2E-5841BF47EC2F}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WXPlugin", "WXPlugin\WXPlugin.csproj", "{56BFE4E0-0D30-474A-B57B-CF08515FF66E}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExamplePlugin", "ExamplePlugin\ExamplePlugin.csproj", "{910F0FC8-B73D-449F-ADD7-C6CA147D9F05}"
|
|
||||||
EndProject
|
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
@ -34,13 +30,5 @@ Global
|
||||||
{133FF515-D605-4856-BA2E-5841BF47EC2F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{133FF515-D605-4856-BA2E-5841BF47EC2F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{133FF515-D605-4856-BA2E-5841BF47EC2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{133FF515-D605-4856-BA2E-5841BF47EC2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{133FF515-D605-4856-BA2E-5841BF47EC2F}.Release|Any CPU.Build.0 = Release|Any CPU
|
{133FF515-D605-4856-BA2E-5841BF47EC2F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{56BFE4E0-0D30-474A-B57B-CF08515FF66E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{56BFE4E0-0D30-474A-B57B-CF08515FF66E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{56BFE4E0-0D30-474A-B57B-CF08515FF66E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{56BFE4E0-0D30-474A-B57B-CF08515FF66E}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{910F0FC8-B73D-449F-ADD7-C6CA147D9F05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{910F0FC8-B73D-449F-ADD7-C6CA147D9F05}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{910F0FC8-B73D-449F-ADD7-C6CA147D9F05}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{910F0FC8-B73D-449F-ADD7-C6CA147D9F05}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|
|
@ -3,7 +3,6 @@ using System.ComponentModel;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Nocksoft.IO.ConfigFiles;
|
using Nocksoft.IO.ConfigFiles;
|
||||||
|
@ -42,30 +41,14 @@ namespace WeeXnes
|
||||||
private void App_OnStartup(object sender, StartupEventArgs e)
|
private void App_OnStartup(object sender, StartupEventArgs e)
|
||||||
{
|
{
|
||||||
Environment.CurrentDirectory = Application.StartupPath;
|
Environment.CurrentDirectory = Application.StartupPath;
|
||||||
Console.Data.Colors.colored_output = false;
|
|
||||||
Console.Data.Formatting.timestamp_prefix = true;
|
|
||||||
SetExceptionHandler();
|
SetExceptionHandler();
|
||||||
CheckForDebugMode();
|
CheckForDebugMode();
|
||||||
CheckStartupArgs(e.Args);
|
|
||||||
CheckUpdatedFiles();
|
CheckUpdatedFiles();
|
||||||
CheckForFolder();
|
CheckForFolder();
|
||||||
LoadSettings();
|
LoadSettings();
|
||||||
SaveSettingsHandler.SetupSaveEvents();
|
SaveSettingsHandler.SetupSaveEvents();
|
||||||
LoadFiles();
|
LoadFiles();
|
||||||
LoadPluginManager();
|
CheckStartupArgs(e.Args);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void LoadPluginManager()
|
|
||||||
{
|
|
||||||
if (!Directory.Exists(Global.Defaults.DefaultPathPlugins))
|
|
||||||
Directory.CreateDirectory(Global.Defaults.DefaultPathPlugins);
|
|
||||||
|
|
||||||
Global.pluginManager.LoadPlugins();
|
|
||||||
foreach (var plugin in Global.pluginManager.CurrentPlugins)
|
|
||||||
{
|
|
||||||
plugin.Initialize();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CheckUpdatedFiles()
|
private void CheckUpdatedFiles()
|
||||||
|
@ -83,7 +66,7 @@ namespace WeeXnes
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.Error(ex.ToString());
|
WeeXnes.Core.CustomConsole.Error(ex.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -145,11 +128,11 @@ namespace WeeXnes
|
||||||
{
|
{
|
||||||
Game newGame = Game.Methods.GameFromIni(new INIFile(file.FullName));
|
Game newGame = Game.Methods.GameFromIni(new INIFile(file.FullName));
|
||||||
DiscordRPCView.Data.Games.Add(newGame);
|
DiscordRPCView.Data.Games.Add(newGame);
|
||||||
Console.WriteLine(file.Name + " loaded -> " + newGame.ProcessName);
|
WeeXnes.Core.CustomConsole.WriteLine(file.Name + " loaded -> " + newGame.ProcessName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.Error(file.Name + ": " + ex.Message);
|
WeeXnes.Core.CustomConsole.Error(file.Name + ": " + ex.Message);
|
||||||
new FluentMessageBox(file.Name + ": " + ex.Message).ShowDialog();
|
new FluentMessageBox(file.Name + ": " + ex.Message).ShowDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -171,12 +154,12 @@ namespace WeeXnes
|
||||||
);
|
);
|
||||||
newItem.Filename = file.Name;
|
newItem.Filename = file.Name;
|
||||||
KeyManagerView.Data.KeyItemsList.Add(newItem);
|
KeyManagerView.Data.KeyItemsList.Add(newItem);
|
||||||
Console.WriteLine(file.Name + " loaded -> " + newItem.Name);
|
WeeXnes.Core.CustomConsole.WriteLine(file.Name + " loaded -> " + newItem.Name);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.Error(file.Name + ": " + ex.Message);
|
WeeXnes.Core.CustomConsole.Error(file.Name + ": " + ex.Message);
|
||||||
new FluentMessageBox(file.Name + ": " + ex.Message).ShowDialog();
|
new FluentMessageBox(file.Name + ": " + ex.Message).ShowDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -191,10 +174,10 @@ namespace WeeXnes
|
||||||
{
|
{
|
||||||
switch (argument)
|
switch (argument)
|
||||||
{
|
{
|
||||||
case HandleLaunchArguments.ArgumentStrings.autostart:
|
case "-autostart":
|
||||||
HandleLaunchArguments.arg_autostart();
|
HandleLaunchArguments.arg_autostart();
|
||||||
break;
|
break;
|
||||||
case HandleLaunchArguments.ArgumentStrings.debugMode:
|
case "-debugMode":
|
||||||
HandleLaunchArguments.arg_debugMode();
|
HandleLaunchArguments.arg_debugMode();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -204,7 +187,11 @@ namespace WeeXnes
|
||||||
private void CheckForDebugMode()
|
private void CheckForDebugMode()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
HandleLaunchArguments.arg_debugMode();
|
DebugMode = true;
|
||||||
|
HandleLaunchArguments.arg_enableConsole();
|
||||||
|
//Allow untrusted certs in Debug mode
|
||||||
|
ServicePointManager.ServerCertificateValidationCallback +=
|
||||||
|
(sender, cert, chain, sslPolicyErrors) => true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,13 @@
|
||||||
global using Console = WeeXnes.Core.Console;
|
using System;
|
||||||
global using VanillaConsole = System.Console;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using VanillaConsole = System.Console;
|
||||||
|
|
||||||
|
|
||||||
namespace WeeXnes.Core
|
namespace WeeXnes.Core
|
||||||
{
|
{
|
||||||
|
public class CustomConsole
|
||||||
|
|
||||||
public static class Console
|
|
||||||
{
|
{
|
||||||
public static class Data
|
public static class Data
|
||||||
{
|
{
|
||||||
|
@ -25,7 +21,6 @@ namespace WeeXnes.Core
|
||||||
|
|
||||||
public static class Formatting
|
public static class Formatting
|
||||||
{
|
{
|
||||||
public static bool timestamp_prefix = false;
|
|
||||||
public static string success_char = "✓";
|
public static string success_char = "✓";
|
||||||
public static string warning_char = "⌬";
|
public static string warning_char = "⌬";
|
||||||
public static string info_char = "◈";
|
public static string info_char = "◈";
|
||||||
|
@ -33,6 +28,7 @@ namespace WeeXnes.Core
|
||||||
public static string writeline_char = "•";
|
public static string writeline_char = "•";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void ConfiguredWriteline(
|
private static void ConfiguredWriteline(
|
||||||
string text,
|
string text,
|
||||||
ConsoleColor color,
|
ConsoleColor color,
|
||||||
|
@ -41,14 +37,8 @@ namespace WeeXnes.Core
|
||||||
if(!App.DebugMode)
|
if(!App.DebugMode)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
try
|
//VanillaConsole.OutputEncoding = Encoding.UTF8;
|
||||||
{
|
|
||||||
VanillaConsole.OutputEncoding = Encoding.UTF8;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
ConsoleColor prevColor = VanillaConsole.BackgroundColor;
|
ConsoleColor prevColor = VanillaConsole.BackgroundColor;
|
||||||
ConsoleColor prevForeColor = VanillaConsole.ForegroundColor;
|
ConsoleColor prevForeColor = VanillaConsole.ForegroundColor;
|
||||||
if (Data.Colors.colored_output)
|
if (Data.Colors.colored_output)
|
||||||
|
@ -56,9 +46,7 @@ namespace WeeXnes.Core
|
||||||
VanillaConsole.BackgroundColor = color;
|
VanillaConsole.BackgroundColor = color;
|
||||||
VanillaConsole.ForegroundColor = foregroundColor;
|
VanillaConsole.ForegroundColor = foregroundColor;
|
||||||
}
|
}
|
||||||
DateTime currentTime = DateTime.Now;
|
|
||||||
if (Data.Formatting.timestamp_prefix)
|
|
||||||
text = currentTime.ToString("[HH:mm:ss]") + text;
|
|
||||||
VanillaConsole.WriteLine(text + " ");
|
VanillaConsole.WriteLine(text + " ");
|
||||||
if (Data.Colors.colored_output)
|
if (Data.Colors.colored_output)
|
||||||
{
|
{
|
||||||
|
@ -74,6 +62,13 @@ namespace WeeXnes.Core
|
||||||
{
|
{
|
||||||
ConfiguredWriteline(" " + Data.Formatting.writeline_char + " (" + lineNumber + "|" + caller + ") " + text,VanillaConsole.BackgroundColor, ConsoleColor.White);
|
ConfiguredWriteline(" " + Data.Formatting.writeline_char + " (" + lineNumber + "|" + caller + ") " + text,VanillaConsole.BackgroundColor, ConsoleColor.White);
|
||||||
}
|
}
|
||||||
|
public static void WriteLineVerbose(string text,
|
||||||
|
[CallerLineNumber] int lineNumber = 0,
|
||||||
|
[CallerMemberName] string caller = null,
|
||||||
|
[CallerFilePath] string filePath = null)
|
||||||
|
{
|
||||||
|
ConfiguredWriteline(" " + Data.Formatting.writeline_char + " (" + Path.GetFileName(filePath) + "|" + caller + "|" + lineNumber + ") " + text,VanillaConsole.BackgroundColor, ConsoleColor.White);
|
||||||
|
}
|
||||||
public static void WriteLine(float text,
|
public static void WriteLine(float text,
|
||||||
[CallerLineNumber] int lineNumber = 0,
|
[CallerLineNumber] int lineNumber = 0,
|
||||||
[CallerMemberName] string caller = null)
|
[CallerMemberName] string caller = null)
|
|
@ -8,24 +8,21 @@ namespace WeeXnes.Core
|
||||||
{
|
{
|
||||||
public class Information
|
public class Information
|
||||||
{
|
{
|
||||||
public const string Version = "4.7";
|
public const string Version = "4.5.0";
|
||||||
public const string EncryptionHash = "8zf5#RdyQ]$4x4_";
|
public const string EncryptionHash = "8zf5#RdyQ]$4x4_";
|
||||||
public const string ApiUrl = "https://api.github.com/repos/weexnes/weexnessuite/releases/latest";
|
public const string ApiUrl = "https://api.github.com/repos/weexnes/weexnessuite/releases/latest";
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Global
|
public class Global
|
||||||
{
|
{
|
||||||
public static PluginManager pluginManager = new PluginManager(Path.Combine(Environment.CurrentDirectory, "plugins"));
|
|
||||||
public static string AppDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "WeeXnes");
|
public static string AppDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "WeeXnes");
|
||||||
public static UpdateVar<string> AppDataPathRPC = new UpdateVar<string>();
|
public static UpdateVar<string> AppDataPathRPC = new UpdateVar<string>();
|
||||||
public static UpdateVar<string> AppDataPathKEY = new UpdateVar<string>();
|
public static UpdateVar<string> AppDataPathKEY = new UpdateVar<string>();
|
||||||
public static UpdateVar<bool> checkUpdateOnStartup = new UpdateVar<bool>();
|
|
||||||
public static string SettingsFile = "settings.ini";
|
public static string SettingsFile = "settings.ini";
|
||||||
public class Defaults
|
public class Defaults
|
||||||
{
|
{
|
||||||
public static string DefaultPathRPC = Path.Combine(AppDataPath, "RPC");
|
public static string DefaultPathRPC = Path.Combine(AppDataPath, "RPC");
|
||||||
public static string DefaultPathKEY = Path.Combine(AppDataPath, "Keys");
|
public static string DefaultPathKEY = Path.Combine(AppDataPath, "Keys");
|
||||||
public static string DefaultPathPlugins = Path.Combine(Environment.CurrentDirectory, "plugins");
|
|
||||||
}
|
}
|
||||||
public static void ForceClose()
|
public static void ForceClose()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,18 +1,11 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Net;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
namespace WeeXnes.Core
|
namespace WeeXnes.Core
|
||||||
{
|
{
|
||||||
public class HandleLaunchArguments
|
public class HandleLaunchArguments
|
||||||
{
|
{
|
||||||
public static class ArgumentStrings
|
|
||||||
{
|
|
||||||
public const string autostart = "-autostart";
|
|
||||||
public const string debugMode = "-debugMode";
|
|
||||||
}
|
|
||||||
public static class Data
|
public static class Data
|
||||||
{
|
{
|
||||||
public static bool Autostart = false;
|
public static bool Autostart = false;
|
||||||
|
@ -26,11 +19,7 @@ namespace WeeXnes.Core
|
||||||
}
|
}
|
||||||
public static void arg_debugMode()
|
public static void arg_debugMode()
|
||||||
{
|
{
|
||||||
App.DebugMode = true;
|
MessageBox.Show("user debug mode enabled");
|
||||||
HandleLaunchArguments.arg_enableConsole();
|
|
||||||
//Allow untrusted certs in Debug mode
|
|
||||||
ServicePointManager.ServerCertificateValidationCallback +=
|
|
||||||
(sender, cert, chain, sslPolicyErrors) => true;
|
|
||||||
}
|
}
|
||||||
public static void arg_enableConsole()
|
public static void arg_enableConsole()
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,20 +37,17 @@ namespace WeeXnes.Core
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.Error(ex.ToString());
|
WeeXnes.Core.CustomConsole.WriteLine(ex.ToString());
|
||||||
this.ExceptionCache.Value = ex;
|
this.ExceptionCache.Value = ex;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this._loginWorker.RunWorkerCompleted += LoginWorkerOnRunWorkerCompleted;
|
this._loginWorker.RunWorkerCompleted += (sender, args) =>
|
||||||
|
{
|
||||||
|
WeeXnes.Core.CustomConsole.WriteLine("LoginWorker complete");
|
||||||
|
};
|
||||||
this._loginUrl = loginUrl;
|
this._loginUrl = loginUrl;
|
||||||
this._userDataUrl = userDataUrl;
|
this._userDataUrl = userDataUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoginWorkerOnRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
|
||||||
{
|
|
||||||
Console.WriteLine("LoginWorker complete");
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Login(string email, string password)
|
public string Login(string email, string password)
|
||||||
{
|
{
|
||||||
if (String.IsNullOrEmpty(email))
|
if (String.IsNullOrEmpty(email))
|
||||||
|
@ -82,7 +79,7 @@ namespace WeeXnes.Core
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Console.Error("Error: " + response.StatusCode);
|
WeeXnes.Core.CustomConsole.WriteLine("Error: " + response.StatusCode);
|
||||||
LoginView.errorStringCache.Value = response.StatusCode.ToString();
|
LoginView.errorStringCache.Value = response.StatusCode.ToString();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -120,7 +117,7 @@ namespace WeeXnes.Core
|
||||||
user = user.user;
|
user = user.user;
|
||||||
|
|
||||||
// Now you can access the user object properties dynamically
|
// Now you can access the user object properties dynamically
|
||||||
Console.WriteLine("authenticated user: " + user.name);
|
WeeXnes.Core.CustomConsole.WriteLine("authenticated user: " + user.name);
|
||||||
//Console.WriteLine($"Email: {user.email}");
|
//Console.WriteLine($"Email: {user.email}");
|
||||||
// Access other properties as needed
|
// Access other properties as needed
|
||||||
_currentUserCache.Value = user;
|
_currentUserCache.Value = user;
|
||||||
|
@ -132,7 +129,7 @@ namespace WeeXnes.Core
|
||||||
// Handle the error, e.g., print the status code
|
// Handle the error, e.g., print the status code
|
||||||
_currentUserCache.Value = null;
|
_currentUserCache.Value = null;
|
||||||
|
|
||||||
Console.Error("Error: " + response.StatusCode);
|
WeeXnes.Core.CustomConsole.WriteLine("Error: " + response.StatusCode);
|
||||||
|
|
||||||
LoginView.errorStringCache.Value = response.StatusCode.ToString();
|
LoginView.errorStringCache.Value = response.StatusCode.ToString();
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
|
||||||
using WXPlugin.PluginCore;
|
|
||||||
|
|
||||||
namespace WeeXnes.Core;
|
|
||||||
|
|
||||||
public class PluginManager
|
|
||||||
{
|
|
||||||
private HashSet<String> Directories = new HashSet<String>();
|
|
||||||
public HashSet<IPluginBase> CurrentPlugins { get; set; } = new HashSet<IPluginBase>();
|
|
||||||
public PluginManager(String pluginPath)
|
|
||||||
{
|
|
||||||
|
|
||||||
Console.WriteLine("Plugin Manager Initialized");
|
|
||||||
Directories.Add(pluginPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void LoadPlugins()
|
|
||||||
{
|
|
||||||
|
|
||||||
Console.WriteLine("Plugin Manager Loading Plugins");
|
|
||||||
CurrentPlugins = new HashSet<IPluginBase>();
|
|
||||||
foreach (var dir in Directories)
|
|
||||||
{
|
|
||||||
DirectoryInfo dirInfo = new DirectoryInfo(dir);
|
|
||||||
foreach (var file in dirInfo.GetFiles("*.dll"))
|
|
||||||
{
|
|
||||||
Assembly asm = Assembly.LoadFrom(file.FullName);
|
|
||||||
foreach (Type type in asm.GetTypes())
|
|
||||||
{
|
|
||||||
if (type.IsSubclassOf(typeof(IPluginBase)) || type.GetInterfaces().Contains(typeof(IPluginBase)) && type.IsAbstract == false)
|
|
||||||
{
|
|
||||||
IPluginBase newPlugin = type.InvokeMember(
|
|
||||||
null,
|
|
||||||
BindingFlags.CreateInstance,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null)
|
|
||||||
as IPluginBase;
|
|
||||||
Console.WriteLine("Loaded: " + newPlugin.Name);
|
|
||||||
Console.WriteLine(newPlugin.UiPage.Content.ToString());
|
|
||||||
CurrentPlugins.Add(newPlugin);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -18,7 +18,6 @@ namespace WeeXnes.Core
|
||||||
public const string Section = "GENERAL";
|
public const string Section = "GENERAL";
|
||||||
public const string RpcFilesPath = "RpcFilesPath";
|
public const string RpcFilesPath = "RpcFilesPath";
|
||||||
public const string KeyFilesPath = "KeyFilesPath";
|
public const string KeyFilesPath = "KeyFilesPath";
|
||||||
public const string StartupUpdateCheck = "StartupUpdateCheck";
|
|
||||||
}
|
}
|
||||||
public static class KeyManager
|
public static class KeyManager
|
||||||
{
|
{
|
||||||
|
@ -88,14 +87,6 @@ namespace WeeXnes.Core
|
||||||
Global.AppDataPathKEY.Value
|
Global.AppDataPathKEY.Value
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
Global.checkUpdateOnStartup.ValueChanged += () =>
|
|
||||||
{
|
|
||||||
SettingsView.Data.settingsFile.SetValue(
|
|
||||||
Data.General.Section,
|
|
||||||
Data.General.StartupUpdateCheck,
|
|
||||||
Global.checkUpdateOnStartup.Value.ToString()
|
|
||||||
);
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -29,7 +29,7 @@ namespace WeeXnes.Core
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Console.WriteLine(e.ToString());
|
Console.WriteLine(e);
|
||||||
returnval = null;
|
returnval = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ namespace WeeXnes.Core
|
||||||
returnval = rawcontent[2];
|
returnval = rawcontent[2];
|
||||||
}catch (Exception e)
|
}catch (Exception e)
|
||||||
{
|
{
|
||||||
Console.WriteLine(e.ToString());
|
Console.WriteLine(e);
|
||||||
returnval = null;
|
returnval = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,16 +10,14 @@
|
||||||
xmlns:discordrpc="clr-namespace:WeeXnes.Views.DiscordRPC"
|
xmlns:discordrpc="clr-namespace:WeeXnes.Views.DiscordRPC"
|
||||||
xmlns:passwordGenerator="clr-namespace:WeeXnes.Views.PasswordGenerator"
|
xmlns:passwordGenerator="clr-namespace:WeeXnes.Views.PasswordGenerator"
|
||||||
xmlns:profile="clr-namespace:WeeXnes.Views.ProfileView"
|
xmlns:profile="clr-namespace:WeeXnes.Views.ProfileView"
|
||||||
xmlns:EncryptedTextEditor="clr-namespace:WeeXnes.Views.EncryptedTextEditor"
|
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Height="540"
|
Height="400"
|
||||||
Width="500"
|
Width="500"
|
||||||
Title="WeeXnes"
|
Title="WeeXnes"
|
||||||
Background="{DynamicResource ApplicationBackgroundBrush}"
|
Background="{DynamicResource ApplicationBackgroundBrush}"
|
||||||
ExtendsContentIntoTitleBar="True"
|
ExtendsContentIntoTitleBar="True"
|
||||||
WindowBackdropType="Mica"
|
WindowBackdropType="Mica"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen">
|
||||||
Loaded="MainWindow_OnLoaded">
|
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
@ -65,7 +63,6 @@
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<ui:NavigationStore
|
<ui:NavigationStore
|
||||||
Name="NavBar"
|
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Frame="{Binding ElementName=MainFrame}"
|
Frame="{Binding ElementName=MainFrame}"
|
||||||
SelectedPageIndex="0">
|
SelectedPageIndex="0">
|
||||||
|
@ -94,19 +91,12 @@
|
||||||
Name="ButtonPwGen"
|
Name="ButtonPwGen"
|
||||||
PageTag="Gen"
|
PageTag="Gen"
|
||||||
PageType="{x:Type passwordGenerator:PasswordGenView}"/>
|
PageType="{x:Type passwordGenerator:PasswordGenView}"/>
|
||||||
<ui:NavigationItem
|
|
||||||
Content="Editor"
|
|
||||||
Icon="DocumentOnePage24"
|
|
||||||
Name="ButtonEncryptedFileEditor"
|
|
||||||
PageTag="Editor"
|
|
||||||
PageType="{x:Type EncryptedTextEditor:TextEditorView}"/>
|
|
||||||
<ui:NavigationItem
|
<ui:NavigationItem
|
||||||
Content="Profile"
|
Content="Profile"
|
||||||
Icon="InprivateAccount24"
|
Icon="InprivateAccount24"
|
||||||
Name="ButtonProfile"
|
Name="ButtonProfile"
|
||||||
PageTag="Profile"
|
PageTag="Profile"
|
||||||
PageType="{x:Type profile:LoginView}"
|
PageType="{x:Type profile:LoginView}"/>
|
||||||
Visibility="Collapsed"/>
|
|
||||||
</ui:NavigationStore.Items>
|
</ui:NavigationStore.Items>
|
||||||
<ui:NavigationStore.Footer>
|
<ui:NavigationStore.Footer>
|
||||||
<ui:NavigationItem
|
<ui:NavigationItem
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Text;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using WeeXnes.Core;
|
using WeeXnes.Core;
|
||||||
using ButtonBase = System.Windows.Controls.Primitives.ButtonBase;
|
using ButtonBase = System.Windows.Controls.Primitives.ButtonBase;
|
||||||
|
@ -16,14 +15,6 @@ namespace WeeXnes
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Wpf.Ui.Appearance.Accent.ApplySystemAccent();
|
Wpf.Ui.Appearance.Accent.ApplySystemAccent();
|
||||||
EnableDebugOptions();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void EnableDebugOptions()
|
|
||||||
{
|
|
||||||
if(!App.DebugMode)
|
|
||||||
return;
|
|
||||||
//Code to be enabled in Debug mode
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,13 +52,6 @@ namespace WeeXnes
|
||||||
Environment.Exit(0);
|
Environment.Exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
foreach (var plugin in Global.pluginManager.CurrentPlugins)
|
|
||||||
{
|
|
||||||
NavBar.Items.Add(plugin.NavIcon);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
<ui:TextBox Name="TextboxProcessname" PlaceholderText="Process name" Margin="0,4"/>
|
<ui:TextBox Name="TextboxProcessname" PlaceholderText="Process name" Margin="0,4"/>
|
||||||
<ui:TextBox Name="TextboxClientid" PlaceholderText="Client ID" Margin="0,4"/>
|
<ui:TextBox Name="TextboxClientid" PlaceholderText="Client ID" Margin="0,4"/>
|
||||||
<ui:TextBox Name="TextboxDetails" PlaceholderText="Details" Margin="0,4"/>
|
|
||||||
<ui:TextBox Name="TextboxState" PlaceholderText="State" Margin="0,4"/>
|
<ui:TextBox Name="TextboxState" PlaceholderText="State" Margin="0,4"/>
|
||||||
|
<ui:TextBox Name="TextboxDetails" PlaceholderText="Details" Margin="0,4"/>
|
||||||
<ui:TextBox Name="TextboxBigimgkey" PlaceholderText="Big image key" Margin="0,4"/>
|
<ui:TextBox Name="TextboxBigimgkey" PlaceholderText="Big image key" Margin="0,4"/>
|
||||||
<ui:TextBox Name="TextboxBigimgtxt" PlaceholderText="Big image text" Margin="0,4"/>
|
<ui:TextBox Name="TextboxBigimgtxt" PlaceholderText="Big image text" Margin="0,4"/>
|
||||||
<ui:TextBox Name="TextboxSmallimgkey" PlaceholderText="Small image key" Margin="0,4"/>
|
<ui:TextBox Name="TextboxSmallimgkey" PlaceholderText="Small image key" Margin="0,4"/>
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace WeeXnes.Views.DiscordRPC
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.WriteLine(ex.ToString());
|
Console.WriteLine(ex);
|
||||||
}
|
}
|
||||||
CloseDialog();
|
CloseDialog();
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ using System.Windows.Controls;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using Nocksoft.IO.ConfigFiles;
|
using Nocksoft.IO.ConfigFiles;
|
||||||
using WeeXnes.Core;
|
using WeeXnes.Core;
|
||||||
|
using CConsole = WeeXnes.Core.CustomConsole;
|
||||||
|
|
||||||
namespace WeeXnes.Views.DiscordRPC
|
namespace WeeXnes.Views.DiscordRPC
|
||||||
{
|
{
|
||||||
|
@ -66,7 +67,7 @@ namespace WeeXnes.Views.DiscordRPC
|
||||||
if (dialog.ShowDialog() == true)
|
if (dialog.ShowDialog() == true)
|
||||||
{
|
{
|
||||||
File.Copy(filepath, dialog.FileName, true);
|
File.Copy(filepath, dialog.FileName, true);
|
||||||
Console.WriteLine("Exported to: " + dialog.FileName);
|
CustomConsole.WriteLine("Exported to: " + dialog.FileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -91,11 +92,11 @@ namespace WeeXnes.Views.DiscordRPC
|
||||||
{
|
{
|
||||||
File.Copy(dialog.FileName, Global.AppDataPathRPC.Value + "\\" + newGame.UUID + ".rpc", true);
|
File.Copy(dialog.FileName, Global.AppDataPathRPC.Value + "\\" + newGame.UUID + ".rpc", true);
|
||||||
DiscordRPCView.Data.Games.Add(newGame);
|
DiscordRPCView.Data.Games.Add(newGame);
|
||||||
Console.WriteLine("Imported: " + dialog.FileName);
|
CustomConsole.WriteLine("Imported: " + dialog.FileName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Console.Error("not imported: " + dialog.FileName);
|
CustomConsole.Error("not imported: " + dialog.FileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace WeeXnes.Views.DiscordRPC
|
||||||
|
|
||||||
private void LogChanged()
|
private void LogChanged()
|
||||||
{
|
{
|
||||||
VanillaConsole.WriteLine("Log Write Data: " + Data.LogCache.Value);
|
Console.WriteLine("Log Write Data: " + Data.LogCache.Value);
|
||||||
this.Dispatcher.Invoke(() =>
|
this.Dispatcher.Invoke(() =>
|
||||||
{
|
{
|
||||||
RpcLogView.Items.Add(Data.LogCache.Value);
|
RpcLogView.Items.Add(Data.LogCache.Value);
|
||||||
|
@ -58,7 +58,7 @@ namespace WeeXnes.Views.DiscordRPC
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
VanillaConsole.WriteLine(ex.ToString());
|
Console.WriteLine(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void StopBackgroundWorker()
|
public void StopBackgroundWorker()
|
||||||
|
@ -71,7 +71,7 @@ namespace WeeXnes.Views.DiscordRPC
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
VanillaConsole.WriteLine(ex.ToString());
|
Console.WriteLine(ex);
|
||||||
}
|
}
|
||||||
//Stop RPC
|
//Stop RPC
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ namespace WeeXnes.Views.DiscordRPC
|
||||||
{
|
{
|
||||||
foreach (Game game in DiscordRPCView.Data.Games)
|
foreach (Game game in DiscordRPCView.Data.Games)
|
||||||
game.Stop();
|
game.Stop();
|
||||||
VanillaConsole.WriteLine("Thread Stopped");
|
Console.WriteLine("Thread Stopped");
|
||||||
Data.LogCache.Value = new customEvent("[INFO] RPC Thread has stopped", EventType.ProcessStoppedEvent);
|
Data.LogCache.Value = new customEvent("[INFO] RPC Thread has stopped", EventType.ProcessStoppedEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
<Page x:Class="WeeXnes.Views.EncryptedTextEditor.TextEditorView"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:local="clr-namespace:WeeXnes.Views.EncryptedTextEditor"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
Title="TextEditorView" Height="Auto" Width="Auto">
|
|
||||||
<Grid>
|
|
||||||
<Grid>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="40px"/>
|
|
||||||
<RowDefinition/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Grid Grid.Row="0">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<Button Name="btn_openFile" Click="Btn_openFile_OnClick" Grid.Column="0" Content="Open File" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5"/>
|
|
||||||
<Button Name="btn_saveFile" Click="Btn_saveFile_OnClick" Grid.Column="1" Content="Save" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5"/>
|
|
||||||
<Button Name="btn_saveFileAs" Click="Btn_saveFileAs_OnClick" Grid.Column="2" Content="Save As" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5"/>
|
|
||||||
</Grid>
|
|
||||||
<RichTextBox Name="rtb_FileEditor" Grid.Row="1">
|
|
||||||
<RichTextBox.Resources>
|
|
||||||
<Style TargetType="{x:Type Paragraph}">
|
|
||||||
<Setter Property="Margin" Value="0"/>
|
|
||||||
</Style>
|
|
||||||
</RichTextBox.Resources>
|
|
||||||
</RichTextBox>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
|
||||||
</Page>
|
|
|
@ -1,97 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Documents;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using EncryptionLib;
|
|
||||||
using WeeXnes.Core;
|
|
||||||
|
|
||||||
namespace WeeXnes.Views.EncryptedTextEditor;
|
|
||||||
|
|
||||||
public partial class TextEditorView : Page
|
|
||||||
{
|
|
||||||
public string currentFilePath { get; set; } = null;
|
|
||||||
public TextEditorView()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
private void RaiseClickEvent(System.Windows.Controls.Button button)
|
|
||||||
{
|
|
||||||
var clickEventArgs = new RoutedEventArgs(System.Windows.Controls.Button.ClickEvent);
|
|
||||||
button.RaiseEvent(clickEventArgs);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Btn_openFile_OnClick(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
var fileContent = string.Empty;
|
|
||||||
var filePath = string.Empty;
|
|
||||||
|
|
||||||
Console.WriteLine("Calling OpenFileDialog");
|
|
||||||
using (OpenFileDialog openFileDialog = new OpenFileDialog())
|
|
||||||
{
|
|
||||||
//openFileDialog.InitialDirectory = AppDomain.CurrentDomain.BaseDirectory;
|
|
||||||
openFileDialog.Filter = "WXN Text Files (*.wtf)|*.wtf";
|
|
||||||
openFileDialog.RestoreDirectory = true;
|
|
||||||
|
|
||||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
|
||||||
{
|
|
||||||
Console.WriteLine("Opening file " + openFileDialog.FileName);
|
|
||||||
this.currentFilePath = openFileDialog.FileName;
|
|
||||||
string[] FileContent = File.ReadAllLines(openFileDialog.FileName);
|
|
||||||
string[] decryptedContent = EncryptorLibary.decryptArray(Information.EncryptionHash, FileContent);
|
|
||||||
rtb_FileEditor.Document.Blocks.Clear();
|
|
||||||
foreach (string line in decryptedContent)
|
|
||||||
{
|
|
||||||
rtb_FileEditor.Document.Blocks.Add(new Paragraph(new Run(line)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void Btn_saveFile_OnClick(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (this.currentFilePath == null)
|
|
||||||
{
|
|
||||||
RaiseClickEvent(btn_saveFileAs);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Console.WriteLine("Saving file " + currentFilePath);
|
|
||||||
TextRange textRange = new TextRange(rtb_FileEditor.Document.ContentStart, rtb_FileEditor.Document.ContentEnd);
|
|
||||||
string plainText = textRange.Text;
|
|
||||||
string[] lines = plainText.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
|
|
||||||
string[] encryptedContent =
|
|
||||||
EncryptionLib.EncryptorLibary.encryptArray(Information.EncryptionHash, lines);
|
|
||||||
File.WriteAllLines(this.currentFilePath, encryptedContent);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Btn_saveFileAs_OnClick(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
Console.WriteLine("Calling SaveFileDialog");
|
|
||||||
using (SaveFileDialog saveFileDialog = new SaveFileDialog())
|
|
||||||
{
|
|
||||||
//saveFileDialog.InitialDirectory = AppDomain.CurrentDomain.BaseDirectory;
|
|
||||||
saveFileDialog.Filter = "WXN Text Files (*.wtf)|*.wtf";
|
|
||||||
saveFileDialog.RestoreDirectory = true;
|
|
||||||
|
|
||||||
if(saveFileDialog.ShowDialog() == DialogResult.OK)
|
|
||||||
{
|
|
||||||
Console.WriteLine("Saving file " + saveFileDialog.FileName);
|
|
||||||
this.currentFilePath = saveFileDialog.FileName;
|
|
||||||
TextRange textRange = new TextRange(rtb_FileEditor.Document.ContentStart, rtb_FileEditor.Document.ContentEnd);
|
|
||||||
string plainText = textRange.Text;
|
|
||||||
string[] lines = plainText.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
|
|
||||||
string[] encryptedContent =
|
|
||||||
EncryptionLib.EncryptorLibary.encryptArray(Information.EncryptionHash, lines);
|
|
||||||
File.WriteAllLines(saveFileDialog.FileName, encryptedContent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -6,6 +6,7 @@ using System.Net;
|
||||||
using Wpf.Ui.Controls;
|
using Wpf.Ui.Controls;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using Path = System.Windows.Shapes.Path;
|
using Path = System.Windows.Shapes.Path;
|
||||||
|
using Console = WeeXnes.Core.CustomConsole;
|
||||||
|
|
||||||
namespace WeeXnes.Views.KeyManager
|
namespace WeeXnes.Views.KeyManager
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,7 +87,7 @@ namespace WeeXnes.Views.KeyManager
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.WriteLine(ex.ToString());
|
Console.WriteLine(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace WeeXnes.Views.PasswordGenerator
|
||||||
CustomPasswordBuilderString += PasswordBuilderStrings.special;
|
CustomPasswordBuilderString += PasswordBuilderStrings.special;
|
||||||
|
|
||||||
|
|
||||||
Console.WriteLine("Generating Password from: " + CustomPasswordBuilderString);
|
CustomConsole.WriteLine("Generating Password from: " + CustomPasswordBuilderString);
|
||||||
//MessageBox.Show(CustomPasswordBuilderString);
|
//MessageBox.Show(CustomPasswordBuilderString);
|
||||||
|
|
||||||
string generatedPassword = "";
|
string generatedPassword = "";
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
<Page x:Class="WeeXnes.Views.PluginManager.PluginManagerView"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:local="clr-namespace:WeeXnes.Views.PluginManager"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
Title="PluginManagerView" Height="450" Width="800">
|
|
||||||
<Grid>
|
|
||||||
<ListView ItemsSource="{Binding Plugin}">
|
|
||||||
<ListView.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<StackPanel>
|
|
||||||
<TextBlock Text="{Binding Name}"/>
|
|
||||||
<TextBlock Text="{Binding Description}"/>
|
|
||||||
</StackPanel>
|
|
||||||
</DataTemplate>
|
|
||||||
</ListView.ItemTemplate>
|
|
||||||
</ListView>
|
|
||||||
</Grid>
|
|
||||||
</Page>
|
|
|
@ -1,13 +0,0 @@
|
||||||
using System.Windows.Controls;
|
|
||||||
|
|
||||||
|
|
||||||
namespace WeeXnes.Views.PluginManager;
|
|
||||||
|
|
||||||
public partial class PluginManagerView : Page
|
|
||||||
{
|
|
||||||
public PluginManagerView()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -38,7 +38,6 @@ namespace WeeXnes.Views.ProfileView
|
||||||
{
|
{
|
||||||
CardAction button = (CardAction)sender;
|
CardAction button = (CardAction)sender;
|
||||||
dynamic messageObj = button.Tag;
|
dynamic messageObj = button.Tag;
|
||||||
Console.WriteLine(messageObj.ToString());
|
|
||||||
MessageFullView.MessageToShow = messageObj;
|
MessageFullView.MessageToShow = messageObj;
|
||||||
NavigationService.Navigate(new Uri("/Views/ProfileView/MessageFullView.xaml",UriKind.Relative));
|
NavigationService.Navigate(new Uri("/Views/ProfileView/MessageFullView.xaml",UriKind.Relative));
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,9 +22,9 @@ namespace WeeXnes.Views.ProfileView
|
||||||
auth.ExceptionCache.ValueChanged += LoginWorkerException;
|
auth.ExceptionCache.ValueChanged += LoginWorkerException;
|
||||||
auth._currentUserCache.ValueChanged += userCacheChanged;
|
auth._currentUserCache.ValueChanged += userCacheChanged;
|
||||||
LoginView.errorStringCache.ValueChanged += errorStringChanged;
|
LoginView.errorStringCache.ValueChanged += errorStringChanged;
|
||||||
Console.WriteLine("Event hooks loaded");
|
WeeXnes.Core.CustomConsole.WriteLine("Error Hooks loaded");
|
||||||
Console.WriteLine("Error Hooks loaded");
|
|
||||||
|
|
||||||
|
WeeXnes.Core.CustomConsole.WriteLine("Event hooks loaded");
|
||||||
if (auth._currentUserCache.Value == null)
|
if (auth._currentUserCache.Value == null)
|
||||||
{
|
{
|
||||||
LoadingScreen.Visibility = Visibility.Visible;
|
LoadingScreen.Visibility = Visibility.Visible;
|
||||||
|
@ -83,8 +83,7 @@ namespace WeeXnes.Views.ProfileView
|
||||||
auth._currentUserCache.ValueChanged -= userCacheChanged;
|
auth._currentUserCache.ValueChanged -= userCacheChanged;
|
||||||
LoginView.errorStringCache.ValueChanged -= errorStringChanged;
|
LoginView.errorStringCache.ValueChanged -= errorStringChanged;
|
||||||
|
|
||||||
Console.WriteLine("Event hooks unloaded");
|
WeeXnes.Core.CustomConsole.WriteLine("Event hooks unloaded");
|
||||||
Console.WriteLine("Error hooks unloaded");
|
|
||||||
}
|
}
|
||||||
private void errorStringChanged()
|
private void errorStringChanged()
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,8 +17,7 @@
|
||||||
<ui:CardAction Icon="Play28"
|
<ui:CardAction Icon="Play28"
|
||||||
Name="ButtonCheckForUpdates"
|
Name="ButtonCheckForUpdates"
|
||||||
Click="ButtonCheckForUpdates_OnClick"
|
Click="ButtonCheckForUpdates_OnClick"
|
||||||
Margin="0,10,0,0"
|
Margin="0,10,0,0">
|
||||||
Visibility="Collapsed">
|
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="0,0,0,4"
|
Margin="0,0,0,4"
|
||||||
|
@ -115,11 +114,6 @@
|
||||||
|
|
||||||
<StackPanel Orientation="Vertical" Visibility="Collapsed" Name="DebugOptions">
|
<StackPanel Orientation="Vertical" Visibility="Collapsed" Name="DebugOptions">
|
||||||
<Label Content="Debug" HorizontalAlignment="Center"/>
|
<Label Content="Debug" HorizontalAlignment="Center"/>
|
||||||
|
|
||||||
<CheckBox Content="Check for updates on Startup"
|
|
||||||
Name="CheckboxAutoUpdate"
|
|
||||||
Checked="CheckboxAutoUpdate_OnChecked"
|
|
||||||
Unchecked="CheckboxAutoUpdate_OnUnchecked"/>
|
|
||||||
<ui:CardAction Icon="ErrorCircle24"
|
<ui:CardAction Icon="ErrorCircle24"
|
||||||
Click="dbg_throwException">
|
Click="dbg_throwException">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
|
|
|
@ -51,22 +51,11 @@ namespace WeeXnes.Views.Settings
|
||||||
KeyManagerView.Data.censorKeys.Value = false;
|
KeyManagerView.Data.censorKeys.Value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CheckboxAutoUpdate_OnChecked(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
Global.checkUpdateOnStartup.Value = true;
|
|
||||||
}
|
|
||||||
private void CheckboxAutoUpdate_OnUnchecked(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
Global.checkUpdateOnStartup.Value = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void ButtonCheckForUpdates_OnClick(object sender, RoutedEventArgs e)
|
private void ButtonCheckForUpdates_OnClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Checking for Updates...");
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using(WebClient webClient = new WebClient())
|
using(WebClient webClient = new WebClient())
|
||||||
|
@ -77,19 +66,14 @@ namespace WeeXnes.Views.Settings
|
||||||
GithubApiResponse apiResponseData = JsonConvert.DeserializeObject<GithubApiResponse>(downloadString);
|
GithubApiResponse apiResponseData = JsonConvert.DeserializeObject<GithubApiResponse>(downloadString);
|
||||||
if (apiResponseData.tag_name != Information.Version)
|
if (apiResponseData.tag_name != Information.Version)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Update found");
|
|
||||||
UpdateFoundView.Data.updateResponse = apiResponseData;
|
UpdateFoundView.Data.updateResponse = apiResponseData;
|
||||||
NavigationService.Navigate(new Uri("/Views/Settings/UpdateFoundView.xaml",UriKind.Relative));
|
NavigationService.Navigate(new Uri("/Views/Settings/UpdateFoundView.xaml",UriKind.Relative));
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Console.WriteLine("No Update found");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.WriteLine(ex.ToString());
|
Console.WriteLine(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +87,7 @@ namespace WeeXnes.Views.Settings
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.Error(ex.Message);
|
MessageBox.Show(ex.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +100,7 @@ namespace WeeXnes.Views.Settings
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.Error(ex.Message);
|
MessageBox.Show(ex.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,7 +113,7 @@ namespace WeeXnes.Views.Settings
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.Error(ex.Message);
|
MessageBox.Show(ex.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,13 +144,11 @@ namespace WeeXnes.Views.Settings
|
||||||
|
|
||||||
private void dbg_throwException(object sender, RoutedEventArgs e)
|
private void dbg_throwException(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Console.Warning("Creating ArithmeticException for Debugging");
|
|
||||||
Functions.ThrowTestException(new ArithmeticException());
|
Functions.ThrowTestException(new ArithmeticException());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TimedShutdown_OnClick(object sender, RoutedEventArgs e)
|
private void TimedShutdown_OnClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Setting timed shutdown in " + (Convert.ToInt32(ShutdownTimer.Value)) + "mins");
|
|
||||||
System.Diagnostics.Process process = new System.Diagnostics.Process();
|
System.Diagnostics.Process process = new System.Diagnostics.Process();
|
||||||
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
|
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
|
||||||
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
|
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
|
||||||
|
@ -178,7 +160,6 @@ namespace WeeXnes.Views.Settings
|
||||||
|
|
||||||
private void ResetShutdown_OnClick(object sender, RoutedEventArgs e)
|
private void ResetShutdown_OnClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Canceling timed shutdown");
|
|
||||||
System.Diagnostics.Process process = new System.Diagnostics.Process();
|
System.Diagnostics.Process process = new System.Diagnostics.Process();
|
||||||
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
|
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
|
||||||
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
|
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
|
||||||
|
|
|
@ -48,7 +48,7 @@ namespace WeeXnes.Views.Settings
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.WriteLine(ex.ToString());
|
Console.WriteLine(ex);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<Version>4.7</Version>
|
<Version>4.5.0</Version>
|
||||||
<ProjectGuid>{4B33CEE7-C74D-43B9-B99A-8B273D5195BC}</ProjectGuid>
|
<ProjectGuid>{4B33CEE7-C74D-43B9-B99A-8B273D5195BC}</ProjectGuid>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<RootNamespace>WeeXnes</RootNamespace>
|
<RootNamespace>WeeXnes</RootNamespace>
|
||||||
|
@ -15,7 +15,6 @@
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<ApplicationIcon>wicns.ico</ApplicationIcon>
|
<ApplicationIcon>wicns.ico</ApplicationIcon>
|
||||||
<LangVersion>12</LangVersion>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
@ -71,11 +70,10 @@
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</ApplicationDefinition>
|
</ApplicationDefinition>
|
||||||
<Compile Include="Core\Console.cs" />
|
<Compile Include="Core\CustomConsole.cs" />
|
||||||
<Compile Include="Core\EncryptorLibrary.cs" />
|
<Compile Include="Core\EncryptorLibrary.cs" />
|
||||||
<Compile Include="Core\HandleLaunchArguments.cs" />
|
<Compile Include="Core\HandleLaunchArguments.cs" />
|
||||||
<Compile Include="Core\LoginLib.cs" />
|
<Compile Include="Core\LoginLib.cs" />
|
||||||
<Compile Include="Core\PluginManager.cs" />
|
|
||||||
<Compile Include="Core\RpcLogEvents.cs" />
|
<Compile Include="Core\RpcLogEvents.cs" />
|
||||||
<Compile Include="Core\SaveSettingsHandler.cs" />
|
<Compile Include="Core\SaveSettingsHandler.cs" />
|
||||||
<Compile Include="Core\WXFile.cs" />
|
<Compile Include="Core\WXFile.cs" />
|
||||||
|
@ -92,9 +90,6 @@
|
||||||
<Compile Include="Views\DiscordRPC\RunRPCView.xaml.cs">
|
<Compile Include="Views\DiscordRPC\RunRPCView.xaml.cs">
|
||||||
<DependentUpon>RunRPCView.xaml</DependentUpon>
|
<DependentUpon>RunRPCView.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Views\EncryptedTextEditor\TextEditorView.xaml.cs">
|
|
||||||
<DependentUpon>TextEditorView.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Views\Home\HomeView.xaml.cs">
|
<Compile Include="Views\Home\HomeView.xaml.cs">
|
||||||
<DependentUpon>HomeView.xaml</DependentUpon>
|
<DependentUpon>HomeView.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -111,9 +106,6 @@
|
||||||
<Compile Include="Views\PasswordGenerator\SaveToKeyManagerView.xaml.cs">
|
<Compile Include="Views\PasswordGenerator\SaveToKeyManagerView.xaml.cs">
|
||||||
<DependentUpon>SaveToKeyManagerView.xaml</DependentUpon>
|
<DependentUpon>SaveToKeyManagerView.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Views\PluginManager\PluginManagerView.xaml.cs">
|
|
||||||
<DependentUpon>PluginManagerView.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Views\ProfileView\InboxView.xaml.cs">
|
<Compile Include="Views\ProfileView\InboxView.xaml.cs">
|
||||||
<DependentUpon>InboxView.xaml</DependentUpon>
|
<DependentUpon>InboxView.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -165,13 +157,11 @@
|
||||||
<Page Include="Views\DiscordRPC\DiscordRPCView.xaml" />
|
<Page Include="Views\DiscordRPC\DiscordRPCView.xaml" />
|
||||||
<Page Include="Views\DiscordRPC\EditRPCView.xaml" />
|
<Page Include="Views\DiscordRPC\EditRPCView.xaml" />
|
||||||
<Page Include="Views\DiscordRPC\RunRPCView.xaml" />
|
<Page Include="Views\DiscordRPC\RunRPCView.xaml" />
|
||||||
<Page Include="Views\EncryptedTextEditor\TextEditorView.xaml" />
|
|
||||||
<Page Include="Views\Home\HomeView.xaml" />
|
<Page Include="Views\Home\HomeView.xaml" />
|
||||||
<Page Include="Views\KeyManager\KeyManagerView.xaml" />
|
<Page Include="Views\KeyManager\KeyManagerView.xaml" />
|
||||||
<Page Include="Views\PasswordGenerator\PasswordGenView.xaml" />
|
<Page Include="Views\PasswordGenerator\PasswordGenView.xaml" />
|
||||||
<Page Include="Views\PasswordGenerator\SavePasswordView.xaml" />
|
<Page Include="Views\PasswordGenerator\SavePasswordView.xaml" />
|
||||||
<Page Include="Views\PasswordGenerator\SaveToKeyManagerView.xaml" />
|
<Page Include="Views\PasswordGenerator\SaveToKeyManagerView.xaml" />
|
||||||
<Page Include="Views\PluginManager\PluginManagerView.xaml" />
|
|
||||||
<Page Include="Views\ProfileView\InboxView.xaml" />
|
<Page Include="Views\ProfileView\InboxView.xaml" />
|
||||||
<Page Include="Views\ProfileView\LicenseView.xaml" />
|
<Page Include="Views\ProfileView\LicenseView.xaml" />
|
||||||
<Page Include="Views\ProfileView\LoginError.xaml" />
|
<Page Include="Views\ProfileView\LoginError.xaml" />
|
||||||
|
@ -205,11 +195,5 @@
|
||||||
<Content Include="wicns.ico" />
|
<Content Include="wicns.ico" />
|
||||||
<Resource Include="Images\wicon.png" />
|
<Resource Include="Images\wicon.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\WXPlugin\WXPlugin.csproj">
|
|
||||||
<Project>{56bfe4e0-0d30-474a-b57b-cf08515ff66e}</Project>
|
|
||||||
<Name>WXPlugin</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
|
@ -13,7 +13,6 @@
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<LangVersion>12</LangVersion>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
|
Loading…
Add table
Reference in a new issue