Commit 8cd931ef by Liv Haapala

Merge branch 'master' into 'master'

Master



See merge request !1
2 parents 5723d2fb 19dda149
Showing with 3067 additions and 373 deletions
......@@ -6,3 +6,12 @@ bin
*.suo
/MoyaAdmin/MoyaAdminUI/MoyaAdminUI/bin
/MoyaAdmin/MoyaAdminUI/MoyaAdminUI/obj
*.DotSettings
*.user
MoyaAdmin/MoyaAdminUI/ImageResizer/ImageResizer/TestApp/obj/
MoyaAdmin/MoyaAdminUI/installers/
ThermoPrinterLibrary/ThermoPrinterLibrary/obj/
MoyaSignup/installers/
MoyaAdmin/MoyaAdminUI/ImageResizer/ImageResizer/ImageResizer/obj/
MoyaAdmin/MoyaAdminUI/ImageResizer/ImageResizer/ImageResizer/bin.old/
MoyaAdmin/MoyaAdminUI/ImageResizer/ImageResizer/Backup/

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageResizer", "ImageResizer\ImageResizer.csproj", "{E660FA4F-B216-46DE-B387-DDE59BBAAFE6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApp", "TestApp\TestApp.csproj", "{AC55DC8D-6A5A-4A72-92D7-E26003F6D6A5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E660FA4F-B216-46DE-B387-DDE59BBAAFE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E660FA4F-B216-46DE-B387-DDE59BBAAFE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E660FA4F-B216-46DE-B387-DDE59BBAAFE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E660FA4F-B216-46DE-B387-DDE59BBAAFE6}.Release|Any CPU.Build.0 = Release|Any CPU
{AC55DC8D-6A5A-4A72-92D7-E26003F6D6A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AC55DC8D-6A5A-4A72-92D7-E26003F6D6A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC55DC8D-6A5A-4A72-92D7-E26003F6D6A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AC55DC8D-6A5A-4A72-92D7-E26003F6D6A5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{E660FA4F-B216-46DE-B387-DDE59BBAAFE6}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ImageResizer</RootNamespace>
<AssemblyName>ImageResizer</AssemblyName>
<ApplicationIcon>photo_portrait.ico</ApplicationIcon>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>2.0</OldToolsVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ImageResizer.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="ImageResizer.Designer.cs">
<DependentUpon>ImageResizer.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ImageResizer.resx">
<SubType>Designer</SubType>
<DependentUpon>ImageResizer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<SubType>Designer</SubType>
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="Resources\ZoomIn48.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\ZoomOut16.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\ZoomOut48.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\delete.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\disk_blue.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\import1.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\ZoomIn16.png" />
</ItemGroup>
<ItemGroup>
<Content Include="photo_portrait.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\MoyaAdminLib\MoyaAdminLib.csproj">
<Project>{095ce28f-5b53-4203-85c6-3a9afd486407}</Project>
<Name>MoyaAdminLib</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\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>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="sfdImage.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="GroupBox3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="lblZoomFactor.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="picZoomIn.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="picZoomOut.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tbResize.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="grpImage.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="vsbImage.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="hsbImage.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ofdImage.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>115, 17</value>
</metadata>
<metadata name="GroupBox1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="chkCrop.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="nudCropWidth.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label5.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="nudCropHeight.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="lblSize.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
\ No newline at end of file
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("ImageResizer")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ImageResizer")]
[assembly: AssemblyCopyright("")]
[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("65e27085-bd8e-4aef-b04d-7acc50b52745")]
// 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")]
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ImageResizer.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ImageResizer.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap delete {
get {
object obj = ResourceManager.GetObject("delete", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap disk_blue {
get {
object obj = ResourceManager.GetObject("disk_blue", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap import1 {
get {
object obj = ResourceManager.GetObject("import1", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ZoomIn48 {
get {
object obj = ResourceManager.GetObject("ZoomIn48", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ZoomOut48 {
get {
object obj = ResourceManager.GetObject("ZoomOut48", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\delete.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="disk_blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\disk_blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="import1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\import1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ZoomIn48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ZoomIn48.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ZoomOut48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ZoomOut48.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
\ No newline at end of file
namespace TestApp
{
partial class IntegratedTestForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.btnUpload = new System.Windows.Forms.Button();
this.picMain = new System.Windows.Forms.PictureBox();
this.imageResizer1 = new ImageResizer.ImageResizer();
((System.ComponentModel.ISupportInitialize)(this.picMain)).BeginInit();
this.SuspendLayout();
//
// btnUpload
//
this.btnUpload.Location = new System.Drawing.Point(12, 12);
this.btnUpload.Name = "btnUpload";
this.btnUpload.Size = new System.Drawing.Size(75, 23);
this.btnUpload.TabIndex = 0;
this.btnUpload.Text = "Upload Pic";
this.btnUpload.UseVisualStyleBackColor = true;
this.btnUpload.Click += new System.EventHandler(this.btnUpload_Click);
//
// picMain
//
this.picMain.Image = global::TestApp.Properties.Resources.NoImage;
this.picMain.InitialImage = null;
this.picMain.Location = new System.Drawing.Point(93, 12);
this.picMain.Name = "picMain";
this.picMain.Size = new System.Drawing.Size(550, 300);
this.picMain.TabIndex = 2;
this.picMain.TabStop = false;
//
// imageResizer1
//
this.imageResizer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.imageResizer1.Location = new System.Drawing.Point(93, 12);
this.imageResizer1.MinimumSize = new System.Drawing.Size(550, 300);
this.imageResizer1.Name = "imageResizer1";
this.imageResizer1.RequiredHeight = 100;
this.imageResizer1.RequiredWidth = 100;
this.imageResizer1.Size = new System.Drawing.Size(550, 300);
this.imageResizer1.StandAloneMode = false;
this.imageResizer1.TabIndex = 1;
this.imageResizer1.Visible = false;
//
// IntegratedTestForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(649, 315);
this.Controls.Add(this.btnUpload);
this.Controls.Add(this.picMain);
this.Controls.Add(this.imageResizer1);
this.Name = "IntegratedTestForm";
this.Text = "Integrated Test (control displayed and used as needed)";
((System.ComponentModel.ISupportInitialize)(this.picMain)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btnUpload;
private ImageResizer.ImageResizer imageResizer1;
private System.Windows.Forms.PictureBox picMain;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace TestApp
{
public partial class IntegratedTestForm : Form
{
public IntegratedTestForm()
{
InitializeComponent();
imageResizer1.WorkComplete += new ImageResizer.WorkCompleteDelegate(imageResizer1_WorkComplete);
}
void imageResizer1_WorkComplete(object sender, bool complete)
{
if (complete)
{
picMain.Image = imageResizer1.GetEditedImage();
}
else
{
picMain.Image = TestApp.Properties.Resources.NoImage;
}
imageResizer1.Reset();
btnUpload.Enabled = true;
picMain.Visible = true;
imageResizer1.Visible = false;
}
private void btnUpload_Click(object sender, EventArgs e)
{
btnUpload.Enabled = false;
picMain.Visible = false;
imageResizer1.Visible = true;
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace TestApp
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new StandAloneTestForm());
}
}
}
\ No newline at end of file
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("TestApp")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TestApp")]
[assembly: AssemblyCopyright("")]
[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("96fe1f03-3cc3-45a1-8707-d89a8429ddd0")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace TestApp.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TestApp.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap NoImage {
get {
object obj = ResourceManager.GetObject("NoImage", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="NoImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\NoImage.jpg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
\ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace TestApp.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
namespace TestApp
{
partial class StandAloneTestForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(StandAloneTestForm));
this.imageResizer1 = new ImageResizer.ImageResizer();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.SuspendLayout();
//
// imageResizer1
//
this.imageResizer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.imageResizer1.Location = new System.Drawing.Point(0, 0);
this.imageResizer1.MinimumSize = new System.Drawing.Size(550, 300);
this.imageResizer1.Name = "imageResizer1";
this.imageResizer1.RequiredHeight = 0;
this.imageResizer1.RequiredWidth = 0;
this.imageResizer1.Size = new System.Drawing.Size(572, 323);
this.imageResizer1.StandAloneMode = true;
this.imageResizer1.TabIndex = 0;
//
// linkLabel1
//
this.linkLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.linkLabel1.Location = new System.Drawing.Point(449, 180);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(123, 50);
this.linkLabel1.TabIndex = 1;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "http://www.codeproject.com/KB/graphics/ImageResizer.aspx";
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// StandAloneTestForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(572, 323);
this.Controls.Add(this.linkLabel1);
this.Controls.Add(this.imageResizer1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "StandAloneTestForm";
this.Text = "http://www.codeproject.com/KB/graphics/ImageResizer.aspx";
this.ResumeLayout(false);
}
#endregion
private ImageResizer.ImageResizer imageResizer1;
private System.Windows.Forms.LinkLabel linkLabel1;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace TestApp
{
public partial class StandAloneTestForm : Form
{
public StandAloneTestForm()
{
InitializeComponent();
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("http://www.codeproject.com/KB/graphics/ImageResizer.aspx");
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{AC55DC8D-6A5A-4A72-92D7-E26003F6D6A5}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TestApp</RootNamespace>
<AssemblyName>TestApp</AssemblyName>
<ApplicationIcon>photo_portrait.ico</ApplicationIcon>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>2.0</OldToolsVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="IntegratedTestForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="IntegratedTestForm.Designer.cs">
<DependentUpon>IntegratedTestForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="IntegratedTestForm.resx">
<SubType>Designer</SubType>
<DependentUpon>IntegratedTestForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="StandAloneTestForm.resx">
<SubType>Designer</SubType>
<DependentUpon>StandAloneTestForm.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="StandAloneTestForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="StandAloneTestForm.Designer.cs">
<DependentUpon>StandAloneTestForm.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ImageResizer\ImageResizer.csproj">
<Project>{E660FA4F-B216-46DE-B387-DDE59BBAAFE6}</Project>
<Name>ImageResizer</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Resources\NoImage.jpg" />
</ItemGroup>
<ItemGroup>
<Content Include="photo_portrait.ico" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\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>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
bin/
obj/
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Windows.Forms;
namespace MoyaAdminLib
{
public class AlphaNumericComparer : IComparer
{
public int ColumnIndex;
public bool SortOrderDesc;
public Type SortOrderType;
public AlphaNumericComparer()
{
ColumnIndex = 0;
}
public AlphaNumericComparer(int column)
{
ColumnIndex = 0;
}
public AlphaNumericComparer(int column, bool sortOrderDesc)
{
this.SortOrderDesc = sortOrderDesc;
ColumnIndex=column;
}
public AlphaNumericComparer(int column, bool sortOrderDesc, Type type)
{
this.SortOrderDesc = sortOrderDesc;
ColumnIndex = column;
this.SortOrderType = type;
}
public int Compare(object x, object y)
{
string s1 = null;
string s2 = null;
if (x != null)
{
if (x is ListViewItem)
{
ListViewItem lvix = (ListViewItem)x;
if (ColumnIndex < lvix.SubItems.Count)
s1 = lvix.SubItems[ColumnIndex].Text;
else
return 0;
}
}
if (s1 == null)
return 0;
if (y != null)
{
if (y is ListViewItem)
{
ListViewItem lviy = (ListViewItem)y;
if (ColumnIndex < lviy.SubItems.Count)
s2 = lviy.SubItems[ColumnIndex].Text;
else
return 0;
}
}
if (s2 == null)
return 0;
decimal num1 = 0;
decimal num2 = 0;
if (SortOrderType != null)
{
if (SortOrderType == typeof(DateTime))
{
DateTime date1 = DateTime.MinValue;
DateTime date2 = DateTime.MinValue;
if (DateTime.TryParse(s1, out date1) && DateTime.TryParse(s2, out date2))
return Compare(date1, date2);
}
}
if (Decimal.TryParse(s1, out num1) && Decimal.TryParse(s2, out num2))
{
return Compare(num1, num2);
}
int len1 = s1.Length;
int len2 = s2.Length;
int marker1 = 0;
int marker2 = 0;
// Walk through two the strings with two markers.
while (marker1 < len1 && marker2 < len2)
{
char ch1 = s1[marker1];
char ch2 = s2[marker2];
// Some buffers we can build up characters in for each chunk.
char[] space1 = new char[len1];
int loc1 = 0;
char[] space2 = new char[len2];
int loc2 = 0;
// Walk through all following characters that are digits or
// characters in BOTH strings starting at the appropriate marker.
// Collect char arrays.
do
{
space1[loc1++] = ch1;
marker1++;
if (marker1 < len1)
{
ch1 = s1[marker1];
}
else
{
break;
}
} while (char.IsDigit(ch1) == char.IsDigit(space1[0]));
do
{
space2[loc2++] = ch2;
marker2++;
if (marker2 < len2)
{
ch2 = s2[marker2];
}
else
{
break;
}
} while (char.IsDigit(ch2) == char.IsDigit(space2[0]));
// If we have collected numbers, compare them numerically.
// Otherwise, if we have strings, compare them alphabetically.
string str1 = new string(space1);
string str2 = new string(space2);
int result = 0;
if (char.IsDigit(space1[0]) && char.IsDigit(space2[0]))
{
try
{
int thisNumericChunk = int.Parse(str1);
int thatNumericChunk = int.Parse(str2);
result = thisNumericChunk.CompareTo(thatNumericChunk);
}catch(Exception ex)
{
if (ex is OverflowException)
{
result = str1.CompareTo(str2);
}
}
}
else
{
result = str1.CompareTo(str2);
}
if (result != 0)
{
return result;
}
}
return len1 - len2;
}
public int Compare(decimal x, decimal y)
{
if (x > y)
return 1;
else if (x < y)
return -1;
else
return 0;
}
public int Compare(DateTime date1, DateTime date2)
{
if (date1 > date2)
return 1;
else if (date1 < date2)
return -1;
else
return 0;
}
}
}
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Windows.Forms;
namespace MoyaAdminLib
{
public class AlphaNumericStringComparer : IComparer<string>
{
public int ColumnIndex;
public bool SortOrderDesc;
public AlphaNumericStringComparer()
{
ColumnIndex = 0;
}
public AlphaNumericStringComparer(int column)
{
ColumnIndex = 0;
}
public AlphaNumericStringComparer(int column, bool sortOrderDesc)
{
this.SortOrderDesc = sortOrderDesc;
ColumnIndex=column;
}
public int Compare(string x, string y)
{
if (x == null)
x = "";
if(y == null)
y = "";
decimal num1 = 0;
decimal num2 = 0;
if (Decimal.TryParse(x, out num1) && Decimal.TryParse(y, out num2))
{
return Compare(num1, num2);
}
int len1 = x.Length;
int len2 = y.Length;
int marker1 = 0;
int marker2 = 0;
// Walk through two the strings with two markers.
while (marker1 < len1 && marker2 < len2)
{
char ch1 = x[marker1];
char ch2 = y[marker2];
// Some buffers we can build up characters in for each chunk.
char[] space1 = new char[len1];
int loc1 = 0;
char[] space2 = new char[len2];
int loc2 = 0;
// Walk through all following characters that are digits or
// characters in BOTH strings starting at the appropriate marker.
// Collect char arrays.
do
{
space1[loc1++] = ch1;
marker1++;
if (marker1 < len1)
{
ch1 = x[marker1];
}
else
{
break;
}
} while (char.IsDigit(ch1) == char.IsDigit(space1[0]));
do
{
space2[loc2++] = ch2;
marker2++;
if (marker2 < len2)
{
ch2 = y[marker2];
}
else
{
break;
}
} while (char.IsDigit(ch2) == char.IsDigit(space2[0]));
// If we have collected numbers, compare them numerically.
// Otherwise, if we have strings, compare them alphabetically.
string str1 = new string(space1);
string str2 = new string(space2);
int result;
if (char.IsDigit(space1[0]) && char.IsDigit(space2[0]))
{
int thisNumericChunk = int.Parse(str1);
int thatNumericChunk = int.Parse(str2);
result = thisNumericChunk.CompareTo(thatNumericChunk);
}
else
{
result = str1.CompareTo(str2);
}
if (result != 0)
{
return result;
}
}
return len1 - len2;
}
public int Compare(decimal x, decimal y)
{
if (x > y)
return 1;
else if (x < y)
return -1;
else
return 0;
}
}
}
......@@ -13,25 +13,24 @@
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
......@@ -47,6 +46,8 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AlphaNumericComparer.cs" />
<Compile Include="AlphaNumericStringComparer.cs" />
<Compile Include="Card.cs" />
<Compile Include="CardList.cs" />
<Compile Include="ComputerPlace.cs" />
......@@ -68,6 +69,7 @@
<Compile Include="OrgMealList.cs" />
<Compile Include="Place.cs" />
<Compile Include="PlaceMap.cs" />
<Compile Include="Product.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Randomizer.cs" />
<Compile Include="Reader.cs" />
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MoyaAdminLib
{
public class Product
{
private string productName;
public string Name
{
get { return productName; }
set { productName = value; }
}
private int productId;
public int Id
{
get { return productId;}
set { productId = value; }
}
}
}
......@@ -149,7 +149,7 @@ namespace MoyaAdminLib
{
var responseValue = string.Empty;
if (response.StatusCode != HttpStatusCode.OK)
if ((int)response.StatusCode < 200 && (int)response.StatusCode >= 300)
{
var message = String.Format("Request failed. Received HTTP {0}", response.StatusCode);
throw new ApplicationException(message);
......
......@@ -27,8 +27,10 @@ namespace MoyaAdminLib
public string firstname;
public string lastname;
public string login;
public string password;
public int userId;
public string nick;
public string email;
public string birthday;
public string gender;
public string phoneNumber;
......
D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.dll.config
D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.dll
D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.pdb
D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.dll
D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.pdb
D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.Controls.EventUserEditor.resources
D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.csproj.GenerateResource.Cache
I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.dll.config
I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.dll
I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.pdb
I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.Controls.EventUserEditor.resources
I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.csproj.GenerateResource.Cache
I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.dll
I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.pdb
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.Controls.EventUserEditor.resources
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.csproj.GenerateResource.Cache
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.dll
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.dll.config
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.dll
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.pdb
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.pdb
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.csprojResolveAssemblyReference.cache
I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.csprojResolveAssemblyReference.cache
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Release\MoyaAdminLib.dll.config
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Release\MoyaAdminLib.dll
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Release\MoyaAdminLib.pdb
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Release\MoyaAdminLib.Controls.EventUserEditor.resources
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Release\MoyaAdminLib.csproj.GenerateResource.Cache
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Release\MoyaAdminLib.dll
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Release\MoyaAdminLib.pdb
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Release\MoyaAdminLib.csprojResolveAssemblyReference.cache

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoyaAdminUI", "MoyaAdminUI\MoyaAdminUI.csproj", "{56D4C2A6-B4A2-4E40-ACFB-19E188AAD703}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoyaAdminLib", "MoyaAdminLib\MoyaAdminLib.csproj", "{095CE28F-5B53-4203-85C6-3A9AFD486407}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageResizer", "ImageResizer\ImageResizer\ImageResizer\ImageResizer.csproj", "{E660FA4F-B216-46DE-B387-DDE59BBAAFE6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -21,6 +23,10 @@ Global
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|Any CPU.Build.0 = Debug|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|Any CPU.ActiveCfg = Release|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|Any CPU.Build.0 = Release|Any CPU
{E660FA4F-B216-46DE-B387-DDE59BBAAFE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E660FA4F-B216-46DE-B387-DDE59BBAAFE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E660FA4F-B216-46DE-B387-DDE59BBAAFE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E660FA4F-B216-46DE-B387-DDE59BBAAFE6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
bin/
obj/
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="MoyaAdminUI.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="MoyaAdminUI.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
<userSettings>
<MoyaAdminUI.Properties.Settings>
......@@ -14,20 +14,20 @@
<value>http://10.220.105.194:8080/MoyaWeb</value>
</setting>
<setting name="ApiApplicationKey" serializeAs="String">
<value />
<value/>
</setting>
<setting name="ApiUser" serializeAs="String">
<value />
<value/>
</setting>
<setting name="ApiPass" serializeAs="String">
<value />
<value/>
</setting>
<setting name="ApplicationVersion" serializeAs="String">
<value />
<value/>
</setting>
<setting name="Port" serializeAs="String">
<value />
<value/>
</setting>
</MoyaAdminUI.Properties.Settings>
</userSettings>
</configuration>
\ No newline at end of file
</configuration>
......@@ -79,7 +79,7 @@ namespace MoyaAdminUI
string json = "{\"" + key + "\":\"" + value + "\"}";
RestClient client2 = new RestClient(Properties.Settings.Default.ApiURL, HttpVerb.POST, json);
RestClient client2 = new RestClient(Properties.Settings.Default.ApiURL, HttpVerb.PUT, json);
try
{
client2.MakeRequest("meta/v1/printedcard/" + card.id + "/card-filing");
......
......@@ -8,7 +8,7 @@ using System.Windows.Forms;
namespace MoyaAdminUI
{
public delegate void ComputerPlaceGridSettingsAnswer(bool cancel, int x, int y, bool ix, bool iy, string name, bool horizontalRow, int seatSpacing, int doubleRowSpacing);
public delegate void ComputerPlaceGridSettingsAnswer(bool cancel, int x, int y, bool ix, bool iy, int width, int height, string name, bool horizontalRow, int seatSpacing, int doubleRowSpacing, int productId);
public partial class ComputerPlaceGridSettings : Form
{
public ComputerPlaceGridSettings()
......@@ -16,17 +16,39 @@ namespace MoyaAdminUI
InitializeComponent();
}
public ComputerPlaceGridSettings(int width, int height, int productId)
{
InitializeComponent();
this.width = width;
this.height = height;
this.productId = productId;
}
public event ComputerPlaceGridSettingsAnswer PreviewAnswer;
public event ComputerPlaceGridSettingsAnswer AnswerGiven;
private int width = 0;
public int Width
{
set { width = value; }
}
private int height = 0;
public int Height
{
set { height = value; }
}
private int productId;
void sendAnswer(ComputerPlaceGridSettingsAnswer d, bool cancel)
{
if (d != null)
{
if(rabVert.Checked)
d(cancel, Convert.ToInt32(this.RowsNud.Value), Convert.ToInt32(this.SeatsNud.Value), chbInvertRows.Checked, chbInvertSeats.Checked, this.NamePrefixTextBox.Text.Trim(), rabHoriz.Checked, Convert.ToInt32(nudSeatSpacing.Value), Convert.ToInt32(nudDoubleRowSpacing.Value));
d(cancel, Convert.ToInt32(this.RowsNud.Value), Convert.ToInt32(this.SeatsNud.Value), chbInvertRows.Checked, chbInvertSeats.Checked, Convert.ToInt32(this.widthNud.Value), Convert.ToInt32(this.heightNud.Value), this.NamePrefixTextBox.Text.Trim(), rabHoriz.Checked, Convert.ToInt32(nudSeatSpacing.Value), Convert.ToInt32(nudDoubleRowSpacing.Value), Convert.ToInt32(productIdNud.Value));
else
d(cancel, Convert.ToInt32(this.SeatsNud.Value), Convert.ToInt32(this.RowsNud.Value), chbInvertSeats.Checked, chbInvertRows.Checked, this.NamePrefixTextBox.Text.Trim(), rabHoriz.Checked, Convert.ToInt32(nudSeatSpacing.Value), Convert.ToInt32(nudDoubleRowSpacing.Value));
d(cancel, Convert.ToInt32(this.SeatsNud.Value), Convert.ToInt32(this.RowsNud.Value), chbInvertSeats.Checked, chbInvertRows.Checked, Convert.ToInt32(this.widthNud.Value), Convert.ToInt32(this.heightNud.Value), this.NamePrefixTextBox.Text.Trim(), rabHoriz.Checked, Convert.ToInt32(nudSeatSpacing.Value), Convert.ToInt32(nudDoubleRowSpacing.Value), Convert.ToInt32(productIdNud.Value));
}
}
......@@ -60,6 +82,12 @@ namespace MoyaAdminUI
private void ComputerPlaceGridSettings_Load(object sender, EventArgs e)
{
if (width > 0)
this.widthNud.Value = this.width;
if ( height > 0)
this.heightNud.Value = this.height;
if (productId > 0)
this.productIdNud.Value = this.productId;
sendAnswer(PreviewAnswer, false);
}
......@@ -116,5 +144,15 @@ namespace MoyaAdminUI
{
sendAnswer(PreviewAnswer, false);
}
private void widthNud_ValueChanged(object sender, EventArgs e)
{
sendAnswer(PreviewAnswer, false);
}
private void heightNud_ValueChanged(object sender, EventArgs e)
{
sendAnswer(PreviewAnswer, false);
}
}
}
namespace MoyaAdminUI
{
partial class ImageCropForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.imageResizer1 = new ImageResizer.ImageResizer();
this.SuspendLayout();
//
// imageResizer1
//
this.imageResizer1.CroppedImageRatio = new decimal(new int[] {
0,
0,
0,
0});
this.imageResizer1.DefaultApiUrl = null;
this.imageResizer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.imageResizer1.Location = new System.Drawing.Point(0, 0);
this.imageResizer1.MinimumSize = new System.Drawing.Size(550, 300);
this.imageResizer1.Name = "imageResizer1";
this.imageResizer1.RequiredHeight = 0;
this.imageResizer1.RequiredWidth = 0;
this.imageResizer1.Size = new System.Drawing.Size(958, 936);
this.imageResizer1.TabIndex = 0;
//
// ImageCropForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(958, 936);
this.Controls.Add(this.imageResizer1);
this.Name = "ImageCropForm";
this.Text = "ImageCropForm";
this.Load += new System.EventHandler(this.ImageCropForm_Load);
this.ResumeLayout(false);
}
#endregion
private ImageResizer.ImageResizer imageResizer1;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MoyaAdminUI
{
public partial class ImageCropForm : Form
{
private decimal croppedImageRatio;
public decimal CroppedImageRatio
{
get { return croppedImageRatio; }
set { croppedImageRatio = value; }
}
private string defaultApiUrl;
public string DefaultApiUrl
{
get { return defaultApiUrl; }
set { defaultApiUrl = value; }
}
public ImageCropForm()
{
InitializeComponent();
//imageResizer1.CroppedImageRatio = croppedImageRatio;
}
private void ImageCropForm_Load(object sender, EventArgs e)
{
imageResizer1.CroppedImageRatio = croppedImageRatio;
imageResizer1.DefaultApiUrl = defaultApiUrl;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
......@@ -55,6 +55,10 @@ namespace MoyaAdminUI
}
refreshPlacesCountTexBoxes();
placesCountTimer.Start();
//PlacesListView.
//PlacesListView.ListViewItemSorter = new AlphaNumericStringComparer();
}
private void loadPlacemap()
......@@ -122,6 +126,8 @@ namespace MoyaAdminUI
private void MapPictureBox_MouseUp(object sender, MouseEventArgs e)
{
//Point point = new Point(e.Location.X - MapPictureBox.Cursor.Size.Width/2 + 4, e.Location.Y - MapPictureBox.Cursor.Size.Height/2 + 4);
//clickedLocation = point;
clickedLocation = e.Location;
if (e.Button == MouseButtons.Right)
{
......@@ -364,19 +370,19 @@ namespace MoyaAdminUI
private void createNewComputerPlaceGrid(object sender, EventArgs e)
{
gridSettingsForm = new ComputerPlaceGridSettings();
gridSettingsForm = new ComputerPlaceGridSettings(newPlaceWidth, newPlaceHeight, defaultProductId);
gridSettingsForm.PreviewAnswer += new ComputerPlaceGridSettingsAnswer(gridSettingsForm_PreviewAnswer);
gridSettingsForm.AnswerGiven += new ComputerPlaceGridSettingsAnswer(gridSettingsForm_AnswerGiven);
gridSettingsForm.Show(this);
}
void gridSettingsForm_AnswerGiven(bool cancel, int x, int y, bool ix, bool iy, string name, bool horizontalRow, int seatSpacing, int doubleRowSpacing)
void gridSettingsForm_AnswerGiven(bool cancel, int x, int y, bool ix, bool iy, int width, int height, string name, bool horizontalRow, int seatSpacing, int doubleRowSpacing, int productId)
{
List<ComputerPlace> returnList = new List<ComputerPlace>();
this.gridPreview.Clear();
if (!cancel)
{
addPlaceGrid(returnList, x, y, ix, iy, name, false, horizontalRow, seatSpacing, doubleRowSpacing);
addPlaceGrid(returnList, x, y, ix, iy, width, height, name, false, horizontalRow, seatSpacing, doubleRowSpacing, productId);
foreach (ComputerPlace p in returnList)
{
unsavedComputerPlaces.Add(p);
......@@ -391,14 +397,14 @@ namespace MoyaAdminUI
this.gridSettingsForm = null;
}
void gridSettingsForm_PreviewAnswer(bool cancel, int x, int y, bool ix, bool iy, string name, bool horizontalRow, int seatSpacing, int doubleRowSpacing)
void gridSettingsForm_PreviewAnswer(bool cancel, int x, int y, bool ix, bool iy, int width, int height, string name, bool horizontalRow, int seatSpacing, int doubleRowSpacing, int productId)
{
this.gridPreview.Clear();
addPlaceGrid(gridPreview, x, y, ix, iy, name, true, horizontalRow, seatSpacing, doubleRowSpacing);
addPlaceGrid(gridPreview, x, y, ix, iy,width, height, name, true, horizontalRow, seatSpacing, doubleRowSpacing, productId);
this.MapPictureBox.Refresh();
}
void addPlaceGrid(List<ComputerPlace> list, int xcount, int ycount, bool ix, bool iy, string name, bool preview, bool horizontalRow, int seatSpacing, int doubleRowSpacing)
void addPlaceGrid(List<ComputerPlace> list, int xcount, int ycount, bool ix, bool iy, int width, int height, string name, bool preview, bool horizontalRow, int seatSpacing, int doubleRowSpacing, int productId)
{
int dRowCount = -1;
int count = 0;
......@@ -517,9 +523,9 @@ namespace MoyaAdminUI
ComputerPlace p = new ComputerPlace();
p.MapId = SelectedMap.Id;
p.ProductId = defaultProductId;
p.Width = newPlaceWidth;
p.Height = newPlaceHeight;
p.ProductId = productId;
p.Width = width;
p.Height = height;
int xcoord = 0;
int ycoord = 0;
......@@ -742,6 +748,8 @@ namespace MoyaAdminUI
this.MapPictureBox.Refresh();
this.loadComputerPlaces();
this.Cursor = Cursors.Default;
refreshPlacesCountTexBoxes();
}
......@@ -750,7 +758,7 @@ namespace MoyaAdminUI
if (disableEvents)
return;
if (!this.unsavedComputerPlaces.Contains(this.selectedPlace))
if (!this.unsavedComputerPlaces.Contains(this.selectedPlace) && this.selectedPlace != null)
{
this.unsavedComputerPlaces.Add(this.selectedPlace);
}
......@@ -803,6 +811,7 @@ namespace MoyaAdminUI
foreach (ListViewItem li in this.PlacesListView.SelectedItems)
{
ComputerPlace p = (ComputerPlace)li.Tag;
if (p.Id > 0)
{
p.Delete();
......@@ -877,6 +886,7 @@ namespace MoyaAdminUI
);
newPlaceHeight = mouseDownComputerPlace.Height;
newPlaceWidth = mouseDownComputerPlace.Width;
defaultProductId = mouseDownComputerPlace.ProductId;
}
else
{
......@@ -985,7 +995,6 @@ namespace MoyaAdminUI
}
else if (this.PlacesListView.SelectedItems.Count > 1)
{
editObjects();
}
......@@ -1078,9 +1087,12 @@ namespace MoyaAdminUI
private void toolStripRefreshButton_Click(object sender, EventArgs e)
{
User.LoadAll();
PlacesListView.Items.Clear();
loadComputerPlaces();
MapPictureBox.Refresh();
refreshPlacesCountTexBoxes();
}
private void usersToolStripPrintButton_Click(object sender, EventArgs e)
......@@ -1267,10 +1279,113 @@ namespace MoyaAdminUI
private void placesContextMenuStrip_Opening(object sender, CancelEventArgs e)
{
printPlaceStickersForSelectedPlacesToolStripMenuItem.Visible = false;
if(PlacesListView.SelectedItems.Count > 0)
{
printPlaceStickersForSelectedPlacesToolStripMenuItem.Visible = true;
}
}
private void printPlaceStickersForSelectedPlacesToolStripMenuItem_Click(object sender, EventArgs e)
{
List<ComputerPlace> places = new List<ComputerPlace>();
foreach(ListViewItem lvi in PlacesListView.SelectedItems)
{
if (lvi.Tag is ComputerPlace)
places.Add((ComputerPlace)lvi.Tag);
}
PrintPlaceStickersForm frm = new PrintPlaceStickersForm(places);
frm.Show();
}
private void PlacesListView_ColumnClick(object sender, ColumnClickEventArgs e)
{
int column = e.Column;
PlacesListView.ListViewItemSorter = new AlphaNumericComparer(column, true);
PlacesListView.Sort();
}
private void MainForm_KeyPress(object sender, KeyPressEventArgs e)
{
}
private void PlacesListView_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Left || e.KeyCode == Keys.Right || e.KeyCode == Keys.Up || e.KeyCode == Keys.Down)
{
foreach (ListViewItem li in this.PlacesListView.SelectedItems)
{
ComputerPlace p = (ComputerPlace)li.Tag;
if (!this.unsavedComputerPlaces.Contains(p))
{
this.unsavedComputerPlaces.Add(p);
}
changed();
}
}
}
private void MainForm_KeyDown(object sender, KeyEventArgs e)
{
}
private void PlacesListView_KeyDown(object sender, KeyEventArgs e)
{
if (UnlockToolStripButton.Checked)
{
foreach (ListViewItem li in this.PlacesListView.SelectedItems)
{
ComputerPlace p = (ComputerPlace)li.Tag;
//p.Coord += difference;
if (e.KeyCode == Keys.Left)
p.MapX -= 1;
else if (e.KeyCode == Keys.Right)
p.MapX += 1;
else if (e.KeyCode == Keys.Up)
p.MapY -= 1;
else if (e.KeyCode == Keys.Down)
p.MapY += 1;
}
if (this.PlacesListView.SelectedItems.Count == 1)
{
//single move
placeEditor.SelectedObject = mouseDownComputerPlace;
changed();
}
else if (this.PlacesListView.SelectedItems.Count > 1)
{
editObjects();
}
MapPictureBox.Refresh();
}
}
private void placeEditor_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
{
changed();
}
private void cropImageToolStripButton_Click(object sender, EventArgs e)
{
ImageCropForm frm = new ImageCropForm();
frm.CroppedImageRatio = 1.3675M;
frm.DefaultApiUrl = Properties.Settings.Default.ApiURL;
frm.Show();
}
private void toolStripButton2_Click(object sender, EventArgs e)
{
//PrintPlaceStickersForm frm = new PrintPlaceStickersForm();
}
}
}
......@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MoyaAdminUI</RootNamespace>
<AssemblyName>MoyaAdminUI</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
......@@ -84,6 +84,12 @@
<Compile Include="ComputerPlaceGridSettings.designer.cs">
<DependentUpon>ComputerPlaceGridSettings.cs</DependentUpon>
</Compile>
<Compile Include="ImageCropForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ImageCropForm.Designer.cs">
<DependentUpon>ImageCropForm.cs</DependentUpon>
</Compile>
<Compile Include="IncomingForm.cs">
<SubType>Form</SubType>
</Compile>
......@@ -97,12 +103,24 @@
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="MoyaUtils.cs" />
<Compile Include="OCRForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="OCRForm.Designer.cs">
<DependentUpon>OCRForm.cs</DependentUpon>
</Compile>
<Compile Include="OrgMealCounter.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="OrgMealCounter.Designer.cs">
<DependentUpon>OrgMealCounter.cs</DependentUpon>
</Compile>
<Compile Include="PrintPlaceStickersForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PrintPlaceStickersForm.Designer.cs">
<DependentUpon>PrintPlaceStickersForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Scanner.cs" />
......@@ -133,15 +151,24 @@
<EmbeddedResource Include="ComputerPlaceGridSettings.resx">
<DependentUpon>ComputerPlaceGridSettings.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ImageCropForm.resx">
<DependentUpon>ImageCropForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="IncomingForm.resx">
<DependentUpon>IncomingForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="OCRForm.resx">
<DependentUpon>OCRForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="OrgMealCounter.resx">
<DependentUpon>OrgMealCounter.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PrintPlaceStickersForm.resx">
<DependentUpon>PrintPlaceStickersForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
......@@ -150,6 +177,7 @@
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="ShowCardInformation.resx">
<DependentUpon>ShowCardInformation.cs</DependentUpon>
......@@ -191,11 +219,26 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ImageResizer\ImageResizer\ImageResizer\ImageResizer.csproj">
<Project>{e660fa4f-b216-46de-b387-dde59bbaafe6}</Project>
<Name>ImageResizer</Name>
</ProjectReference>
<ProjectReference Include="..\MoyaAdminLib\MoyaAdminLib.csproj">
<Project>{095ce28f-5b53-4203-85c6-3a9afd486407}</Project>
<Name>MoyaAdminLib</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<COMReference Include="bpac">
<Guid>{90359D74-B7D9-467F-B938-3883F4CAB582}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>3</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>$(SolutionDir)/../../../\AutoUpdate\src\AutoPublish\bin\Debug\AutoPublish.exe $(ConfigurationName) $(ProjectName) $(SolutionDir) $(TargetPath)</PostBuildEvent>
......
//using asprise_ocr_api;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MoyaAdminUI
{
public partial class OCRForm : Form
{
public OCRForm()
{
InitializeComponent();
}
private void OCRForm_Load(object sender, EventArgs e)
{
openFileDialog1.Filter = "image files (*.jpg, *.png)|*.jpg;*.png";
if(openFileDialog1.ShowDialog() == DialogResult.OK)
{
pictureBox1.Image = Image.FromFile(openFileDialog1.FileName);
pictureBox1.ImageLocation = openFileDialog1.FileName;
}
}
private void button1_Click(object sender, EventArgs e)
{
/*
AspriseOCR.SetUp();
AspriseOCR ocr = new AspriseOCR();
ocr.StartEngine("eng", AspriseOCR.SPEED_FAST);
string s = ocr.Recognize(pictureBox1.ImageLocation, -1, Convert.ToInt32(xNumericUpDown.Value), Convert.ToInt32(yNumericUpDown.Value), Convert.ToInt32(widthNumericUpDown.Value), Convert.ToInt32(heigthNumericUpDown.Value), AspriseOCR.RECOGNIZE_TYPE_TEXT, AspriseOCR.OUTPUT_FORMAT_PLAINTEXT);
Console.WriteLine("OCR Result: " + s);
// process more images here ...
ocr.StopEngine();
if(s.Contains("1"))
{
int start = s.IndexOf("1") + 2;
int end = s.IndexOf('\n', start);
int length = end - start;
string lastname = "";
if(length > 0 && start >= 0)
lastname = s.Substring(start, length);
lastnameTextBox.Text = lastname;
}*/
/*
if (s.Contains("2"))
{
int start = s.IndexOf("2") + 2;
int end = s.IndexOf('\n', start);
int length = end - start;
string firstnames = "";
if (length > 0 && start >= 0)
firstnames = s.Substring(start, length);
firstnamesTextBox.Text = firstnames;
*/
/*
start = end++;
end = s.IndexOf('\n', start);
length = 10;
string date = s.Substring(start, length);
if (date.Contains("?"))
{
start = s.IndexOf("?", start) +2;
end = s.IndexOf('\n', start);
length = 1;
string gender = s.Substring(start, length);
if (gender != null && gender != "" && gender.ToUpper() == "N")
genderTextBox.Text = "Nainen";
if (gender != null && gender != "" && gender.ToUpper() == "M")
genderTextBox.Text = "Mies";
}
birthdayTextBox.Text = date;
*/
}
/*
if(s.Contains("3"))
{
int start = s.IndexOf("3") + 2;
int end = s.IndexOf('\n', start);
int length = 10;
string date = s.Substring(start, length);
if (date.Contains("?"))
{
start = s.IndexOf("?", start) + 2;
end = s.IndexOf('\n', start);
length = 1;
string gender = s.Substring(start, length);
if (gender != null && gender != "" && gender.ToUpper() == "N")
genderTextBox.Text = "Nainen";
if (gender != null && gender != "" && gender.ToUpper() == "M")
genderTextBox.Text = "Mies";
}
birthdayTextBox.Text = date;
}
*/
//}
/*
private void label2_Click(object sender, EventArgs e)
{
}
private void birthdayTextBox_TextChanged(object sender, EventArgs e)
{
}*/
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
\ No newline at end of file
namespace MoyaAdminUI
{
partial class PrintPlaceStickersForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.printButton = new System.Windows.Forms.Button();
this.cancelButton = new System.Windows.Forms.Button();
this.showNickCheckBox = new System.Windows.Forms.CheckBox();
this.showCodeCheckBox = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// printButton
//
this.printButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.printButton.Location = new System.Drawing.Point(55, 84);
this.printButton.Name = "printButton";
this.printButton.Size = new System.Drawing.Size(75, 23);
this.printButton.TabIndex = 0;
this.printButton.Text = "Print";
this.printButton.UseVisualStyleBackColor = true;
this.printButton.Click += new System.EventHandler(this.printButton_Click);
//
// cancelButton
//
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancelButton.Location = new System.Drawing.Point(136, 84);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(75, 23);
this.cancelButton.TabIndex = 1;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
//
// showNickCheckBox
//
this.showNickCheckBox.AutoSize = true;
this.showNickCheckBox.Location = new System.Drawing.Point(13, 13);
this.showNickCheckBox.Name = "showNickCheckBox";
this.showNickCheckBox.Size = new System.Drawing.Size(70, 17);
this.showNickCheckBox.TabIndex = 2;
this.showNickCheckBox.Text = "Print nick";
this.showNickCheckBox.UseVisualStyleBackColor = true;
//
// showCodeCheckBox
//
this.showCodeCheckBox.AutoSize = true;
this.showCodeCheckBox.Location = new System.Drawing.Point(13, 37);
this.showCodeCheckBox.Name = "showCodeCheckBox";
this.showCodeCheckBox.Size = new System.Drawing.Size(111, 17);
this.showCodeCheckBox.TabIndex = 3;
this.showCodeCheckBox.Text = "Print access code";
this.showCodeCheckBox.UseVisualStyleBackColor = true;
//
// PrintPlaceStickersForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(216, 119);
this.Controls.Add(this.showCodeCheckBox);
this.Controls.Add(this.showNickCheckBox);
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.printButton);
this.Name = "PrintPlaceStickersForm";
this.Text = "PrintPlaceStickersForm";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button printButton;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.CheckBox showNickCheckBox;
private System.Windows.Forms.CheckBox showCodeCheckBox;
}
}
\ No newline at end of file
using MoyaAdminLib;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MoyaAdminUI
{
public partial class PrintPlaceStickersForm : Form
{
private string placeLabel = "paikkatarra.lbx";
private List<ComputerPlace> places;
public PrintPlaceStickersForm(List<ComputerPlace> places)
{
InitializeComponent();
this.places = places;
}
private void printButton_Click(object sender, EventArgs e)
{
if (!File.Exists(placeLabel))
{
MessageBox.Show("Cannot find print template");
return;
}
foreach (ComputerPlace place in places)
{
bpac.DocumentClass doc = null;
try
{
doc = new bpac.DocumentClass();
}
catch (Exception ex)
{
MessageBox.Show("Could not print place label. Place: " + place.Name);
Console.WriteLine(ex.Message + "\r\n" + ex.StackTrace);
return;
}
//doc.SetPrinter(Objects.Conf.BoxLabelPrinter, false);
if (doc != null)
{
//doc.Open(Path.Combine(Properties.Settings.Default.dd, cloakroomLabel));
doc.Open(placeLabel);
doc.GetObject("place").Text = place.Name;
if(showNickCheckBox.Checked && place.User != null)
doc.GetObject("group").Text = place.User.Nick;
else
doc.GetObject("group").Text = "";
//if(showCodeCheckBox.Checked)
doc.GetObject("code").Text = "";
doc.StartPrint("", bpac.PrintOptionConstants.bpoDefault);
if(!doc.PrintOut(1, bpac.PrintOptionConstants.bpoDefault))
{
Console.WriteLine("Error occurred: " + doc.ErrorCode.ToString());
}
doc.EndPrint();
doc.Close();
}
}
this.DialogResult = DialogResult.OK;
this.Close();
}
private void cancelButton_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
......@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 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.11")]
[assembly: AssemblyFileVersion("1.0.11")]
[assembly: AssemblyVersion("1.0.21")]
[assembly: AssemblyFileVersion("1.0.21")]
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18408
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace MoyaAdminUI.Properties
{
namespace MoyaAdminUI.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
......@@ -22,48 +22,40 @@ namespace MoyaAdminUI.Properties
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MoyaAdminUI.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set
{
set {
resourceCulture = value;
}
}
......
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18449
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
......@@ -12,7 +12,7 @@ namespace MoyaAdminUI.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
......
......@@ -95,16 +95,20 @@ namespace MoyaAdminUI
User user = (User)usersListView.SelectedItems[0].Tag;
RestClient client = new RestClient(Properties.Settings.Default.ApiURL);
string json = client.MakeRequest("user/card/" + user.EventUserId);
var ser = new JavaScriptSerializer();
Card card = ser.Deserialize<Card>(json);
pictureBox1.ImageLocation = RestClient.GetRequestURL(Properties.Settings.Default.ApiURL, "card/GetImage/" + card.id);
if (card.state == Card.CARD_STATE_PRINTED)
CardState.Text = card.state + " in " + card.GetCardPlace();
else
CardState.Text = card.state;
try {
string json = client.MakeRequest("user/card/" + user.EventUserId);
var ser = new JavaScriptSerializer();
Card card = ser.Deserialize<Card>(json);
pictureBox1.ImageLocation = RestClient.GetRequestURL(Properties.Settings.Default.ApiURL, "card/GetImage/" + card.id);
if (card.state == Card.CARD_STATE_PRINTED)
CardState.Text = card.state + " in " + card.GetCardPlace();
else
CardState.Text = card.state;
}catch
{
Console.WriteLine("Failed to fetch user card");
}
/*
if (card.state == Card.CARD_STATE_PRINTED)
{
......
......@@ -22,7 +22,7 @@
Name "MoyaAdminUI moya v1_00_11"
Name "MoyaAdminUI moya v1_00_21"
; DO NOT CHANGE OutFile "installer_temp.exe" !!! AutoPublish requires this.
......@@ -198,7 +198,7 @@ FunctionEnd
Section "!MoyaAdminUI moya stable v1_00_11" SecMain
Section "!MoyaAdminUI moya stable v1_00_21" SecMain
SetShellVarContext current
......@@ -212,9 +212,9 @@ Section "!MoyaAdminUI moya stable v1_00_11" SecMain
SetOverwrite On
File /oname=autoupdate.xml "I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\autoupdate.moya.xml"
File /oname=autoupdate.xml "C:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\autoupdate.moya.xml"
File /oname=MoyaAdminUI.exe "I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminUI.exe"
File /oname=MoyaAdminUI.exe "C:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminUI.exe"
File autoupdate.crt
......@@ -224,12 +224,15 @@ Section "!MoyaAdminUI moya stable v1_00_11" SecMain
; that is referenced to the main project.
File "I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminLib.dll"
File "I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.dll"
File "C:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminLib.dll"
File "C:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\ImageResizer.dll"
File "C:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\Interop.bpac.dll"
File "C:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.dll"
File "I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminUI.pdb"
File "I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminLib.pdb"
File "I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.pdb"
File "C:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminUI.pdb"
File "C:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminLib.pdb"
File "C:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\ImageResizer.pdb"
File "C:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.pdb"
......@@ -317,12 +320,15 @@ Section "Uninstall"
; that is referenced to the main project.
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminLib.dll"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.dll"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminLib.dll"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\ImageResizer.dll"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\Interop.bpac.dll"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.dll"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminUI.pdb"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminLib.pdb"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.pdb"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminUI.pdb"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminLib.pdb"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\ImageResizer.pdb"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.pdb"
......
bin/
obj/
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Text;
using ConfLib2;
using System.ComponentModel;
namespace RamaSignup
{
public class Config : ConfObject
{
public Config()
{
}
//Username
private string sqlUsername;
[
ConfValueAttribute(1, 32),
Description("Database username"),
Category("Database"),
DefaultValue((string)"vector_ilmo")
]
public string SqlUsername { get { return sqlUsername; } set { sqlUsername = value; } }
//Password
private string sqlPassword;
[
ConfValueAttribute(1, 64),
Description("Database password"),
Category("Database"),
DefaultValue((string)"ramakukka")
]
public string SqlPassword { get { return sqlPassword; } set { sqlPassword = value; } }
private string sqlDatabase;
[
ConfValueAttribute(1, 32),
Description("Database name"),
Category("Database"),
DefaultValue((string)"vector_ilmo_devel")
]
public string SqlDatabase { get { return sqlDatabase; } set { sqlDatabase = value; } }
private string sqlHost;
[
ConfValueAttribute(1, 64),
Description("Database address"),
Category("Database"),
DefaultValue((string)"sql.f-solutions.net")
]
public string SqlHost { get { return sqlHost; } set { sqlHost = value; } }
private int defaultGroup;
[
ConfValueAttribute(0, 65000),
Description("Default group to new player"),
Category("Defaults"),
DefaultValue((int)1)
]
public int DefaultGroup { get { return defaultGroup; } set { defaultGroup = value; } }
}
}
......@@ -8,16 +8,19 @@ using System.Text;
using System.Windows.Forms;
using WebCam;
using ImageFilters;
using NpgsqlAltPool;
using DynamicPg;
using Npgsql;
using System.IO;
using MoyaAdminLib;
using System.Diagnostics;
using ThermoPrinterLibrary;
namespace RamaSignup
{
public partial class Form1 : Form
{
ThermoPrinter thermoPrinter;
public Form1()
{
RestClient.ApiApplicationKey = Properties.Settings.Default.ApiApplicationKey;
......@@ -55,10 +58,23 @@ namespace RamaSignup
this.btnSave.Enabled = true;
}*/
public void SetPrinter(ThermoPrinter.Models model)
{
thermoPrinter = new ThermoPrinter(model);
try
{
thermoPrinter.Start(Properties.Settings.Default.printerPort);
thermoPrinter.SetBarcodeWidth(ThermoPrinter.BarcodeWidths.Small);
thermoPrinter.SetCharacterAlignment(ThermoPrinter.CharacterAlignments.Center);
thermoPrinter.SetPositionHRI(ThermoPrinter.HRIPrintingPositions.Below);
}
catch
{
thermoPrinter = null;
}
}
private void Form1_Load(object sender, EventArgs e)
{
......@@ -67,14 +83,13 @@ namespace RamaSignup
Application.ExitThread(); //program is required to close by autoupdate (probably updated)
return;
}
if (Debugger.IsAttached)
this.WindowState = FormWindowState.Normal;
}
userLoginControl1.SetPrinter += SetPrinter;
}
bool pictureTaken;
......@@ -136,7 +151,10 @@ namespace RamaSignup
}
else
{
if (thermoPrinter != null)
thermoPrinter.Stop();
}
}
private void Form1_Deactivate(object sender, EventArgs e)
......@@ -152,9 +170,15 @@ namespace RamaSignup
allowShutdown = true;
Application.Exit();
return;
} else if (e.Alt && e.KeyCode == Keys.F5)
{
//userDetailsEditor1.SetPrinter(ThermoPrinterLibrary.ThermoPrinter.Models.IDP3210);
//MessageBox.Show("Printteri: IDP3210");
}
}
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.Alt && e.Control && e.KeyCode == Keys.S)
......@@ -165,12 +189,11 @@ namespace RamaSignup
}
}
private void Form1_MouseClick(object sender, MouseEventArgs e)
{
/* if (e.Button == MouseButtons.Right)
{/*
if (e.Button == MouseButtons.Right)
{
allowShutdown = true;
Application.Exit();
......@@ -179,7 +202,7 @@ namespace RamaSignup
}
private void button1_Click(object sender, EventArgs e)
{
allowShutdown = true;
......@@ -190,6 +213,7 @@ namespace RamaSignup
{
userLoginControl1.Visible = false;
userDetailsEditor1.LoadUser(userLoginControl1.CurrentUser);
userDetailsEditor1.ThermoPrinter = thermoPrinter;
userLoginControl1.Clear();
userDetailsEditor1.Visible = true;
//userLoginControl1.CurrentUser;
......
......@@ -34,30 +34,6 @@
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
......@@ -70,42 +46,39 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>
</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<DebugType>none</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<ItemGroup>
<Reference Include="AutoUpdateLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\AutoUpdate\src\AutoPublish\bin\Debug\AutoUpdateLib.dll</HintPath>
<Reference Include="AutoUpdateLib">
<HintPath>Resources\AutoUpdateLib.dll</HintPath>
</Reference>
<Reference Include="ConfLib2, Version=1.0.1.23606, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Infodesk\res\ConfLib2.dll</HintPath>
<HintPath>deps\ConfLib2.dll</HintPath>
</Reference>
<Reference Include="DynamicPg, Version=1.3.7.31629, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="DynamicPg, Version=1.3.6.41028, Culture=neutral">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Infodesk\res\DynamicPg.dll</HintPath>
<HintPath>deps\DynamicPg.dll</HintPath>
</Reference>
<Reference Include="Mono.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Infodesk\res\Mono.Security.dll</HintPath>
<HintPath>deps\Mono.Security.dll</HintPath>
</Reference>
<Reference Include="Mono.Security.Protocol.Tls, Version=1.0.1528.33423, Culture=neutral, PublicKeyToken=4c884638a2b03853">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Infodesk\res\Mono.Security.Protocol.Tls.dll</HintPath>
<HintPath>deps\Mono.Security.Protocol.Tls.dll</HintPath>
</Reference>
<Reference Include="Npgsql, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Infodesk\res\Npgsql.dll</HintPath>
</Reference>
<Reference Include="NpgsqlAltPool, Version=1.4.2.37006, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Infodesk\res\NpgsqlAltPool.dll</HintPath>
<HintPath>deps\Npgsql.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
......@@ -126,7 +99,6 @@
</ItemGroup>
<ItemGroup>
<Compile Include="API32.cs" />
<Compile Include="Conf.cs" />
<Compile Include="Filters.cs" />
<Compile Include="Form1.cs">
<SubType>Form</SubType>
......@@ -230,11 +202,26 @@
<Project>{095ce28f-5b53-4203-85c6-3a9afd486407}</Project>
<Name>MoyaAdminLib</Name>
</ProjectReference>
<ProjectReference Include="..\ThermoPrinterLibrary\ThermoPrinterLibrary\ThermoPrinterLibrary.csproj">
<Project>{25113a41-1991-4d34-95c0-47c238037a39}</Project>
<Name>ThermoPrinterLibrary</Name>
</ProjectReference>
<ProjectReference Include="..\WebCamLib\WebCamLib.vcxproj">
<Project>{fd48314a-9615-4ba6-913a-03787fb2dd30}</Project>
<Name>WebCamLib</Name>
</ProjectReference>
<ProjectReference Include="..\WebCamWrapper\WebCamWrapper.csproj">
<Project>{cc5d5149-0092-4508-ac34-2abe1468a1c9}</Project>
<Name>WebCamWrapper</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="deps\ConfLib2.dll" />
<Content Include="deps\DynamicPg.dll" />
<Content Include="deps\Mono.Security.dll" />
<Content Include="deps\Mono.Security.Protocol.Tls.dll" />
<Content Include="deps\Npgsql.dll" />
</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.
......

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoyaSignup", "MoyaSignup.csproj", "{7264F333-9419-4208-AA6D-223D4CE19C05}"
EndProject
......@@ -11,81 +11,34 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCamLib", "..\WebCamLib\W
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebCamWrapper", "..\WebCamWrapper\WebCamWrapper.csproj", "{CC5D5149-0092-4508-AC34-2ABE1468A1C9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThermoPrinterLibrary", "..\ThermoPrinterLibrary\ThermoPrinterLibrary\ThermoPrinterLibrary.csproj", "{25113A41-1991-4D34-95C0-47C238037A39}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7264F333-9419-4208-AA6D-223D4CE19C05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7264F333-9419-4208-AA6D-223D4CE19C05}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7264F333-9419-4208-AA6D-223D4CE19C05}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{7264F333-9419-4208-AA6D-223D4CE19C05}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{7264F333-9419-4208-AA6D-223D4CE19C05}.Debug|Win32.ActiveCfg = Debug|Any CPU
{7264F333-9419-4208-AA6D-223D4CE19C05}.Debug|x64.ActiveCfg = Debug|Any CPU
{7264F333-9419-4208-AA6D-223D4CE19C05}.Debug|x86.ActiveCfg = Debug|x86
{7264F333-9419-4208-AA6D-223D4CE19C05}.Debug|x86.Build.0 = Debug|x86
{7264F333-9419-4208-AA6D-223D4CE19C05}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7264F333-9419-4208-AA6D-223D4CE19C05}.Release|Any CPU.Build.0 = Release|Any CPU
{7264F333-9419-4208-AA6D-223D4CE19C05}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{7264F333-9419-4208-AA6D-223D4CE19C05}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{7264F333-9419-4208-AA6D-223D4CE19C05}.Release|Win32.ActiveCfg = Release|Any CPU
{7264F333-9419-4208-AA6D-223D4CE19C05}.Release|x64.ActiveCfg = Release|Any CPU
{7264F333-9419-4208-AA6D-223D4CE19C05}.Release|x86.ActiveCfg = Release|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|Any CPU.Build.0 = Debug|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|Win32.ActiveCfg = Debug|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|x64.ActiveCfg = Debug|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|x86.ActiveCfg = Debug|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|Any CPU.ActiveCfg = Release|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|Any CPU.Build.0 = Release|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|Win32.ActiveCfg = Release|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|x64.ActiveCfg = Release|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|x86.ActiveCfg = Release|Any CPU
{FD48314A-9615-4BA6-913A-03787FB2DD30}.Debug|Any CPU.ActiveCfg = Debug|Win32
{FD48314A-9615-4BA6-913A-03787FB2DD30}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{FD48314A-9615-4BA6-913A-03787FB2DD30}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{FD48314A-9615-4BA6-913A-03787FB2DD30}.Debug|Win32.ActiveCfg = Debug|Win32
{FD48314A-9615-4BA6-913A-03787FB2DD30}.Debug|Win32.Build.0 = Debug|Win32
{FD48314A-9615-4BA6-913A-03787FB2DD30}.Debug|x64.ActiveCfg = Debug|x64
{FD48314A-9615-4BA6-913A-03787FB2DD30}.Debug|x64.Build.0 = Debug|x64
{7264F333-9419-4208-AA6D-223D4CE19C05}.Release|x86.ActiveCfg = Release|x86
{7264F333-9419-4208-AA6D-223D4CE19C05}.Release|x86.Build.0 = Release|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|x86.ActiveCfg = Debug|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|x86.Build.0 = Debug|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|x86.ActiveCfg = Release|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|x86.Build.0 = Release|x86
{FD48314A-9615-4BA6-913A-03787FB2DD30}.Debug|x86.ActiveCfg = Debug|Win32
{FD48314A-9615-4BA6-913A-03787FB2DD30}.Debug|x86.Build.0 = Debug|Win32
{FD48314A-9615-4BA6-913A-03787FB2DD30}.Release|Any CPU.ActiveCfg = Release|Win32
{FD48314A-9615-4BA6-913A-03787FB2DD30}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{FD48314A-9615-4BA6-913A-03787FB2DD30}.Release|Mixed Platforms.Build.0 = Release|Win32
{FD48314A-9615-4BA6-913A-03787FB2DD30}.Release|Win32.ActiveCfg = Release|Win32
{FD48314A-9615-4BA6-913A-03787FB2DD30}.Release|Win32.Build.0 = Release|Win32
{FD48314A-9615-4BA6-913A-03787FB2DD30}.Release|x64.ActiveCfg = Release|x64
{FD48314A-9615-4BA6-913A-03787FB2DD30}.Release|x64.Build.0 = Release|x64
{FD48314A-9615-4BA6-913A-03787FB2DD30}.Release|x86.ActiveCfg = Release|Win32
{FD48314A-9615-4BA6-913A-03787FB2DD30}.Release|x86.Build.0 = Release|Win32
{CC5D5149-0092-4508-AC34-2ABE1468A1C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC5D5149-0092-4508-AC34-2ABE1468A1C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC5D5149-0092-4508-AC34-2ABE1468A1C9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{CC5D5149-0092-4508-AC34-2ABE1468A1C9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{CC5D5149-0092-4508-AC34-2ABE1468A1C9}.Debug|Win32.ActiveCfg = Debug|Any CPU
{CC5D5149-0092-4508-AC34-2ABE1468A1C9}.Debug|x64.ActiveCfg = Debug|Any CPU
{CC5D5149-0092-4508-AC34-2ABE1468A1C9}.Debug|x86.ActiveCfg = Debug|Any CPU
{CC5D5149-0092-4508-AC34-2ABE1468A1C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CC5D5149-0092-4508-AC34-2ABE1468A1C9}.Release|Any CPU.Build.0 = Release|Any CPU
{CC5D5149-0092-4508-AC34-2ABE1468A1C9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{CC5D5149-0092-4508-AC34-2ABE1468A1C9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{CC5D5149-0092-4508-AC34-2ABE1468A1C9}.Release|Win32.ActiveCfg = Release|Any CPU
{CC5D5149-0092-4508-AC34-2ABE1468A1C9}.Release|x64.ActiveCfg = Release|Any CPU
{CC5D5149-0092-4508-AC34-2ABE1468A1C9}.Release|x86.ActiveCfg = Release|Any CPU
{CC5D5149-0092-4508-AC34-2ABE1468A1C9}.Debug|x86.ActiveCfg = Debug|x86
{CC5D5149-0092-4508-AC34-2ABE1468A1C9}.Debug|x86.Build.0 = Debug|x86
{CC5D5149-0092-4508-AC34-2ABE1468A1C9}.Release|x86.ActiveCfg = Release|x86
{CC5D5149-0092-4508-AC34-2ABE1468A1C9}.Release|x86.Build.0 = Release|x86
{25113A41-1991-4D34-95C0-47C238037A39}.Debug|x86.ActiveCfg = Debug|x86
{25113A41-1991-4D34-95C0-47C238037A39}.Debug|x86.Build.0 = Debug|x86
{25113A41-1991-4D34-95C0-47C238037A39}.Release|x86.ActiveCfg = Release|x86
{25113A41-1991-4D34-95C0-47C238037A39}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34209
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
......@@ -12,7 +12,7 @@ namespace RamaSignup.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
......@@ -25,19 +25,7 @@ namespace RamaSignup.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("http://10.220.105.252:8080/MoyaWeb")]
public string ApiURL {
get {
return ((string)(this["ApiURL"]));
}
set {
this["ApiURL"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("8krAyTEpzP6QnwzkxGek")]
[global::System.Configuration.DefaultSettingValueAttribute("myapiclientid")]
public string ApiApplicationKey {
get {
return ((string)(this["ApiApplicationKey"]));
......@@ -49,7 +37,7 @@ namespace RamaSignup.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("tapsa")]
[global::System.Configuration.DefaultSettingValueAttribute("myapiuser")]
public string ApiUser {
get {
return ((string)(this["ApiUser"]));
......@@ -61,7 +49,7 @@ namespace RamaSignup.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("6uGbN6GiQqbZy1n,p3hg")]
[global::System.Configuration.DefaultSettingValueAttribute("myapikey")]
public string ApiPass {
get {
return ((string)(this["ApiPass"]));
......@@ -94,5 +82,53 @@ namespace RamaSignup.Properties {
this["Port"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("TMT188II")]
public string ThermoPrinter {
get {
return ((string)(this["ThermoPrinter"]));
}
set {
this["ThermoPrinter"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Mobius")]
public string Camera {
get {
return ((string)(this["Camera"]));
}
set {
this["Camera"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("COM1")]
public string printerPort {
get {
return ((string)(this["printerPort"]));
}
set {
this["printerPort"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("http://myapi.moya.endpoint/MoyaWeb")]
public string ApiURL {
get {
return ((string)(this["ApiURL"]));
}
set {
this["ApiURL"] = value;
}
}
}
}
......@@ -2,17 +2,14 @@
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="RamaSignup.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="ApiURL" Type="System.String" Scope="User">
<Value Profile="(Default)">http://10.220.105.252:8080/MoyaWeb</Value>
</Setting>
<Setting Name="ApiApplicationKey" Type="System.String" Scope="User">
<Value Profile="(Default)">8krAyTEpzP6QnwzkxGek</Value>
<Value Profile="(Default)">myapiclientid</Value>
</Setting>
<Setting Name="ApiUser" Type="System.String" Scope="User">
<Value Profile="(Default)">tapsa</Value>
<Value Profile="(Default)">myapiuser</Value>
</Setting>
<Setting Name="ApiPass" Type="System.String" Scope="User">
<Value Profile="(Default)">6uGbN6GiQqbZy1n,p3hg</Value>
<Value Profile="(Default)">myapikey</Value>
</Setting>
<Setting Name="ApplicationVersion" Type="System.String" Scope="User">
<Value Profile="(Default)" />
......@@ -20,5 +17,17 @@
<Setting Name="Port" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="ThermoPrinter" Type="System.String" Scope="User">
<Value Profile="(Default)">TMT188II</Value>
</Setting>
<Setting Name="Camera" Type="System.String" Scope="User">
<Value Profile="(Default)">Mobius</Value>
</Setting>
<Setting Name="printerPort" Type="System.String" Scope="User">
<Value Profile="(Default)">COM1</Value>
</Setting>
<Setting Name="ApiURL" Type="System.String" Scope="User">
<Value Profile="(Default)">http://myapi.moya.endpoint/MoyaWeb</Value>
</Setting>
</Settings>
</SettingsFile>
\ No newline at end of file
No preview for this file type
......@@ -15,6 +15,7 @@ using MoyaAdminLib;
using System.Net;
using System.Collections.Specialized;
using System.Drawing.Imaging;
using System.Diagnostics;
namespace RamaSignup
{
......@@ -32,6 +33,8 @@ namespace RamaSignup
private static Bitmap latestFrame;
public event EventHandler Changed;
public bool PictureTaken = false;
public TakePictureControl()
{
InitializeComponent();
......@@ -48,6 +51,7 @@ namespace RamaSignup
public void loadUserImage(User user)
{
PictureTaken = false;
if (user.UserId == 0)
return;
string api = RestClient.GetRequestURL(Properties.Settings.Default.ApiURL, "v2/user/" + user.UserId + "/image");
......@@ -99,6 +103,7 @@ namespace RamaSignup
}
public void SaveUserImage(User user)
{
if (PictureTaken == false) return;
string url = RestClient.GetRequestURL(Properties.Settings.Default.ApiURL, "v2/user/" + user.UserId + "/image");
NameValueCollection postParameters = new NameValueCollection();
//postParameters.Add("password", Util.CreatePasswordHash(this.password));
......@@ -195,7 +200,17 @@ namespace RamaSignup
{
try
{
Camera c = CameraService.AvailableCameras.First();
Camera c = null;
if (Debugger.IsAttached)
{
foreach (Camera cam in CameraService.AvailableCameras)
{
if (cam.Name.ToLower().Contains("mobius"))
c = cam;
}
}
if(c == null)
c = CameraService.AvailableCameras.First();
setFrameSource(new CameraFrameSource(c));
//_frameSource.Camera.CaptureWidth = 1024;
//_frameSource.Camera.CaptureHeight = 768;
......@@ -271,8 +286,8 @@ namespace RamaSignup
private void clear()
{
this.pbIncoming.Image = null;
//pictureTaken = false;
latestFrame = null;
PictureTaken = false;
}
void savePicture(int pid)
......@@ -287,32 +302,7 @@ namespace RamaSignup
//Objects.Pool.ExecNonQuery("UPDATE kortit SET kuva = :bytesData WHERE id=" + pid, new Npgsql.NpgsqlParameter(":bytesData", imageContent));
return;
}
/*
private void btnTakePic_Click(object sender, EventArgs e)
{
this.btnTakePic.Enabled = false;
this.Cursor = Cursors.WaitCursor;
this.btnTakePic.Refresh();
if (freeze)
{
freeze = false;
//this.webcam.StartWebCam();
this.btnTakePic.Text = "Käytä tätä kuvaa";
pictureTaken = false;
}
else
{
freeze = true;
//this.webcam.CloseWebcam();
this.btnTakePic.Text = "Ota uusi kuva";
pictureTaken = true;
}
this.Cursor = Cursors.Default;
this.btnTakePic.Enabled = true;
}
* */
private void TakePictureControl_VisibleChanged(object sender, EventArgs e)
{
......@@ -326,10 +316,8 @@ namespace RamaSignup
public void TakePicture()
{
/*
if (_frameSource != null && _frameSource.Camera == CameraService.AvailableCameras.First())
return;
*/
PictureTaken = false;
if (!cameraOpen)
{
btnTakePic.Enabled = false;
......@@ -339,6 +327,7 @@ namespace RamaSignup
thrashOldCamera();
startCapturing();
btnTakePic.Enabled = true;
PictureTaken = false;
}
else
{
......@@ -348,6 +337,7 @@ namespace RamaSignup
thrashOldCamera();
pbIncoming.Image = latestFrame;
btnTakePic.Enabled = true;
PictureTaken = true;
if (Changed != null)
Changed(null, null);
}
......@@ -358,7 +348,12 @@ namespace RamaSignup
TakePicture();
}
internal void Clear()
{
pbIncoming.Image = null;
}
}
}
......@@ -10,12 +10,15 @@ using System.Windows.Forms;
using MoyaAdminLib;
using System.Web.Script.Serialization;
using System.Net;
using ThermoPrinterLibrary;
namespace RamaSignup
{
public partial class UserLoginControl : UserControl
{
public event EventHandler LoginOk;
public delegate void ThermoPrinterEvent(ThermoPrinter.Models model);
public event ThermoPrinterEvent SetPrinter;
public UserLoginControl()
{
......@@ -40,6 +43,19 @@ namespace RamaSignup
}
else
{
if (txtEmail.Text == "thermo2")
{
if(SetPrinter != null)
SetPrinter(ThermoPrinter.Models.IDP3210);
txtEmail.Text = "OK";
}
else if (txtEmail.Text == "thermo1")
{
if(SetPrinter != null)
SetPrinter(ThermoPrinterLibrary.ThermoPrinter.Models.TMT188II);
txtEmail.Text = "OK";
}
timer1.Stop();
CurrentUser = null;
btnNewProfile.Visible = false;
......@@ -171,7 +187,12 @@ namespace RamaSignup
{
CurrentUser = null;
txtEmail.Text = "";
passwordTextBox.Visible = false;
passwordTextBox.Text = "";
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
this.BackColor = Color.Transparent;
infoLabel.Text = "Hei! Kirjoita sähköpostiosoitteesi";
loginButton.Visible = false;
}
}
}
......@@ -15,17 +15,14 @@
</runtime>
<userSettings>
<RamaSignup.Properties.Settings>
<setting name="ApiURL" serializeAs="String">
<value>http://10.220.105.252:8080/MoyaWeb</value>
</setting>
<setting name="ApiApplicationKey" serializeAs="String">
<value>8krAyTEpzP6QnwzkxGek</value>
<value>myapiclientid</value>
</setting>
<setting name="ApiUser" serializeAs="String">
<value>tapsa</value>
<value>myapiuser</value>
</setting>
<setting name="ApiPass" serializeAs="String">
<value>6uGbN6GiQqbZy1n,p3hg</value>
<value>myapikey</value>
</setting>
<setting name="ApplicationVersion" serializeAs="String">
<value />
......@@ -33,6 +30,18 @@
<setting name="Port" serializeAs="String">
<value />
</setting>
<setting name="ThermoPrinter" serializeAs="String">
<value>TMT188II</value>
</setting>
<setting name="Camera" serializeAs="String">
<value>Mobius</value>
</setting>
<setting name="printerPort" serializeAs="String">
<value>COM1</value>
</setting>
<setting name="ApiURL" serializeAs="String">
<value>http://myapi.moya.endpoint/MoyaWeb</value>
</setting>
</RamaSignup.Properties.Settings>
</userSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!