-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
58 changed files
with
7,864 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[*.cs] | ||
|
||
# CS0618: Type or member is obsolete | ||
dotnet_diagnostic.CS0618.severity = silent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.30907.101 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{497AA70B-948C-485D-9BDC-D4079761233F}" | ||
ProjectSection(SolutionItems) = preProject | ||
.editorconfig = .editorconfig | ||
EndProjectSection | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SLBr", "SLBr\SLBr.csproj", "{7816736D-3C43-4D68-9A4D-9F0825372E97}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|Any CPU = Release|Any CPU | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{7816736D-3C43-4D68-9A4D-9F0825372E97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{7816736D-3C43-4D68-9A4D-9F0825372E97}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{7816736D-3C43-4D68-9A4D-9F0825372E97}.Debug|x64.ActiveCfg = Debug|x64 | ||
{7816736D-3C43-4D68-9A4D-9F0825372E97}.Debug|x64.Build.0 = Debug|x64 | ||
{7816736D-3C43-4D68-9A4D-9F0825372E97}.Debug|x86.ActiveCfg = Debug|Win32 | ||
{7816736D-3C43-4D68-9A4D-9F0825372E97}.Debug|x86.Build.0 = Debug|Win32 | ||
{7816736D-3C43-4D68-9A4D-9F0825372E97}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{7816736D-3C43-4D68-9A4D-9F0825372E97}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{7816736D-3C43-4D68-9A4D-9F0825372E97}.Release|x64.ActiveCfg = Release|x64 | ||
{7816736D-3C43-4D68-9A4D-9F0825372E97}.Release|x64.Build.0 = Release|x64 | ||
{7816736D-3C43-4D68-9A4D-9F0825372E97}.Release|x86.ActiveCfg = Release|Win32 | ||
{7816736D-3C43-4D68-9A4D-9F0825372E97}.Release|x86.Build.0 = Release|Win32 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{7816736D-3C43-4D68-9A4D-9F0825372E97} = {497AA70B-948C-485D-9BDC-D4079761233F} | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {7AEF2092-FFC4-4819-97A3-CC8862806680} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> | ||
</startup> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Application x:Class="SLBr.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:SLBr" | ||
StartupUri="MainWindow.xaml" Startup="Application_Startup"> | ||
<Application.Resources> | ||
|
||
</Application.Resources> | ||
</Application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
// Copyright © 2022 SLT World. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Configuration; | ||
using System.Data; | ||
using System.Diagnostics; | ||
using System.Linq; | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Shell; | ||
|
||
namespace SLBr | ||
{ | ||
/// <summary> | ||
/// Interaction logic for App.xaml | ||
/// </summary> | ||
public partial class App : Application | ||
{ | ||
/*[DllImport("user32.dll")] | ||
private static extern bool ShowWindow(IntPtr hWnd, int cmdShow); | ||
private const int SW_MAXIMIZE = 3; | ||
private const int SW_SHOWNORMAL = 1;*/ | ||
|
||
//private static Mutex SingleInstanceMutex; | ||
|
||
private void Application_Startup(object sender, StartupEventArgs e) | ||
{ | ||
/*if (e.Args.Count() > 0) | ||
{ | ||
MessageBox.Show("You have the latest version."); | ||
Shutdown(); | ||
}*/ | ||
|
||
JumpTask OpenTask = new JumpTask | ||
{ | ||
Title = "Open", | ||
Arguments = "", | ||
//Description = "Open SLBr", | ||
CustomCategory = "Actions", | ||
ApplicationPath = Assembly.GetExecutingAssembly().Location, | ||
IconResourcePath = Assembly.GetExecutingAssembly().Location | ||
}; | ||
JumpTask PrivateOpenTask = new JumpTask | ||
{ | ||
Title = "Open in private mode", | ||
Arguments = "Private", | ||
//Description = "No browsing history will be saved, in memory cache will be used (Incognito)", | ||
CustomCategory = "Actions", | ||
ApplicationPath = Assembly.GetExecutingAssembly().Location, | ||
IconResourcePath = Assembly.GetExecutingAssembly().Location | ||
}; | ||
JumpTask DeveloperOpenTask = new JumpTask | ||
{ | ||
Title = "Open in developer mode", | ||
Arguments = "Developer", | ||
//Description = "Access to developer features of SLBr and bypass the i5 processor check", | ||
CustomCategory = "Actions", | ||
ApplicationPath = Assembly.GetExecutingAssembly().Location, | ||
IconResourcePath = Assembly.GetExecutingAssembly().Location | ||
}; | ||
JumpTask ChromiumOpenTask = new JumpTask | ||
{ | ||
Title = "Open in chromium mode", | ||
Arguments = "Chromium", | ||
//Description = "Access to developer features of SLBr and bypass the i5 processor check", | ||
CustomCategory = "Actions", | ||
ApplicationPath = Assembly.GetExecutingAssembly().Location, | ||
IconResourcePath = Assembly.GetExecutingAssembly().Location | ||
}; | ||
JumpTask IEOpenTask = new JumpTask | ||
{ | ||
Title = "Open in Internet Explorer mode", | ||
Arguments = "IE", | ||
//Description = "Access to developer features of SLBr and bypass the i5 processor check", | ||
CustomCategory = "Actions", | ||
ApplicationPath = Assembly.GetExecutingAssembly().Location, | ||
IconResourcePath = Assembly.GetExecutingAssembly().Location | ||
}; | ||
|
||
JumpList jumpList = new JumpList(); | ||
jumpList.JumpItems.Add(OpenTask); | ||
jumpList.JumpItems.Add(PrivateOpenTask); | ||
jumpList.JumpItems.Add(DeveloperOpenTask); | ||
jumpList.JumpItems.Add(ChromiumOpenTask); | ||
jumpList.JumpItems.Add(IEOpenTask); | ||
jumpList.ShowFrequentCategory = false; | ||
jumpList.ShowRecentCategory = false; | ||
|
||
JumpList.SetJumpList(Current, jumpList); | ||
|
||
|
||
Process _Process = Process.GetCurrentProcess(); | ||
List<Process> Processes = Process.GetProcesses().Where(p => | ||
p.ProcessName == _Process.ProcessName && !_Process.HasExited).ToList(); | ||
|
||
int count = Processes.Count(); | ||
|
||
if (count > 1) | ||
{ | ||
//ShowWindow(Processes[0].MainWindowHandle, SW_MAXIMIZE); | ||
MessageBox.Show("An instance is already running... Relaunch the application if you think something is wrong.");//BUG, Relaunching in SLBr shows this message | ||
Current.Shutdown(); | ||
} | ||
/*bool IsNewInstance = false; | ||
SingleInstanceMutex = new Mutex(true, "SLBrSLTBrowser", out IsNewInstance); | ||
if (!IsNewInstance) | ||
{ | ||
MessageBox.Show("Already an instance is running..."); | ||
Current.Shutdown(); | ||
}*/ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright © 2022 SLT World. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace SLBr | ||
{ | ||
public class Favourite | ||
{ | ||
public string Name { get; set; } | ||
public string Arguments { get; set; } | ||
} | ||
} |
Oops, something went wrong.