Commit 59ebbffd by Tapio Haapala

Merge branch 'master' of gitlab.codecrew.fi:liv/moya-info-tools

Conflicts:
	PrintServer/moyaPrintServer/moyaPrintServer.suo
2 parents dbed5d2d dd63eef5
Showing with 63 additions and 19 deletions
......@@ -235,7 +235,7 @@ namespace CardDisplay
try
{
ret = client.MakeRequest("meta/v1/printedcard/" + card.cardId + "/card-filing");
ret = client.MakeRequest("meta/v1/printedcard/" + card.eventuserId + "/card-filing");
}
catch (ApplicationException ex)
{
......@@ -255,7 +255,7 @@ namespace CardDisplay
slot2ReaderEventId = re.readerEventId;
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;
slot2SelectedCard = card;
break;
......
......@@ -16,6 +16,7 @@ namespace MoyaAdminLib
//{"id":3990,"state":"PENDING_VALIDATION","cardTemplate":"pelaaja","username":"Miketzu","wholeName":"Mirco Renko"}
public int id;
public int eventuserId;
public int cardId;
public DateTime printTime;
public string state;
public string template;
......
......@@ -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
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.csproj.GenerateResource.Cache
I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.dll
......@@ -21,3 +20,4 @@ D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.pdb
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.pdb
D:\Devel\proj\moya-info-tools\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.csprojResolveAssemblyReference.cache
I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\obj\Debug\MoyaAdminLib.csprojResolveAssemblyReference.cache
......@@ -63,6 +63,8 @@
this.ImageRefreshTimer = new System.Windows.Forms.Timer(this.components);
this.panel2 = new System.Windows.Forms.Panel();
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();
this.toolStrip1.SuspendLayout();
this.TopPanel.SuspendLayout();
......@@ -271,6 +273,8 @@
//
// TopPanel
//
this.TopPanel.Controls.Add(this.allPlacesCountTextBox);
this.TopPanel.Controls.Add(this.label4);
this.TopPanel.Controls.Add(this.freePlacesCountTextBox);
this.TopPanel.Controls.Add(this.label2);
this.TopPanel.Controls.Add(this.reservedPlacesCountTextBox);
......@@ -296,6 +300,9 @@
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";
this.label2.Size = new System.Drawing.Size(50, 13);
this.label2.TabIndex = 9;
this.label2.Text = "Vapaana";
......@@ -381,6 +388,23 @@
this.placesCountTimer.Interval = 60000;
this.placesCountTimer.Tick += new System.EventHandler(this.placesCountTimer_Tick);
//
// allPlacesCountTextBox
//
this.allPlacesCountTextBox.Location = new System.Drawing.Point(580, 18);
this.allPlacesCountTextBox.Name = "allPlacesCountTextBox";
this.allPlacesCountTextBox.ReadOnly = true;
this.allPlacesCountTextBox.Size = new System.Drawing.Size(100, 20);
this.allPlacesCountTextBox.TabIndex = 12;
//
// label4
//
this.label4.AutoSize = true;
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
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
......@@ -443,6 +467,8 @@
private System.Windows.Forms.TextBox reservedPlacesCountTextBox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Timer placesCountTimer;
private System.Windows.Forms.TextBox allPlacesCountTextBox;
private System.Windows.Forms.Label label4;
}
}
......@@ -92,7 +92,8 @@ namespace MoyaAdminUI
}
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();
}
......@@ -1195,15 +1196,24 @@ namespace MoyaAdminUI
{
int free = 0;
int reserved = 0;
int all = 0;
foreach (ListViewItem lvi in PlacesListView.Items)
{
if (lvi.Tag != null && lvi.Tag is ComputerPlace)
{
ComputerPlace place = (ComputerPlace)lvi.Tag;
if (place.Taken)
{
reserved += 1;
all += 1;
}
else if (place.Buyable)
{
free += 1;
all += 1;
}
else if (!place.Disabled)
all += 1;
}
}
if (freePlacesCountTextBox.Text != free.ToString())
......@@ -1223,6 +1233,8 @@ namespace MoyaAdminUI
{
reservedPlacesCountTextBox.Text = reserved.ToString();
}
if (allPlacesCountTextBox.Text != all.ToString())
allPlacesCountTextBox.Text = all.ToString();
}
private void MainForm_SizeChanged(object sender, EventArgs e)
......@@ -1246,6 +1258,10 @@ namespace MoyaAdminUI
private void placesCountTimer_Tick(object sender, EventArgs e)
{
PlacesListView.Items.Clear();
loadComputerPlaces();
MapPictureBox.Refresh();
refreshPlacesCountTexBoxes();
}
......
......@@ -9,7 +9,7 @@ namespace moyaPrintServer
{
public int id;
public string cardTemplate;
public string template;
public string username;
public string wholeName;
public string state;
......
......@@ -135,6 +135,7 @@ namespace moyaPrintServer
pd.PrintPage += new PrintPageEventHandler(PrintPage);
if(PrintersComboBox.SelectedItem != null)
pd.PrinterSettings.PrinterName = PrintersComboBox.SelectedItem.ToString();
pd.DefaultPageSettings = pd.PrinterSettings.DefaultPageSettings;
......@@ -231,7 +232,7 @@ namespace moyaPrintServer
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
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());
......@@ -257,7 +258,7 @@ namespace moyaPrintServer
foreach (PrintQueue pq in queueCollection)
{
if (pq.FullName == PrintersComboBox.SelectedItem.ToString())
if (PrintersComboBox.SelectedItem != null && pq.FullName == PrintersComboBox.SelectedItem.ToString())
printQueue = pq;
}
......
......@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.25.0")]
[assembly: AssemblyFileVersion("1.0.25.0")]
[assembly: AssemblyVersion("1.0.29.0")]
[assembly: AssemblyFileVersion("1.0.29.0")]
......@@ -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.
......@@ -198,7 +198,7 @@ FunctionEnd
Section "!MoyaPrintServer moya stable v1_00_25" SecMain
Section "!MoyaPrintServer moya stable v1_00_29" SecMain
SetShellVarContext current
......@@ -212,9 +212,9 @@ Section "!MoyaPrintServer moya stable v1_00_25" SecMain
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
......@@ -224,10 +224,10 @@ Section "!MoyaPrintServer moya stable v1_00_25" SecMain
; 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\Release\AutoUpdateLib.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\Debug\AutoUpdateLib.pdb"
......@@ -315,10 +315,10 @@ Section "Uninstall"
; 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\Release\AutoUpdateLib.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\Debug\AutoUpdateLib.pdb"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!