weiter mit assignments
This commit is contained in:
parent
9bc1fb2873
commit
8b31fcd162
126
AIS/AISAdmin/EditAssignmentDialog.Designer.cs
generated
Normal file
126
AIS/AISAdmin/EditAssignmentDialog.Designer.cs
generated
Normal file
@ -0,0 +1,126 @@
|
||||
namespace AISAdmin
|
||||
{
|
||||
partial class EditAssignmentDialog
|
||||
{
|
||||
/// <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.buttonOK = new System.Windows.Forms.Button();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.numericUpDownMMSI = new System.Windows.Forms.NumericUpDown();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.comboBoxType = new System.Windows.Forms.ComboBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMMSI)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// buttonOK
|
||||
//
|
||||
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonOK.Location = new System.Drawing.Point(56, 88);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonOK.TabIndex = 0;
|
||||
this.buttonOK.Text = "OK";
|
||||
this.buttonOK.UseVisualStyleBackColor = true;
|
||||
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonCancel.Location = new System.Drawing.Point(137, 88);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonCancel.TabIndex = 1;
|
||||
this.buttonCancel.Text = "Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 9);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(38, 15);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "MMSI";
|
||||
//
|
||||
// numericUpDownMMSI
|
||||
//
|
||||
this.numericUpDownMMSI.Location = new System.Drawing.Point(56, 7);
|
||||
this.numericUpDownMMSI.Name = "numericUpDownMMSI";
|
||||
this.numericUpDownMMSI.Size = new System.Drawing.Size(156, 23);
|
||||
this.numericUpDownMMSI.TabIndex = 3;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(12, 41);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(31, 15);
|
||||
this.label2.TabIndex = 4;
|
||||
this.label2.Text = "Type";
|
||||
//
|
||||
// comboBoxType
|
||||
//
|
||||
this.comboBoxType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxType.FormattingEnabled = true;
|
||||
this.comboBoxType.Location = new System.Drawing.Point(55, 36);
|
||||
this.comboBoxType.Name = "comboBoxType";
|
||||
this.comboBoxType.Size = new System.Drawing.Size(157, 23);
|
||||
this.comboBoxType.TabIndex = 5;
|
||||
//
|
||||
// EditAssignmentDialog
|
||||
//
|
||||
this.AcceptButton = this.buttonOK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.buttonCancel;
|
||||
this.ClientSize = new System.Drawing.Size(218, 117);
|
||||
this.Controls.Add(this.comboBoxType);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.numericUpDownMMSI);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonOK);
|
||||
this.Name = "EditAssignmentDialog";
|
||||
this.Text = "Edit assignment";
|
||||
this.Load += new System.EventHandler(this.EditAssignmentDialog_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMMSI)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Button buttonOK;
|
||||
private Button buttonCancel;
|
||||
private Label label1;
|
||||
private NumericUpDown numericUpDownMMSI;
|
||||
private Label label2;
|
||||
private ComboBox comboBoxType;
|
||||
}
|
||||
}
|
||||
39
AIS/AISAdmin/EditAssignmentDialog.cs
Normal file
39
AIS/AISAdmin/EditAssignmentDialog.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using bsmd.AIS2Service;
|
||||
|
||||
namespace AISAdmin
|
||||
{
|
||||
public partial class EditAssignmentDialog : Form
|
||||
{
|
||||
public EditAssignmentDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public MonitorAssignment Assignment { get; set; }
|
||||
|
||||
private void EditAssignmentDialog_Load(object sender, EventArgs e)
|
||||
{
|
||||
comboBoxType.DataSource = Enum.GetValues(typeof(MonitorAssignment.ZoneMonitorType));
|
||||
this.numericUpDownMMSI.Value = Assignment.MMSI;
|
||||
this.comboBoxType.SelectedItem = Assignment.MonitorType;
|
||||
}
|
||||
|
||||
private void buttonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Assignment.MMSI = (int) this.numericUpDownMMSI.Value;
|
||||
MonitorAssignment.ZoneMonitorType mType;
|
||||
Enum.TryParse<MonitorAssignment.ZoneMonitorType>(this.comboBoxType.SelectedValue.ToString(), out mType);
|
||||
this.Assignment.MonitorType = mType;
|
||||
}
|
||||
}
|
||||
}
|
||||
60
AIS/AISAdmin/EditAssignmentDialog.resx
Normal file
60
AIS/AISAdmin/EditAssignmentDialog.resx
Normal file
@ -0,0 +1,60 @@
|
||||
<root>
|
||||
<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>
|
||||
21
AIS/AISAdmin/Main.Designer.cs
generated
21
AIS/AISAdmin/Main.Designer.cs
generated
@ -43,6 +43,7 @@
|
||||
this.listBoxZones = new System.Windows.Forms.ListBox();
|
||||
this.buttonImportZone = new System.Windows.Forms.Button();
|
||||
this.groupBoxAssignments = new System.Windows.Forms.GroupBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.listBoxTargets = new System.Windows.Forms.ListBox();
|
||||
this.buttonAssignSelectedTarget = new System.Windows.Forms.Button();
|
||||
this.buttonDeleteAssignment = new System.Windows.Forms.Button();
|
||||
@ -50,7 +51,6 @@
|
||||
this.listBoxAssignment = new System.Windows.Forms.ListBox();
|
||||
this.textBoxGroup = new System.Windows.Forms.TextBox();
|
||||
this.buttonSaveGroup = new System.Windows.Forms.Button();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.groupBoxZones.SuspendLayout();
|
||||
this.groupBoxAssignments.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
@ -213,6 +213,15 @@
|
||||
this.groupBoxAssignments.TabStop = false;
|
||||
this.groupBoxAssignments.Text = "Assignments";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(7, 19);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(286, 15);
|
||||
this.label2.TabIndex = 8;
|
||||
this.label2.Text = "Assignment will be to all zones in the selected group!";
|
||||
//
|
||||
// listBoxTargets
|
||||
//
|
||||
this.listBoxTargets.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
@ -254,6 +263,7 @@
|
||||
this.buttonNewAssignment.Size = new System.Drawing.Size(37, 31);
|
||||
this.buttonNewAssignment.TabIndex = 3;
|
||||
this.buttonNewAssignment.UseVisualStyleBackColor = true;
|
||||
this.buttonNewAssignment.Click += new System.EventHandler(this.buttonNewAssignment_Click);
|
||||
//
|
||||
// listBoxAssignment
|
||||
//
|
||||
@ -286,15 +296,6 @@
|
||||
this.buttonSaveGroup.UseVisualStyleBackColor = true;
|
||||
this.buttonSaveGroup.Click += new System.EventHandler(this.buttonSaveGroup_Click);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(7, 19);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(286, 15);
|
||||
this.label2.TabIndex = 8;
|
||||
this.label2.Text = "Assignment will be to all zones in the selected group!";
|
||||
//
|
||||
// Main
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
|
||||
@ -179,5 +179,16 @@ namespace AISAdmin
|
||||
this.listBoxAssignment.DataSource = new BindingList<MonitorAssignment>(this._zoneAssignmentDict[mz]);
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonNewAssignment_Click(object sender, EventArgs e)
|
||||
{
|
||||
MonitorAssignment ma = new(-1);
|
||||
using EditAssignmentDialog ead = new EditAssignmentDialog();
|
||||
ead.Assignment = ma;
|
||||
if(ead.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user