Code:
////////////////////////////////////////////////////////////////////////
// Eplan-Form-Template
////////////////////////////////////////////////////////////////////////
// Erstellt am: 2009-11-03
// Erstellt von: Jonny Wire
// Geändert am: 2017-09-14
// Geändert von: KleinMTH
////////////////////////////////////////////////////////////////////////
public class FrmTemplate : System.Windows.Forms.Form
{
////////////////////////////////////////////////////////////////////////
// Formular (wird automatisch generiert
////////////////////////////////////////////////////////////////////////
#region Formular
public FrmTemplate()
{
InitializeComponent();
}
private System.Windows.Forms.ToolStripStatusLabel lblStatus2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
///
/// Erforderliche Designervariable.
///
private System.ComponentModel.IContainer components = null;
///
/// Verwendete Ressourcen bereinigen.
///
/// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Windows Form-Designer generierter Code
///
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
///
private void InitializeComponent()
{
this.lblStatus2 = new System.Windows.Forms.ToolStripStatusLabel();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// lblStatus2
//
this.lblStatus2.Margin = new System.Windows.Forms.Padding(2, 3, 0, 2);
this.lblStatus2.Name = "lblStatus2";
this.lblStatus2.Size = new System.Drawing.Size(235, 17);
this.lblStatus2.Text = "Letzte Änderung: 2009-10-23 - Johann Weiher";
//
// button1
//
this.button1.Location = new System.Drawing.Point(13, 13);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(175, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Betriebsmittel Nummerieren";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(13, 42);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(175, 23);
this.button2.TabIndex = 1;
this.button2.Text = "Klemmen Nummerieren";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
this.button3.Location = new System.Drawing.Point(13, 71);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(175, 23);
this.button3.TabIndex = 2;
this.button3.Text = "Stecker Nummerieren";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
this.button4.Location = new System.Drawing.Point(13, 100);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(175, 23);
this.button4.TabIndex = 3;
this.button4.Text = "Makro XYZ Einfügen";
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// FrmTemplate
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(204, 164);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Name = "FrmTemplate";
this.ResumeLayout(false);
}
#endregion
# endregion // Code für das Formular
////////////////////////////////////////////////////////////////////////
// Action
////////////////////////////////////////////////////////////////////////
[DeclareAction("FORM_TEMPLATE")]
public void FrmTemplateVoid()
{
// Form aufrufen
FrmTemplate Frm1 = new FrmTemplate();
Frm1.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
Frm1.ShowDialog();
return;
}
private void button1_Click(object sender, System.EventArgs e)
{
new CommandLineInterpreter().Execute("StartOfflineNumeration");
}
private void button2_Click(object sender, System.EventArgs e)
{
new CommandLineInterpreter().Execute("XTPGedTerminalNumberingAction");
}
private void button3_Click(object sender, System.EventArgs e)
{
new CommandLineInterpreter().Execute("XTPGedPlugNumberingAction");
}
private void button4_Click(object sender, System.EventArgs e)
{
new CommandLineInterpreter().Execute("XGedStartInteractionAction /Name:XMIaInsertMacro /filename: \"FIRMENNAME\\MAKRO.ems\" / variant:0");
}
}