Commit 4d46f84b by Liv Haapala

jotain mahdollisesti puuttuvia tiedostoja

1 parent 740a1d45
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MoyaAdminLib
{
public class CardLocation
{
private Card card;
public Card Card { get { return card; } set { card = value; } }
private int book;
public int Book { get { return book; } set { book = value; } }
private int page;
public int Page { get { return page; } set { page = value; } }
private int slot;
public int Slot { get { return slot; } set { slot = value; } }
}
}
namespace MoyaAdminUI
{
partial class ListCardsForm
{
/// <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.listView1 = new System.Windows.Forms.ListView();
this.panel1 = new System.Windows.Forms.Panel();
this.SuspendLayout();
//
// listView1
//
this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.listView1.Location = new System.Drawing.Point(0, 0);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(508, 309);
this.listView1.TabIndex = 0;
this.listView1.UseCompatibleStateImageBehavior = false;
//
// panel1
//
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(508, 100);
this.panel1.TabIndex = 1;
//
// ListCardsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(508, 309);
this.Controls.Add(this.panel1);
this.Controls.Add(this.listView1);
this.Name = "ListCardsForm";
this.Text = "ListCardsForm";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.Panel panel1;
}
}
\ 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 MoyaAdminUI
{
public partial class ListCardsForm : Form
{
public ListCardsForm()
{
InitializeComponent();
}
}
}

namespace MoyaAdminUI
{
partial class MovePlacesForm
{
/// <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.pixelsNumericUpDown = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.upRadioButton = new System.Windows.Forms.RadioButton();
this.downRadioButton = new System.Windows.Forms.RadioButton();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.leftRadioButton = new System.Windows.Forms.RadioButton();
this.rightRadioButton = new System.Windows.Forms.RadioButton();
this.moveButton = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pixelsNumericUpDown)).BeginInit();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// pixelsNumericUpDown
//
this.pixelsNumericUpDown.Location = new System.Drawing.Point(52, 181);
this.pixelsNumericUpDown.Name = "pixelsNumericUpDown";
this.pixelsNumericUpDown.Size = new System.Drawing.Size(163, 20);
this.pixelsNumericUpDown.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 183);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(34, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Pixels";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 13);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(49, 13);
this.label2.TabIndex = 2;
this.label2.Text = "Direction";
//
// upRadioButton
//
this.upRadioButton.AutoSize = true;
this.upRadioButton.Location = new System.Drawing.Point(6, 19);
this.upRadioButton.Name = "upRadioButton";
this.upRadioButton.Size = new System.Drawing.Size(39, 17);
this.upRadioButton.TabIndex = 3;
this.upRadioButton.TabStop = true;
this.upRadioButton.Text = "Up";
this.upRadioButton.UseVisualStyleBackColor = true;
this.upRadioButton.CheckedChanged += new System.EventHandler(this.upRradioButton_CheckedChanged);
//
// downRadioButton
//
this.downRadioButton.AutoSize = true;
this.downRadioButton.Location = new System.Drawing.Point(6, 42);
this.downRadioButton.Name = "downRadioButton";
this.downRadioButton.Size = new System.Drawing.Size(53, 17);
this.downRadioButton.TabIndex = 4;
this.downRadioButton.TabStop = true;
this.downRadioButton.Text = "Down";
this.downRadioButton.UseVisualStyleBackColor = true;
this.downRadioButton.CheckedChanged += new System.EventHandler(this.downRadioButton_CheckedChanged);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.upRadioButton);
this.groupBox1.Controls.Add(this.downRadioButton);
this.groupBox1.Location = new System.Drawing.Point(15, 29);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(200, 67);
this.groupBox1.TabIndex = 7;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Vertical";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.leftRadioButton);
this.groupBox2.Controls.Add(this.rightRadioButton);
this.groupBox2.Location = new System.Drawing.Point(15, 102);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(200, 67);
this.groupBox2.TabIndex = 8;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Horizontal";
//
// leftRadioButton
//
this.leftRadioButton.AutoSize = true;
this.leftRadioButton.Location = new System.Drawing.Point(6, 42);
this.leftRadioButton.Name = "leftRadioButton";
this.leftRadioButton.Size = new System.Drawing.Size(43, 17);
this.leftRadioButton.TabIndex = 8;
this.leftRadioButton.TabStop = true;
this.leftRadioButton.Text = "Left";
this.leftRadioButton.UseVisualStyleBackColor = true;
this.leftRadioButton.CheckedChanged += new System.EventHandler(this.leftRadioButton_CheckedChanged);
//
// rightRadioButton
//
this.rightRadioButton.AutoSize = true;
this.rightRadioButton.Location = new System.Drawing.Point(6, 19);
this.rightRadioButton.Name = "rightRadioButton";
this.rightRadioButton.Size = new System.Drawing.Size(50, 17);
this.rightRadioButton.TabIndex = 7;
this.rightRadioButton.TabStop = true;
this.rightRadioButton.Text = "Right";
this.rightRadioButton.UseVisualStyleBackColor = true;
this.rightRadioButton.CheckedChanged += new System.EventHandler(this.rightRadioButton_CheckedChanged);
//
// moveButton
//
this.moveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.moveButton.Location = new System.Drawing.Point(141, 222);
this.moveButton.Name = "moveButton";
this.moveButton.Size = new System.Drawing.Size(75, 23);
this.moveButton.TabIndex = 9;
this.moveButton.Text = "Move";
this.moveButton.UseVisualStyleBackColor = true;
this.moveButton.Click += new System.EventHandler(this.moveButton_Click);
//
// MovePlacesForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(228, 257);
this.Controls.Add(this.moveButton);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.pixelsNumericUpDown);
this.Name = "MovePlacesForm";
this.Text = "MovePlacesForm";
((System.ComponentModel.ISupportInitialize)(this.pixelsNumericUpDown)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.NumericUpDown pixelsNumericUpDown;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.RadioButton upRadioButton;
private System.Windows.Forms.RadioButton downRadioButton;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.RadioButton leftRadioButton;
private System.Windows.Forms.RadioButton rightRadioButton;
private System.Windows.Forms.Button moveButton;
}
}
\ No newline at end of file
using MoyaAdminLib;
using MoyaAdminUI.MoyaAPI;
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 MoyaAdminUI
{
public partial class MovePlacesForm : Form
{
private List<ComputerPlace> places;
public List<ComputerPlace> Places
{
get { return places; }
set { places = value; }
}
private int mapHeight;
public int MapHeight
{
get { return mapHeight; }
set { mapHeight = value; }
}
private int mapWidth;
public int MapWidth
{
get { return mapWidth; }
set { mapWidth = value; }
}
public MovePlacesForm()
{
InitializeComponent();
}
private void upRradioButton_CheckedChanged(object sender, EventArgs e)
{
if(upRadioButton.Checked && downRadioButton.Checked)
{
downRadioButton.Checked = false;
}
}
private void downRadioButton_CheckedChanged(object sender, EventArgs e)
{
if (upRadioButton.Checked && downRadioButton.Checked)
{
upRadioButton.Checked = false;
}
}
private void rightRadioButton_CheckedChanged(object sender, EventArgs e)
{
if (rightRadioButton.Checked && leftRadioButton.Checked)
{
leftRadioButton.Checked = false;
}
}
private void leftRadioButton_CheckedChanged(object sender, EventArgs e)
{
if (rightRadioButton.Checked && leftRadioButton.Checked)
{
rightRadioButton.Checked = false;
}
}
private void moveButton_Click(object sender, EventArgs e)
{
int pixels = (int) pixelsNumericUpDown.Value;
foreach(ComputerPlace place in places)
{
if(upRadioButton.Checked)
{
if (place.MapY - pixels >= 0)
place.MapY -= pixels;
else
{
MessageBox.Show("Cannot move places outside map!");
return;
}
} else if(downRadioButton.Checked)
{
if(place.MapY + pixels < MapHeight)
place.MapY += pixels;
else
{
MessageBox.Show("Cannot move places outside map!");
return;
}
}
if(rightRadioButton.Checked)
{
if(place.MapX + pixels < MapWidth)
{
place.MapX += pixels;
} else
{
MessageBox.Show("Cannot move places outside map!");
return;
}
} else if(leftRadioButton.Checked)
{
if (place.MapX - pixels >= 0)
{
place.MapX -= pixels;
}
else
{
MessageBox.Show("Cannot move places outside map!");
return;
}
}
}
DialogResult = DialogResult.OK;
this.Close();
}
}
}
<?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>
</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!