Commit aa3c033b by Liv Haapala

new stuff

1 parent b5c3486e
 
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 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CardDisplay", "CardDisplay\CardDisplay.csproj", "{9CE1A44D-28CF-4277-BAC7-D73A8C2D8059}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CardDisplay", "CardDisplay\CardDisplay.csproj", "{9CE1A44D-28CF-4277-BAC7-D73A8C2D8059}"
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}"
...@@ -25,16 +27,16 @@ Global ...@@ -25,16 +27,16 @@ Global
{9CE1A44D-28CF-4277-BAC7-D73A8C2D8059}.Release|Mixed Platforms.Build.0 = Release|x86 {9CE1A44D-28CF-4277-BAC7-D73A8C2D8059}.Release|Mixed Platforms.Build.0 = Release|x86
{9CE1A44D-28CF-4277-BAC7-D73A8C2D8059}.Release|x86.ActiveCfg = Release|x86 {9CE1A44D-28CF-4277-BAC7-D73A8C2D8059}.Release|x86.ActiveCfg = Release|x86
{9CE1A44D-28CF-4277-BAC7-D73A8C2D8059}.Release|x86.Build.0 = Release|x86 {9CE1A44D-28CF-4277-BAC7-D73A8C2D8059}.Release|x86.Build.0 = Release|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|Any CPU.ActiveCfg = Debug|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|Any CPU.Build.0 = Debug|Any CPU {095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|Mixed Platforms.Build.0 = Debug|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|x86.ActiveCfg = Debug|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|x86.ActiveCfg = Debug|Any CPU {095CE28F-5B53-4203-85C6-3A9AFD486407}.Debug|x86.Build.0 = Debug|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|Any CPU.ActiveCfg = Release|Any CPU {095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|Any CPU.ActiveCfg = Release|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|Any CPU.Build.0 = Release|Any CPU {095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|Mixed Platforms.ActiveCfg = Release|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|Mixed Platforms.Build.0 = Release|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|Mixed Platforms.Build.0 = Release|Any CPU {095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|x86.ActiveCfg = Release|x86
{095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|x86.ActiveCfg = Release|Any CPU {095CE28F-5B53-4203-85C6-3A9AFD486407}.Release|x86.Build.0 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
......
...@@ -68,6 +68,12 @@ ...@@ -68,6 +68,12 @@
<Compile Include="Forms\Form1.Designer.cs"> <Compile Include="Forms\Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon> <DependentUpon>Form1.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\ReaderForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\ReaderForm.Designer.cs">
<DependentUpon>ReaderForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Forms\ApiSettings.resx"> <EmbeddedResource Include="Forms\ApiSettings.resx">
...@@ -76,6 +82,9 @@ ...@@ -76,6 +82,9 @@
<EmbeddedResource Include="Forms\Form1.resx"> <EmbeddedResource Include="Forms\Form1.resx">
<DependentUpon>Form1.cs</DependentUpon> <DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Forms\ReaderForm.resx">
<DependentUpon>ReaderForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx"> <EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput> <LastGenOutput>Resources.Designer.cs</LastGenOutput>
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
this.cardPlaceLabel1 = new System.Windows.Forms.Label(); this.cardPlaceLabel1 = new System.Windows.Forms.Label();
this.cardPlaceLabel2 = new System.Windows.Forms.Label(); this.cardPlaceLabel2 = new System.Windows.Forms.Label();
this.cardPlaceLabel3 = new System.Windows.Forms.Label(); this.cardPlaceLabel3 = new System.Windows.Forms.Label();
this.addReaderToolStripButton = new System.Windows.Forms.ToolStripButton();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
...@@ -59,6 +60,9 @@ ...@@ -59,6 +60,9 @@
// //
// pictureBox1 // pictureBox1
// //
this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pictureBox1.Location = new System.Drawing.Point(12, 96); this.pictureBox1.Location = new System.Drawing.Point(12, 96);
this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Name = "pictureBox1";
...@@ -66,10 +70,13 @@ ...@@ -66,10 +70,13 @@
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 0; this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false; this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
// //
// pictureBox2 // pictureBox2
// //
this.pictureBox2.Anchor = System.Windows.Forms.AnchorStyles.Top; this.pictureBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.pictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pictureBox2.Location = new System.Drawing.Point(195, 96); this.pictureBox2.Location = new System.Drawing.Point(195, 96);
this.pictureBox2.Name = "pictureBox2"; this.pictureBox2.Name = "pictureBox2";
...@@ -77,10 +84,13 @@ ...@@ -77,10 +84,13 @@
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox2.TabIndex = 1; this.pictureBox2.TabIndex = 1;
this.pictureBox2.TabStop = false; this.pictureBox2.TabStop = false;
this.pictureBox2.Click += new System.EventHandler(this.pictureBox2_Click);
// //
// pictureBox3 // pictureBox3
// //
this.pictureBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.pictureBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pictureBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.pictureBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pictureBox3.Location = new System.Drawing.Point(373, 95); this.pictureBox3.Location = new System.Drawing.Point(373, 95);
this.pictureBox3.Name = "pictureBox3"; this.pictureBox3.Name = "pictureBox3";
...@@ -88,6 +98,7 @@ ...@@ -88,6 +98,7 @@
this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox3.TabIndex = 2; this.pictureBox3.TabIndex = 2;
this.pictureBox3.TabStop = false; this.pictureBox3.TabStop = false;
this.pictureBox3.Click += new System.EventHandler(this.pictureBox3_Click);
// //
// readersComboBox1 // readersComboBox1
// //
...@@ -138,8 +149,7 @@ ...@@ -138,8 +149,7 @@
// //
// prevSlot1Button // prevSlot1Button
// //
this.prevSlot1Button.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.prevSlot1Button.Location = new System.Drawing.Point(12, 354);
this.prevSlot1Button.Location = new System.Drawing.Point(12, 360);
this.prevSlot1Button.Name = "prevSlot1Button"; this.prevSlot1Button.Name = "prevSlot1Button";
this.prevSlot1Button.Size = new System.Drawing.Size(28, 23); this.prevSlot1Button.Size = new System.Drawing.Size(28, 23);
this.prevSlot1Button.TabIndex = 10; this.prevSlot1Button.TabIndex = 10;
...@@ -149,8 +159,7 @@ ...@@ -149,8 +159,7 @@
// //
// prevSlot2Button // prevSlot2Button
// //
this.prevSlot2Button.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.prevSlot2Button.Location = new System.Drawing.Point(195, 354);
this.prevSlot2Button.Location = new System.Drawing.Point(195, 360);
this.prevSlot2Button.Name = "prevSlot2Button"; this.prevSlot2Button.Name = "prevSlot2Button";
this.prevSlot2Button.Size = new System.Drawing.Size(28, 23); this.prevSlot2Button.Size = new System.Drawing.Size(28, 23);
this.prevSlot2Button.TabIndex = 11; this.prevSlot2Button.TabIndex = 11;
...@@ -160,8 +169,7 @@ ...@@ -160,8 +169,7 @@
// //
// prevSlot3Button // prevSlot3Button
// //
this.prevSlot3Button.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.prevSlot3Button.Location = new System.Drawing.Point(373, 354);
this.prevSlot3Button.Location = new System.Drawing.Point(360, 361);
this.prevSlot3Button.Name = "prevSlot3Button"; this.prevSlot3Button.Name = "prevSlot3Button";
this.prevSlot3Button.Size = new System.Drawing.Size(28, 23); this.prevSlot3Button.Size = new System.Drawing.Size(28, 23);
this.prevSlot3Button.TabIndex = 12; this.prevSlot3Button.TabIndex = 12;
...@@ -171,8 +179,7 @@ ...@@ -171,8 +179,7 @@
// //
// forwardSlot1Button // forwardSlot1Button
// //
this.forwardSlot1Button.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.forwardSlot1Button.Location = new System.Drawing.Point(143, 354);
this.forwardSlot1Button.Location = new System.Drawing.Point(161, 360);
this.forwardSlot1Button.Name = "forwardSlot1Button"; this.forwardSlot1Button.Name = "forwardSlot1Button";
this.forwardSlot1Button.Size = new System.Drawing.Size(28, 23); this.forwardSlot1Button.Size = new System.Drawing.Size(28, 23);
this.forwardSlot1Button.TabIndex = 13; this.forwardSlot1Button.TabIndex = 13;
...@@ -182,8 +189,7 @@ ...@@ -182,8 +189,7 @@
// //
// forwardSlot2Button // forwardSlot2Button
// //
this.forwardSlot2Button.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.forwardSlot2Button.Location = new System.Drawing.Point(326, 354);
this.forwardSlot2Button.Location = new System.Drawing.Point(326, 361);
this.forwardSlot2Button.Name = "forwardSlot2Button"; this.forwardSlot2Button.Name = "forwardSlot2Button";
this.forwardSlot2Button.Size = new System.Drawing.Size(28, 23); this.forwardSlot2Button.Size = new System.Drawing.Size(28, 23);
this.forwardSlot2Button.TabIndex = 14; this.forwardSlot2Button.TabIndex = 14;
...@@ -193,8 +199,7 @@ ...@@ -193,8 +199,7 @@
// //
// forwardSlot3Button // forwardSlot3Button
// //
this.forwardSlot3Button.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.forwardSlot3Button.Location = new System.Drawing.Point(504, 354);
this.forwardSlot3Button.Location = new System.Drawing.Point(509, 360);
this.forwardSlot3Button.Name = "forwardSlot3Button"; this.forwardSlot3Button.Name = "forwardSlot3Button";
this.forwardSlot3Button.Size = new System.Drawing.Size(28, 23); this.forwardSlot3Button.Size = new System.Drawing.Size(28, 23);
this.forwardSlot3Button.TabIndex = 15; this.forwardSlot3Button.TabIndex = 15;
...@@ -205,10 +210,11 @@ ...@@ -205,10 +210,11 @@
// toolStrip1 // toolStrip1
// //
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.settingsToolStripButton}); this.settingsToolStripButton,
this.addReaderToolStripButton});
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(544, 25); this.toolStrip1.Size = new System.Drawing.Size(733, 25);
this.toolStrip1.TabIndex = 16; this.toolStrip1.TabIndex = 16;
this.toolStrip1.Text = "toolStrip1"; this.toolStrip1.Text = "toolStrip1";
// //
...@@ -252,11 +258,21 @@ ...@@ -252,11 +258,21 @@
this.cardPlaceLabel3.TabIndex = 25; this.cardPlaceLabel3.TabIndex = 25;
this.cardPlaceLabel3.Text = "00.00.00"; this.cardPlaceLabel3.Text = "00.00.00";
// //
// addReaderToolStripButton
//
this.addReaderToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.addReaderToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("addReaderToolStripButton.Image")));
this.addReaderToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.addReaderToolStripButton.Name = "addReaderToolStripButton";
this.addReaderToolStripButton.Size = new System.Drawing.Size(23, 22);
this.addReaderToolStripButton.Text = "Add new reader window";
this.addReaderToolStripButton.Click += new System.EventHandler(this.addReaderToolStripButton_Click);
//
// 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(544, 388); this.ClientSize = new System.Drawing.Size(733, 392);
this.Controls.Add(this.cardPlaceLabel3); this.Controls.Add(this.cardPlaceLabel3);
this.Controls.Add(this.cardPlaceLabel2); this.Controls.Add(this.cardPlaceLabel2);
this.Controls.Add(this.cardPlaceLabel1); this.Controls.Add(this.cardPlaceLabel1);
...@@ -311,6 +327,7 @@ ...@@ -311,6 +327,7 @@
private System.Windows.Forms.Label cardPlaceLabel1; private System.Windows.Forms.Label cardPlaceLabel1;
private System.Windows.Forms.Label cardPlaceLabel2; private System.Windows.Forms.Label cardPlaceLabel2;
private System.Windows.Forms.Label cardPlaceLabel3; private System.Windows.Forms.Label cardPlaceLabel3;
private System.Windows.Forms.ToolStripButton addReaderToolStripButton;
} }
} }
...@@ -175,7 +175,7 @@ namespace CardDisplay ...@@ -175,7 +175,7 @@ namespace CardDisplay
try try
{ {
ret = client.MakeRequest("meta/v1/printedcard/" + card.cardId + "/card-filing"); ret = client.MakeRequest("meta/v1/printedcard/" + card.id + "/card-filing");
} }
catch (ApplicationException ex) catch (ApplicationException ex)
{ {
...@@ -194,7 +194,7 @@ namespace CardDisplay ...@@ -194,7 +194,7 @@ namespace CardDisplay
slot1ReaderEventId = re.readerEventId; slot1ReaderEventId = re.readerEventId;
slot1Cards.Add(card); slot1Cards.Add(card);
pictureBox1.ImageLocation = RestClient.GetRequestURL(Properties.Settings.Default.ApiURL, "card/GetImage/" + card.cardId); pictureBox1.ImageLocation = RestClient.GetRequestURL(Properties.Settings.Default.ApiURL, "card/GetImage/" + card.id);
pictureBox1.Tag = re.eventuser; pictureBox1.Tag = re.eventuser;
slot1SelectedCard = card; slot1SelectedCard = card;
break; break;
...@@ -235,7 +235,7 @@ namespace CardDisplay ...@@ -235,7 +235,7 @@ namespace CardDisplay
try try
{ {
ret = client.MakeRequest("meta/v1/printedcard/" + card.eventuserId + "/card-filing"); ret = client.MakeRequest("meta/v1/printedcard/" + card.id + "/card-filing");
} }
catch (ApplicationException ex) catch (ApplicationException ex)
{ {
...@@ -255,7 +255,7 @@ namespace CardDisplay ...@@ -255,7 +255,7 @@ namespace CardDisplay
slot2ReaderEventId = re.readerEventId; slot2ReaderEventId = re.readerEventId;
slot2Cards.Add(card); slot2Cards.Add(card);
pictureBox2.ImageLocation = RestClient.GetRequestURL(Properties.Settings.Default.ApiURL, "card/GetImage/" + card.eventuserId); pictureBox2.ImageLocation = RestClient.GetRequestURL(Properties.Settings.Default.ApiURL, "card/GetImage/" + card.id);
pictureBox2.Tag = re.eventuser; pictureBox2.Tag = re.eventuser;
slot2SelectedCard = card; slot2SelectedCard = card;
break; break;
...@@ -264,7 +264,7 @@ namespace CardDisplay ...@@ -264,7 +264,7 @@ namespace CardDisplay
} }
catch (Exception ex) catch (Exception ex)
{ {
Console.WriteLine("Catched exception: " + ex.Message);
} }
} }
} }
...@@ -295,7 +295,7 @@ namespace CardDisplay ...@@ -295,7 +295,7 @@ namespace CardDisplay
try try
{ {
ret = client.MakeRequest("meta/v1/printedcard/" + card.cardId + "/card-filing"); ret = client.MakeRequest("meta/v1/printedcard/" + card.id + "/card-filing");
} }
catch (ApplicationException ex) catch (ApplicationException ex)
{ {
...@@ -315,7 +315,7 @@ namespace CardDisplay ...@@ -315,7 +315,7 @@ namespace CardDisplay
slot3ReaderEventId = re.readerEventId; slot3ReaderEventId = re.readerEventId;
slot3Cards.Add(card); slot3Cards.Add(card);
pictureBox3.ImageLocation = RestClient.GetRequestURL(Properties.Settings.Default.ApiURL, "card/GetImage/" + card.cardId); pictureBox3.ImageLocation = RestClient.GetRequestURL(Properties.Settings.Default.ApiURL, "card/GetImage/" + card.id);
pictureBox3.Tag = re.eventuser; pictureBox3.Tag = re.eventuser;
slot3SelectedCard = card; slot3SelectedCard = card;
break; break;
...@@ -398,7 +398,7 @@ namespace CardDisplay ...@@ -398,7 +398,7 @@ namespace CardDisplay
if (i >= 0) if (i >= 0)
{ {
slot1SelectedCard = slot1Cards[i]; slot1SelectedCard = slot1Cards[i];
pictureBox1.ImageLocation = RestClient.GetRequestURL( Properties.Settings.Default.ApiURL , "card/GetImage/" + slot1SelectedCard.cardId); pictureBox1.ImageLocation = RestClient.GetRequestURL( Properties.Settings.Default.ApiURL , "card/GetImage/" + slot1SelectedCard.id);
} }
} }
} }
...@@ -411,7 +411,7 @@ namespace CardDisplay ...@@ -411,7 +411,7 @@ namespace CardDisplay
if (i >= 0) if (i >= 0)
{ {
slot2SelectedCard = slot2Cards[i]; slot2SelectedCard = slot2Cards[i];
pictureBox2.ImageLocation = RestClient.GetRequestURL( Properties.Settings.Default.ApiURL, "card/GetImage/" + slot2SelectedCard.cardId); pictureBox2.ImageLocation = RestClient.GetRequestURL( Properties.Settings.Default.ApiURL, "card/GetImage/" + slot2SelectedCard.id);
} }
} }
} }
...@@ -424,7 +424,7 @@ namespace CardDisplay ...@@ -424,7 +424,7 @@ namespace CardDisplay
if (i >= 0) if (i >= 0)
{ {
slot3SelectedCard = slot1Cards[i]; slot3SelectedCard = slot1Cards[i];
pictureBox3.ImageLocation = RestClient.GetRequestURL( Properties.Settings.Default.ApiURL, "card/GetImage/" + slot3SelectedCard.cardId); pictureBox3.ImageLocation = RestClient.GetRequestURL( Properties.Settings.Default.ApiURL, "card/GetImage/" + slot3SelectedCard.id);
} }
} }
} }
...@@ -437,7 +437,7 @@ namespace CardDisplay ...@@ -437,7 +437,7 @@ namespace CardDisplay
if (i <= (slot1Cards.Count - 1)) if (i <= (slot1Cards.Count - 1))
{ {
slot1SelectedCard = slot1Cards[i]; slot1SelectedCard = slot1Cards[i];
pictureBox1.ImageLocation = RestClient.GetRequestURL( Properties.Settings.Default.ApiURL, "card/GetImage/" + slot1SelectedCard.cardId); pictureBox1.ImageLocation = RestClient.GetRequestURL( Properties.Settings.Default.ApiURL, "card/GetImage/" + slot1SelectedCard.id);
} }
} }
} }
...@@ -450,7 +450,7 @@ namespace CardDisplay ...@@ -450,7 +450,7 @@ namespace CardDisplay
if (i <= (slot2Cards.Count - 1)) if (i <= (slot2Cards.Count - 1))
{ {
slot2SelectedCard = slot2Cards[i]; slot2SelectedCard = slot2Cards[i];
pictureBox2.ImageLocation = RestClient.GetRequestURL( Properties.Settings.Default.ApiURL, "card/GetImage/" + slot2SelectedCard.cardId); pictureBox2.ImageLocation = RestClient.GetRequestURL( Properties.Settings.Default.ApiURL, "card/GetImage/" + slot2SelectedCard.id);
} }
} }
} }
...@@ -463,7 +463,7 @@ namespace CardDisplay ...@@ -463,7 +463,7 @@ namespace CardDisplay
if (i <= (slot3Cards.Count - 1)) if (i <= (slot3Cards.Count - 1))
{ {
slot3SelectedCard = slot2Cards[i]; slot3SelectedCard = slot2Cards[i];
pictureBox3.ImageLocation = RestClient.GetRequestURL( Properties.Settings.Default.ApiURL, "card/GetImage/" + slot3SelectedCard.cardId); pictureBox3.ImageLocation = RestClient.GetRequestURL( Properties.Settings.Default.ApiURL, "card/GetImage/" + slot3SelectedCard.id);
} }
} }
} }
...@@ -473,5 +473,41 @@ namespace CardDisplay ...@@ -473,5 +473,41 @@ namespace CardDisplay
ApiSettings frm = new ApiSettings(); ApiSettings frm = new ApiSettings();
frm.ShowDialog(); frm.ShowDialog();
} }
private void button1_Click(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
}
private void pictureBox4_Click(object sender, EventArgs e)
{
}
private void pictureBox3_Click(object sender, EventArgs e)
{
}
private void pictureBox2_Click(object sender, EventArgs e)
{
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
private void addReaderToolStripButton_Click(object sender, EventArgs e)
{
ReaderForm frm = new ReaderForm();
frm.Show();
}
} }
} }
...@@ -142,4 +142,15 @@ ...@@ -142,4 +142,15 @@
PKycdQEAAAAASUVORK5CYII= PKycdQEAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="addReaderToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEbSURBVDhPldO/S0JRGMbxO9gsYZtgtTu4NNSaf0D/QNBU
Q4u6qFRrDg3uCtGWDY0N/ViaWhx1EUSIhDaLoB8g1fe5nnO5Xq55euDDfT2c98XjPXozsoB1VHGNIZ7R
wS1OUcEigqzBNrzhx8Eu/GTwjbhNf9mBnwQ+cIIjXKKPeUPzCNLGwaQMksQ+4ppvMJUmBihgRQsmacQN
qGEq2qgjPEIbejhDCV9mLewYM5NDES108YkxwgPO8a/cQY36sfXUN3XOEt6hxivzlCy8OjawCZ1L9RbC
WYbekm7jIeyAMvxiz3wYmVpD46L1J9gB93AeoMv2CtssL3AeoDcSbhbt9x6gM29Dt0u1LlM0DUQHXMA5
KejvbJu5td7qL1p9gf54+ekqAAAAAElFTkSuQmCC
</value>
</data>
</root> </root>
\ No newline at end of file
namespace CardDisplay.Forms
{
partial class ReaderForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.cardPlaceLabel1 = new System.Windows.Forms.Label();
this.forwardSlot1Button = new System.Windows.Forms.Button();
this.prevSlot1Button = new System.Windows.Forms.Button();
this.readersComboBox1 = new System.Windows.Forms.ComboBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.slot1Timer = new System.Windows.Forms.Timer(this.components);
this.timer1 = new System.Windows.Forms.Timer(this.components);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// cardPlaceLabel1
//
this.cardPlaceLabel1.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.cardPlaceLabel1.AutoSize = true;
this.cardPlaceLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cardPlaceLabel1.Location = new System.Drawing.Point(49, 52);
this.cardPlaceLabel1.Name = "cardPlaceLabel1";
this.cardPlaceLabel1.Size = new System.Drawing.Size(151, 37);
this.cardPlaceLabel1.TabIndex = 28;
this.cardPlaceLabel1.Text = "00.00.00";
//
// forwardSlot1Button
//
this.forwardSlot1Button.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.forwardSlot1Button.Location = new System.Drawing.Point(202, 390);
this.forwardSlot1Button.Name = "forwardSlot1Button";
this.forwardSlot1Button.Size = new System.Drawing.Size(28, 23);
this.forwardSlot1Button.TabIndex = 27;
this.forwardSlot1Button.Text = ">>";
this.forwardSlot1Button.UseVisualStyleBackColor = true;
this.forwardSlot1Button.Click += new System.EventHandler(this.forwardSlot1Button_Click);
//
// prevSlot1Button
//
this.prevSlot1Button.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.prevSlot1Button.Location = new System.Drawing.Point(12, 390);
this.prevSlot1Button.Name = "prevSlot1Button";
this.prevSlot1Button.Size = new System.Drawing.Size(28, 23);
this.prevSlot1Button.TabIndex = 26;
this.prevSlot1Button.Text = "<<";
this.prevSlot1Button.UseVisualStyleBackColor = true;
this.prevSlot1Button.Click += new System.EventHandler(this.prevSlot1Button_Click);
//
// readersComboBox1
//
this.readersComboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.readersComboBox1.FormattingEnabled = true;
this.readersComboBox1.Location = new System.Drawing.Point(12, 24);
this.readersComboBox1.Name = "readersComboBox1";
this.readersComboBox1.Size = new System.Drawing.Size(218, 21);
this.readersComboBox1.TabIndex = 25;
this.readersComboBox1.SelectedIndexChanged += new System.EventHandler(this.readersComboBox1_SelectedIndexChanged);
//
// pictureBox1
//
this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pictureBox1.Location = new System.Drawing.Point(12, 92);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(218, 292);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 24;
this.pictureBox1.TabStop = false;
//
// slot1Timer
//
this.slot1Timer.Interval = 500;
this.slot1Timer.Tick += new System.EventHandler(this.slot1Timer_Tick);
//
// timer1
//
this.timer1.Interval = 4000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// ReaderForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(242, 425);
this.Controls.Add(this.cardPlaceLabel1);
this.Controls.Add(this.forwardSlot1Button);
this.Controls.Add(this.prevSlot1Button);
this.Controls.Add(this.readersComboBox1);
this.Controls.Add(this.pictureBox1);
this.Name = "ReaderForm";
this.Text = "ReaderForm";
this.Load += new System.EventHandler(this.ReaderForm_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label cardPlaceLabel1;
private System.Windows.Forms.Button forwardSlot1Button;
private System.Windows.Forms.Button prevSlot1Button;
private System.Windows.Forms.ComboBox readersComboBox1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Timer slot1Timer;
private System.Windows.Forms.Timer timer1;
}
}
\ No newline at end of file
using MoyaAdminLib;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Web.Script.Serialization;
using System.Windows.Forms;
namespace CardDisplay.Forms
{
public partial class ReaderForm : Form
{
public ReaderForm()
{
InitializeComponent();
}
private void ReaderForm_Load(object sender, EventArgs e)
{
if (Properties.Settings.Default.ApiURL != null && Properties.Settings.Default.ApiURL != "")
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
timer1.Stop();
RestClient client = new RestClient(Properties.Settings.Default.ApiURL);
try
{
ret = client.MakeRequest("reader/List");
var ser = new JavaScriptSerializer();
ReaderList readers = ser.Deserialize<ReaderList>(ret);
readersComboBox1.Items.Clear();
foreach (Reader reader in readers.readers)
{
readersComboBox1.Items.Add(reader);
}
}
catch (Exception ex)
{
ret = ex.Message;
}
}
string statePrinted = "PRINTED";
string CARD_PLACE = "cardplace";
List<Card> slot1Cards = new List<Card>();
Card slot1SelectedCard = null;
int slot1ReaderEventId = 0;
string ret = "";
private void Form1_Resize(object sender, EventArgs e)
{
}
private void prevSlot1Button_Click(object sender, EventArgs e)
{
if (slot1SelectedCard != null && slot1Cards.Count > 1)
{
int i = slot1Cards.IndexOf(slot1SelectedCard) - 1;
if (i >= 0)
{
slot1SelectedCard = slot1Cards[i];
pictureBox1.ImageLocation = RestClient.GetRequestURL(Properties.Settings.Default.ApiURL, "card/GetImage/" + slot1SelectedCard.id);
}
}
}
private void forwardSlot1Button_Click(object sender, EventArgs e)
{
if (slot1SelectedCard != null && slot1Cards.Count > 1)
{
int i = slot1Cards.IndexOf(slot1SelectedCard);
if (i <= (slot1Cards.Count - 1))
{
slot1SelectedCard = slot1Cards[i];
pictureBox1.ImageLocation = RestClient.GetRequestURL(Properties.Settings.Default.ApiURL, "card/GetImage/" + slot1SelectedCard.id);
}
}
}
private void readersComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
slot1Timer.Enabled = true;
}
private void slot1Timer_Tick(object sender, EventArgs e)
{
if (readersComboBox1.SelectedItem != null)
{
Reader reader = (Reader)readersComboBox1.SelectedItem;
RestClient client = new RestClient(Properties.Settings.Default.ApiURL);
try
{
ret = client.MakeRequest("reader/readerevents/" + reader.readerId + "/" + slot1ReaderEventId);
var ser = new JavaScriptSerializer();
ReaderEventList events = ser.Deserialize<ReaderEventList>(ret);
events.readerEvents = events.readerEvents.OrderByDescending(r => r.readerEventTime).ToList();
foreach (ReaderEvent re in events.readerEvents)
{
if (re.eventuser != null && pictureBox1.Tag != null && pictureBox1.Tag is Eventuser && ((Eventuser)pictureBox1.Tag).eventuserId == re.eventuser.eventuserId)
continue;
if (re.eventuser != null)
{
client = new RestClient(Properties.Settings.Default.ApiURL);
ret = client.MakeRequest("user/card/" + re.eventuser.eventuserId);
Card card = ser.Deserialize<Card>(ret);
try
{
ret = client.MakeRequest("meta/v1/printedcard/" + card.id + "/card-filing");
}
catch (ApplicationException ex)
{
if (!ex.Message.Contains("HTTP NoContent"))
return;
}
if (ret != null && ret != "")
{
MetaData data = getValue(ret);
if (data != null)
cardPlaceLabel1.Text = data.value;
else
cardPlaceLabel1.Text = "00.00.00";
}
else
cardPlaceLabel1.Text = "0.0.0";
slot1ReaderEventId = re.readerEventId;
slot1Cards.Add(card);
pictureBox1.ImageLocation = RestClient.GetRequestURL(Properties.Settings.Default.ApiURL, "card/GetImage/" + card.id);
pictureBox1.Tag = re.eventuser;
slot1SelectedCard = card;
break;
}
}
}
catch (Exception ex)
{
}
}
}
public void getCardPlace(MetaData data, out int bookNumber, out int pageNumber, out int slotNumber)
{
bookNumber = 0;
pageNumber = 0;
slotNumber = 0;
if (data != null)
{
if (data.key == CARD_PLACE)
{
if (data.value != null && data.value != "")
{
string[] fields = data.value.Split(new string[] { "." }, StringSplitOptions.None);
if (fields.Length > 2)
{
if (fields.Length == 3)
{
int.TryParse(fields[0], out bookNumber);
int.TryParse(fields[1], out pageNumber);
int.TryParse(fields[2], out slotNumber);
}
}
}
}
}
}
private MetaData getValue(string ret)
{
MetaData data = null;
if (ret != null && ret != "")
{
ret = ret.Trim();
if (ret.StartsWith("{") && ret.EndsWith("}"))
{
ret = ret.Replace("{", "");
ret = ret.Replace("}", "");
if (ret.Contains(":"))
{
data = new MetaData();
string[] fields = ret.Split(new string[] { ":" }, StringSplitOptions.RemoveEmptyEntries);
if (fields.Length == 2)
{
if (fields[0].StartsWith("\""))
fields[0] = fields[0].Substring(1, fields[0].Length - 1);
if (fields[0].EndsWith("\""))
fields[0] = fields[0].Substring(0, fields[0].Length - 1);
data.key = fields[0];
if (fields[1].StartsWith("\""))
fields[1] = fields[1].Substring(1, fields[1].Length - 1);
if (fields[1].EndsWith("\""))
fields[1] = fields[1].Substring(0, fields[1].Length - 1);
data.value = fields[1];
}
}
}
}
return data;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="slot1Timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>104, 17</value>
</metadata>
</root>
\ No newline at end of file
...@@ -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.3.0")] [assembly: AssemblyVersion("1.0.6.0")]
[assembly: AssemblyFileVersion("1.0.3.0")] [assembly: AssemblyFileVersion("1.0.6.0")]
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
Name "CardDisplay moya v1_00_03" Name "CardDisplay moya v1_00_06"
; 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_03" SecMain Section "!CardDisplay moya stable v1_00_06" SecMain
SetShellVarContext current SetShellVarContext current
...@@ -212,9 +212,9 @@ Section "!CardDisplay moya stable v1_00_03" SecMain ...@@ -212,9 +212,9 @@ Section "!CardDisplay moya stable v1_00_03" SecMain
SetOverwrite On SetOverwrite On
File /oname=autoupdate.xml "I:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Debug\autoupdate.moya.xml" File /oname=autoupdate.xml "C:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Release\autoupdate.moya.xml"
File /oname=CardDisplay.exe "I:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Debug\CardDisplay.exe" File /oname=CardDisplay.exe "C:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Release\CardDisplay.exe"
File autoupdate.crt File autoupdate.crt
...@@ -224,10 +224,9 @@ Section "!CardDisplay moya stable v1_00_03" SecMain ...@@ -224,10 +224,9 @@ Section "!CardDisplay moya stable v1_00_03" SecMain
; that is referenced to the main project. ; that is referenced to the main project.
File "I:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Debug\MoyaAdminLib.dll" File "C:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Release\MoyaAdminLib.dll"
File "I:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Debug\CardDisplay.pdb" File "C:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Release\CardDisplay.pdb"
File "I:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Debug\MoyaAdminLib.pdb"
...@@ -315,10 +314,9 @@ Section "Uninstall" ...@@ -315,10 +314,9 @@ Section "Uninstall"
; that is referenced to the main project. ; that is referenced to the main project.
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Debug\MoyaAdminLib.dll" Delete "$INSTDIR\C:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Release\MoyaAdminLib.dll"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Debug\CardDisplay.pdb" Delete "$INSTDIR\C:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Release\CardDisplay.pdb"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\CardDisplay\CardDisplay\CardDisplay\bin\Debug\MoyaAdminLib.pdb"
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace MoyaSignup
{
public class HeartBeatMonitor
{
Thread thdMonitorLoop;
private bool run = true;
public HeartBeatMonitor()
{
thdMonitorLoop = new Thread(new ThreadStart(monitorLoop));
thdMonitorLoop.Start();
}
public void Stop()
{
run = false;
}
private void monitorLoop()
{
while (run)
{
Thread.Sleep(100);
if (Program.HeartBeat.AddMilliseconds(4000) < System.DateTime.Now)
{
Application.Run(new MoyaSignup.WaitForm());
}
}
}
}
}
...@@ -113,6 +113,7 @@ ...@@ -113,6 +113,7 @@
<Compile Include="Form1.Designer.cs"> <Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon> <DependentUpon>Form1.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="HeartBeatMonitor.cs" />
<Compile Include="mjpeg\ByteArrayUtils.cs" /> <Compile Include="mjpeg\ByteArrayUtils.cs" />
<Compile Include="mjpeg\MJPEGConfiguration.cs" /> <Compile Include="mjpeg\MJPEGConfiguration.cs" />
<Compile Include="mjpeg\MJPEGSource.cs" /> <Compile Include="mjpeg\MJPEGSource.cs" />
...@@ -122,6 +123,8 @@ ...@@ -122,6 +123,8 @@
<Compile Include="mjpeg\SourceDescriptions.cs" /> <Compile Include="mjpeg\SourceDescriptions.cs" />
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="WaitForm.cs" />
<Compile Include="WaitForm.Designer.cs" />
<EmbeddedResource Include="ApiSettings.resx"> <EmbeddedResource Include="ApiSettings.resx">
<DependentUpon>ApiSettings.cs</DependentUpon> <DependentUpon>ApiSettings.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -151,6 +154,7 @@ ...@@ -151,6 +154,7 @@
<EmbeddedResource Include="UserLoginControl.resx"> <EmbeddedResource Include="UserLoginControl.resx">
<DependentUpon>UserLoginControl.cs</DependentUpon> <DependentUpon>UserLoginControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="WaitForm.resx" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>
......
...@@ -8,6 +8,7 @@ namespace MoyaSignup ...@@ -8,6 +8,7 @@ namespace MoyaSignup
static class Program static class Program
{ {
public static Form1 form1; public static Form1 form1;
public static DateTime HeartBeat = System.DateTime.Now;
/// <summary> /// <summary>
/// The main entry point for the application. /// The main entry point for the application.
...@@ -27,10 +28,12 @@ namespace MoyaSignup ...@@ -27,10 +28,12 @@ namespace MoyaSignup
Properties.Settings.Default.Upgrade(); Properties.Settings.Default.Upgrade();
Properties.Settings.Default.ApplicationVersion = appVersionString; Properties.Settings.Default.ApplicationVersion = appVersionString;
} }
//HeartBeatMonitor hbmon = new HeartBeatMonitor();
form1 = new Form1(); form1 = new Form1();
Application.Run(form1); Application.Run(form1);
//hbmon.Stop();
} }
} }
} }
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
this.pbIncoming.Location = new System.Drawing.Point(3, 3); this.pbIncoming.Location = new System.Drawing.Point(3, 3);
this.pbIncoming.Name = "pbIncoming"; this.pbIncoming.Name = "pbIncoming";
this.pbIncoming.Size = new System.Drawing.Size(299, 411); this.pbIncoming.Size = new System.Drawing.Size(299, 411);
this.pbIncoming.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pbIncoming.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.pbIncoming.TabIndex = 119; this.pbIncoming.TabIndex = 119;
this.pbIncoming.TabStop = false; this.pbIncoming.TabStop = false;
// //
......
...@@ -223,11 +223,11 @@ namespace MoyaSignup ...@@ -223,11 +223,11 @@ namespace MoyaSignup
if(c == null) if(c == null)
c = CameraService.AvailableCameras.First(); c = CameraService.AvailableCameras.First();
setFrameSource(new CameraFrameSource(c)); setFrameSource(new CameraFrameSource(c));
//_frameSource.Camera.CaptureWidth = 1024; _frameSource.Camera.CaptureWidth = 1280;
//_frameSource.Camera.CaptureHeight = 768; _frameSource.Camera.CaptureHeight = 720;
_frameSource.Camera.CaptureWidth = 640; //_frameSource.Camera.CaptureWidth = 640;
_frameSource.Camera.CaptureHeight = 480; //_frameSource.Camera.CaptureHeight = 480;
_frameSource.Camera.Fps = 50; _frameSource.Camera.Fps = 50;
_frameSource.NewFrame += OnImageCaptured; _frameSource.NewFrame += OnImageCaptured;
...@@ -265,9 +265,13 @@ namespace MoyaSignup ...@@ -265,9 +265,13 @@ namespace MoyaSignup
public void OnImageCaptured(Touchless.Vision.Contracts.IFrameSource frameSource, Touchless.Vision.Contracts.Frame frame, double fps) public void OnImageCaptured(Touchless.Vision.Contracts.IFrameSource frameSource, Touchless.Vision.Contracts.Frame frame, double fps)
{ {
latestFrame = BitmapFilter.Crop(frame.Image, RetangleWidth, RetangleHeight, ImageFilters.BitmapFilter.AnchorPosition.Free, 220, 220); int x = (frame.Image.Width - RetangleWidth)/2;
x = frame.Image.Width - x;
int y = (frame.Image.Height - RetangleHeight)/2;
y = frame.Image.Height - y;
latestFrame = BitmapFilter.Crop(frame.Image, RetangleWidth, RetangleHeight, ImageFilters.BitmapFilter.AnchorPosition.Free, 0, 0);
//_latestFrame.RotateFlip(RotateFlipType.RotateNoneFlipY); //_latestFrame.RotateFlip(RotateFlipType.RotateNoneFlipY);
......
namespace MoyaSignup
{
partial class WaitForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WaitForm));
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.label3 = new System.Windows.Forms.Label();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(108, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(139, 16);
this.label1.TabIndex = 0;
this.label1.Text = "Ohjelma odottaa verkkoa... ";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(48, 102);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(260, 13);
this.label2.TabIndex = 1;
this.label2.Text = "Odota sulkematta ohjelmaa vähintään minuutin verran";
//
// timer1
//
this.timer1.Enabled = true;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// label3
//
this.label3.Location = new System.Drawing.Point(32, 35);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(302, 56);
this.label3.TabIndex = 2;
this.label3.Text = resources.GetString("label3.Text");
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(12, 118);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(322, 10);
this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
this.progressBar1.TabIndex = 3;
this.progressBar1.Value = 50;
//
// WaitForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(346, 140);
this.ControlBox = false;
this.Controls.Add(this.progressBar1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "WaitForm";
this.Text = "Odota";
this.TopMost = true;
this.Load += new System.EventHandler(this.WaitForm_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ProgressBar progressBar1;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MoyaSignup
{
public partial class WaitForm : Form
{
public WaitForm()
{
InitializeComponent();
}
private void timer1_Tick(object sender, EventArgs e)
{
if (Program.HeartBeat.AddMilliseconds(4000) > System.DateTime.Now)
{
this.Close();
}
}
private void WaitForm_Load(object sender, EventArgs e)
{
this.BringToFront();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="label3.Text" xml:space="preserve">
<value>Mikäli vika on verkkoyhteydessä tämä ikkuna sulkeutuu verkkoyhteyden palattua ja ohjelma jatkaa toimintaansa.
Mikäli näet tämän ilmoituksen usein tarkista ettei käytössäsi ole langaton yhteys tai mobili internetyhteys.
</value>
</data>
</root>
\ 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!