Commit f7f8c306 by Liv Haapala

no message

1 parent 330bb628
Showing with 273 additions and 79 deletions
......@@ -28,12 +28,15 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.label4 = new System.Windows.Forms.Label();
this.PortsComboBox = new System.Windows.Forms.ComboBox();
this.status = new System.Windows.Forms.TextBox();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.settingsToolStripButton = new System.Windows.Forms.ToolStripButton();
this.barcodeTextBox = new System.Windows.Forms.TextBox();
this.barcodeTimer = new System.Windows.Forms.Timer(this.components);
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
......@@ -53,7 +56,7 @@
this.PortsComboBox.FormattingEnabled = true;
this.PortsComboBox.Location = new System.Drawing.Point(12, 47);
this.PortsComboBox.Name = "PortsComboBox";
this.PortsComboBox.Size = new System.Drawing.Size(310, 21);
this.PortsComboBox.Size = new System.Drawing.Size(336, 21);
this.PortsComboBox.TabIndex = 15;
this.PortsComboBox.SelectedIndexChanged += new System.EventHandler(this.PortsComboBox_SelectedIndexChanged);
//
......@@ -62,11 +65,11 @@
this.status.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.status.Location = new System.Drawing.Point(12, 74);
this.status.Location = new System.Drawing.Point(12, 102);
this.status.Multiline = true;
this.status.Name = "status";
this.status.ReadOnly = true;
this.status.Size = new System.Drawing.Size(310, 226);
this.status.Size = new System.Drawing.Size(336, 294);
this.status.TabIndex = 17;
//
// toolStrip1
......@@ -75,7 +78,7 @@
this.settingsToolStripButton});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(337, 25);
this.toolStrip1.Size = new System.Drawing.Size(363, 25);
this.toolStrip1.TabIndex = 18;
this.toolStrip1.Text = "toolStrip1";
//
......@@ -89,11 +92,27 @@
this.settingsToolStripButton.Text = "Api Settings";
this.settingsToolStripButton.Click += new System.EventHandler(this.settingsToolStripButton_Click);
//
// barcodeTextBox
//
this.barcodeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.barcodeTextBox.Location = new System.Drawing.Point(13, 75);
this.barcodeTextBox.Name = "barcodeTextBox";
this.barcodeTextBox.Size = new System.Drawing.Size(335, 20);
this.barcodeTextBox.TabIndex = 19;
this.barcodeTextBox.TextChanged += new System.EventHandler(this.barcodeTextBox_TextChanged);
//
// barcodeTimer
//
this.barcodeTimer.Interval = 500;
this.barcodeTimer.Tick += new System.EventHandler(this.barcodeTimer_Tick);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(337, 312);
this.ClientSize = new System.Drawing.Size(363, 408);
this.Controls.Add(this.barcodeTextBox);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.status);
this.Controls.Add(this.label4);
......@@ -117,6 +136,8 @@
private System.Windows.Forms.TextBox status;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton settingsToolStripButton;
private System.Windows.Forms.TextBox barcodeTextBox;
private System.Windows.Forms.Timer barcodeTimer;
}
}
......
......@@ -90,5 +90,35 @@ namespace BarcodeScannerClient
ApiSettings frm = new ApiSettings();
frm.ShowDialog();
}
private void barcodeTextBox_TextChanged(object sender, EventArgs e)
{
if (barcodeTextBox.Text != "")
barcodeTimer.Enabled = true;
}
private void barcodeTimer_Tick(object sender, EventArgs e)
{
barcodeTimer.Enabled = false;
if (barcodeTextBox.Text != "")
{
string url = Properties.Settings.Default.ApiURL.Replace("%", barcodeTextBox.Text.Trim());
BarcodeRestClient client = new BarcodeRestClient(url);
try
{
ret = client.MakeRequest();
}
catch (Exception ex)
{
ret = ex.Message;
}
setRet();
}
barcodeTextBox.Text = "";
}
}
}
......@@ -130,6 +130,9 @@
PKycdQEAAAAASUVORK5CYII=
</value>
</data>
<metadata name="barcodeTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>122, 17</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAkAMDAQAAAAAABoBgAAlgAAACAgEAAAAAAA6AIAAP4GAAAQEBAAAAAAACgBAADmCQAAMDAAAAEA
......
......@@ -22,6 +22,9 @@
<setting name="ApiPass" serializeAs="String">
<value />
</setting>
<setting name="ApplicationVersion" serializeAs="String">
<value />
</setting>
</BarcodeScannerClient.Properties.Settings>
</userSettings>
</configuration>
\ No newline at end of file
......@@ -22,7 +22,7 @@
Name "BarcodeScannerClient moya v1_00_00"
Name "BarcodeScannerClient moya v1_00_06"
; DO NOT CHANGE OutFile "installer_temp.exe" !!! AutoPublish requires this.
......@@ -198,7 +198,7 @@ FunctionEnd
Section "!BarcodeScannerClient moya stable v1_00_00" SecMain
Section "!BarcodeScannerClient moya stable v1_00_06" SecMain
SetShellVarContext current
......@@ -224,8 +224,10 @@ Section "!BarcodeScannerClient moya stable v1_00_00" SecMain
; that is referenced to the main project.
File "I:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\bin\Debug\AutoUpdateLib.dll"
File "I:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\bin\Debug\BarcodeScannerClient.pdb"
File "I:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\bin\Debug\AutoUpdateLib.pdb"
......@@ -313,8 +315,10 @@ Section "Uninstall"
; that is referenced to the main project.
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\bin\Debug\AutoUpdateLib.dll"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\bin\Debug\BarcodeScannerClient.pdb"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\BarcodeScannerClient\BarcodeScannerClient\BarcodeScannerClient\bin\Debug\AutoUpdateLib.pdb"
......
......@@ -35,8 +35,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="AutoUpdateLib">
<HintPath>..\..\..\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\AutoUpdateLib.dll</HintPath>
<Reference Include="AutoUpdateLib, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\AutoUpdate\src\AutoUpdateLib\bin\Debug\AutoUpdateLib.dll</HintPath>
</Reference>
<Reference Include="MoyaAdminLib">
<HintPath>..\..\..\MoyaAdmin\MoyaAdminUI\MoyaAdminLib\bin\Debug\MoyaAdminLib.dll</HintPath>
......
......@@ -123,17 +123,17 @@
//
// slot1Timer
//
this.slot1Timer.Interval = 1000;
this.slot1Timer.Interval = 500;
this.slot1Timer.Tick += new System.EventHandler(this.slot1Timer_Tick);
//
// slot2Timer
//
this.slot2Timer.Interval = 1000;
this.slot2Timer.Interval = 500;
this.slot2Timer.Tick += new System.EventHandler(this.slot2Timer_Tick);
//
// slot3Timer
//
this.slot3Timer.Interval = 1000;
this.slot3Timer.Interval = 500;
this.slot3Timer.Tick += new System.EventHandler(this.slot3Timer_Tick);
//
// prevSlot1Button
......
......@@ -161,9 +161,11 @@ namespace CardDisplay
var ser = new JavaScriptSerializer();
ReaderEventList events = ser.Deserialize<ReaderEventList>(ret);
events.readerEvents = events.readerEvents.OrderBy(r => r.readerEventTime).ToList();
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);
......@@ -185,11 +187,15 @@ namespace CardDisplay
MetaData data = getValue(ret);
if(data != null)
cardPlaceLabel1.Text = data.value;
}
}else
cardPlaceLabel1.Text = "0.0.0";
slot1ReaderEventId = re.readerEventId;
slot1Cards.Add(card);
pictureBox1.ImageLocation = RestClient.GetRequestURL(Properties.Settings.Default.ApiURL, "card/GetImage/" + re.printedCardId);
slot1SelectedCard = card;
pictureBox1.ImageLocation = RestClient.GetRequestURL(Properties.Settings.Default.ApiURL, "card/GetImage/" + card.cardId);
pictureBox1.Tag = re.eventuser;
slot1SelectedCard = card;
break;
}
}
}
......@@ -213,9 +219,11 @@ namespace CardDisplay
var ser = new JavaScriptSerializer();
ReaderEventList events = ser.Deserialize<ReaderEventList>(ret);
events.readerEvents = events.readerEvents.OrderBy(r => r.readerEventTime).ToList();
events.readerEvents = events.readerEvents.OrderByDescending(r => r.readerEventTime).ToList();
foreach (ReaderEvent re in events.readerEvents)
{
if (re.eventuser != null && pictureBox2.Tag != null && pictureBox2.Tag is Eventuser && ((Eventuser)pictureBox2.Tag).eventuserId == re.eventuser.eventuserId)
continue;
if (re.eventuser != null)
{
client = new RestClient(Properties.Settings.Default.ApiURL);
......@@ -236,12 +244,17 @@ namespace CardDisplay
{
MetaData data = getValue(ret);
if (data != null)
cardPlaceLabel1.Text = data.value;
cardPlaceLabel2.Text = data.value;
}
else
cardPlaceLabel1.Text = "0.0.0";
slot2ReaderEventId = re.readerEventId;
slot2Cards.Add(card);
pictureBox2.ImageLocation = RestClient.GetRequestURL(Properties.Settings.Default.ApiURL, "card/GetImage/" + card.cardId);
pictureBox2.Tag = re.eventuser;
slot2SelectedCard = card;
break;
}
}
}
......@@ -264,9 +277,11 @@ namespace CardDisplay
var ser = new JavaScriptSerializer();
ReaderEventList events = ser.Deserialize<ReaderEventList>(ret);
events.readerEvents = events.readerEvents.OrderBy(r => r.readerEventTime).ToList();
events.readerEvents = events.readerEvents.OrderByDescending(r => r.readerEventTime).ToList();
foreach (ReaderEvent re in events.readerEvents)
{
if (re.eventuser != null && pictureBox3.Tag != null && pictureBox3.Tag is Eventuser && ((Eventuser)pictureBox3.Tag).eventuserId == re.eventuser.eventuserId)
continue;
if (re.eventuser != null)
{
client = new RestClient(Properties.Settings.Default.ApiURL);
......@@ -287,12 +302,17 @@ namespace CardDisplay
{
MetaData data = getValue(ret);
if (data != null)
cardPlaceLabel1.Text = data.value;
cardPlaceLabel3.Text = data.value;
}
else
cardPlaceLabel1.Text = "0.0.0";
slot3ReaderEventId = re.readerEventId;
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.cardId);
pictureBox3.Tag = re.eventuser;
slot3SelectedCard = card;
break;
}
}
}
......
......@@ -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.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.2.0")]
[assembly: AssemblyFileVersion("1.0.2.0")]
......@@ -22,7 +22,7 @@
Name "CardDisplay moya v1_00_00"
Name "CardDisplay moya v1_00_02"
; DO NOT CHANGE OutFile "installer_temp.exe" !!! AutoPublish requires this.
......@@ -198,7 +198,7 @@ FunctionEnd
Section "!CardDisplay moya stable v1_00_00" SecMain
Section "!CardDisplay moya stable v1_00_02" SecMain
SetShellVarContext current
......
......@@ -148,7 +148,7 @@ namespace Cloakroom
private bool printLabel(string barcode)
{
if (Properties.Settings.Default.dd == null || !Directory.Exists(Properties.Settings.Default.dd))
if (!File.Exists(cloakroomLabel))
{
MessageBox.Show("Cannot find print template");
return false;
......@@ -167,7 +167,8 @@ namespace Cloakroom
//doc.SetPrinter(Objects.Conf.BoxLabelPrinter, false);
if (doc != null)
{
doc.Open(Path.Combine(Properties.Settings.Default.dd, cloakroomLabel));
//doc.Open(Path.Combine(Properties.Settings.Default.dd, cloakroomLabel));
doc.Open(cloakroomLabel);
if(selectedUser != null)
doc.GetObject("Name").Text = selectedUser.firstname + " " + selectedUser.lastname;
......
......@@ -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.1.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyVersion("1.0.2.0")]
[assembly: AssemblyFileVersion("1.0.2.0")]
......@@ -49,6 +49,7 @@
this.cardInfoToolStripButton = new System.Windows.Forms.ToolStripButton();
this.cloackRoomToolStripButton = new System.Windows.Forms.ToolStripButton();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.orgMealToolStripButton = new System.Windows.Forms.ToolStripButton();
this.TopPanel = new System.Windows.Forms.Panel();
this.label3 = new System.Windows.Forms.Label();
this.MapsComboBox = new System.Windows.Forms.ComboBox();
......@@ -57,7 +58,6 @@
this.searchTimer = new System.Windows.Forms.Timer(this.components);
this.ImageRefreshTimer = new System.Windows.Forms.Timer(this.components);
this.panel2 = new System.Windows.Forms.Panel();
this.orgMealToolStripButton = new System.Windows.Forms.ToolStripButton();
((System.ComponentModel.ISupportInitialize)(this.MapPictureBox)).BeginInit();
this.toolStrip1.SuspendLayout();
this.TopPanel.SuspendLayout();
......@@ -219,6 +219,7 @@
this.incomingFormToolStripButton.Name = "incomingFormToolStripButton";
this.incomingFormToolStripButton.Size = new System.Drawing.Size(23, 22);
this.incomingFormToolStripButton.Text = "Sisäänottonäkymä";
this.incomingFormToolStripButton.Visible = false;
this.incomingFormToolStripButton.Click += new System.EventHandler(this.incomingFormToolStripButton_Click);
//
// cardInfoToolStripButton
......@@ -252,6 +253,16 @@
this.toolStripButton1.Text = "Api settings";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click_1);
//
// orgMealToolStripButton
//
this.orgMealToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.orgMealToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("orgMealToolStripButton.Image")));
this.orgMealToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.orgMealToolStripButton.Name = "orgMealToolStripButton";
this.orgMealToolStripButton.Size = new System.Drawing.Size(23, 22);
this.orgMealToolStripButton.Text = "Org Meal";
this.orgMealToolStripButton.Click += new System.EventHandler(this.orgMealToolStripButton_Click);
//
// TopPanel
//
this.TopPanel.Controls.Add(this.label3);
......@@ -321,16 +332,6 @@
this.panel2.Size = new System.Drawing.Size(752, 471);
this.panel2.TabIndex = 17;
//
// orgMealToolStripButton
//
this.orgMealToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.orgMealToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("orgMealToolStripButton.Image")));
this.orgMealToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.orgMealToolStripButton.Name = "orgMealToolStripButton";
this.orgMealToolStripButton.Size = new System.Drawing.Size(23, 22);
this.orgMealToolStripButton.Text = "Org Meal";
this.orgMealToolStripButton.Click += new System.EventHandler(this.orgMealToolStripButton_Click);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
......
......@@ -48,8 +48,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="AutoUpdateLib">
<HintPath>..\..\..\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\AutoUpdateLib.dll</HintPath>
<Reference Include="AutoUpdateLib, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\AutoUpdate\src\AutoUpdateLib\bin\Debug\AutoUpdateLib.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
......
......@@ -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.8")]
[assembly: AssemblyFileVersion("1.0.8")]
[assembly: AssemblyVersion("1.0.10")]
[assembly: AssemblyFileVersion("1.0.10")]
......@@ -22,7 +22,7 @@
Name "MoyaAdminUI moya v1_00_08"
Name "MoyaAdminUI moya v1_00_10"
; DO NOT CHANGE OutFile "installer_temp.exe" !!! AutoPublish requires this.
......@@ -198,7 +198,7 @@ FunctionEnd
Section "!MoyaAdminUI moya stable v1_00_08" SecMain
Section "!MoyaAdminUI moya stable v1_00_10" SecMain
SetShellVarContext current
......@@ -212,9 +212,9 @@ Section "!MoyaAdminUI moya stable v1_00_08" SecMain
SetOverwrite On
File /oname=autoupdate.xml "D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\autoupdate.moya.xml"
File /oname=autoupdate.xml "I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\autoupdate.moya.xml"
File /oname=MoyaAdminUI.exe "D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminUI.exe"
File /oname=MoyaAdminUI.exe "I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminUI.exe"
File autoupdate.crt
......@@ -224,10 +224,12 @@ Section "!MoyaAdminUI moya stable v1_00_08" SecMain
; that is referenced to the main project.
File "D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.dll"
File "I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminLib.dll"
File "I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.dll"
File "D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminUI.pdb"
File "D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.pdb"
File "I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminUI.pdb"
File "I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminLib.pdb"
File "I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.pdb"
......@@ -315,10 +317,12 @@ Section "Uninstall"
; that is referenced to the main project.
Delete "$INSTDIR\D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.dll"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminLib.dll"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.dll"
Delete "$INSTDIR\D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminUI.pdb"
Delete "$INSTDIR\D:\Devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.pdb"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminUI.pdb"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\MoyaAdminLib.pdb"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\MoyaAdmin\MoyaAdminUI\MoyaAdminUI\bin\Debug\AutoUpdateLib.pdb"
......
......@@ -52,7 +52,6 @@
//
this.ApiPassTextBox.Location = new System.Drawing.Point(12, 164);
this.ApiPassTextBox.Name = "ApiPassTextBox";
this.ApiPassTextBox.PasswordChar = 'ῷ';
this.ApiPassTextBox.Size = new System.Drawing.Size(260, 20);
this.ApiPassTextBox.TabIndex = 16;
//
......
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
......@@ -12,10 +13,33 @@ namespace OrgMealCounter
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if (!Debugger.IsAttached)
{
if (args.Length == 0 || args[0] != "-noautoupdate")
{
if (AutoUpdateLib.AutoUpdateCore.CheckForUpdates(null))
return; //program is required to close by autoupdate (probably updated)
}
}
System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
Version appVersion = a.GetName().Version;
string appVersionString = appVersion.ToString();
if (Properties.Settings.Default.ApplicationVersion != appVersion.ToString())
{
Properties.Settings.Default.Upgrade();
Properties.Settings.Default.ApplicationVersion = appVersionString;
}
Application.Run(new Form1());
}
}
......
......@@ -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.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.2.0")]
[assembly: AssemblyFileVersion("1.0.2.0")]
......@@ -16,6 +16,7 @@ namespace OrgMealCounter.Properties {
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public string ApplicationVersion;
public static Settings Default {
get {
......
......@@ -22,7 +22,7 @@
Name "OrgMealCounter moya v1_00_00"
Name "OrgMealCounter moya v1_00_02"
; DO NOT CHANGE OutFile "installer_temp.exe" !!! AutoPublish requires this.
......@@ -198,7 +198,7 @@ FunctionEnd
Section "!OrgMealCounter moya stable v1_00_00" SecMain
Section "!OrgMealCounter moya stable v1_00_02" SecMain
SetShellVarContext current
......@@ -225,9 +225,11 @@ Section "!OrgMealCounter moya stable v1_00_00" SecMain
; that is referenced to the main project.
File "I:\devel\proj\moya-info-tools\OrgMealCounter\OrgMealCounter\bin\Debug\MoyaAdminLib.dll"
File "I:\devel\proj\moya-info-tools\OrgMealCounter\OrgMealCounter\bin\Debug\AutoUpdateLib.dll"
File "I:\devel\proj\moya-info-tools\OrgMealCounter\OrgMealCounter\bin\Debug\OrgMealCounter.pdb"
File "I:\devel\proj\moya-info-tools\OrgMealCounter\OrgMealCounter\bin\Debug\MoyaAdminLib.pdb"
File "I:\devel\proj\moya-info-tools\OrgMealCounter\OrgMealCounter\bin\Debug\AutoUpdateLib.pdb"
......@@ -316,9 +318,11 @@ Section "Uninstall"
; that is referenced to the main project.
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\OrgMealCounter\OrgMealCounter\bin\Debug\MoyaAdminLib.dll"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\OrgMealCounter\OrgMealCounter\bin\Debug\AutoUpdateLib.dll"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\OrgMealCounter\OrgMealCounter\bin\Debug\OrgMealCounter.pdb"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\OrgMealCounter\OrgMealCounter\bin\Debug\MoyaAdminLib.pdb"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\OrgMealCounter\OrgMealCounter\bin\Debug\AutoUpdateLib.pdb"
......
......@@ -49,8 +49,11 @@
this.label1 = new System.Windows.Forms.Label();
this.CardFilterTextBox = new System.Windows.Forms.TextBox();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.setPrintedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.statusStrip1.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// autoPrintCheckBox
......@@ -74,6 +77,7 @@
this.columnHeader1,
this.columnHeader2,
this.columnHeader3});
this.listView.ContextMenuStrip = this.contextMenuStrip1;
this.listView.FullRowSelect = true;
this.listView.Location = new System.Drawing.Point(11, 84);
this.listView.Name = "listView";
......@@ -218,6 +222,20 @@
this.CardFilterTextBox.TabIndex = 16;
this.toolTip1.SetToolTip(this.CardFilterTextBox, "By default print all cards. With this you can limit name of printed card types");
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.setPrintedToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(153, 48);
//
// setPrintedToolStripMenuItem
//
this.setPrintedToolStripMenuItem.Name = "setPrintedToolStripMenuItem";
this.setPrintedToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.setPrintedToolStripMenuItem.Text = "Set printed";
this.setPrintedToolStripMenuItem.Click += new System.EventHandler(this.setPrintedToolStripMenuItem_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
......@@ -244,6 +262,7 @@
this.statusStrip1.PerformLayout();
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
......@@ -270,6 +289,8 @@
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox CardFilterTextBox;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem setPrintedToolStripMenuItem;
}
}
......@@ -124,10 +124,26 @@ namespace moyaPrintServer
PrintDocument pd = new PrintDocument();
pd.DocumentName = "Card "+ card.cardId + " " + card.username;
/*
pd.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("Card " + this.Name, 216, 339);
//pd.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("Card " + this.Name, 216, 350);
pd.PrinterSettings.PrinterName = PrintersComboBox.SelectedItem.ToString();
pd.DefaultPageSettings.Landscape = false;
*/
pd.PrintPage += new PrintPageEventHandler(PrintPage);
pd.PrinterSettings.PrinterName = PrintersComboBox.SelectedItem.ToString();
pd.DefaultPageSettings = pd.PrinterSettings.DefaultPageSettings;
pd.OriginAtMargins = true;
pd.DefaultPageSettings.Margins.Top = 0;
pd.DefaultPageSettings.Margins.Bottom = 0;
pd.DefaultPageSettings.Margins.Right = 0;
pd.DefaultPageSettings.Margins.Left = 0;
pd.Print();
}
......@@ -137,7 +153,12 @@ namespace moyaPrintServer
private void PrintPage(object o, System.Drawing.Printing.PrintPageEventArgs ev)
{
ev.Graphics.DrawImage(currentImage, 0f, 0f, new Rectangle(0, 0, currentImage.Width, currentImage.Height), GraphicsUnit.Pixel);
//ev.Graphics.DrawImage(currentImage, 0f, 0f, new Rectangle(0, 0, currentImage.Width, currentImage.Height), GraphicsUnit.Pixel);
Rectangle margins = ev.MarginBounds;
//margins.Height += 6;
ev.Graphics.DrawImage(currentImage, margins);
// Meillä ei ole kuin yks sivu
try
{
......@@ -170,8 +191,8 @@ namespace moyaPrintServer
Card card = (Card)listView.Items[0].Tag;
try
{
RestClient client = new RestClient(Properties.Settings.Default.ApiURL + "/card/Reserve/" + card.cardId);
client.MakeRequest();
RestClient client = new RestClient(Properties.Settings.Default.ApiURL);
client.MakeRequest("card/Reserve/" + card.cardId);
}
catch (Exception ex)
{
......@@ -205,11 +226,14 @@ namespace moyaPrintServer
listView.BeginUpdate();
listView.Items.Clear();
if (sortByNameCheckBox.Checked)
queuelist.cards = queuelist.cards.OrderBy(c => c.username).ToList();
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))
{
ListViewItem lvi = listView.Items.Add(card.cardId.ToString());
lvi.SubItems.Add(card.username);
lvi.SubItems.Add(card.wholeName);
......@@ -262,6 +286,36 @@ namespace moyaPrintServer
}
private void setPrintedToolStripMenuItem_Click(object sender, EventArgs e)
{
if (listView.SelectedItems.Count > 0)
{
if (MessageBox.Show("Change state to printed for the selected cards?") != DialogResult.OK)
return;
List<ListViewItem> printed = new List<ListViewItem>();
foreach (ListViewItem lvi in listView.SelectedItems)
{
Card card = (Card)lvi.Tag;
try
{
RestClient client = new RestClient(Properties.Settings.Default.ApiURL);
client.MakeRequest("card/Printed/" + currentCardId);
printed.Add(lvi);
}
catch (Exception ex)
{
toolStripStatusLabel1.Text = ex.Message;
}
}
foreach (ListViewItem printedItem in printed)
{
listView.Items.Remove(printedItem);
}
}
}
}
}
......@@ -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.8.0")]
[assembly: AssemblyFileVersion("1.0.8.0")]
[assembly: AssemblyVersion("1.0.24.0")]
[assembly: AssemblyFileVersion("1.0.24.0")]
......@@ -35,8 +35,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="AutoUpdateLib">
<HintPath>..\..\..\MoyaAdmin\MoyaAdminUI\res\AutoUpdateLib.dll</HintPath>
<Reference Include="AutoUpdateLib, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\AutoUpdate\src\AutoUpdateLib\bin\Debug\AutoUpdateLib.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
......
......@@ -22,7 +22,7 @@
Name "MoyaPrintServer moya v1_00_08"
Name "MoyaPrintServer moya v1_00_24"
; DO NOT CHANGE OutFile "installer_temp.exe" !!! AutoPublish requires this.
......@@ -198,7 +198,7 @@ FunctionEnd
Section "!MoyaPrintServer moya stable v1_00_08" SecMain
Section "!MoyaPrintServer moya stable v1_00_24" SecMain
SetShellVarContext current
......@@ -212,9 +212,9 @@ Section "!MoyaPrintServer moya stable v1_00_08" SecMain
SetOverwrite On
File /oname=autoupdate.xml "D:\Devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\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 "D:\Devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\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_08" SecMain
; that is referenced to the main project.
File "D:\Devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\AutoUpdateLib.dll"
File "I:\devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\AutoUpdateLib.dll"
File "D:\Devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\moyaPrintServer.pdb"
File "D:\Devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\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\D:\Devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\AutoUpdateLib.dll"
Delete "$INSTDIR\I:\devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\AutoUpdateLib.dll"
Delete "$INSTDIR\D:\Devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\moyaPrintServer.pdb"
Delete "$INSTDIR\D:\Devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\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!