Commit 740a1d45 by Liv Haapala

päivityksiä ohjelmiin

1 parent 1410e8eb
Showing with 955 additions and 260 deletions
...@@ -97,7 +97,8 @@ ...@@ -97,7 +97,8 @@
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>$(SolutionDir)/../../../\AutoUpdate\src\AutoPublish\bin\Debug\AutoPublish.exe $(ConfigurationName) $(ProjectName) $(SolutionDir) $(TargetPath)</PostBuildEvent> <PostBuildEvent>
</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.
......
...@@ -12,7 +12,6 @@ C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeS ...@@ -12,7 +12,6 @@ C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeS
C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\obj\x86\Debug\BarcodeScannerClient.pdb C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\obj\x86\Debug\BarcodeScannerClient.pdb
C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\bin\Debug\BarcodeScannerClient.exe C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\bin\Debug\BarcodeScannerClient.exe
C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\bin\Debug\BarcodeScannerClient.pdb C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\bin\Debug\BarcodeScannerClient.pdb
C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\obj\x86\Debug\BarcodeScannerClient.csprojResolveAssemblyReference.cache
C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\obj\x86\Debug\BarcodeScannerClient.Form1.resources C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\obj\x86\Debug\BarcodeScannerClient.Form1.resources
C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\obj\x86\Debug\BarcodeScannerClient.Properties.Resources.resources C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\obj\x86\Debug\BarcodeScannerClient.Properties.Resources.resources
C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\obj\x86\Debug\BarcodeScannerClient.csproj.GenerateResource.Cache C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\obj\x86\Debug\BarcodeScannerClient.csproj.GenerateResource.Cache
...@@ -28,3 +27,9 @@ I:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeS ...@@ -28,3 +27,9 @@ I:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeS
I:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\obj\x86\Debug\BarcodeScannerClient.pdb I:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\obj\x86\Debug\BarcodeScannerClient.pdb
I:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\bin\Debug\AutoUpdateLib.dll I:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\bin\Debug\AutoUpdateLib.dll
I:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\bin\Debug\AutoUpdateLib.pdb I:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\bin\Debug\AutoUpdateLib.pdb
C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\bin\Debug\AutoUpdateLib.dll
C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\bin\Debug\AutoUpdateLib.pdb
C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\obj\x86\Debug\BarcodeScannerClient.csproj.AssemblyReference.cache
C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\obj\x86\Debug\BarcodeScannerClient.ApiSettings.resources
C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\obj\x86\Debug\BarcodeScannerClient.csproj.CoreCompileInputs.cache
C:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\obj\x86\Debug\BarcodeScannerClient.csproj.CopyComplete
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CardDisplay</RootNamespace> <RootNamespace>CardDisplay</RootNamespace>
<AssemblyName>CardDisplay</AssemblyName> <AssemblyName>CardDisplay</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile> </TargetFrameworkProfile>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="AutoUpdateLib, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="AutoUpdateLib, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\AutoUpdate\src\AutoUpdateLib\bin\Debug\AutoUpdateLib.dll</HintPath> <HintPath>Resources\AutoUpdateLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="MoyaAdminLib"> <Reference Include="MoyaAdminLib">
<HintPath>..\..\..\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.dll</HintPath> <HintPath>..\..\..\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.dll</HintPath>
...@@ -110,9 +110,12 @@ ...@@ -110,9 +110,12 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Include="Resources\AutoUpdateLib.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>$(SolutionDir)/../../../\AutoUpdate\src\AutoPublish\bin\Debug\AutoPublish.exe $(ConfigurationName) $(ProjectName) $(SolutionDir) $(TargetPath)</PostBuildEvent> <PostBuildEvent>$(SolutionDir)/../../../\AutoUpdate\src\AutoPublish\bin\x86\Debug\AutoPublish.exe $(ConfigurationName) $(ProjectName) $(SolutionDir) $(TargetPath)</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.
......
...@@ -32,5 +32,5 @@ using System.Runtime.InteropServices; ...@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.7.0")] [assembly: AssemblyVersion("1.0.8.0")]
[assembly: AssemblyFileVersion("1.0.7.0")] [assembly: AssemblyFileVersion("1.0.8.0")]
...@@ -19,7 +19,7 @@ namespace CardDisplay.Properties { ...@@ -19,7 +19,7 @@ namespace CardDisplay.Properties {
// class via a tool like ResGen or Visual Studio. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {
......
...@@ -12,7 +12,7 @@ namespace CardDisplay.Properties { ...@@ -12,7 +12,7 @@ namespace CardDisplay.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
......
...@@ -11,17 +11,17 @@ ...@@ -11,17 +11,17 @@
<value>Nie4xu9eedu8Shaey1bu</value> <value>Nie4xu9eedu8Shaey1bu</value>
</setting> </setting>
<setting name="ApiURL" serializeAs="String"> <setting name="ApiURL" serializeAs="String">
<value /> <value/>
</setting> </setting>
<setting name="ApiUser" serializeAs="String"> <setting name="ApiUser" serializeAs="String">
<value /> <value/>
</setting> </setting>
<setting name="ApiPass" serializeAs="String"> <setting name="ApiPass" serializeAs="String">
<value /> <value/>
</setting> </setting>
<setting name="ApiTokenSet" serializeAs="String"> <setting name="ApiTokenSet" serializeAs="String">
<value>False</value> <value>False</value>
</setting> </setting>
</CardDisplay.Properties.Settings> </CardDisplay.Properties.Settings>
</userSettings> </userSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<AutoPublishSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <AutoPublishSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<UploadUser>f-solu-06</UploadUser> <UploadUser>f-solu-06</UploadUser>
<PrivateKeyPath>C:\devel\proj\AutoUpdate.svn\src\AutoPublish\Properties\key.txt</PrivateKeyPath>
<UploadPath>/home/f-solu-06/software.f-solutions.fi</UploadPath> <UploadPath>/home/f-solu-06/software.f-solutions.fi</UploadPath>
<UploadHost>www4.f-solutions.fi</UploadHost> <UploadHost>www5.f-solutions.fi</UploadHost>
<ProjectName>CardDisplay</ProjectName> <ProjectName>CardDisplay</ProjectName>
<Customers> <Customers>
<Customer> <Customer>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
Name "CardDisplay moya v1_00_07" Name "CardDisplay moya v1_00_08"
; DO NOT CHANGE OutFile "installer_temp.exe" !!! AutoPublish requires this. ; DO NOT CHANGE OutFile "installer_temp.exe" !!! AutoPublish requires this.
...@@ -198,7 +198,7 @@ FunctionEnd ...@@ -198,7 +198,7 @@ FunctionEnd
Section "!CardDisplay moya stable v1_00_07" SecMain Section "!CardDisplay moya stable v1_00_08" SecMain
SetShellVarContext current SetShellVarContext current
...@@ -228,7 +228,6 @@ Section "!CardDisplay moya stable v1_00_07" SecMain ...@@ -228,7 +228,6 @@ Section "!CardDisplay moya stable v1_00_07" SecMain
File "C:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Release\AutoUpdateLib.dll" File "C:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Release\AutoUpdateLib.dll"
File "C:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Release\CardDisplay.pdb" File "C:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Release\CardDisplay.pdb"
File "C:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Release\AutoUpdateLib.pdb"
...@@ -320,7 +319,6 @@ Section "Uninstall" ...@@ -320,7 +319,6 @@ Section "Uninstall"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Release\AutoUpdateLib.dll" Delete "$INSTDIR\C:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Release\AutoUpdateLib.dll"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Release\CardDisplay.pdb" Delete "$INSTDIR\C:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Release\CardDisplay.pdb"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Release\AutoUpdateLib.pdb"
......
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2012 for Windows Desktop # Visual Studio Version 16
VisualStudioVersion = 16.0.31911.196
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cloakroom", "Cloakroom\Cloakroom.csproj", "{74D33A35-3220-4D07-B039-D8C4FE62EE07}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cloakroom", "Cloakroom\Cloakroom.csproj", "{74D33A35-3220-4D07-B039-D8C4FE62EE07}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoyaAdminLib", "..\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\MoyaAdminLib.csproj", "{095CE28F-5B53-4203-85C6-3A9AFD486407}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoyaAdminLib", "..\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\MoyaAdminLib.csproj", "{095CE28F-5B53-4203-85C6-3A9AFD486407}"
...@@ -8,19 +10,30 @@ EndProject ...@@ -8,19 +10,30 @@ EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{74D33A35-3220-4D07-B039-D8C4FE62EE07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {74D33A35-3220-4D07-B039-D8C4FE62EE07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74D33A35-3220-4D07-B039-D8C4FE62EE07}.Debug|Any CPU.Build.0 = Debug|Any CPU {74D33A35-3220-4D07-B039-D8C4FE62EE07}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74D33A35-3220-4D07-B039-D8C4FE62EE07}.Debug|x86.ActiveCfg = Debug|Any CPU
{74D33A35-3220-4D07-B039-D8C4FE62EE07}.Debug|x86.Build.0 = Debug|Any CPU
{74D33A35-3220-4D07-B039-D8C4FE62EE07}.Release|Any CPU.ActiveCfg = Release|Any CPU {74D33A35-3220-4D07-B039-D8C4FE62EE07}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74D33A35-3220-4D07-B039-D8C4FE62EE07}.Release|Any CPU.Build.0 = Release|Any CPU {74D33A35-3220-4D07-B039-D8C4FE62EE07}.Release|Any CPU.Build.0 = Release|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {74D33A35-3220-4D07-B039-D8C4FE62EE07}.Release|x86.ActiveCfg = Release|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|Any CPU.Build.0 = Debug|Any CPU {74D33A35-3220-4D07-B039-D8C4FE62EE07}.Release|x86.Build.0 = Release|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|Any CPU.ActiveCfg = Release|Any CPU {095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|Any CPU.ActiveCfg = Debug|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|Any CPU.Build.0 = Release|Any CPU {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|Any CPU.ActiveCfg = Release|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|x86.ActiveCfg = Release|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|x86.Build.0 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9140C60D-5D4A-4F92-9FFC-89A233001292}
EndGlobalSection
EndGlobal EndGlobal
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
<value /> <value />
</setting> </setting>
<setting name="ApiURL" serializeAs="String"> <setting name="ApiURL" serializeAs="String">
<value /> <value>http://10.220.105.194:8080/MoyaWeb</value>
</setting> </setting>
<setting name="ApiKey" serializeAs="String"> <setting name="ApiApplicationKey" serializeAs="String">
<value /> <value>4ifkLUhy1ByYD6JWOUdA</value>
</setting> </setting>
<setting name="ApiPass" serializeAs="String"> <setting name="ApiPass" serializeAs="String">
<value /> <value />
...@@ -28,6 +28,12 @@ ...@@ -28,6 +28,12 @@
<setting name="Port" serializeAs="String"> <setting name="Port" serializeAs="String">
<value /> <value />
</setting> </setting>
<setting name="ApplicationVersion" serializeAs="String">
<value />
</setting>
<setting name="ApiTokenSet" serializeAs="String">
<value>False</value>
</setting>
</Cloakroom.Properties.Settings> </Cloakroom.Properties.Settings>
</userSettings> </userSettings>
</configuration> </configuration>
...@@ -37,9 +37,6 @@ ...@@ -37,9 +37,6 @@
<Reference Include="AutoUpdateLib"> <Reference Include="AutoUpdateLib">
<HintPath>..\..\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\AutoUpdateLib.dll</HintPath> <HintPath>..\..\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\AutoUpdateLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="MoyaAdminLib">
<HintPath>..\..\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Web" /> <Reference Include="System.Web" />
...@@ -111,9 +108,16 @@ ...@@ -111,9 +108,16 @@
<EmbedInteropTypes>False</EmbedInteropTypes> <EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference> </COMReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\MoyaAdminLib.csproj">
<Project>{095ce28f-5b53-4203-85c6-3a9afd486407}</Project>
<Name>MoyaAdminLib</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>$(SolutionDir)/../../\AutoUpdate\src\AutoPublish\bin\Debug\AutoPublish.exe $(ConfigurationName) $(ProjectName) $(SolutionDir) $(TargetPath)</PostBuildEvent> <PostBuildEvent>
</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.
......
...@@ -142,4 +142,10 @@ ...@@ -142,4 +142,10 @@
<metadata name="barcodeFocusTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="barcodeFocusTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>585, 17</value> <value>585, 17</value>
</metadata> </metadata>
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>860, 17</value>
</metadata>
<metadata name="searchTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>743, 17</value>
</metadata>
</root> </root>
\ No newline at end of file
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // 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 // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
...@@ -12,7 +12,7 @@ namespace Cloakroom.Properties { ...@@ -12,7 +12,7 @@ namespace Cloakroom.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [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", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
...@@ -37,7 +37,7 @@ namespace Cloakroom.Properties { ...@@ -37,7 +37,7 @@ namespace Cloakroom.Properties {
[global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")] [global::System.Configuration.DefaultSettingValueAttribute("http://10.220.105.194:8080/MoyaWeb")]
public string ApiURL { public string ApiURL {
get { get {
return ((string)(this["ApiURL"])); return ((string)(this["ApiURL"]));
...@@ -49,13 +49,13 @@ namespace Cloakroom.Properties { ...@@ -49,13 +49,13 @@ namespace Cloakroom.Properties {
[global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")] [global::System.Configuration.DefaultSettingValueAttribute("4ifkLUhy1ByYD6JWOUdA")]
public string ApiKey { public string ApiApplicationKey {
get { get {
return ((string)(this["ApiKey"])); return ((string)(this["ApiApplicationKey"]));
} }
set { set {
this["ApiKey"] = value; this["ApiApplicationKey"] = value;
} }
} }
...@@ -94,5 +94,29 @@ namespace Cloakroom.Properties { ...@@ -94,5 +94,29 @@ namespace Cloakroom.Properties {
this["Port"] = value; this["Port"] = value;
} }
} }
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string ApplicationVersion {
get {
return ((string)(this["ApplicationVersion"]));
}
set {
this["ApplicationVersion"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool ApiTokenSet {
get {
return ((bool)(this["ApiTokenSet"]));
}
set {
this["ApiTokenSet"] = value;
}
}
} }
} }
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
<Value Profile="(Default)" /> <Value Profile="(Default)" />
</Setting> </Setting>
<Setting Name="ApiURL" Type="System.String" Scope="User"> <Setting Name="ApiURL" Type="System.String" Scope="User">
<Value Profile="(Default)" /> <Value Profile="(Default)">http://10.220.105.194:8080/MoyaWeb</Value>
</Setting> </Setting>
<Setting Name="ApiKey" Type="System.String" Scope="User"> <Setting Name="ApiApplicationKey" Type="System.String" Scope="User">
<Value Profile="(Default)" /> <Value Profile="(Default)">4ifkLUhy1ByYD6JWOUdA</Value>
</Setting> </Setting>
<Setting Name="ApiPass" Type="System.String" Scope="User"> <Setting Name="ApiPass" Type="System.String" Scope="User">
<Value Profile="(Default)" /> <Value Profile="(Default)" />
...@@ -20,5 +20,11 @@ ...@@ -20,5 +20,11 @@
<Setting Name="Port" Type="System.String" Scope="User"> <Setting Name="Port" Type="System.String" Scope="User">
<Value Profile="(Default)" /> <Value Profile="(Default)" />
</Setting> </Setting>
<Setting Name="ApplicationVersion" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="ApiTokenSet" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>
\ No newline at end of file
 using MoyaAdminLib;
using MoyaAdminLib;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -22,25 +21,23 @@ namespace Cloakroom ...@@ -22,25 +21,23 @@ namespace Cloakroom
private void Settings_Load(object sender, EventArgs e) private void Settings_Load(object sender, EventArgs e)
{ {
resetApiTokenCheckBox.Checked = !Properties.Settings.Default.ApiTokenSet;
apiURLTextBox.Text = Properties.Settings.Default.ApiURL; apiURLTextBox.Text = Properties.Settings.Default.ApiURL;
ApiKeyTextBox.Text = Properties.Settings.Default.ApiKey;
ApiUserTextBox.Text = Properties.Settings.Default.ApiUser;
ApiPassTextBox.Text = Properties.Settings.Default.ApiPass;
if (apiURLTextBox.Text != "" && ApiKeyTextBox.Text != "" && ApiUserTextBox.Text != "" && ApiPassTextBox.Text != "") if (Properties.Settings.Default.ApiTokenSet)
{ {
loadReaders(); loadReaders();
} }
if (Properties.Settings.Default.ReaderId != 0) if (Properties.Settings.Default.ReaderId != 0)
{ {
if (portsComboBox.Items.Count > 0) if (scannersComboBox.Items.Count > 0)
{ {
foreach (object obj in portsComboBox.Items) foreach (object obj in scannersComboBox.Items)
{ {
if (obj is Reader && ((Reader)obj).readerId == Properties.Settings.Default.ReaderId) if (obj is Reader && ((Reader)obj).readerId == Properties.Settings.Default.ReaderId)
{ {
portsComboBox.SelectedItem = obj; scannersComboBox.SelectedItem = obj;
break; break;
} }
} }
...@@ -60,11 +57,11 @@ namespace Cloakroom ...@@ -60,11 +57,11 @@ namespace Cloakroom
ReaderList readers = ser.Deserialize<ReaderList>(ret); ReaderList readers = ser.Deserialize<ReaderList>(ret);
if (readers != null && readers.readers != null) if (readers != null && readers.readers != null)
{ {
portsComboBox.Items.Clear(); scannersComboBox.Items.Clear();
portsComboBox.Items.Add(" "); scannersComboBox.Items.Add(" ");
foreach (Reader reader in readers.readers) foreach (Reader reader in readers.readers)
{ {
portsComboBox.Items.Add(reader); scannersComboBox.Items.Add(reader);
} }
} }
} }
...@@ -76,19 +73,68 @@ namespace Cloakroom ...@@ -76,19 +73,68 @@ namespace Cloakroom
private void SaveButton_Click(object sender, EventArgs e) private void SaveButton_Click(object sender, EventArgs e)
{ {
Properties.Settings.Default.ApiURL = apiURLTextBox.Text; if (scannersComboBox.SelectedItem != null && scannersComboBox.SelectedItem is Reader)
Properties.Settings.Default.ApiKey = ApiKeyTextBox.Text; {
Properties.Settings.Default.ApiUser = ApiUserTextBox.Text; Properties.Settings.Default.ReaderId = ((Reader)scannersComboBox.SelectedItem).readerId;
Properties.Settings.Default.ApiPass = ApiPassTextBox.Text; Properties.Settings.Default.Save();
}
ApiCredential apiCredential = null;
if (portsComboBox.SelectedItem != null && portsComboBox.SelectedItem is Reader) if (resetApiTokenCheckBox.Checked)
{ {
Properties.Settings.Default.ReaderId = ((Reader)portsComboBox.SelectedItem).readerId; try
{
apiCredential = RestClient.GetApiCredential(usernameTextBox.Text, pwTextBox.Text, Properties.Settings.Default.ApiApplicationKey, apiURLTextBox.Text);
}
catch (Exception ex)
{
MessageBox.Show("Failed to get api credentials: " + ex.Message);
}
if (apiCredential != null)
{
Properties.Settings.Default.ApiURL = apiURLTextBox.Text;
Properties.Settings.Default.ApiApplicationKey = Properties.Settings.Default.ApiApplicationKey;
Properties.Settings.Default.ApiUser = apiCredential.authname;
Properties.Settings.Default.ApiPass = apiCredential.secret;
Properties.Settings.Default.ApiTokenSet = true;
Properties.Settings.Default.Save();
}
} }
Properties.Settings.Default.Save();
RestClient.ApiApplicationKey = Properties.Settings.Default.ApiApplicationKey;
RestClient.ApiPass = Properties.Settings.Default.ApiPass;
RestClient.ApiUser = Properties.Settings.Default.ApiUser;
RestClient.ApiURL = Properties.Settings.Default.ApiURL;
this.DialogResult = System.Windows.Forms.DialogResult.OK; this.DialogResult = System.Windows.Forms.DialogResult.OK;
} }
private void ApiSettings_Load(object sender, EventArgs e)
{
resetApiTokenCheckBox.Checked = !Properties.Settings.Default.ApiTokenSet;
apiURLTextBox.Text = Properties.Settings.Default.ApiURL;
//usernameTextBox.Text = Properties.Settings.Default.ApiUser;
//pwTextBox.Text = Properties.Settings.Default.ApiPass;
}
private void resetApiTokenCheckBox_CheckedChanged(object sender, EventArgs e)
{
if (!resetApiTokenCheckBox.Checked)
{
apiURLTextBox.ReadOnly = true;
usernameTextBox.ReadOnly = true;
pwTextBox.ReadOnly = true;
}
else
{
apiURLTextBox.ReadOnly = false;
usernameTextBox.ReadOnly = false;
pwTextBox.ReadOnly = false;
}
}
} }
} }
...@@ -15,3 +15,21 @@ I:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\obj\Debug\Interop.bpac.dll ...@@ -15,3 +15,21 @@ I:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\obj\Debug\Interop.bpac.dll
I:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\obj\Debug\Cloakroom.csproj.ResolveComReference.cache I:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\obj\Debug\Cloakroom.csproj.ResolveComReference.cache
I:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\bin\Debug\AutoUpdateLib.dll I:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\bin\Debug\AutoUpdateLib.dll
I:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\bin\Debug\AutoUpdateLib.pdb I:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\bin\Debug\AutoUpdateLib.pdb
C:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\bin\Debug\Cloakroom.exe.config
C:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\bin\Debug\Cloakroom.exe
C:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\bin\Debug\Cloakroom.pdb
C:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\bin\Debug\Interop.bpac.dll
C:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\obj\Debug\Interop.bpac.dll
C:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\obj\Debug\Cloakroom.csproj.ResolveComReference.cache
C:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\obj\Debug\Cloakroom.Form1.resources
C:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\obj\Debug\Cloakroom.Properties.Resources.resources
C:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\obj\Debug\Cloakroom.Settings.resources
C:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\obj\Debug\Cloakroom.csproj.GenerateResource.cache
C:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\obj\Debug\Cloakroom.csproj.CoreCompileInputs.cache
C:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\obj\Debug\Cloakroom.csproj.CopyComplete
C:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\obj\Debug\Cloakroom.exe
C:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\obj\Debug\Cloakroom.pdb
C:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\bin\Debug\MoyaAdminLib.dll
C:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\bin\Debug\MoyaAdminLib.pdb
C:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\bin\Debug\MoyaAdminLib.dll.config
C:\devel\proj\moya-info-tools\Cloakroom\Cloakroom\obj\Debug\Cloakroom.csproj.AssemblyReference.cache
...@@ -43,36 +43,36 @@ ...@@ -43,36 +43,36 @@
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(42, 12); this.label1.Location = new System.Drawing.Point(42, 12);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(35, 13); this.label1.Size = new System.Drawing.Size(27, 13);
this.label1.TabIndex = 0; this.label1.TabIndex = 0;
this.label1.Text = "Name"; this.label1.Text = "Nimi";
// //
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(48, 40); this.label2.Location = new System.Drawing.Point(11, 40);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 13); this.label2.Size = new System.Drawing.Size(58, 13);
this.label2.TabIndex = 1; this.label2.TabIndex = 1;
this.label2.Text = "Nick"; this.label2.Text = "Nimimerkki";
// //
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(5, 68); this.label3.Location = new System.Drawing.Point(6, 68);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(72, 13); this.label3.Size = new System.Drawing.Size(63, 13);
this.label3.TabIndex = 2; this.label3.TabIndex = 2;
this.label3.Text = "Card template"; this.label3.Text = "Kortin pohja";
// //
// label4 // label4
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(22, 96); this.label4.Location = new System.Drawing.Point(19, 96);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(55, 13); this.label4.Size = new System.Drawing.Size(50, 13);
this.label4.TabIndex = 3; this.label4.TabIndex = 3;
this.label4.Text = "Card state"; this.label4.Text = "Kortin tila";
// //
// nameTextBox // nameTextBox
// //
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
<Compile Include="BacksideTemplateText.cs" /> <Compile Include="BacksideTemplateText.cs" />
<Compile Include="Card.cs" /> <Compile Include="Card.cs" />
<Compile Include="CardList.cs" /> <Compile Include="CardList.cs" />
<Compile Include="CardLocation.cs" />
<Compile Include="ComputerPlace.cs" /> <Compile Include="ComputerPlace.cs" />
<Compile Include="Controls\EventUserEditor.cs"> <Compile Include="Controls\EventUserEditor.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
......
...@@ -31,8 +31,6 @@ ...@@ -31,8 +31,6 @@
this.apiURLTextBox = new System.Windows.Forms.TextBox(); this.apiURLTextBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.SaveButton = new System.Windows.Forms.Button(); this.SaveButton = new System.Windows.Forms.Button();
this.ApiKeyTextBox = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.usernameTextBox = new System.Windows.Forms.TextBox(); this.usernameTextBox = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
...@@ -61,7 +59,8 @@ ...@@ -61,7 +59,8 @@
// //
// SaveButton // SaveButton
// //
this.SaveButton.Location = new System.Drawing.Point(226, 204); this.SaveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.SaveButton.Location = new System.Drawing.Point(223, 164);
this.SaveButton.Name = "SaveButton"; this.SaveButton.Name = "SaveButton";
this.SaveButton.Size = new System.Drawing.Size(75, 23); this.SaveButton.Size = new System.Drawing.Size(75, 23);
this.SaveButton.TabIndex = 2; this.SaveButton.TabIndex = 2;
...@@ -69,23 +68,6 @@ ...@@ -69,23 +68,6 @@
this.SaveButton.UseVisualStyleBackColor = true; this.SaveButton.UseVisualStyleBackColor = true;
this.SaveButton.Click += new System.EventHandler(this.SaveButton_Click); this.SaveButton.Click += new System.EventHandler(this.SaveButton_Click);
// //
// ApiKeyTextBox
//
this.ApiKeyTextBox.Location = new System.Drawing.Point(6, 152);
this.ApiKeyTextBox.Name = "ApiKeyTextBox";
this.ApiKeyTextBox.ReadOnly = true;
this.ApiKeyTextBox.Size = new System.Drawing.Size(260, 20);
this.ApiKeyTextBox.TabIndex = 3;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(6, 136);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(79, 13);
this.label2.TabIndex = 4;
this.label2.Text = "Application key";
//
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
...@@ -127,14 +109,12 @@ ...@@ -127,14 +109,12 @@
this.groupBox1.Controls.Add(this.pwTextBox); this.groupBox1.Controls.Add(this.pwTextBox);
this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.usernameTextBox); this.groupBox1.Controls.Add(this.usernameTextBox);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.ApiKeyTextBox);
this.groupBox1.Controls.Add(this.label1); this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.apiURLTextBox); this.groupBox1.Controls.Add(this.apiURLTextBox);
this.groupBox1.Controls.Add(this.resetApiTokenCheckBox); this.groupBox1.Controls.Add(this.resetApiTokenCheckBox);
this.groupBox1.Location = new System.Drawing.Point(13, 13); this.groupBox1.Location = new System.Drawing.Point(13, 13);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(288, 185); this.groupBox1.Size = new System.Drawing.Size(288, 146);
this.groupBox1.TabIndex = 9; this.groupBox1.TabIndex = 9;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
// //
...@@ -153,7 +133,7 @@ ...@@ -153,7 +133,7 @@
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(310, 235); this.ClientSize = new System.Drawing.Size(307, 195);
this.Controls.Add(this.SaveButton); this.Controls.Add(this.SaveButton);
this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox1);
this.Name = "ApiSettings"; this.Name = "ApiSettings";
...@@ -170,8 +150,6 @@ ...@@ -170,8 +150,6 @@
private System.Windows.Forms.TextBox apiURLTextBox; private System.Windows.Forms.TextBox apiURLTextBox;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button SaveButton; private System.Windows.Forms.Button SaveButton;
private System.Windows.Forms.TextBox ApiKeyTextBox;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox usernameTextBox; private System.Windows.Forms.TextBox usernameTextBox;
private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label4;
......
...@@ -27,7 +27,7 @@ namespace MoyaAdminUI ...@@ -27,7 +27,7 @@ namespace MoyaAdminUI
{ {
try try
{ {
apiCredential = RestClient.GetApiCredential(usernameTextBox.Text, pwTextBox.Text, ApiKeyTextBox.Text, apiURLTextBox.Text); apiCredential = RestClient.GetApiCredential(usernameTextBox.Text, pwTextBox.Text, Properties.Settings.Default.ApiApplicationKey, apiURLTextBox.Text);
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -37,7 +37,7 @@ namespace MoyaAdminUI ...@@ -37,7 +37,7 @@ namespace MoyaAdminUI
if (apiCredential != null) if (apiCredential != null)
{ {
Properties.Settings.Default.ApiURL = apiURLTextBox.Text; Properties.Settings.Default.ApiURL = apiURLTextBox.Text;
Properties.Settings.Default.ApiApplicationKey = ApiKeyTextBox.Text; //Properties.Settings.Default.ApiApplicationKey = Properties.Settings.Default.ApiApplicationKey;
Properties.Settings.Default.ApiUser = apiCredential.authname; Properties.Settings.Default.ApiUser = apiCredential.authname;
Properties.Settings.Default.ApiPass = apiCredential.secret; Properties.Settings.Default.ApiPass = apiCredential.secret;
Properties.Settings.Default.ApiTokenSet = true; Properties.Settings.Default.ApiTokenSet = true;
...@@ -60,7 +60,6 @@ namespace MoyaAdminUI ...@@ -60,7 +60,6 @@ namespace MoyaAdminUI
resetApiTokenCheckBox.Checked = !Properties.Settings.Default.ApiTokenSet; resetApiTokenCheckBox.Checked = !Properties.Settings.Default.ApiTokenSet;
apiURLTextBox.Text = Properties.Settings.Default.ApiURL; apiURLTextBox.Text = Properties.Settings.Default.ApiURL;
ApiKeyTextBox.Text = Properties.Settings.Default.ApiApplicationKey;
//usernameTextBox.Text = Properties.Settings.Default.ApiUser; //usernameTextBox.Text = Properties.Settings.Default.ApiUser;
//pwTextBox.Text = Properties.Settings.Default.ApiPass; //pwTextBox.Text = Properties.Settings.Default.ApiPass;
} }
...@@ -72,14 +71,12 @@ namespace MoyaAdminUI ...@@ -72,14 +71,12 @@ namespace MoyaAdminUI
apiURLTextBox.ReadOnly = true; apiURLTextBox.ReadOnly = true;
usernameTextBox.ReadOnly = true; usernameTextBox.ReadOnly = true;
pwTextBox.ReadOnly = true; pwTextBox.ReadOnly = true;
ApiKeyTextBox.ReadOnly = true;
} }
else else
{ {
apiURLTextBox.ReadOnly = false; apiURLTextBox.ReadOnly = false;
usernameTextBox.ReadOnly = false; usernameTextBox.ReadOnly = false;
pwTextBox.ReadOnly = false; pwTextBox.ReadOnly = false;
ApiKeyTextBox.ReadOnly = false;
} }
} }
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</sectionGroup> </sectionGroup>
</configSections> </configSections>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup> </startup>
<userSettings> <userSettings>
<MoyaAdminUI.Properties.Settings> <MoyaAdminUI.Properties.Settings>
...@@ -14,19 +14,19 @@ ...@@ -14,19 +14,19 @@
<value>http://10.220.105.194:8080/MoyaWeb</value> <value>http://10.220.105.194:8080/MoyaWeb</value>
</setting> </setting>
<setting name="ApiApplicationKey" serializeAs="String"> <setting name="ApiApplicationKey" serializeAs="String">
<value /> <value>8krAyTEpzP6QnwzkxGek</value>
</setting> </setting>
<setting name="ApiUser" serializeAs="String"> <setting name="ApiUser" serializeAs="String">
<value /> <value/>
</setting> </setting>
<setting name="ApiPass" serializeAs="String"> <setting name="ApiPass" serializeAs="String">
<value /> <value/>
</setting> </setting>
<setting name="ApplicationVersion" serializeAs="String"> <setting name="ApplicationVersion" serializeAs="String">
<value /> <value/>
</setting> </setting>
<setting name="Port" serializeAs="String"> <setting name="Port" serializeAs="String">
<value /> <value/>
</setting> </setting>
<setting name="ApiTokenSet" serializeAs="String"> <setting name="ApiTokenSet" serializeAs="String">
<value>False</value> <value>False</value>
......
...@@ -308,6 +308,7 @@ ...@@ -308,6 +308,7 @@
this.statusStrip1.Size = new System.Drawing.Size(595, 22); this.statusStrip1.Size = new System.Drawing.Size(595, 22);
this.statusStrip1.TabIndex = 29; this.statusStrip1.TabIndex = 29;
this.statusStrip1.Text = "Status"; this.statusStrip1.Text = "Status";
this.statusStrip1.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.statusStrip1_ItemClicked);
// //
// messageToolStripStatusLabel // messageToolStripStatusLabel
// //
...@@ -321,6 +322,7 @@ ...@@ -321,6 +322,7 @@
this.columnHeader1, this.columnHeader1,
this.columnHeader2}); this.columnHeader2});
this.listView1.FullRowSelect = true; this.listView1.FullRowSelect = true;
this.listView1.HideSelection = false;
this.listView1.Location = new System.Drawing.Point(280, 27); this.listView1.Location = new System.Drawing.Point(280, 27);
this.listView1.MultiSelect = false; this.listView1.MultiSelect = false;
this.listView1.Name = "listView1"; this.listView1.Name = "listView1";
......
...@@ -197,5 +197,10 @@ namespace MoyaAdminUI ...@@ -197,5 +197,10 @@ namespace MoyaAdminUI
lastAddedSlotsNumericUpDown.Value = lastAddedSlot; lastAddedSlotsNumericUpDown.Value = lastAddedSlot;
messageToolStripStatusLabel.Text = "Viimeisin lisätty value: " + value + " kortille: " + card.Label(); messageToolStripStatusLabel.Text = "Viimeisin lisätty value: " + value + " kortille: " + card.Label();
} }
private void statusStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
{
}
} }
} }
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
this.placesContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); this.placesContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
this.printPlaceStickersForSelectedPlacesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.printPlaceStickersForSelectedPlacesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.doAReplaceForComputerPlaceNameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.doAReplaceForComputerPlaceNameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.moveSelectedPlacesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.MapPictureBox = new System.Windows.Forms.PictureBox(); this.MapPictureBox = new System.Windows.Forms.PictureBox();
this.placeEditor = new System.Windows.Forms.PropertyGrid(); this.placeEditor = new System.Windows.Forms.PropertyGrid();
this.PlacesListView = new System.Windows.Forms.ListView(); this.PlacesListView = new System.Windows.Forms.ListView();
...@@ -57,6 +58,7 @@ ...@@ -57,6 +58,7 @@
this.getListOfUnlinkedComputerPlacesToolStripButton = new System.Windows.Forms.ToolStripButton(); this.getListOfUnlinkedComputerPlacesToolStripButton = new System.Windows.Forms.ToolStripButton();
this.generateBacksidesToolStripButton = new System.Windows.Forms.ToolStripButton(); this.generateBacksidesToolStripButton = new System.Windows.Forms.ToolStripButton();
this.toolStripButton4 = new System.Windows.Forms.ToolStripButton(); this.toolStripButton4 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
this.TopPanel = new System.Windows.Forms.Panel(); this.TopPanel = new System.Windows.Forms.Panel();
this.allPlacesCountTextBox = new System.Windows.Forms.TextBox(); this.allPlacesCountTextBox = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
...@@ -72,7 +74,8 @@ ...@@ -72,7 +74,8 @@
this.ImageRefreshTimer = new System.Windows.Forms.Timer(this.components); this.ImageRefreshTimer = new System.Windows.Forms.Timer(this.components);
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.placesCountTimer = new System.Windows.Forms.Timer(this.components); this.placesCountTimer = new System.Windows.Forms.Timer(this.components);
this.toolStripButton3 = new System.Windows.Forms.ToolStripButton(); this.getCSVForSelectedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
this.placesContextMenuStrip.SuspendLayout(); this.placesContextMenuStrip.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.MapPictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.MapPictureBox)).BeginInit();
this.toolStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout();
...@@ -85,9 +88,11 @@ ...@@ -85,9 +88,11 @@
// //
this.placesContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.placesContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.printPlaceStickersForSelectedPlacesToolStripMenuItem, this.printPlaceStickersForSelectedPlacesToolStripMenuItem,
this.doAReplaceForComputerPlaceNameToolStripMenuItem}); this.doAReplaceForComputerPlaceNameToolStripMenuItem,
this.moveSelectedPlacesToolStripMenuItem,
this.getCSVForSelectedToolStripMenuItem});
this.placesContextMenuStrip.Name = "placesContextMenuStrip"; this.placesContextMenuStrip.Name = "placesContextMenuStrip";
this.placesContextMenuStrip.Size = new System.Drawing.Size(277, 48); this.placesContextMenuStrip.Size = new System.Drawing.Size(277, 92);
this.placesContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.placesContextMenuStrip_Opening); this.placesContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.placesContextMenuStrip_Opening);
// //
// printPlaceStickersForSelectedPlacesToolStripMenuItem // printPlaceStickersForSelectedPlacesToolStripMenuItem
...@@ -104,6 +109,13 @@ ...@@ -104,6 +109,13 @@
this.doAReplaceForComputerPlaceNameToolStripMenuItem.Text = "Do a replace for computer place name"; this.doAReplaceForComputerPlaceNameToolStripMenuItem.Text = "Do a replace for computer place name";
this.doAReplaceForComputerPlaceNameToolStripMenuItem.Click += new System.EventHandler(this.doAReplaceForComputerPlaceNameToolStripMenuItem_Click); this.doAReplaceForComputerPlaceNameToolStripMenuItem.Click += new System.EventHandler(this.doAReplaceForComputerPlaceNameToolStripMenuItem_Click);
// //
// moveSelectedPlacesToolStripMenuItem
//
this.moveSelectedPlacesToolStripMenuItem.Name = "moveSelectedPlacesToolStripMenuItem";
this.moveSelectedPlacesToolStripMenuItem.Size = new System.Drawing.Size(276, 22);
this.moveSelectedPlacesToolStripMenuItem.Text = "Move selected places";
this.moveSelectedPlacesToolStripMenuItem.Click += new System.EventHandler(this.moveSelectedPlacesToolStripMenuItem_Click);
//
// MapPictureBox // MapPictureBox
// //
this.MapPictureBox.Cursor = System.Windows.Forms.Cursors.Default; this.MapPictureBox.Cursor = System.Windows.Forms.Cursors.Default;
...@@ -361,6 +373,16 @@ ...@@ -361,6 +373,16 @@
this.toolStripButton4.Text = "Generate CSV for item collection"; this.toolStripButton4.Text = "Generate CSV for item collection";
this.toolStripButton4.Click += new System.EventHandler(this.toolStripButton4_Click); this.toolStripButton4.Click += new System.EventHandler(this.toolStripButton4_Click);
// //
// toolStripButton3
//
this.toolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image")));
this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton3.Name = "toolStripButton3";
this.toolStripButton3.Size = new System.Drawing.Size(23, 22);
this.toolStripButton3.Text = "Get Printed Cards CSV";
this.toolStripButton3.Click += new System.EventHandler(this.toolStripButton3_Click_2);
//
// TopPanel // TopPanel
// //
this.TopPanel.Controls.Add(this.allPlacesCountTextBox); this.TopPanel.Controls.Add(this.allPlacesCountTextBox);
...@@ -492,15 +514,12 @@ ...@@ -492,15 +514,12 @@
this.placesCountTimer.Interval = 600000000; this.placesCountTimer.Interval = 600000000;
this.placesCountTimer.Tick += new System.EventHandler(this.placesCountTimer_Tick); this.placesCountTimer.Tick += new System.EventHandler(this.placesCountTimer_Tick);
// //
// toolStripButton3 // getCSVForSelectedToolStripMenuItem
// //
this.toolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.getCSVForSelectedToolStripMenuItem.Name = "getCSVForSelectedToolStripMenuItem";
this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image"))); this.getCSVForSelectedToolStripMenuItem.Size = new System.Drawing.Size(276, 22);
this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta; this.getCSVForSelectedToolStripMenuItem.Text = "Get CSV for selected";
this.toolStripButton3.Name = "toolStripButton3"; this.getCSVForSelectedToolStripMenuItem.Click += new System.EventHandler(this.getCSVForSelectedToolStripMenuItem_Click);
this.toolStripButton3.Size = new System.Drawing.Size(23, 22);
this.toolStripButton3.Text = "Get Printed Cards CSV";
this.toolStripButton3.Click += new System.EventHandler(this.toolStripButton3_Click_2);
// //
// MainForm // MainForm
// //
...@@ -577,6 +596,9 @@ ...@@ -577,6 +596,9 @@
private System.Windows.Forms.ToolStripButton generateBacksidesToolStripButton; private System.Windows.Forms.ToolStripButton generateBacksidesToolStripButton;
private System.Windows.Forms.ToolStripButton toolStripButton4; private System.Windows.Forms.ToolStripButton toolStripButton4;
private System.Windows.Forms.ToolStripButton toolStripButton3; private System.Windows.Forms.ToolStripButton toolStripButton3;
private System.Windows.Forms.ToolStripMenuItem moveSelectedPlacesToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem getCSVForSelectedToolStripMenuItem;
private System.Windows.Forms.SaveFileDialog saveFileDialog1;
} }
} }
...@@ -1603,5 +1603,66 @@ namespace MoyaAdminUI ...@@ -1603,5 +1603,66 @@ namespace MoyaAdminUI
{ {
} }
private void moveSelectedPlacesToolStripMenuItem_Click(object sender, EventArgs e)
{
MovePlacesForm frm = new MovePlacesForm();
frm.MapHeight = MapPictureBox.Height;
frm.MapWidth = MapPictureBox.Width;
List<ComputerPlace> places = new List<ComputerPlace>();
foreach(ListViewItem lvi in PlacesListView.SelectedItems)
{
ComputerPlace place = (ComputerPlace)lvi.Tag;
places.Add(place);
}
frm.Places = places;
if (frm.ShowDialog() == DialogResult.OK)
{
foreach (ComputerPlace place in frm.Places)
{
foreach (ListViewItem lvi in PlacesListView.Items)
{
if ((ComputerPlace)lvi.Tag == place)
{
if (lvi.SubItems.Count > 3)
{
lvi.SubItems[2].Text = place.MapX.ToString();
lvi.SubItems[3].Text = place.MapY.ToString();
}
}
}
}
}
}
private void getCSVForSelectedToolStripMenuItem_Click(object sender, EventArgs e)
{
if(PlacesListView.SelectedItems.Count > 0)
{
string csv = "\"place\";\"reserver\";\"user_email\"\r\n";
foreach(ListViewItem lvi in PlacesListView.SelectedItems)
{
ComputerPlace place = (ComputerPlace)lvi.Tag;
if (place.User != null)
{
csv += "\""+ place.Name + "\";\"" + place.ReserverUserName + "\";\"" + place.User.Firstname + " " + place.User.Lastname + "\"\r\n";
} else
{
csv += "\"" + place.Name + "\";\"" + place.ReserverUserName + "\";\"\"\r\n";
}
}
if(saveFileDialog1.ShowDialog() == DialogResult.OK)
{
File.WriteAllText(saveFileDialog1.FileName, csv);
}
}
}
} }
} }
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MoyaAdminUI</RootNamespace> <RootNamespace>MoyaAdminUI</RootNamespace>
<AssemblyName>MoyaAdminUI</AssemblyName> <AssemblyName>MoyaAdminUI</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<PublishUrl>publish\</PublishUrl> <PublishUrl>publish\</PublishUrl>
<Install>true</Install> <Install>true</Install>
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper> <IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
...@@ -37,6 +38,7 @@ ...@@ -37,6 +38,7 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
...@@ -47,11 +49,12 @@ ...@@ -47,11 +49,12 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="AutoUpdateLib, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="AutoUpdateLib, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\AutoUpdate\src\AutoUpdateLib\bin\Debug\AutoUpdateLib.dll</HintPath> <HintPath>..\..\..\PrintServer\moyaPrintServer\res\AutoUpdateLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="Csv, Version=1.0.31.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Csv, Version=1.0.31.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Csv.1.0.31\lib\net40\Csv.dll</HintPath> <HintPath>..\packages\Csv.1.0.31\lib\net40\Csv.dll</HintPath>
...@@ -69,13 +72,11 @@ ...@@ -69,13 +72,11 @@
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="zxing, Version=0.16.2.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL"> <Reference Include="zxing, Version=0.16.4.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
<HintPath>..\packages\ZXing.Net.0.16.2\lib\net40\zxing.dll</HintPath> <HintPath>..\packages\ZXing.Net.0.16.4\lib\net45\zxing.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="zxing.presentation, Version=0.16.2.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL"> <Reference Include="zxing.presentation, Version=0.16.4.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
<HintPath>..\packages\ZXing.Net.0.16.2\lib\net40\zxing.presentation.dll</HintPath> <HintPath>..\packages\ZXing.Net.0.16.4\lib\net45\zxing.presentation.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
...@@ -133,6 +134,12 @@ ...@@ -133,6 +134,12 @@
<Compile Include="IncomingForm.Designer.cs"> <Compile Include="IncomingForm.Designer.cs">
<DependentUpon>IncomingForm.cs</DependentUpon> <DependentUpon>IncomingForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="ListCardsForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ListCardsForm.Designer.cs">
<DependentUpon>ListCardsForm.cs</DependentUpon>
</Compile>
<Compile Include="ListUsersForm.cs"> <Compile Include="ListUsersForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -145,6 +152,12 @@ ...@@ -145,6 +152,12 @@
<Compile Include="MainForm.Designer.cs"> <Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon> <DependentUpon>MainForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="MovePlacesForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MovePlacesForm.Designer.cs">
<DependentUpon>MovePlacesForm.cs</DependentUpon>
</Compile>
<Compile Include="MoyaUtils.cs" /> <Compile Include="MoyaUtils.cs" />
<Compile Include="OCRForm.cs"> <Compile Include="OCRForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
...@@ -224,12 +237,18 @@ ...@@ -224,12 +237,18 @@
<EmbeddedResource Include="IncomingForm.resx"> <EmbeddedResource Include="IncomingForm.resx">
<DependentUpon>IncomingForm.cs</DependentUpon> <DependentUpon>IncomingForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="ListCardsForm.resx">
<DependentUpon>ListCardsForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ListUsersForm.resx"> <EmbeddedResource Include="ListUsersForm.resx">
<DependentUpon>ListUsersForm.cs</DependentUpon> <DependentUpon>ListUsersForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="MainForm.resx"> <EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon> <DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="MovePlacesForm.resx">
<DependentUpon>MovePlacesForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="OCRForm.resx"> <EmbeddedResource Include="OCRForm.resx">
<DependentUpon>OCRForm.cs</DependentUpon> <DependentUpon>OCRForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -316,9 +335,12 @@ ...@@ -316,9 +335,12 @@
<EmbedInteropTypes>False</EmbedInteropTypes> <EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference> </COMReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Include="Properties\AutoUpdateLib.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>$(SolutionDir)/../../../\AutoUpdate\src\AutoPublish\bin\Debug\AutoPublish.exe $(ConfigurationName) $(ProjectName) $(SolutionDir) $(TargetPath)</PostBuildEvent> <PostBuildEvent>$(SolutionDir)/../../../\AutoUpdate\src\AutoPublish\bin\x86\Debug\AutoPublish.exe $(ConfigurationName) $(ProjectName) $(SolutionDir) $(TargetPath)</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.
......
...@@ -17,7 +17,7 @@ namespace MoyaAdminUI ...@@ -17,7 +17,7 @@ namespace MoyaAdminUI
{ {
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
if (!Debugger.IsAttached) /*if (!Debugger.IsAttached)
{ {
if (args.Length == 0 || args[0] != "-noautoupdate") if (args.Length == 0 || args[0] != "-noautoupdate")
{ {
...@@ -26,7 +26,7 @@ namespace MoyaAdminUI ...@@ -26,7 +26,7 @@ namespace MoyaAdminUI
return; //program is required to close by autoupdate (probably updated) return; //program is required to close by autoupdate (probably updated)
} }
} }*/
System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly(); System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
Version appVersion = a.GetName().Version; Version appVersion = a.GetName().Version;
......
...@@ -32,5 +32,5 @@ using System.Runtime.InteropServices; ...@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.29")] [assembly: AssemblyVersion("1.0.37")]
[assembly: AssemblyFileVersion("1.0.29")] [assembly: AssemblyFileVersion("1.0.37")]
...@@ -19,7 +19,7 @@ namespace MoyaAdminUI.Properties { ...@@ -19,7 +19,7 @@ namespace MoyaAdminUI.Properties {
// class via a tool like ResGen or Visual Studio. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {
......
...@@ -12,7 +12,7 @@ namespace MoyaAdminUI.Properties { ...@@ -12,7 +12,7 @@ namespace MoyaAdminUI.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
...@@ -37,7 +37,7 @@ namespace MoyaAdminUI.Properties { ...@@ -37,7 +37,7 @@ namespace MoyaAdminUI.Properties {
[global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")] [global::System.Configuration.DefaultSettingValueAttribute("8krAyTEpzP6QnwzkxGek")]
public string ApiApplicationKey { public string ApiApplicationKey {
get { get {
return ((string)(this["ApiApplicationKey"])); return ((string)(this["ApiApplicationKey"]));
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<Value Profile="(Default)">http://10.220.105.194:8080/MoyaWeb</Value> <Value Profile="(Default)">http://10.220.105.194:8080/MoyaWeb</Value>
</Setting> </Setting>
<Setting Name="ApiApplicationKey" Type="System.String" Scope="User"> <Setting Name="ApiApplicationKey" Type="System.String" Scope="User">
<Value Profile="(Default)" /> <Value Profile="(Default)">8krAyTEpzP6QnwzkxGek</Value>
</Setting> </Setting>
<Setting Name="ApiUser" Type="System.String" Scope="User"> <Setting Name="ApiUser" Type="System.String" Scope="User">
<Value Profile="(Default)" /> <Value Profile="(Default)" />
......
...@@ -171,6 +171,161 @@ namespace MoyaAdminUI ...@@ -171,6 +171,161 @@ namespace MoyaAdminUI
barcodeTimer.Start(); barcodeTimer.Start();
} }
private void listCardsButton_Click(object sender, EventArgs e)
{
List<Card> cards = new List<Card>();
string ret = "";
RestClient client = null;
foreach (User user in User.Cache)
{
client = new RestClient(Properties.Settings.Default.ApiURL);
Card card = null;
try
{
ret = client.MakeRequest("user/card/" + user.EventUserId);
var ser = new JavaScriptSerializer();
card = ser.Deserialize<Card>(ret);
}
catch (Exception ex)
{
}
if (card != null && card.state == "PRINTED" && printedCheckBox.Checked)
{
if ((card.state == "PRINTED" && printedCheckBox.Checked) ||
(card.state == "PENDING_VALIDATION" && pendingValidationCheckBox.Checked) ||
(card.state == "VALIDATED" && ValidatedCheckBox.Checked) ||
(card.state == "DELIVERED" && deliveredCheckBox.Checked) ||
(card.state == "REJECTED" && rejectedCheckBox.Checked))
{
cards.Add(card);
}
}
}
if (cards.Count > 0)
{
Dictionary<int, CardLocation> locationsToCards = new Dictionary<int, CardLocation>();
List<Card> cardsWithoutLocation = new List<Card>();
foreach (Card ca in cards)
{
if (ca.state == Card.CARD_STATE_PRINTED)
{
ret = "";
client = new RestClient(Properties.Settings.Default.ApiURL);
try
{
ret = client.MakeRequest("meta/v1/printedcard/" + ca.id + "/card-filing");
}
catch (ApplicationException ex)
{
if (!ex.Message.Contains("HTTP NoContent"))
return;
}
if (ret != null && ret != "")
{
MetaData data = getValue(ret);
int bookNumber = 0;
int pageNumber = 0;
int slotNumber = 0;
getCardPlace(data, out bookNumber, out pageNumber, out slotNumber);
int idx = int.Parse(bookNumber.ToString() + pageNumber.ToString() + slotNumber.ToString());
CardLocation location = new CardLocation();
location.Card = ca;
location.Book = bookNumber;
location.Page = pageNumber;
location.Slot = slotNumber;
if (idx > 0)
{
if (locationsToCards.ContainsKey(idx))
locationsToCards.Add(idx, location);
else
locationsToCards[idx] = location;
}
else
cardsWithoutLocation.Add(ca);
}
else
cardsWithoutLocation.Add(ca);
}
else
{
cardsWithoutLocation.Add(ca);
}
}
List<int> bookNumbers = new List<int>();
Dictionary<int, int> pageNumbers = new Dictionary<int, int>();
foreach (CardLocation cl in locationsToCards.Values)
{
if (!bookNumbers.Contains(cl.Book))
bookNumbers.Add(cl.Book);
if (pageNumbers.ContainsKey(cl.Book))
{
if (pageNumbers[cl.Book] < cl.Page)
pageNumbers[cl.Book] = cl.Page;
}
else
pageNumbers.Add(cl.Book, cl.Page);
}
foreach (int bookNumber in bookNumbers)
{
if (pageNumbers.ContainsKey(bookNumber))
{
for (int i = 1; i < pageNumbers[bookNumber]; i++)
{
for (int s = 1; s < 4; s++)
{
CardLocation cl = locationsToCards.Values.ToList().Find(cal => cal.Book == bookNumber && cal.Page == i && cal.Slot == s);
if (cl != null)
{
ListViewItem lvi = new ListViewItem(cl.Card.wholeName);
lvi.SubItems.Add(cl.Card.state);
lvi.SubItems.Add(cl.Book.ToString() + "." + cl.Page + "." + cl.Slot);
lvi.Tag = cl;
cardsListView.Items.Add(lvi);
}
else
{
ListViewItem lvi = new ListViewItem("");
lvi.SubItems.Add("");
lvi.SubItems.Add(bookNumber.ToString() + "." + i.ToString() + "." + s.ToString());
lvi.ForeColor = Color.Red;
cardsListView.Items.Add(lvi);
}
}
}
}
}
foreach (Card ca in cardsWithoutLocation)
{
ListViewItem lvi = new ListViewItem(ca.wholeName);
lvi.SubItems.Add(ca.state);
lvi.SubItems.Add("");
cardsListView.Items.Add(lvi);
}
}
//cards = cards.OrderBy(c => c.wholeName).ToList();
/*
foreach (Card card in cards)
{
ListViewItem lvi = new ListViewItem(card.wholeName);
lvi.SubItems.Add(card.username);
lvi.Tag = card;
cardsListView.Items.Add(lvi);
}*/
}
} }
} }
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Csv" version="1.0.31" targetFramework="net40" /> <package id="Csv" version="1.0.31" targetFramework="net40" />
<package id="ZXing.Net" version="0.16.2" targetFramework="net40" /> <package id="ZXing.Net" version="0.16.4" targetFramework="net45" />
</packages> </packages>
\ No newline at end of file
...@@ -78,6 +78,7 @@ namespace MoyaSignup ...@@ -78,6 +78,7 @@ namespace MoyaSignup
thermoPrinter.SetBarcodeWidth(ThermoPrinter.BarcodeWidths.Small); thermoPrinter.SetBarcodeWidth(ThermoPrinter.BarcodeWidths.Small);
thermoPrinter.SetCharacterAlignment(ThermoPrinter.CharacterAlignments.Center); thermoPrinter.SetCharacterAlignment(ThermoPrinter.CharacterAlignments.Center);
thermoPrinter.SetPositionHRI(ThermoPrinter.HRIPrintingPositions.Below); thermoPrinter.SetPositionHRI(ThermoPrinter.HRIPrintingPositions.Below);
thermoPrinter.SetCharacterTable(ThermoPrinter.CharacterCodeTables.Nordic);
} }
catch catch
{ {
......
...@@ -70,7 +70,8 @@ ...@@ -70,7 +70,8 @@
<HintPath>packages\AForge.Video.2.2.5\lib\AForge.Video.dll</HintPath> <HintPath>packages\AForge.Video.2.2.5\lib\AForge.Video.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="AutoUpdateLib"> <Reference Include="AutoUpdateLib, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>Resources\AutoUpdateLib.dll</HintPath> <HintPath>Resources\AutoUpdateLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="ConfLib2, Version=1.0.1.23606, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="ConfLib2, Version=1.0.1.23606, Culture=neutral, processorArchitecture=MSIL">
...@@ -341,6 +342,7 @@ ...@@ -341,6 +342,7 @@
</Target> </Target>
--> -->
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>$(SolutionDir)/../../\AutoUpdate\src\AutoPublish\bin\Debug\AutoPublish.exe $(ConfigurationName) $(ProjectName) $(SolutionDir) $(TargetPath)</PostBuildEvent> <PostBuildEvent>
</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
\ No newline at end of file
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14 # Visual Studio Version 17
VisualStudioVersion = 14.0.25420.1 VisualStudioVersion = 17.0.31912.275
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoyaSignup", "MoyaSignup.csproj", "{7264F333-9419-4208-AA6D-223D4CE19C05}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoyaSignup", "MoyaSignup.csproj", "{7264F333-9419-4208-AA6D-223D4CE19C05}"
EndProject EndProject
...@@ -30,13 +30,18 @@ Global ...@@ -30,13 +30,18 @@ Global
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|x86.ActiveCfg = Release|x86 {095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|x86.ActiveCfg = Release|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|x86.Build.0 = Release|x86 {095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|x86.Build.0 = Release|x86
{25113A41-1991-4D34-95C0-47C238037A39}.Debug|Any CPU.ActiveCfg = Debug|x86 {25113A41-1991-4D34-95C0-47C238037A39}.Debug|Any CPU.ActiveCfg = Debug|x86
{25113A41-1991-4D34-95C0-47C238037A39}.Debug|Any CPU.Build.0 = Debug|x86
{25113A41-1991-4D34-95C0-47C238037A39}.Debug|x86.ActiveCfg = Debug|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}.Debug|x86.Build.0 = Debug|x86
{25113A41-1991-4D34-95C0-47C238037A39}.Release|Any CPU.ActiveCfg = Release|x86 {25113A41-1991-4D34-95C0-47C238037A39}.Release|Any CPU.ActiveCfg = Release|x86
{25113A41-1991-4D34-95C0-47C238037A39}.Release|Any CPU.Build.0 = Release|x86
{25113A41-1991-4D34-95C0-47C238037A39}.Release|x86.ActiveCfg = Release|x86 {25113A41-1991-4D34-95C0-47C238037A39}.Release|x86.ActiveCfg = Release|x86
{25113A41-1991-4D34-95C0-47C238037A39}.Release|x86.Build.0 = Release|x86 {25113A41-1991-4D34-95C0-47C238037A39}.Release|x86.Build.0 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5106FE86-9179-42CF-AB8C-51F0A1612B31}
EndGlobalSection
EndGlobal EndGlobal
...@@ -19,7 +19,7 @@ namespace MoyaSignup.Properties { ...@@ -19,7 +19,7 @@ namespace MoyaSignup.Properties {
// class via a tool like ResGen or Visual Studio. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {
......
...@@ -12,7 +12,7 @@ namespace MoyaSignup.Properties { ...@@ -12,7 +12,7 @@ namespace MoyaSignup.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
......
...@@ -354,12 +354,15 @@ namespace MoyaSignup ...@@ -354,12 +354,15 @@ namespace MoyaSignup
if (thermoPrinter != null) if (thermoPrinter != null)
{ {
thermoPrinter.SetCharacterAlignment(ThermoPrinter.CharacterAlignments.Left); thermoPrinter.SetCharacterAlignment(ThermoPrinter.CharacterAlignments.Left);
thermoPrinter.PrintText(name.Replace("ä", "a").Replace("ö", "o").Replace("å", "a").Replace("Ä", "A").Replace("Ö", "O").Replace("Å", "A")); thermoPrinter.PrintText(name);
thermoPrinter.PrintAndFeedPaper(1); thermoPrinter.PrintAndFeedPaper(1);
thermoPrinter.PrintText(info.Replace("ä", "a").Replace("ö", "o").Replace("å", "a").Replace("Ä", "A").Replace("Ö", "O").Replace("Å", "A")); thermoPrinter.PrintText(info);
thermoPrinter.PrintAndFeedPaper(2); thermoPrinter.PrintAndFeedPaper(2);
thermoPrinter.SetCharacterAlignment(ThermoPrinter.CharacterAlignments.Center); thermoPrinter.SetCharacterAlignment(ThermoPrinter.CharacterAlignments.Center);
thermoPrinter.PrintBarcode(ThermoPrinter.BarCodeTypes.CODE39, barcode); //thermoPrinter.PrintBarcode(ThermoPrinter.BarCodeTypes.CODE39, barcode);
//Changing barcode to from code39 to ean13 because barcode contains only numbers and ean13 results in smaller printed barcode
thermoPrinter.PrintBarcode(ThermoPrinter.BarCodeTypes.JAN13, barcode);
thermoPrinter.PrintAndFeedPaper(5); thermoPrinter.PrintAndFeedPaper(5);
thermoPrinter.FullCut(); thermoPrinter.FullCut();
} else if(receiptPrinterName != null && receiptPrinterName != "") } else if(receiptPrinterName != null && receiptPrinterName != "")
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<configSections> <configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="MoyaSignup.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> <section name="MoyaSignup.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
</sectionGroup> </sectionGroup>
</configSections> </configSections>
<runtime> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Npgsql" publicKeyToken="5D8B90D52F46FDA7" culture="neutral" /> <assemblyIdentity name="Npgsql" publicKeyToken="5D8B90D52F46FDA7" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.0.0.0" newVersion="1.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-1.0.0.0" newVersion="1.0.0.0"/>
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="ZedGraph" publicKeyToken="02a83cbd123fcd60" culture="neutral" /> <assemblyIdentity name="ZedGraph" publicKeyToken="02a83cbd123fcd60" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.1.7.430" newVersion="5.1.7.430" /> <bindingRedirect oldVersion="0.0.0.0-5.1.7.430" newVersion="5.1.7.430"/>
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
...@@ -29,10 +29,10 @@ ...@@ -29,10 +29,10 @@
<value>myapikey</value> <value>myapikey</value>
</setting> </setting>
<setting name="ApplicationVersion" serializeAs="String"> <setting name="ApplicationVersion" serializeAs="String">
<value /> <value/>
</setting> </setting>
<setting name="Port" serializeAs="String"> <setting name="Port" serializeAs="String">
<value /> <value/>
</setting> </setting>
<setting name="ThermoPrinter" serializeAs="String"> <setting name="ThermoPrinter" serializeAs="String">
<value>0</value> <value>0</value>
...@@ -57,4 +57,4 @@ ...@@ -57,4 +57,4 @@
</setting> </setting>
</MoyaSignup.Properties.Settings> </MoyaSignup.Properties.Settings>
</userSettings> </userSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /></startup></configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<AutoPublishSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <AutoPublishSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<UploadUser>f-solu-06</UploadUser> <UploadUser>f-solu-06</UploadUser>
<PrivateKeyPath>C:\devel\proj\AutoUpdate.svn\src\AutoPublish\Properties\key.txt</PrivateKeyPath>
<UploadPath>/home/f-solu-06/software.f-solutions.fi</UploadPath> <UploadPath>/home/f-solu-06/software.f-solutions.fi</UploadPath>
<UploadHost>www4.f-solutions.fi</UploadHost> <UploadHost>sftp.f-solutions.fi</UploadHost>
<ProjectName>MoyaPrintServer</ProjectName> <ProjectName>MoyaPrintServer</ProjectName>
<Customers> <Customers>
<Customer> <Customer>
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
this.CardFilterTextBox = new System.Windows.Forms.TextBox(); this.CardFilterTextBox = new System.Windows.Forms.TextBox();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.sortByFirstnameCheckBox = new System.Windows.Forms.CheckBox(); this.sortByFirstnameCheckBox = new System.Windows.Forms.CheckBox();
this.randomizeCheckBox = new System.Windows.Forms.CheckBox();
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
this.statusStrip1.SuspendLayout(); this.statusStrip1.SuspendLayout();
this.toolStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout();
...@@ -61,7 +62,7 @@ ...@@ -61,7 +62,7 @@
// //
this.autoPrintCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.autoPrintCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.autoPrintCheckBox.AutoSize = true; this.autoPrintCheckBox.AutoSize = true;
this.autoPrintCheckBox.Location = new System.Drawing.Point(12, 324); this.autoPrintCheckBox.Location = new System.Drawing.Point(12, 322);
this.autoPrintCheckBox.Name = "autoPrintCheckBox"; this.autoPrintCheckBox.Name = "autoPrintCheckBox";
this.autoPrintCheckBox.Size = new System.Drawing.Size(69, 17); this.autoPrintCheckBox.Size = new System.Drawing.Size(69, 17);
this.autoPrintCheckBox.TabIndex = 4; this.autoPrintCheckBox.TabIndex = 4;
...@@ -80,9 +81,10 @@ ...@@ -80,9 +81,10 @@
this.columnHeader3}); this.columnHeader3});
this.listView.ContextMenuStrip = this.contextMenuStrip1; this.listView.ContextMenuStrip = this.contextMenuStrip1;
this.listView.FullRowSelect = true; this.listView.FullRowSelect = true;
this.listView.HideSelection = false;
this.listView.Location = new System.Drawing.Point(11, 84); this.listView.Location = new System.Drawing.Point(11, 84);
this.listView.Name = "listView"; this.listView.Name = "listView";
this.listView.Size = new System.Drawing.Size(468, 234); this.listView.Size = new System.Drawing.Size(701, 232);
this.listView.TabIndex = 5; this.listView.TabIndex = 5;
this.listView.UseCompatibleStateImageBehavior = false; this.listView.UseCompatibleStateImageBehavior = false;
this.listView.View = System.Windows.Forms.View.Details; this.listView.View = System.Windows.Forms.View.Details;
...@@ -129,7 +131,7 @@ ...@@ -129,7 +131,7 @@
// printButton // printButton
// //
this.printButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.printButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.printButton.Location = new System.Drawing.Point(419, 324); this.printButton.Location = new System.Drawing.Point(652, 322);
this.printButton.Name = "printButton"; this.printButton.Name = "printButton";
this.printButton.Size = new System.Drawing.Size(60, 23); this.printButton.Size = new System.Drawing.Size(60, 23);
this.printButton.TabIndex = 7; this.printButton.TabIndex = 7;
...@@ -141,9 +143,9 @@ ...@@ -141,9 +143,9 @@
// //
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabel1}); this.toolStripStatusLabel1});
this.statusStrip1.Location = new System.Drawing.Point(0, 356); this.statusStrip1.Location = new System.Drawing.Point(0, 354);
this.statusStrip1.Name = "statusStrip1"; this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(491, 22); this.statusStrip1.Size = new System.Drawing.Size(724, 22);
this.statusStrip1.TabIndex = 8; this.statusStrip1.TabIndex = 8;
this.statusStrip1.Text = "statusStrip1"; this.statusStrip1.Text = "statusStrip1";
// //
...@@ -174,7 +176,7 @@ ...@@ -174,7 +176,7 @@
// refreshButton // refreshButton
// //
this.refreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.refreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.refreshButton.Location = new System.Drawing.Point(352, 324); this.refreshButton.Location = new System.Drawing.Point(585, 322);
this.refreshButton.Name = "refreshButton"; this.refreshButton.Name = "refreshButton";
this.refreshButton.Size = new System.Drawing.Size(61, 23); this.refreshButton.Size = new System.Drawing.Size(61, 23);
this.refreshButton.TabIndex = 12; this.refreshButton.TabIndex = 12;
...@@ -193,7 +195,7 @@ ...@@ -193,7 +195,7 @@
this.settingsToolStripButton}); this.settingsToolStripButton});
this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1"; this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(491, 25); this.toolStrip1.Size = new System.Drawing.Size(724, 25);
this.toolStrip1.TabIndex = 13; this.toolStrip1.TabIndex = 13;
this.toolStrip1.Text = "toolStrip1"; this.toolStrip1.Text = "toolStrip1";
// //
...@@ -211,7 +213,7 @@ ...@@ -211,7 +213,7 @@
// //
this.sortByNameCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.sortByNameCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.sortByNameCheckBox.AutoSize = true; this.sortByNameCheckBox.AutoSize = true;
this.sortByNameCheckBox.Location = new System.Drawing.Point(87, 324); this.sortByNameCheckBox.Location = new System.Drawing.Point(87, 322);
this.sortByNameCheckBox.Name = "sortByNameCheckBox"; this.sortByNameCheckBox.Name = "sortByNameCheckBox";
this.sortByNameCheckBox.Size = new System.Drawing.Size(108, 17); this.sortByNameCheckBox.Size = new System.Drawing.Size(108, 17);
this.sortByNameCheckBox.TabIndex = 14; this.sortByNameCheckBox.TabIndex = 14;
...@@ -234,7 +236,7 @@ ...@@ -234,7 +236,7 @@
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.CardFilterTextBox.Location = new System.Drawing.Point(317, 45); this.CardFilterTextBox.Location = new System.Drawing.Point(317, 45);
this.CardFilterTextBox.Name = "CardFilterTextBox"; this.CardFilterTextBox.Name = "CardFilterTextBox";
this.CardFilterTextBox.Size = new System.Drawing.Size(162, 20); this.CardFilterTextBox.Size = new System.Drawing.Size(395, 20);
this.CardFilterTextBox.TabIndex = 16; this.CardFilterTextBox.TabIndex = 16;
this.toolTip1.SetToolTip(this.CardFilterTextBox, "By default print all cards. With this you can limit name of printed card types"); this.toolTip1.SetToolTip(this.CardFilterTextBox, "By default print all cards. With this you can limit name of printed card types");
// //
...@@ -242,7 +244,7 @@ ...@@ -242,7 +244,7 @@
// //
this.sortByFirstnameCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.sortByFirstnameCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.sortByFirstnameCheckBox.AutoSize = true; this.sortByFirstnameCheckBox.AutoSize = true;
this.sortByFirstnameCheckBox.Location = new System.Drawing.Point(201, 324); this.sortByFirstnameCheckBox.Location = new System.Drawing.Point(201, 322);
this.sortByFirstnameCheckBox.Name = "sortByFirstnameCheckBox"; this.sortByFirstnameCheckBox.Name = "sortByFirstnameCheckBox";
this.sortByFirstnameCheckBox.Size = new System.Drawing.Size(107, 17); this.sortByFirstnameCheckBox.Size = new System.Drawing.Size(107, 17);
this.sortByFirstnameCheckBox.TabIndex = 17; this.sortByFirstnameCheckBox.TabIndex = 17;
...@@ -250,11 +252,22 @@ ...@@ -250,11 +252,22 @@
this.sortByFirstnameCheckBox.UseVisualStyleBackColor = true; this.sortByFirstnameCheckBox.UseVisualStyleBackColor = true;
this.sortByFirstnameCheckBox.CheckedChanged += new System.EventHandler(this.sortByFirstnameCheckBox_CheckedChanged); this.sortByFirstnameCheckBox.CheckedChanged += new System.EventHandler(this.sortByFirstnameCheckBox_CheckedChanged);
// //
// randomizeCheckBox
//
this.randomizeCheckBox.AutoSize = true;
this.randomizeCheckBox.Location = new System.Drawing.Point(315, 322);
this.randomizeCheckBox.Name = "randomizeCheckBox";
this.randomizeCheckBox.Size = new System.Drawing.Size(79, 17);
this.randomizeCheckBox.TabIndex = 18;
this.randomizeCheckBox.Text = "Randomize";
this.randomizeCheckBox.UseVisualStyleBackColor = true;
//
// Form1 // Form1
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(491, 378); this.ClientSize = new System.Drawing.Size(724, 376);
this.Controls.Add(this.randomizeCheckBox);
this.Controls.Add(this.sortByFirstnameCheckBox); this.Controls.Add(this.sortByFirstnameCheckBox);
this.Controls.Add(this.CardFilterTextBox); this.Controls.Add(this.CardFilterTextBox);
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
...@@ -307,6 +320,7 @@ ...@@ -307,6 +320,7 @@
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem setPrintedToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem setPrintedToolStripMenuItem;
private System.Windows.Forms.CheckBox sortByFirstnameCheckBox; private System.Windows.Forms.CheckBox sortByFirstnameCheckBox;
private System.Windows.Forms.CheckBox randomizeCheckBox;
} }
} }
...@@ -239,13 +239,13 @@ namespace moyaPrintServer ...@@ -239,13 +239,13 @@ namespace moyaPrintServer
try try
{ {
RestClient client = new RestClient(Properties.Settings.Default.ApiURL); RestClient client = new RestClient(Properties.Settings.Default.ApiURL);
string json = client.MakeRequest("card/ListUnprinted"); string json = client.MakeRequest("card/ListUnprinted");
var ser = new JavaScriptSerializer(); var ser = new JavaScriptSerializer();
PrintQueueList queuelist = ser.Deserialize<PrintQueueList>(json); PrintQueueList queuelist = ser.Deserialize<PrintQueueList>(json);
if (queuelist == null || queuelist.cards.Count == 0) if (queuelist == null || queuelist.cards.Count == 0)
{ {
toolStripStatusLabel1.Text = "No new cards"; toolStripStatusLabel1.Text = "No new cards";
...@@ -254,10 +254,18 @@ namespace moyaPrintServer ...@@ -254,10 +254,18 @@ namespace moyaPrintServer
listView.BeginUpdate(); listView.BeginUpdate();
listView.Items.Clear(); listView.Items.Clear();
if (sortByNameCheckBox.Checked) if (sortByNameCheckBox.Checked)
queuelist.cards = queuelist.cards.OrderBy(c => c.username).ToList(); queuelist.cards = queuelist.cards.OrderBy(c => c.username).ToList();
if (sortByFirstnameCheckBox.Checked) if (sortByFirstnameCheckBox.Checked)
queuelist.cards = queuelist.cards.OrderBy(c => c.wholeName).ToList(); queuelist.cards = queuelist.cards.OrderBy(c => c.wholeName).ToList();
if (randomizeCheckBox.Checked)
{
Random nrg = new Random();
queuelist.cards = queuelist.cards.OrderBy(c => nrg.Next()).ToList();
}
foreach (Card card in queuelist.cards) foreach (Card card in queuelist.cards)
{ {
// jos ei ole filtteriä niin tulosta kaikki validoidut kortit. Jos on filtteri niin tulosta vain ne joihin se osuu // jos ei ole filtteriä niin tulosta kaikki validoidut kortit. Jos on filtteri niin tulosta vain ne joihin se osuu
...@@ -271,13 +279,24 @@ namespace moyaPrintServer ...@@ -271,13 +279,24 @@ namespace moyaPrintServer
} }
} }
listView.EndUpdate(); listView.EndUpdate();
} }
catch (Exception ex) catch (Exception ex)
{ {
toolStripStatusLabel1.Text = ex.Message; toolStripStatusLabel1.Text = ex.Message;
} }
} }
/*
private List<PrintQueueList> shuffleList(List<PrintQueueList> cards)
{
List<PrintQueueList> shuffled = new List<PrintQueueList>();
for(int i = 0; i < cards.Count; i++)
{
}
}*/
private int GetNumberOfPrintJobs() private int GetNumberOfPrintJobs()
{ {
......
...@@ -142,9 +142,6 @@ ...@@ -142,9 +142,6 @@
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>346, 17</value> <value>346, 17</value>
</metadata> </metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>346, 17</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
AAABAAgAICAQAAAAAADoAgAAhgAAABAQEAAAAAAAKAEAAG4DAAAwMAAAAQAIAKgOAACWBAAAICAAAAEA AAABAAgAICAQAAAAAADoAgAAhgAAABAQEAAAAAAAKAEAAG4DAAAwMAAAAQAIAKgOAACWBAAAICAAAAEA
......
...@@ -32,5 +32,5 @@ using System.Runtime.InteropServices; ...@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.36.0")] [assembly: AssemblyVersion("1.0.37.0")]
[assembly: AssemblyFileVersion("1.0.36.0")] [assembly: AssemblyFileVersion("1.0.37.0")]
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:4.0.30319.17929 // Runtime Version:4.0.30319.42000
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
...@@ -19,7 +19,7 @@ namespace moyaPrintServer.Properties { ...@@ -19,7 +19,7 @@ namespace moyaPrintServer.Properties {
// class via a tool like ResGen or Visual Studio. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {
......
...@@ -12,7 +12,7 @@ namespace moyaPrintServer.Properties { ...@@ -12,7 +12,7 @@ namespace moyaPrintServer.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
......
...@@ -8,29 +8,29 @@ ...@@ -8,29 +8,29 @@
<userSettings> <userSettings>
<moyaPrintServer.Properties.Settings> <moyaPrintServer.Properties.Settings>
<setting name="Printer" serializeAs="String"> <setting name="Printer" serializeAs="String">
<value /> <value/>
</setting> </setting>
<setting name="AutoPrint" serializeAs="String"> <setting name="AutoPrint" serializeAs="String">
<value>False</value> <value>False</value>
</setting> </setting>
<setting name="ApiURL" serializeAs="String"> <setting name="ApiURL" serializeAs="String">
<value /> <value/>
</setting> </setting>
<setting name="ApiApplicationKey" serializeAs="String"> <setting name="ApiApplicationKey" serializeAs="String">
<value>8krAyTEpzP6QnwzkxGek</value> <value>8krAyTEpzP6QnwzkxGek</value>
</setting> </setting>
<setting name="ApiUser" serializeAs="String"> <setting name="ApiUser" serializeAs="String">
<value /> <value/>
</setting> </setting>
<setting name="ApiPass" serializeAs="String"> <setting name="ApiPass" serializeAs="String">
<value /> <value/>
</setting> </setting>
<setting name="ApplicationVersion" serializeAs="String"> <setting name="ApplicationVersion" serializeAs="String">
<value /> <value/>
</setting> </setting>
<setting name="ApiTokenSet" serializeAs="String"> <setting name="ApiTokenSet" serializeAs="String">
<value>False</value> <value>False</value>
</setting> </setting>
</moyaPrintServer.Properties.Settings> </moyaPrintServer.Properties.Settings>
</userSettings> </userSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>moyaPrintServer</RootNamespace> <RootNamespace>moyaPrintServer</RootNamespace>
<AssemblyName>moyaPrintServer</AssemblyName> <AssemblyName>moyaPrintServer</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile> </TargetFrameworkProfile>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
...@@ -33,10 +34,10 @@ ...@@ -33,10 +34,10 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="AutoUpdateLib, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="AutoUpdateLib">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\res\AutoUpdateLib.dll</HintPath> <HintPath>..\res\AutoUpdateLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
...@@ -114,7 +115,7 @@ ...@@ -114,7 +115,7 @@
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>$(SolutionDir)/../../../\AutoUpdate\src\AutoPublish\bin\Debug\AutoPublish.exe $(ConfigurationName) $(ProjectName) $(SolutionDir) $(TargetPath)</PostBuildEvent> <PostBuildEvent>$(SolutionDir)/../../../\AutoUpdate\src\AutoPublish\bin\x86\Debug\AutoPublish.exe $(ConfigurationName) $(ProjectName) $(SolutionDir) $(TargetPath)</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.
......
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14 # Visual Studio Version 16
VisualStudioVersion = 14.0.25420.1 VisualStudioVersion = 16.0.31911.196
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QrCodeScannerFrm", "QrCodeScannerFrm\QrCodeScannerFrm.csproj", "{9FB4AF3A-D611-481C-9501-6B48B7AB3519}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QrCodeScannerFrm", "QrCodeScannerFrm\QrCodeScannerFrm.csproj", "{9FB4AF3A-D611-481C-9501-6B48B7AB3519}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoyaAdminLib", "..\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\MoyaAdminLib.csproj", "{095CE28F-5B53-4203-85C6-3A9AFD486407}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9FB4AF3A-D611-481C-9501-6B48B7AB3519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9FB4AF3A-D611-481C-9501-6B48B7AB3519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9FB4AF3A-D611-481C-9501-6B48B7AB3519}.Debug|Any CPU.Build.0 = Debug|Any CPU {9FB4AF3A-D611-481C-9501-6B48B7AB3519}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9FB4AF3A-D611-481C-9501-6B48B7AB3519}.Debug|x86.ActiveCfg = Debug|Any CPU
{9FB4AF3A-D611-481C-9501-6B48B7AB3519}.Debug|x86.Build.0 = Debug|Any CPU
{9FB4AF3A-D611-481C-9501-6B48B7AB3519}.Release|Any CPU.ActiveCfg = Release|Any CPU {9FB4AF3A-D611-481C-9501-6B48B7AB3519}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9FB4AF3A-D611-481C-9501-6B48B7AB3519}.Release|Any CPU.Build.0 = Release|Any CPU {9FB4AF3A-D611-481C-9501-6B48B7AB3519}.Release|Any CPU.Build.0 = Release|Any CPU
{9FB4AF3A-D611-481C-9501-6B48B7AB3519}.Release|x86.ActiveCfg = Release|Any CPU
{9FB4AF3A-D611-481C-9501-6B48B7AB3519}.Release|x86.Build.0 = Release|Any CPU
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|Any CPU.ActiveCfg = Debug|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|Any CPU.Build.0 = Debug|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|Any CPU.ActiveCfg = Release|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|x86.ActiveCfg = Release|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|x86.Build.0 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2B8C3160-4214-4A27-A9EF-5ECD20C5FF01}
EndGlobalSection
EndGlobal EndGlobal
...@@ -35,12 +35,19 @@ ...@@ -35,12 +35,19 @@
this.readerTextBox = new System.Windows.Forms.TextBox(); this.readerTextBox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.webCamsComboBox = new System.Windows.Forms.ComboBox(); this.webCamsComboBox = new System.Windows.Forms.ComboBox();
this.resetApiTokenCheckBox = new System.Windows.Forms.CheckBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label4 = new System.Windows.Forms.Label();
this.pwTextBox = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.usernameTextBox = new System.Windows.Forms.TextBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// SaveButton // SaveButton
// //
this.SaveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.SaveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.SaveButton.Location = new System.Drawing.Point(197, 158); this.SaveButton.Location = new System.Drawing.Point(226, 254);
this.SaveButton.Name = "SaveButton"; this.SaveButton.Name = "SaveButton";
this.SaveButton.Size = new System.Drawing.Size(75, 23); this.SaveButton.Size = new System.Drawing.Size(75, 23);
this.SaveButton.TabIndex = 4; this.SaveButton.TabIndex = 4;
...@@ -51,7 +58,7 @@ ...@@ -51,7 +58,7 @@
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 27); this.label1.Location = new System.Drawing.Point(12, 124);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(43, 13); this.label1.Size = new System.Drawing.Size(43, 13);
this.label1.TabIndex = 19; this.label1.TabIndex = 19;
...@@ -60,7 +67,7 @@ ...@@ -60,7 +67,7 @@
// //
// domainTextBox // domainTextBox
// //
this.domainTextBox.Location = new System.Drawing.Point(12, 43); this.domainTextBox.Location = new System.Drawing.Point(12, 140);
this.domainTextBox.Name = "domainTextBox"; this.domainTextBox.Name = "domainTextBox";
this.domainTextBox.Size = new System.Drawing.Size(260, 20); this.domainTextBox.Size = new System.Drawing.Size(260, 20);
this.domainTextBox.TabIndex = 0; this.domainTextBox.TabIndex = 0;
...@@ -68,7 +75,7 @@ ...@@ -68,7 +75,7 @@
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 66); this.label2.Location = new System.Drawing.Point(12, 163);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(78, 13); this.label2.Size = new System.Drawing.Size(78, 13);
this.label2.TabIndex = 22; this.label2.TabIndex = 22;
...@@ -76,7 +83,7 @@ ...@@ -76,7 +83,7 @@
// //
// readerTextBox // readerTextBox
// //
this.readerTextBox.Location = new System.Drawing.Point(12, 82); this.readerTextBox.Location = new System.Drawing.Point(12, 179);
this.readerTextBox.Name = "readerTextBox"; this.readerTextBox.Name = "readerTextBox";
this.readerTextBox.Size = new System.Drawing.Size(260, 20); this.readerTextBox.Size = new System.Drawing.Size(260, 20);
this.readerTextBox.TabIndex = 1; this.readerTextBox.TabIndex = 1;
...@@ -84,7 +91,7 @@ ...@@ -84,7 +91,7 @@
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 109); this.label3.Location = new System.Drawing.Point(12, 202);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(53, 13); this.label3.Size = new System.Drawing.Size(53, 13);
this.label3.TabIndex = 23; this.label3.TabIndex = 23;
...@@ -93,16 +100,76 @@ ...@@ -93,16 +100,76 @@
// webCamsComboBox // webCamsComboBox
// //
this.webCamsComboBox.FormattingEnabled = true; this.webCamsComboBox.FormattingEnabled = true;
this.webCamsComboBox.Location = new System.Drawing.Point(12, 126); this.webCamsComboBox.Location = new System.Drawing.Point(12, 218);
this.webCamsComboBox.Name = "webCamsComboBox"; this.webCamsComboBox.Name = "webCamsComboBox";
this.webCamsComboBox.Size = new System.Drawing.Size(260, 21); this.webCamsComboBox.Size = new System.Drawing.Size(260, 21);
this.webCamsComboBox.TabIndex = 3; this.webCamsComboBox.TabIndex = 3;
// //
// resetApiTokenCheckBox
//
this.resetApiTokenCheckBox.AutoSize = true;
this.resetApiTokenCheckBox.Location = new System.Drawing.Point(6, -1);
this.resetApiTokenCheckBox.Name = "resetApiTokenCheckBox";
this.resetApiTokenCheckBox.Size = new System.Drawing.Size(101, 17);
this.resetApiTokenCheckBox.TabIndex = 0;
this.resetApiTokenCheckBox.Text = "Reset api token";
this.resetApiTokenCheckBox.UseVisualStyleBackColor = true;
this.resetApiTokenCheckBox.CheckedChanged += new System.EventHandler(this.resetApiTokenCheckBox_CheckedChanged);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.pwTextBox);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.usernameTextBox);
this.groupBox1.Controls.Add(this.resetApiTokenCheckBox);
this.groupBox1.Location = new System.Drawing.Point(15, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(288, 109);
this.groupBox1.TabIndex = 24;
this.groupBox1.TabStop = false;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(6, 58);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(53, 13);
this.label4.TabIndex = 8;
this.label4.Text = "Password";
//
// pwTextBox
//
this.pwTextBox.Location = new System.Drawing.Point(6, 74);
this.pwTextBox.Name = "pwTextBox";
this.pwTextBox.PasswordChar = 'ῷ';
this.pwTextBox.ReadOnly = true;
this.pwTextBox.Size = new System.Drawing.Size(260, 20);
this.pwTextBox.TabIndex = 7;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(6, 19);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(55, 13);
this.label5.TabIndex = 6;
this.label5.Text = "Username";
//
// usernameTextBox
//
this.usernameTextBox.Location = new System.Drawing.Point(6, 35);
this.usernameTextBox.Name = "usernameTextBox";
this.usernameTextBox.ReadOnly = true;
this.usernameTextBox.Size = new System.Drawing.Size(260, 20);
this.usernameTextBox.TabIndex = 5;
//
// ApiSettings // ApiSettings
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 196); this.ClientSize = new System.Drawing.Size(313, 292);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.webCamsComboBox); this.Controls.Add(this.webCamsComboBox);
this.Controls.Add(this.label3); this.Controls.Add(this.label3);
this.Controls.Add(this.label2); this.Controls.Add(this.label2);
...@@ -113,6 +180,8 @@ ...@@ -113,6 +180,8 @@
this.Name = "ApiSettings"; this.Name = "ApiSettings";
this.Text = "ApiSettings"; this.Text = "ApiSettings";
this.Load += new System.EventHandler(this.ApiSettings_Load); this.Load += new System.EventHandler(this.ApiSettings_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
...@@ -126,5 +195,11 @@ ...@@ -126,5 +195,11 @@
private System.Windows.Forms.TextBox readerTextBox; private System.Windows.Forms.TextBox readerTextBox;
private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox webCamsComboBox; private System.Windows.Forms.ComboBox webCamsComboBox;
private System.Windows.Forms.CheckBox resetApiTokenCheckBox;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox pwTextBox;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox usernameTextBox;
} }
} }
\ No newline at end of file
using DirectShowLib; using DirectShowLib;
using MoyaAdminLib;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -19,6 +20,37 @@ namespace QrCodeScannerFrm ...@@ -19,6 +20,37 @@ namespace QrCodeScannerFrm
private void SaveButton_Click(object sender, EventArgs e) private void SaveButton_Click(object sender, EventArgs e)
{ {
ApiCredential apiCredential = null;
if (resetApiTokenCheckBox.Checked)
{
try
{
apiCredential = RestClient.GetApiCredential(usernameTextBox.Text, pwTextBox.Text, Properties.Settings.Default.ApiApplicationKey, "https://" + domainTextBox.Text + "/MoyaWeb");
}
catch (Exception ex)
{
MessageBox.Show("Failed to get api credentials: " + ex.Message);
}
if (apiCredential != null)
{
//Properties.Settings.Default.ApiURL = apiURLTextBox.Text;
//Properties.Settings.Default.ApiApplicationKey = Properties.Settings.Default.ApiApplicationKey;
Properties.Settings.Default.ApiUser = apiCredential.authname;
Properties.Settings.Default.ApiPass = apiCredential.secret;
Properties.Settings.Default.ApiTokenSet = true;
Properties.Settings.Default.Save();
}
}
/*RestClient.ApiApplicationKey = Properties.Settings.Default.ApiApplicationKey;
RestClient.ApiPass = Properties.Settings.Default.ApiPass;
RestClient.ApiUser = Properties.Settings.Default.ApiUser;*/
if (domainTextBox.Text != "" && readerTextBox.Text != "" && webCamsComboBox.SelectedItem != null) if (domainTextBox.Text != "" && readerTextBox.Text != "" && webCamsComboBox.SelectedItem != null)
{ {
Properties.Settings.Default.Host = domainTextBox.Text; Properties.Settings.Default.Host = domainTextBox.Text;
...@@ -31,11 +63,18 @@ namespace QrCodeScannerFrm ...@@ -31,11 +63,18 @@ namespace QrCodeScannerFrm
return; return;
} }
RestClient.ApiApplicationKey = Properties.Settings.Default.ApiApplicationKey;
RestClient.ApiPass = Properties.Settings.Default.ApiPass;
RestClient.ApiUser = Properties.Settings.Default.ApiUser;
RestClient.ApiURL = "https://" + Properties.Settings.Default.Host + "/MoyaWeb";
this.DialogResult = System.Windows.Forms.DialogResult.OK; this.DialogResult = System.Windows.Forms.DialogResult.OK;
} }
private void ApiSettings_Load(object sender, EventArgs e) private void ApiSettings_Load(object sender, EventArgs e)
{ {
resetApiTokenCheckBox.Checked = !Properties.Settings.Default.ApiTokenSet;
domainTextBox.Text = Properties.Settings.Default.Host; domainTextBox.Text = Properties.Settings.Default.Host;
readerTextBox.Text = Properties.Settings.Default.Reader; readerTextBox.Text = Properties.Settings.Default.Reader;
...@@ -53,5 +92,21 @@ namespace QrCodeScannerFrm ...@@ -53,5 +92,21 @@ namespace QrCodeScannerFrm
{ {
} }
private void resetApiTokenCheckBox_CheckedChanged(object sender, EventArgs e)
{
if (!resetApiTokenCheckBox.Checked)
{
//apiURLTextBox.ReadOnly = true;
usernameTextBox.ReadOnly = true;
pwTextBox.ReadOnly = true;
}
else
{
//apiURLTextBox.ReadOnly = false;
usernameTextBox.ReadOnly = false;
pwTextBox.ReadOnly = false;
}
}
} }
} }
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
</runtime> </runtime>
<userSettings> <userSettings>
<QrCodeScannerFrm.Properties.Settings> <QrCodeScannerFrm.Properties.Settings>
<setting name="ApiKey" serializeAs="String"> <setting name="ApiApplicationKey" serializeAs="String">
<value /> <value>8krAyTEpzP6QnwzkxGek</value>
</setting> </setting>
<setting name="ApiURL" serializeAs="String"> <setting name="ApiURL" serializeAs="String">
<value>http://my.event.ltd/MoyaWeb/shop/rfidListener.jsf?reader=demo_reader&amp;tag=%</value> <value>http://my.event.ltd/MoyaWeb/shop/rfidListener.jsf?reader=demo_reader&amp;tag=%</value>
...@@ -42,6 +42,9 @@ ...@@ -42,6 +42,9 @@
<setting name="WebCam" serializeAs="String"> <setting name="WebCam" serializeAs="String">
<value>-1</value> <value>-1</value>
</setting> </setting>
<setting name="ApiTokenSet" serializeAs="String">
<value>False</value>
</setting>
</QrCodeScannerFrm.Properties.Settings> </QrCodeScannerFrm.Properties.Settings>
</userSettings> </userSettings>
</configuration> </configuration>
\ No newline at end of file
...@@ -32,6 +32,8 @@ namespace QrCodeScannerFrm ...@@ -32,6 +32,8 @@ namespace QrCodeScannerFrm
string ret = ""; string ret = "";
public static event EventHandler<CodeEventArgs> CodeRead;
private void Form1_Load(object sender, EventArgs e) private void Form1_Load(object sender, EventArgs e)
{ {
if (TrayForm.CaptureDevice != null) if (TrayForm.CaptureDevice != null)
...@@ -146,8 +148,17 @@ namespace QrCodeScannerFrm ...@@ -146,8 +148,17 @@ namespace QrCodeScannerFrm
{ {
if (code != "" && hostTextBox.Text != "" && readerTextBox.Text != "") if (code != "" && hostTextBox.Text != "" && readerTextBox.Text != "")
{ {
if (CodeRead != null)
{
CodeEventArgs e = new CodeEventArgs();
e.Code = code;
CodeRead(this, e);
}
string url = Properties.Settings.Default.ApiURL.Replace("my.event.ltd", hostTextBox.Text.Trim()).Replace("demo_reader", readerTextBox.Text.Trim()).Replace("%", codeTextBox.Text.Trim()); string url = Properties.Settings.Default.ApiURL.Replace("my.event.ltd", hostTextBox.Text.Trim()).Replace("demo_reader", readerTextBox.Text.Trim()).Replace("%", codeTextBox.Text.Trim());
Debug.WriteLine("Url: " + url);
BarcodeRestClient client = new BarcodeRestClient(url); BarcodeRestClient client = new BarcodeRestClient(url);
try try
......
...@@ -32,5 +32,5 @@ using System.Runtime.InteropServices; ...@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.16.0")] [assembly: AssemblyVersion("1.0.18.0")]
[assembly: AssemblyFileVersion("1.0.16.0")] [assembly: AssemblyFileVersion("1.0.18.0")]
...@@ -12,7 +12,7 @@ namespace QrCodeScannerFrm.Properties { ...@@ -12,7 +12,7 @@ namespace QrCodeScannerFrm.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
...@@ -25,13 +25,13 @@ namespace QrCodeScannerFrm.Properties { ...@@ -25,13 +25,13 @@ namespace QrCodeScannerFrm.Properties {
[global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")] [global::System.Configuration.DefaultSettingValueAttribute("8krAyTEpzP6QnwzkxGek")]
public string ApiKey { public string ApiApplicationKey {
get { get {
return ((string)(this["ApiKey"])); return ((string)(this["ApiApplicationKey"]));
} }
set { set {
this["ApiKey"] = value; this["ApiApplicationKey"] = value;
} }
} }
...@@ -118,5 +118,17 @@ namespace QrCodeScannerFrm.Properties { ...@@ -118,5 +118,17 @@ namespace QrCodeScannerFrm.Properties {
this["WebCam"] = value; this["WebCam"] = value;
} }
} }
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool ApiTokenSet {
get {
return ((bool)(this["ApiTokenSet"]));
}
set {
this["ApiTokenSet"] = value;
}
}
} }
} }
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="QrCodeScannerFrm.Properties" GeneratedClassName="Settings"> <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="QrCodeScannerFrm.Properties" GeneratedClassName="Settings">
<Profiles /> <Profiles />
<Settings> <Settings>
<Setting Name="ApiKey" Type="System.String" Scope="User"> <Setting Name="ApiApplicationKey" Type="System.String" Scope="User">
<Value Profile="(Default)" /> <Value Profile="(Default)">8krAyTEpzP6QnwzkxGek</Value>
</Setting> </Setting>
<Setting Name="ApiURL" Type="System.String" Scope="User"> <Setting Name="ApiURL" Type="System.String" Scope="User">
<Value Profile="(Default)">http://my.event.ltd/MoyaWeb/shop/rfidListener.jsf?reader=demo_reader&amp;tag=%</Value> <Value Profile="(Default)">http://my.event.ltd/MoyaWeb/shop/rfidListener.jsf?reader=demo_reader&amp;tag=%</Value>
...@@ -26,5 +26,8 @@ ...@@ -26,5 +26,8 @@
<Setting Name="WebCam" Type="System.Int32" Scope="User"> <Setting Name="WebCam" Type="System.Int32" Scope="User">
<Value Profile="(Default)">-1</Value> <Value Profile="(Default)">-1</Value>
</Setting> </Setting>
<Setting Name="ApiTokenSet" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>
\ No newline at end of file
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="AutoUpdateLib"> <Reference Include="AutoUpdateLib, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>Resources\AutoUpdateLib.dll</HintPath> <HintPath>Resources\AutoUpdateLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="DirectShowLib-2005, Version=2.0.0.0, Culture=neutral, PublicKeyToken=67e7b740cdfc2d3f, processorArchitecture=MSIL"> <Reference Include="DirectShowLib-2005, Version=2.0.0.0, Culture=neutral, PublicKeyToken=67e7b740cdfc2d3f, processorArchitecture=MSIL">
...@@ -69,6 +70,7 @@ ...@@ -69,6 +70,7 @@
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
...@@ -99,6 +101,13 @@ ...@@ -99,6 +101,13 @@
<DependentUpon>ApiSettings.cs</DependentUpon> <DependentUpon>ApiSettings.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="BarcodeRestClient.cs" /> <Compile Include="BarcodeRestClient.cs" />
<Compile Include="CodeEventArgs.cs" />
<Compile Include="CodeLinkingForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="CodeLinkingForm.Designer.cs">
<DependentUpon>CodeLinkingForm.cs</DependentUpon>
</Compile>
<Compile Include="Form1.cs"> <Compile Include="Form1.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -116,6 +125,9 @@ ...@@ -116,6 +125,9 @@
<EmbeddedResource Include="ApiSettings.resx"> <EmbeddedResource Include="ApiSettings.resx">
<DependentUpon>ApiSettings.cs</DependentUpon> <DependentUpon>ApiSettings.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="CodeLinkingForm.resx">
<DependentUpon>CodeLinkingForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form1.resx"> <EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon> <DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -174,9 +186,15 @@ ...@@ -174,9 +186,15 @@
</None> </None>
<Content Include="Utilities\Audio\Formats.txt" /> <Content Include="Utilities\Audio\Formats.txt" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\MoyaAdminLib.csproj">
<Project>{095CE28F-5B53-4203-85C6-3A9AFD486407}</Project>
<Name>MoyaAdminLib</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>$(SolutionDir)/../../\AutoUpdate\src\AutoPublish\bin\Debug\AutoPublish.exe $(ConfigurationName) $(ProjectName) $(SolutionDir) $(TargetPath)</PostBuildEvent> <PostBuildEvent>$(SolutionDir)/../../\AutoUpdate\src\AutoPublish\bin\x86\Debug\AutoPublish.exe $(ConfigurationName) $(ProjectName) $(SolutionDir) $(TargetPath)</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.
......
...@@ -32,10 +32,11 @@ ...@@ -32,10 +32,11 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TrayForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TrayForm));
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.videoFormToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.apiSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.apiSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.scanCodeTimer = new System.Windows.Forms.Timer(this.components); this.scanCodeTimer = new System.Windows.Forms.Timer(this.components);
this.videoFormToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openCardCodeLinkingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
...@@ -50,23 +51,31 @@ ...@@ -50,23 +51,31 @@
// //
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.videoFormToolStripMenuItem, this.videoFormToolStripMenuItem,
this.openCardCodeLinkingToolStripMenuItem,
this.apiSettingsToolStripMenuItem, this.apiSettingsToolStripMenuItem,
this.exitToolStripMenuItem}); this.exitToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1"; this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(154, 92); this.contextMenuStrip1.Size = new System.Drawing.Size(198, 114);
this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening); this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening);
// //
// videoFormToolStripMenuItem
//
this.videoFormToolStripMenuItem.Name = "videoFormToolStripMenuItem";
this.videoFormToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
this.videoFormToolStripMenuItem.Text = "Live video feed";
this.videoFormToolStripMenuItem.Click += new System.EventHandler(this.videoFormToolStripMenuItem_Click);
//
// apiSettingsToolStripMenuItem // apiSettingsToolStripMenuItem
// //
this.apiSettingsToolStripMenuItem.Name = "apiSettingsToolStripMenuItem"; this.apiSettingsToolStripMenuItem.Name = "apiSettingsToolStripMenuItem";
this.apiSettingsToolStripMenuItem.Size = new System.Drawing.Size(153, 22); this.apiSettingsToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
this.apiSettingsToolStripMenuItem.Text = "Settings"; this.apiSettingsToolStripMenuItem.Text = "Settings";
this.apiSettingsToolStripMenuItem.Click += new System.EventHandler(this.apiSettingsToolStripMenuItem_Click); this.apiSettingsToolStripMenuItem.Click += new System.EventHandler(this.apiSettingsToolStripMenuItem_Click);
// //
// exitToolStripMenuItem // exitToolStripMenuItem
// //
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(153, 22); this.exitToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
this.exitToolStripMenuItem.Text = "Exit"; this.exitToolStripMenuItem.Text = "Exit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
// //
...@@ -74,12 +83,12 @@ ...@@ -74,12 +83,12 @@
// //
this.scanCodeTimer.Tick += new System.EventHandler(this.scanCodeTimer_Tick); this.scanCodeTimer.Tick += new System.EventHandler(this.scanCodeTimer_Tick);
// //
// videoFormToolStripMenuItem // openCardCodeLinkingToolStripMenuItem
// //
this.videoFormToolStripMenuItem.Name = "videoFormToolStripMenuItem"; this.openCardCodeLinkingToolStripMenuItem.Name = "openCardCodeLinkingToolStripMenuItem";
this.videoFormToolStripMenuItem.Size = new System.Drawing.Size(153, 22); this.openCardCodeLinkingToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
this.videoFormToolStripMenuItem.Text = "Live video feed"; this.openCardCodeLinkingToolStripMenuItem.Text = "Open card code linking";
this.videoFormToolStripMenuItem.Click += new System.EventHandler(this.videoFormToolStripMenuItem_Click); this.openCardCodeLinkingToolStripMenuItem.Click += new System.EventHandler(this.openCardCodeLinkingToolStripMenuItem_Click);
// //
// TrayForm // TrayForm
// //
...@@ -103,5 +112,6 @@ ...@@ -103,5 +112,6 @@
private System.Windows.Forms.ToolStripMenuItem apiSettingsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem apiSettingsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem videoFormToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem videoFormToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem openCardCodeLinkingToolStripMenuItem;
} }
} }
\ No newline at end of file
...@@ -106,8 +106,8 @@ namespace QrCodeScannerFrm ...@@ -106,8 +106,8 @@ namespace QrCodeScannerFrm
if (result != null) if (result != null)
{ {
Debug.WriteLine(result.BarcodeFormat.ToString()); //Debug.WriteLine(result.BarcodeFormat.ToString());
Debug.WriteLine(result.Text); //Debug.WriteLine(result.Text);
if (lastCode != result.Text || timeCodeSent.AddSeconds(30) < DateTime.Now) if (lastCode != result.Text || timeCodeSent.AddSeconds(30) < DateTime.Now)
{ {
lastCode = result.Text; lastCode = result.Text;
...@@ -119,13 +119,13 @@ namespace QrCodeScannerFrm ...@@ -119,13 +119,13 @@ namespace QrCodeScannerFrm
} }
else else
{ {
Debug.WriteLine("Couldn't dedect qr code, trying to dedect barcode."); //Debug.WriteLine("Couldn't dedect qr code, trying to dedect barcode.");
Debug.WriteLine("Couldn't dedect qr code, trying to dedect barcode."); //Debug.WriteLine("Couldn't dedect qr code, trying to dedect barcode.");
for (int i = 0; i < 3; i++) for (int i = 0; i < 3; i++)
{ {
if (i > 0) if (i > 0)
{ {
Debug.WriteLine("Couldn't dedect barcode, trying to rotate picture 90 degrees."); //Debug.WriteLine("Couldn't dedect barcode, trying to rotate picture 90 degrees.");
image.RotateFlip(RotateFlipType.Rotate90FlipNone); image.RotateFlip(RotateFlipType.Rotate90FlipNone);
} }
source = new BitmapLuminanceSource(image); source = new BitmapLuminanceSource(image);
...@@ -134,8 +134,8 @@ namespace QrCodeScannerFrm ...@@ -134,8 +134,8 @@ namespace QrCodeScannerFrm
result = barcodereader.Decode(image); result = barcodereader.Decode(image);
if (result != null && !result.BarcodeFormat.ToString().Contains("UPC")) if (result != null && !result.BarcodeFormat.ToString().Contains("UPC"))
{ {
Debug.WriteLine(result.BarcodeFormat.ToString()); //Debug.WriteLine(result.BarcodeFormat.ToString());
Debug.WriteLine(result.Text); //Debug.WriteLine(result.Text);
if (lastCode != result.Text || timeCodeSent.AddSeconds(30) < DateTime.Now) if (lastCode != result.Text || timeCodeSent.AddSeconds(30) < DateTime.Now)
{ {
lastCode = result.Text; lastCode = result.Text;
...@@ -165,6 +165,8 @@ namespace QrCodeScannerFrm ...@@ -165,6 +165,8 @@ namespace QrCodeScannerFrm
{ {
string url = Properties.Settings.Default.ApiURL.Replace("my.event.ltd", Properties.Settings.Default.Host.Trim()).Replace("demo_reader", Properties.Settings.Default.Reader.Trim()).Replace("%", code.Trim()); string url = Properties.Settings.Default.ApiURL.Replace("my.event.ltd", Properties.Settings.Default.Host.Trim()).Replace("demo_reader", Properties.Settings.Default.Reader.Trim()).Replace("%", code.Trim());
Debug.WriteLine("Url: " + url);
BarcodeRestClient client = new BarcodeRestClient(url); BarcodeRestClient client = new BarcodeRestClient(url);
try try
...@@ -233,5 +235,13 @@ namespace QrCodeScannerFrm ...@@ -233,5 +235,13 @@ namespace QrCodeScannerFrm
Form1 frm = new Form1(); Form1 frm = new Form1();
frm.Show(); frm.Show();
} }
private void openCardCodeLinkingToolStripMenuItem_Click(object sender, EventArgs e)
{
//Debug.WriteLine("ApiUrl: " + Properties.Settings.Default.ApiURL);
//Debug.WriteLine("ApiUrl: " + Properties.Settings.Default.ApiURL);
CodeLinkingForm frm = new CodeLinkingForm();
frm.Show();
}
} }
} }
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<AutoPublishSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <AutoPublishSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<UploadUser>f-solu-06</UploadUser> <UploadUser>f-solu-06</UploadUser>
<PrivateKeyPath />
<UploadPath>/home/f-solu-06/software.f-solutions.fi</UploadPath> <UploadPath>/home/f-solu-06/software.f-solutions.fi</UploadPath>
<UploadHost>www4.f-solutions.fi</UploadHost> <UploadHost>www4.f-solutions.fi</UploadHost>
<ProjectName>QrCodeScannerFrm</ProjectName> <ProjectName>QrCodeScannerFrm</ProjectName>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
Name "QrCodeScannerFrm moya v1_00_16" Name "QrCodeScannerFrm moya v1_00_18"
; DO NOT CHANGE OutFile "installer_temp.exe" !!! AutoPublish requires this. ; DO NOT CHANGE OutFile "installer_temp.exe" !!! AutoPublish requires this.
...@@ -198,7 +198,7 @@ FunctionEnd ...@@ -198,7 +198,7 @@ FunctionEnd
Section "!QrCodeScannerFrm moya stable v1_00_16" SecMain Section "!QrCodeScannerFrm moya stable v1_00_18" SecMain
SetShellVarContext current SetShellVarContext current
...@@ -214,17 +214,17 @@ Section "!QrCodeScannerFrm moya stable v1_00_16" SecMain ...@@ -214,17 +214,17 @@ Section "!QrCodeScannerFrm moya stable v1_00_16" SecMain
File /oname=cvextern.dll "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\Resources\cvextern.dll" File /oname=cvextern.dll "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\Resources\cvextern.dll"
File /oname=opencv_highgui220.dll "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\opencv_highgui220.dll" File /oname=opencv_highgui220.dll "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\opencv_highgui220.dll"
File /oname=opencv_core220.dll "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\opencv_core220.dll" File /oname=opencv_core220.dll "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\opencv_core220.dll"
File /oname=autoupdate.xml "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\autoupdate.moya.xml" File /oname=autoupdate.xml "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\autoupdate.moya.xml"
File /oname=QrCodeScannerFrm.exe "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\QrCodeScannerFrm.exe" File /oname=QrCodeScannerFrm.exe "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\QrCodeScannerFrm.exe"
File autoupdate.crt File autoupdate.crt
...@@ -234,14 +234,16 @@ Section "!QrCodeScannerFrm moya stable v1_00_16" SecMain ...@@ -234,14 +234,16 @@ Section "!QrCodeScannerFrm moya stable v1_00_16" SecMain
; that is referenced to the main project. ; that is referenced to the main project.
File "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\DirectShowLib-2005.dll" File "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\MoyaAdminLib.dll"
File "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\Emgu.CV.dll" File "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\DirectShowLib-2005.dll"
File "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\Emgu.Util.dll" File "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\Emgu.CV.dll"
File "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\zxing.dll" File "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\Emgu.Util.dll"
File "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\AutoUpdateLib.dll" File "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\zxing.dll"
File "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\AutoUpdateLib.dll"
File "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\QrCodeScannerFrm.pdb" File "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\QrCodeScannerFrm.pdb"
File "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\zxing.pdb" File "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\MoyaAdminLib.pdb"
File "C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\zxing.pdb"
...@@ -329,14 +331,16 @@ Section "Uninstall" ...@@ -329,14 +331,16 @@ Section "Uninstall"
; that is referenced to the main project. ; that is referenced to the main project.
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\DirectShowLib-2005.dll" Delete "$INSTDIR\C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\MoyaAdminLib.dll"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\Emgu.CV.dll" Delete "$INSTDIR\C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\DirectShowLib-2005.dll"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\Emgu.Util.dll" Delete "$INSTDIR\C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\Emgu.CV.dll"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\zxing.dll" Delete "$INSTDIR\C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\Emgu.Util.dll"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\AutoUpdateLib.dll" Delete "$INSTDIR\C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\zxing.dll"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\AutoUpdateLib.dll"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\QrCodeScannerFrm.pdb" Delete "$INSTDIR\C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\QrCodeScannerFrm.pdb"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Release\zxing.pdb" Delete "$INSTDIR\C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\MoyaAdminLib.pdb"
Delete "$INSTDIR\C:\devel\proj\moya-info-tools\QrCodeScannerFrm\QrCodeScannerFrm\bin\Debug\zxing.pdb"
......
...@@ -66,6 +66,7 @@ namespace ThermoPrinterLibrary ...@@ -66,6 +66,7 @@ namespace ThermoPrinterLibrary
JAN13 = 0x2, JAN13 = 0x2,
JAN8 = 0x3, JAN8 = 0x3,
CODE39 = 0x4, CODE39 = 0x4,
//CODE39 = 0x69,
ITF = 0x5, ITF = 0x5,
CODABAR = 0x6 CODABAR = 0x6
} }
...@@ -84,6 +85,19 @@ namespace ThermoPrinterLibrary ...@@ -84,6 +85,19 @@ namespace ThermoPrinterLibrary
Right = 0x2 Right = 0x2
} }
public enum CharacterCodeTables: byte
{
USA = 0x0,
Katakana = 0x1,
Multilingual = 0x2,
Portuguese = 0x3,
CanadianFrench = 0x4,
Nordic = 0x5,
WPC1252 = 0x10,
Latin2 = 0x11,
Euro = 0x13
}
public enum HRIPrintingPositions: byte public enum HRIPrintingPositions: byte
{ {
NoPrinting = 0x0, NoPrinting = 0x0,
...@@ -227,11 +241,47 @@ namespace ThermoPrinterLibrary ...@@ -227,11 +241,47 @@ namespace ThermoPrinterLibrary
} }
} }
public void SetCharacterTable(CharacterCodeTables table)
{
if (initialized)
{
commands = new byte[3];
commands[0] = (byte)Commands.ESC;
commands[1] = (byte)'t';
commands[2] = (byte)table;
this.port.Write(commands, 0, 3);
}
}
public void PrintText(string text) public void PrintText(string text)
{ {
if (initialized) if (initialized)
{ {
byte[] bytes = Encoding.ASCII.GetBytes(text); Encoding encode = Encoding.GetEncoding("iso-8859-1");
byte[] bytes = encode.GetBytes(text);
//Failed to find correct encoding that would replace äöå as the correct ascii value so fixing this by replacing correct value to byte data
int i = 0;
foreach (char c in text.ToCharArray())
{
if (c == 'ä')
bytes[i] = 132;
else if (c == 'ö')
bytes[i] = 148;
else if (c == 'å')
bytes[i] = 134;
else if (c == 'Ä')
bytes[i] = 142;
else if (c == 'Ö')
bytes[i] = 153;
else if (c == 'Å')
bytes[i] = 143;
i++;
}
//byte[] bytes = Encoding.ASCII.GetBytes(text);
this.port.Write(bytes, 0, bytes.Length); this.port.Write(bytes, 0, bytes.Length);
//this.port.Write(text); //this.port.Write(text);
} }
...@@ -279,6 +329,7 @@ namespace ThermoPrinterLibrary ...@@ -279,6 +329,7 @@ namespace ThermoPrinterLibrary
this.port.Write(c.GetBytes(), 0, c.Length); this.port.Write(c.GetBytes(), 0, c.Length);
} }
public void SetPositionHRI(HRIPrintingPositions position) public void SetPositionHRI(HRIPrintingPositions position)
{ {
if (!initialized) return; if (!initialized) return;
...@@ -299,9 +350,5 @@ namespace ThermoPrinterLibrary ...@@ -299,9 +350,5 @@ namespace ThermoPrinterLibrary
this.port.Write(c.GetBytes(), 0, c.Length); this.port.Write(c.GetBytes(), 0, c.Length);
} }
public void SelectingInternationalCharacters()
{
}
} }
} }
...@@ -5,4 +5,7 @@ ApiPass: mIqgbpzGlU5rPrM8JX7l ...@@ -5,4 +5,7 @@ ApiPass: mIqgbpzGlU5rPrM8JX7l
ApiKey: ryirch1oD0Vig1Taik9ga ApiKey: ryirch1oD0Vig1Taik9ga
ApiUser: tapsa ApiUser: tapsa
ApiPass: myPs7I7ov1iM3yeS3am6 ApiPass: myPs7I7ov1iM3yeS3am6
\ No newline at end of file
$(SolutionDir)/../../../\AutoUpdate\src\AutoPublish\bin\Debug\AutoPublish.exe $(ConfigurationName) $(ProjectName) $(SolutionDir) $(TargetPath)
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!