Skip to content

Commit

Permalink
Merge pull request #18 from Karlovsky120/ErrorSubmission
Browse files Browse the repository at this point in the history
Error submission & Application Updater
  • Loading branch information
Karlovsky120 authored Jul 16, 2017
2 parents a02eb77 + aa22d27 commit e272626
Show file tree
Hide file tree
Showing 98 changed files with 11,195 additions and 171 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -287,4 +287,7 @@ __pycache__/
*.odx.cs
*.xsd.cs
download/
submodules/7DaysSaveManipulator
submodules/7DaysSaveManipulator
7DaysProfileEditor.Web/Web.config
7DaysProfileEditor.Web/Web.Debug.config
7DaysProfileEditor.Web/Web.Release.config
132 changes: 132 additions & 0 deletions 7DaysProfileEditor.Web/7DaysProfileEditor.Web.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
<Import Project="..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props')" />
<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>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{5B5522C3-89A8-450F-AF8D-B0D71D264831}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>_7DaysProfileEditor.Web</RootNamespace>
<AssemblyName>7DaysProfileEditor.Web</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" />
</ItemGroup>
<ItemGroup>
<Content Include="packages.config" />
<None Include="Properties\PublishProfiles\7DaysProfileEditor - Web Deploy.pubxml" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</None>
<None Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="Submission.asmx" />
<Content Include="version.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Web.config">
<SubType>Designer</SubType>
</Content>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Submission.asmx.cs">
<DependentUpon>Submission.asmx</DependentUpon>
<SubType>Component</SubType>
</Compile>
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>51737</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:51737/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
</Target>
<!-- 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>
22 changes: 22 additions & 0 deletions 7DaysProfileEditor.Web/7DaysProfileEditor.Web.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.15
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "7DaysProfileEditor.Web", "7DaysProfileEditor.Web.csproj", "{5B5522C3-89A8-450F-AF8D-B0D71D264831}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5B5522C3-89A8-450F-AF8D-B0D71D264831}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5B5522C3-89A8-450F-AF8D-B0D71D264831}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5B5522C3-89A8-450F-AF8D-B0D71D264831}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5B5522C3-89A8-450F-AF8D-B0D71D264831}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
35 changes: 35 additions & 0 deletions 7DaysProfileEditor.Web/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.CompilerServices;
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("_7DaysProfileEditor.Web")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("_7DaysProfileEditor.Web")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[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("5b5522c3-89a8-450f-af8d-b0d71d264831")]

// 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 Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
1 change: 1 addition & 0 deletions 7DaysProfileEditor.Web/Submission.asmx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<%@ WebService Language="C#" CodeBehind="Submission.asmx.cs" Class="_7DaysProfileEditor.Web.Submission" %>
57 changes: 57 additions & 0 deletions 7DaysProfileEditor.Web/Submission.asmx.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
using System;
using System.IO;
using System.Net;
using System.Net.Mail;
using System.Text;
using System.Web;
using System.Web.Services;

namespace _7DaysProfileEditor.Web {
/// <summary>
/// Summary description for Submission
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class Submission : WebService {

[WebMethod]
public void SubmitFile(string message, string filename, byte[] filecontent) {

string emailto = System.Configuration.ConfigurationManager.AppSettings["emailto"];
string emailfrom = System.Configuration.ConfigurationManager.AppSettings["emailfrom"];
string emailpassword = System.Configuration.ConfigurationManager.AppSettings["emailpassword"];
string emailserver = System.Configuration.ConfigurationManager.AppSettings["emailserver"];
string emailport = System.Configuration.ConfigurationManager.AppSettings["emailport"];

byte[] dataPassword = Convert.FromBase64String(emailpassword);
string decodedPassword = Encoding.UTF8.GetString(dataPassword);

var client = new SmtpClient(emailserver, int.Parse(emailport)) {
Credentials = new NetworkCredential(emailfrom, decodedPassword),
EnableSsl = true
};

MailMessage mail = new MailMessage();
mail.From = new MailAddress(emailfrom);

foreach (string email in emailto.Split(",".ToCharArray())) {
mail.To.Add(email);
}

mail.Subject = "File Submission: " + filename;
mail.Body = message;
mail.IsBodyHtml = true;
try {
mail.Attachments.Add(new Attachment(new MemoryStream(filecontent), filename));
}
catch {
//?
}

client.Send(mail);
}
}
}
5 changes: 5 additions & 0 deletions 7DaysProfileEditor.Web/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.3" targetFramework="net452" />
<package id="Microsoft.Net.Compilers" version="1.3.2" targetFramework="net452" developmentDependency="true" />
</packages>
7 changes: 7 additions & 0 deletions 7DaysProfileEditor.Web/version.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>0.16.3.0</version>
<url>https://github.com/Karlovsky120/7DaysProfileEditor/releases/download/0.16.3.0/7DaysProfileEditor.exe</url>
<changelog>https://github.com/Karlovsky120/7DaysProfileEditor/releases/tag/0.16.3.0</changelog>
<mandatory>false</mandatory>
</item>
26 changes: 16 additions & 10 deletions 7DaysProfileEditor.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,26 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "7DaysProfileEditor", "7Days
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "7DaysSaveManipulator", "7DaysSaveManipulator\7DaysSaveManipulator.csproj", "{5358C4CA-E436-44A3-A6EB-36D2732F439F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoUpdater.NET", "AutoUpdater.NET\AutoUpdater.NET.csproj", "{FB9E7E6B-B19F-4F37-A708-2996190CEF13}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E768DEB5-B73C-4671-9B4A-2CD7420E43CC}.Debug|x64.ActiveCfg = Debug|x64
{E768DEB5-B73C-4671-9B4A-2CD7420E43CC}.Debug|x64.Build.0 = Debug|x64
{E768DEB5-B73C-4671-9B4A-2CD7420E43CC}.Release|x64.ActiveCfg = Release|x64
{E768DEB5-B73C-4671-9B4A-2CD7420E43CC}.Release|x64.Build.0 = Release|x64
{5358C4CA-E436-44A3-A6EB-36D2732F439F}.Debug|x64.ActiveCfg = Debug|x64
{5358C4CA-E436-44A3-A6EB-36D2732F439F}.Debug|x64.Build.0 = Debug|x64
{5358C4CA-E436-44A3-A6EB-36D2732F439F}.Release|x64.ActiveCfg = Release|x64
{5358C4CA-E436-44A3-A6EB-36D2732F439F}.Release|x64.Build.0 = Release|x64
{E768DEB5-B73C-4671-9B4A-2CD7420E43CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E768DEB5-B73C-4671-9B4A-2CD7420E43CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E768DEB5-B73C-4671-9B4A-2CD7420E43CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E768DEB5-B73C-4671-9B4A-2CD7420E43CC}.Release|Any CPU.Build.0 = Release|Any CPU
{5358C4CA-E436-44A3-A6EB-36D2732F439F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5358C4CA-E436-44A3-A6EB-36D2732F439F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5358C4CA-E436-44A3-A6EB-36D2732F439F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5358C4CA-E436-44A3-A6EB-36D2732F439F}.Release|Any CPU.Build.0 = Release|Any CPU
{FB9E7E6B-B19F-4F37-A708-2996190CEF13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FB9E7E6B-B19F-4F37-A708-2996190CEF13}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FB9E7E6B-B19F-4F37-A708-2996190CEF13}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FB9E7E6B-B19F-4F37-A708-2996190CEF13}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
43 changes: 43 additions & 0 deletions 7DaysProfileEditor/7DaysProfileEditor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,36 @@
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>source\GUI\icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Management" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
Expand All @@ -83,6 +108,12 @@
<Compile Include="source\GUI\BottomStatusBar.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="source\GUI\frmErrorReport.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="source\GUI\frmErrorReport.Designer.cs">
<DependentUpon>frmErrorReport.cs</DependentUpon>
</Compile>
<Compile Include="source\GUI\InvertedIntegerTextBox.cs">
<SubType>Component</SubType>
</Compile>
Expand Down Expand Up @@ -169,6 +200,7 @@
<Compile Include="source\StatsAndGeneral\StatsPanel.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="source\Updater.cs" />
<Compile Include="source\Util.cs" />
</ItemGroup>
<ItemGroup>
Expand All @@ -177,6 +209,8 @@
</ItemGroup>
<ItemGroup>
<Content Include="ILMergeOrder.txt" />
<Content Include="source\GUI\icon.ico" />
<Content Include="version.xml" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
Expand All @@ -195,6 +229,15 @@
<Project>{5358c4ca-e436-44a3-a6eb-36d2732f439f}</Project>
<Name>7DaysSaveManipulator</Name>
</ProjectReference>
<ProjectReference Include="..\AutoUpdater.NET\AutoUpdater.NET.csproj">
<Project>{fb9e7e6b-b19f-4f37-a708-2996190cef13}</Project>
<Name>AutoUpdater.NET</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="source\GUI\frmErrorReport.resx">
<DependentUpon>frmErrorReport.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
Expand Down
Loading

0 comments on commit e272626

Please sign in to comment.