Skip to content

Commit

Permalink
Fixed client type not showing, added icon for missing windows, added …
Browse files Browse the repository at this point in the history
…default empty sqlite database so there wont be any permission issues as the application dont need to create its own.
  • Loading branch information
BoKKeR committed Apr 10, 2017
1 parent f5a99f1 commit acde91a
Show file tree
Hide file tree
Showing 26 changed files with 259 additions and 3,019 deletions.
Binary file modified .vs/TorrentSwitch/v14/.suo
Binary file not shown.
897 changes: 18 additions & 879 deletions Setup3/Setup3.vdproj

Large diffs are not rendered by default.

1,540 changes: 0 additions & 1,540 deletions Setup3/Setup3_NOTEBOOK_feb-06-225042-2017_Conflict.vdproj

This file was deleted.

36 changes: 23 additions & 13 deletions TorrentSwitch/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,10 @@
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite.EF6" />
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
<remove invariant="System.Data.SQLite" />
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
</DbProviderFactories>
</system.data>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
Expand All @@ -42,7 +34,25 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
<appSettings>
<add key="AWSAccessKey" value="" />
<add key="AWSSecretKey" value="" />
</appSettings></configuration>
<appSettings>
<add key="ClientSettingsProvider.ServiceUri" value="" />
</appSettings>
<system.web>
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
</providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
</providers>
</roleManager>
</system.web>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite.EF6" />
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
<remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
</system.data>
</configuration>
60 changes: 30 additions & 30 deletions TorrentSwitch/ClassDiagram1.cd
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<Class Name="TorrentSwitch.App" Collapsed="true">
<Position X="2.25" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<HashCode>AAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>App.xaml.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="TorrentSwitch.associate" Collapsed="true">
<Position X="4" Y="0.5" Width="1.5" />
<Position X="4" Y="0.5" Width="3" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAA=</HashCode>
<FileName>associate.cs</FileName>
Expand All @@ -17,7 +17,7 @@
<Class Name="TorrentSwitch.MainWindow" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="5.75" Y="1.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAABBABAAAAJAAACRAADAgAAABAAAAQAAAAAAEAEAAg=</HashCode>
<HashCode>AAAABAhAAAABAAAAAAADAAABABAAAAAAAAAAAAAAAAg=</HashCode>
<FileName>MainWindow.xaml.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" Collapsed="true" />
Expand All @@ -26,50 +26,43 @@
<Position X="0.5" Y="3.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>managers\webclient.cs</FileName>
<FileName>Data\Webclient.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="TorrentSwitch.CookieAwareWebClient" Collapsed="true">
<Position X="2.25" Y="1.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAIAAAA=</HashCode>
<FileName>managers\webclient.cs</FileName>
<FileName>Data\Webclient.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="TorrentSwitch.SqliteDatabase" Collapsed="true">
<Position X="5.75" Y="2.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAQAAAAAAAAAAAARAAACAAAAAAAAgAAAAAAAA=</HashCode>
<FileName>sqlite_database.cs</FileName>
<HashCode>AAAAgAAEAAAAAAAAAAACAAIAAAAQAAAAABAAAAAAAAA=</HashCode>
<FileName>SqliteDatabase.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="TorrentSwitch.ClientWindow" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="0.5" Y="1.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAABAAAAAAQAAAABCEAAAAAAA=</HashCode>
<FileName>windows\ClientWindow.xaml.cs</FileName>
<HashCode>AAAAAAQAAAAAAAAAAAAAAAEAAAAAIAAAABAAAAAiAAA=</HashCode>
<FileName>Window\ClientWindow.xaml.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" Collapsed="true" />
</Class>
<Class Name="TorrentSwitch.managers.Deluge" Collapsed="true">
<Position X="4" Y="1.5" Width="1.5" />
<TypeIdentifier>
<HashCode>IAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>managers\Deluge.cs</FileName>
<HashCode>AAAAAAAAAQAAAAAAAAAAAAABACIAgAAAAQBAAAQAAkA=</HashCode>
<FileName>Manager\Deluge.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="TorrentSwitch.managers.Transmission" Collapsed="true">
<Position X="2.25" Y="3.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>managers\Transmission.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="TorrentSwitch.managers.uTorrent" Collapsed="true">
<Position X="4" Y="3.5" Width="1.5" />
<TypeIdentifier>
<HashCode>IAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>managers\uTorrent.cs</FileName>
<HashCode>AAEAAAAAAQEAAAAAAAAAAAABACIAgAAAAABAAAQAAkA=</HashCode>
<FileName>Manager\Transmission.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="TorrentSwitch.Properties.Resources" Collapsed="true">
Expand All @@ -84,33 +77,40 @@
<HashCode>AAAAAAAAAAAAAAAAAAAAIAAAAAABAAAAAAAAAAAAAAA=</HashCode>
</TypeIdentifier>
</Class>
<Class Name="TorrentSwitch.torrent_clients.client" Collapsed="true">
<Class Name="TorrentSwitch.torrentClients.client" Collapsed="true">
<Position X="5.75" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>IAAAAAAIAAAAAAAAAAAAAAAAAgAAAQAgAAAAAAAAAAA=</HashCode>
<FileName>saved_clients\torrent_clients.cs</FileName>
<HashCode>IAEAAAAIAAAAAAAAAAAAAAAAAgAAAAAgAAAAAAAAAAA=</HashCode>
<FileName>SavedClient\TorrentClients.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="TorrentSwitch.torrent_clients.Settings" Collapsed="true">
<Class Name="TorrentSwitch.torrentClients.Settings" Collapsed="true">
<Position X="4" Y="2.5" Width="1.5" />
<TypeIdentifier>
<HashCode>QAAAAgAAAAIAABAAAAACAAEAAAAAAAgAAAAAAgAAAAA=</HashCode>
<FileName>saved_clients\torrent_clients.cs</FileName>
<FileName>SavedClient\TorrentClients.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="TorrentSwitch.windows.AddWindow" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="0.5" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAABAAAAAAAAAAAAABAAAAAAAAAAAAAAA=</HashCode>
<FileName>windows\AddWindow.xaml.cs</FileName>
<HashCode>AAAAACAAAEAAAAAAAAAAAAAAAAABAAAAAIAAAAAAAAA=</HashCode>
<FileName>Window\AddWindow.xaml.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" Collapsed="true" />
</Class>
<Enum Name="TorrentSwitch.torrent_clients.ClientType" Collapsed="true">
<Class Name="TorrentSwitch.managers.UTorrent" Collapsed="true">
<Position X="4" Y="3.5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAQEAAAAAAAAAAAABACAAAAAAAABAIAAAAEA=</HashCode>
<FileName>Manager\UTorrent.cs</FileName>
</TypeIdentifier>
</Class>
<Enum Name="TorrentSwitch.torrentClients.ClientType" Collapsed="true">
<Position X="0.5" Y="4.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAIAAAAAAAAAAAAAAAACAAAAAAAAAgAA=</HashCode>
<FileName>saved_clients\torrent_clients.cs</FileName>
<HashCode>AAAAACAAAAAAAIAAAAAAAAAAAAAAAACAAAAAAAAAgAA=</HashCode>
<FileName>SavedClient\TorrentClients.cs</FileName>
</TypeIdentifier>
</Enum>
<Font Name="Segoe UI" Size="9" />
Expand Down
18 changes: 18 additions & 0 deletions TorrentSwitch/Data/DebugData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TorrentSwitch.Data
{
class DebugData
{
#if cDEBUG

Console.WriteLine("Debug version");
#endif

}
}
5 changes: 0 additions & 5 deletions TorrentSwitch/FodyWeavers.xml

This file was deleted.

1 change: 0 additions & 1 deletion TorrentSwitch/IPC/pipeServer.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Amazon.S3.Model;
using TinyIpc.Messaging;
using TorrentSwitch;
using TorrentSwitch.logic;
Expand Down
2 changes: 1 addition & 1 deletion TorrentSwitch/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
xmlns:local="clr-namespace:TorrentSwitch"
xmlns:properties="clr-namespace:TorrentSwitch.Properties"
mc:Ignorable="d"
Icon="Image/icon.ico"
Icon="/Image/icon.ico"

Title="TorrentSwitch" Height="350" Width="525"
BorderThickness="2"
Expand Down
4 changes: 2 additions & 2 deletions TorrentSwitch/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
using System.Windows.Controls;
using MahApps.Metro.Controls;
using TorrentSwitch.managers;
using TorrentSwitch.torrent_clients;
using Settings = TorrentSwitch.torrent_clients.Settings;
using TorrentSwitch.torrentClients;
using Settings = TorrentSwitch.torrentClients.Settings;
using System.Threading.Tasks;

namespace TorrentSwitch
Expand Down
3 changes: 1 addition & 2 deletions TorrentSwitch/Manager/Deluge.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using TorrentSwitch.torrent_clients;
using TorrentSwitch.torrentClients;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Text.RegularExpressions;
Expand All @@ -10,7 +10,6 @@

namespace TorrentSwitch.managers
{

class Deluge
{
private static CookieAwareWebClient webclient { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion TorrentSwitch/Manager/Qbittorrent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using TorrentSwitch.torrent_clients;
using TorrentSwitch.torrentClients;

namespace TorrentSwitch.managers
{
Expand Down
2 changes: 1 addition & 1 deletion TorrentSwitch/Manager/Transmission.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using TorrentSwitch.torrent_clients;
using TorrentSwitch.torrentClients;

namespace TorrentSwitch.managers
{
Expand Down
2 changes: 1 addition & 1 deletion TorrentSwitch/Manager/UTorrent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Web;
using TorrentSwitch.torrent_clients;
using TorrentSwitch.torrentClients;

namespace TorrentSwitch.managers
{
Expand Down
70 changes: 70 additions & 0 deletions TorrentSwitch/Properties/app.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel element will disable file and registry virtualization.
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
<applicationRequestMinimum>
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" />
</applicationRequestMinimum>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on and is
is designed to work with. Uncomment the appropriate elements and Windows will
automatically selected the most compatible environment. -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
</application>
</compatibility>
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
-->
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>
2 changes: 1 addition & 1 deletion TorrentSwitch/SavedClient/TorrentClients.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Text;
using System.Threading.Tasks;

namespace TorrentSwitch.torrent_clients
namespace TorrentSwitch.torrentClients
{
public static class client
{
Expand Down
4 changes: 2 additions & 2 deletions TorrentSwitch/SqliteDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ public static void LoadDatabase()
while (reader.Read())
{
MainWindow.ColumnLoader(reader["alias"].ToString());
torrent_clients.ClientType client_type = (torrent_clients.ClientType)Enum.Parse(typeof(torrent_clients.ClientType), reader["type"].ToString());
torrentClients.ClientType client_type = (torrentClients.ClientType)Enum.Parse(typeof(torrentClients.ClientType), reader["type"].ToString());

torrent_clients.client.AddUser(
torrentClients.client.AddUser(
reader["alias"].ToString(),
reader["hostname"].ToString(),
reader["port"].ToString(),
Expand Down
Loading

0 comments on commit acde91a

Please sign in to comment.