Commit 258f0580 by Liv Haapala

pieniä muutoksia softiin

1 parent 84ed809c
Showing with 96 additions and 56 deletions
...@@ -235,7 +235,7 @@ namespace CardDisplay ...@@ -235,7 +235,7 @@ namespace CardDisplay
try try
{ {
ret = client.MakeRequest("meta/v1/printedcard/" + card.cardId + "/card-filing"); ret = client.MakeRequest("meta/v1/printedcard/" + card.eventuserId + "/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.cardId); pictureBox2.ImageLocation = RestClient.GetRequestURL(Properties.Settings.Default.ApiURL, "card/GetImage/" + card.eventuserId);
pictureBox2.Tag = re.eventuser; pictureBox2.Tag = re.eventuser;
slot2SelectedCard = card; slot2SelectedCard = card;
break; break;
......
...@@ -16,6 +16,7 @@ namespace MoyaAdminLib ...@@ -16,6 +16,7 @@ namespace MoyaAdminLib
//{"id":3990,"state":"PENDING_VALIDATION","cardTemplate":"pelaaja","username":"Miketzu","wholeName":"Mirco Renko"} //{"id":3990,"state":"PENDING_VALIDATION","cardTemplate":"pelaaja","username":"Miketzu","wholeName":"Mirco Renko"}
public int id; public int id;
public int eventuserId; public int eventuserId;
public int cardId;
public DateTime printTime; public DateTime printTime;
public string state; public string state;
public string template; public string template;
......
...@@ -8,7 +8,6 @@ D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaA ...@@ -8,7 +8,6 @@ D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaA
I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.dll.config I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.dll.config
I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.dll I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.dll
I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.pdb I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.pdb
I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.csprojResolveAssemblyReference.cache
I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.Controls.EventUserEditor.resources I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.Controls.EventUserEditor.resources
I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.csproj.GenerateResource.Cache I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.csproj.GenerateResource.Cache
I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.dll I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.dll
......
...@@ -51,6 +51,10 @@ ...@@ -51,6 +51,10 @@
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.orgMealToolStripButton = new System.Windows.Forms.ToolStripButton(); this.orgMealToolStripButton = new System.Windows.Forms.ToolStripButton();
this.TopPanel = new System.Windows.Forms.Panel(); this.TopPanel = new System.Windows.Forms.Panel();
this.freePlacesCountTextBox = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.reservedPlacesCountTextBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.MapsComboBox = new System.Windows.Forms.ComboBox(); this.MapsComboBox = new System.Windows.Forms.ComboBox();
this.searchTextBox = new System.Windows.Forms.TextBox(); this.searchTextBox = new System.Windows.Forms.TextBox();
...@@ -58,11 +62,9 @@ ...@@ -58,11 +62,9 @@
this.searchTimer = new System.Windows.Forms.Timer(this.components); this.searchTimer = new System.Windows.Forms.Timer(this.components);
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.label1 = new System.Windows.Forms.Label();
this.reservedPlacesCountTextBox = new System.Windows.Forms.TextBox();
this.freePlacesCountTextBox = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.placesCountTimer = new System.Windows.Forms.Timer(this.components); this.placesCountTimer = new System.Windows.Forms.Timer(this.components);
this.allPlacesCountTextBox = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.MapPictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.MapPictureBox)).BeginInit();
this.toolStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout();
this.TopPanel.SuspendLayout(); this.TopPanel.SuspendLayout();
...@@ -270,6 +272,8 @@ ...@@ -270,6 +272,8 @@
// //
// TopPanel // TopPanel
// //
this.TopPanel.Controls.Add(this.allPlacesCountTextBox);
this.TopPanel.Controls.Add(this.label4);
this.TopPanel.Controls.Add(this.freePlacesCountTextBox); this.TopPanel.Controls.Add(this.freePlacesCountTextBox);
this.TopPanel.Controls.Add(this.label2); this.TopPanel.Controls.Add(this.label2);
this.TopPanel.Controls.Add(this.reservedPlacesCountTextBox); this.TopPanel.Controls.Add(this.reservedPlacesCountTextBox);
...@@ -282,6 +286,40 @@ ...@@ -282,6 +286,40 @@
this.TopPanel.Size = new System.Drawing.Size(752, 45); this.TopPanel.Size = new System.Drawing.Size(752, 45);
this.TopPanel.TabIndex = 15; this.TopPanel.TabIndex = 15;
// //
// freePlacesCountTextBox
//
this.freePlacesCountTextBox.Location = new System.Drawing.Point(418, 18);
this.freePlacesCountTextBox.Name = "freePlacesCountTextBox";
this.freePlacesCountTextBox.ReadOnly = true;
this.freePlacesCountTextBox.Size = new System.Drawing.Size(100, 20);
this.freePlacesCountTextBox.TabIndex = 10;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(362, 21);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(46, 13);
this.label2.TabIndex = 9;
this.label2.Text = "Avoinna";
//
// reservedPlacesCountTextBox
//
this.reservedPlacesCountTextBox.Location = new System.Drawing.Point(251, 18);
this.reservedPlacesCountTextBox.Name = "reservedPlacesCountTextBox";
this.reservedPlacesCountTextBox.ReadOnly = true;
this.reservedPlacesCountTextBox.Size = new System.Drawing.Size(100, 20);
this.reservedPlacesCountTextBox.TabIndex = 8;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(204, 21);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 13);
this.label1.TabIndex = 7;
this.label1.Text = "Varattu";
//
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
...@@ -341,44 +379,27 @@ ...@@ -341,44 +379,27 @@
this.panel2.Size = new System.Drawing.Size(752, 471); this.panel2.Size = new System.Drawing.Size(752, 471);
this.panel2.TabIndex = 17; this.panel2.TabIndex = 17;
// //
// label1 // placesCountTimer
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(204, 21);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 13);
this.label1.TabIndex = 7;
this.label1.Text = "Varattu";
//
// reservedPlacesCountTextBox
//
this.reservedPlacesCountTextBox.Location = new System.Drawing.Point(251, 18);
this.reservedPlacesCountTextBox.Name = "reservedPlacesCountTextBox";
this.reservedPlacesCountTextBox.ReadOnly = true;
this.reservedPlacesCountTextBox.Size = new System.Drawing.Size(100, 20);
this.reservedPlacesCountTextBox.TabIndex = 8;
//
// freePlacesCountTextBox
// //
this.freePlacesCountTextBox.Location = new System.Drawing.Point(418, 18); this.placesCountTimer.Interval = 60000;
this.freePlacesCountTextBox.Name = "freePlacesCountTextBox"; this.placesCountTimer.Tick += new System.EventHandler(this.placesCountTimer_Tick);
this.freePlacesCountTextBox.ReadOnly = true;
this.freePlacesCountTextBox.Size = new System.Drawing.Size(100, 20);
this.freePlacesCountTextBox.TabIndex = 10;
// //
// label2 // allPlacesCountTextBox
// //
this.label2.AutoSize = true; this.allPlacesCountTextBox.Location = new System.Drawing.Point(580, 18);
this.label2.Location = new System.Drawing.Point(362, 21); this.allPlacesCountTextBox.Name = "allPlacesCountTextBox";
this.label2.Name = "label2"; this.allPlacesCountTextBox.ReadOnly = true;
this.label2.Size = new System.Drawing.Size(50, 13); this.allPlacesCountTextBox.Size = new System.Drawing.Size(100, 20);
this.label2.TabIndex = 9; this.allPlacesCountTextBox.TabIndex = 12;
this.label2.Text = "Vapaana";
// //
// placesCountTimer // label4
// //
this.placesCountTimer.Interval = 60000; this.label4.AutoSize = true;
this.placesCountTimer.Tick += new System.EventHandler(this.placesCountTimer_Tick); this.label4.Location = new System.Drawing.Point(524, 21);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(36, 13);
this.label4.TabIndex = 11;
this.label4.Text = "Kaikki";
// //
// MainForm // MainForm
// //
...@@ -442,6 +463,8 @@ ...@@ -442,6 +463,8 @@
private System.Windows.Forms.TextBox reservedPlacesCountTextBox; private System.Windows.Forms.TextBox reservedPlacesCountTextBox;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.Timer placesCountTimer; private System.Windows.Forms.Timer placesCountTimer;
private System.Windows.Forms.TextBox allPlacesCountTextBox;
private System.Windows.Forms.Label label4;
} }
} }
...@@ -92,7 +92,8 @@ namespace MoyaAdminUI ...@@ -92,7 +92,8 @@ namespace MoyaAdminUI
} }
catch (Exception e) catch (Exception e)
{ {
MessageBox.Show("Could not connect to Moya server"); //MessageBox.Show("Could not connect to Moya server");
Console.WriteLine("Could not connect to Moya server");
} }
MapPictureBox.Refresh(); MapPictureBox.Refresh();
} }
...@@ -1195,15 +1196,24 @@ namespace MoyaAdminUI ...@@ -1195,15 +1196,24 @@ namespace MoyaAdminUI
{ {
int free = 0; int free = 0;
int reserved = 0; int reserved = 0;
int all = 0;
foreach (ListViewItem lvi in PlacesListView.Items) foreach (ListViewItem lvi in PlacesListView.Items)
{ {
if (lvi.Tag != null && lvi.Tag is ComputerPlace) if (lvi.Tag != null && lvi.Tag is ComputerPlace)
{ {
ComputerPlace place = (ComputerPlace)lvi.Tag; ComputerPlace place = (ComputerPlace)lvi.Tag;
if (place.Taken) if (place.Taken)
{
reserved += 1; reserved += 1;
all += 1;
}
else if (place.Buyable) else if (place.Buyable)
{
free += 1; free += 1;
all += 1;
}
else if (!place.Disabled)
all += 1;
} }
} }
if (freePlacesCountTextBox.Text != free.ToString()) if (freePlacesCountTextBox.Text != free.ToString())
...@@ -1223,6 +1233,8 @@ namespace MoyaAdminUI ...@@ -1223,6 +1233,8 @@ namespace MoyaAdminUI
{ {
reservedPlacesCountTextBox.Text = reserved.ToString(); reservedPlacesCountTextBox.Text = reserved.ToString();
} }
if (allPlacesCountTextBox.Text != all.ToString())
allPlacesCountTextBox.Text = all.ToString();
} }
private void MainForm_SizeChanged(object sender, EventArgs e) private void MainForm_SizeChanged(object sender, EventArgs e)
...@@ -1246,6 +1258,10 @@ namespace MoyaAdminUI ...@@ -1246,6 +1258,10 @@ namespace MoyaAdminUI
private void placesCountTimer_Tick(object sender, EventArgs e) private void placesCountTimer_Tick(object sender, EventArgs e)
{ {
PlacesListView.Items.Clear();
loadComputerPlaces();
MapPictureBox.Refresh();
refreshPlacesCountTexBoxes(); refreshPlacesCountTexBoxes();
} }
......
...@@ -9,7 +9,7 @@ namespace moyaPrintServer ...@@ -9,7 +9,7 @@ namespace moyaPrintServer
{ {
public int id; public int id;
public string cardTemplate; public string template;
public string username; public string username;
public string wholeName; public string wholeName;
public string state; public string state;
......
...@@ -135,6 +135,7 @@ namespace moyaPrintServer ...@@ -135,6 +135,7 @@ namespace moyaPrintServer
pd.PrintPage += new PrintPageEventHandler(PrintPage); pd.PrintPage += new PrintPageEventHandler(PrintPage);
if(PrintersComboBox.SelectedItem != null)
pd.PrinterSettings.PrinterName = PrintersComboBox.SelectedItem.ToString(); pd.PrinterSettings.PrinterName = PrintersComboBox.SelectedItem.ToString();
pd.DefaultPageSettings = pd.PrinterSettings.DefaultPageSettings; pd.DefaultPageSettings = pd.PrinterSettings.DefaultPageSettings;
...@@ -231,7 +232,7 @@ namespace moyaPrintServer ...@@ -231,7 +232,7 @@ namespace moyaPrintServer
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
if (card.state == "VALIDATED" && (CardFilterTextBox.Text.Length == 0 || CardFilterTextBox.Text == card.cardTemplate)) if (card.state == "VALIDATED" && (CardFilterTextBox.Text.Length == 0 || CardFilterTextBox.Text == card.template))
{ {
ListViewItem lvi = listView.Items.Add(card.id.ToString()); ListViewItem lvi = listView.Items.Add(card.id.ToString());
...@@ -257,7 +258,7 @@ namespace moyaPrintServer ...@@ -257,7 +258,7 @@ namespace moyaPrintServer
foreach (PrintQueue pq in queueCollection) foreach (PrintQueue pq in queueCollection)
{ {
if (pq.FullName == PrintersComboBox.SelectedItem.ToString()) if (PrintersComboBox.SelectedItem != null && pq.FullName == PrintersComboBox.SelectedItem.ToString())
printQueue = pq; printQueue = pq;
} }
......
...@@ -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.25.0")] [assembly: AssemblyVersion("1.0.29.0")]
[assembly: AssemblyFileVersion("1.0.25.0")] [assembly: AssemblyFileVersion("1.0.29.0")]
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
Name "MoyaPrintServer moya v1_00_25" Name "MoyaPrintServer moya v1_00_29"
; 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 "!MoyaPrintServer moya stable v1_00_25" SecMain Section "!MoyaPrintServer moya stable v1_00_29" SecMain
SetShellVarContext current SetShellVarContext current
...@@ -212,9 +212,9 @@ Section "!MoyaPrintServer moya stable v1_00_25" SecMain ...@@ -212,9 +212,9 @@ Section "!MoyaPrintServer moya stable v1_00_25" SecMain
SetOverwrite On SetOverwrite On
File /oname=autoupdate.xml "I:\devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Release\autoupdate.moya.xml" File /oname=autoupdate.xml "I:\devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\autoupdate.moya.xml"
File /oname=moyaPrintServer.exe "I:\devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Release\moyaPrintServer.exe" File /oname=moyaPrintServer.exe "I:\devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\moyaPrintServer.exe"
File autoupdate.crt File autoupdate.crt
...@@ -224,10 +224,10 @@ Section "!MoyaPrintServer moya stable v1_00_25" SecMain ...@@ -224,10 +224,10 @@ Section "!MoyaPrintServer moya stable v1_00_25" SecMain
; that is referenced to the main project. ; that is referenced to the main project.
File "I:\devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Release\AutoUpdateLib.dll" File "I:\devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\AutoUpdateLib.dll"
File "I:\devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Release\moyaPrintServer.pdb" File "I:\devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\moyaPrintServer.pdb"
File "I:\devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Release\AutoUpdateLib.pdb" File "I:\devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\AutoUpdateLib.pdb"
...@@ -315,10 +315,10 @@ Section "Uninstall" ...@@ -315,10 +315,10 @@ Section "Uninstall"
; that is referenced to the main project. ; that is referenced to the main project.
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Release\AutoUpdateLib.dll" Delete "$INSTDIR\I:\devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\AutoUpdateLib.dll"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Release\moyaPrintServer.pdb" Delete "$INSTDIR\I:\devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\moyaPrintServer.pdb"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Release\AutoUpdateLib.pdb" Delete "$INSTDIR\I:\devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\AutoUpdateLib.pdb"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!