Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Diagnostics;
using System.Windows.Forms;
using Eplan.EplApi.ApplicationFramework;
using Eplan.EplApi.Base;
using Eplan.EplApi.Scripting;
using System.Threading;
using System.ComponentModel;
using Eplan.EplApi.Gui;
//Formular laden
//public class ClassAction
public partial class frmtest : System.Windows.Forms.Form
{
private Label lblTextTitle;
private RadioButton radioButtonAnfrage;
private RadioButton radioButtonFertigung;
private FolderBrowserDialog folderBrowserDialog1;
private Button btnStart;
private Button btnClose;
private Label lblText01;
private Label lblText20;
#region Designer Code
//<summary>
//Erforderliche Dvsesignervariable.
//</summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
this.lblTextTitle = new System.Windows.Forms.Label();
this.radioButtonAnfrage = new System.Windows.Forms.RadioButton();
this.radioButtonFertigung = new System.Windows.Forms.RadioButton();
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
this.btnStart = new System.Windows.Forms.Button();
this.btnClose = new System.Windows.Forms.Button();
this.lblText01 = new System.Windows.Forms.Label();
this.lblText20 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lblTextTitle
//
this.lblTextTitle.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.lblTextTitle.AutoSize = true;
this.lblTextTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold);
this.lblTextTitle.Location = new System.Drawing.Point(12, 25);
this.lblTextTitle.Name = "lblTextTitle";
this.lblTextTitle.Size = new System.Drawing.Size(48, 16);
this.lblTextTitle.TabIndex = 1;
this.lblTextTitle.Text = frmtest.testtext1;
this.lblTextTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// radioButtonAnfrage
//
this.radioButtonAnfrage.AutoSize = true;
this.radioButtonAnfrage.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold);
this.radioButtonAnfrage.Location = new System.Drawing.Point(15, 147);
this.radioButtonAnfrage.Name = "radioButtonAnfrage";
this.radioButtonAnfrage.Size = new System.Drawing.Size(61, 17);
this.radioButtonAnfrage.TabIndex = 8;
this.radioButtonAnfrage.TabStop = true;
this.radioButtonAnfrage.Text = "Text 1";
this.radioButtonAnfrage.UseVisualStyleBackColor = true;
//
// radioButtonFertigung
//
this.radioButtonFertigung.AutoSize = true;
this.radioButtonFertigung.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold);
this.radioButtonFertigung.Location = new System.Drawing.Point(15, 220);
this.radioButtonFertigung.Name = "radioButtonFertigung";
this.radioButtonFertigung.Size = new System.Drawing.Size(61, 17);
this.radioButtonFertigung.TabIndex = 10;
this.radioButtonFertigung.TabStop = true;
this.radioButtonFertigung.Text = "Text 2";
this.radioButtonFertigung.UseVisualStyleBackColor = true;
//
// btnStart
//
this.btnStart.Location = new System.Drawing.Point(419, 536);
this.btnStart.Name = "btnStart";
this.btnStart.Size = new System.Drawing.Size(75, 23);
this.btnStart.TabIndex = 13;
this.btnStart.Text = "Start";
this.btnStart.UseVisualStyleBackColor = true;
//
// btnClose
//
this.btnClose.Location = new System.Drawing.Point(515, 536);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(75, 23);
this.btnClose.TabIndex = 14;
this.btnClose.Text = "Abbruch";
this.btnClose.UseVisualStyleBackColor = true;
//
// lblText01
//
this.lblText01.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.lblText01.AutoSize = true;
this.lblText01.Location = new System.Drawing.Point(31, 95);
this.lblText01.Name = "lblText01";
this.lblText01.Size = new System.Drawing.Size(28, 13);
this.lblText01.TabIndex = 15;
this.lblText01.Text = "Text";
this.lblText01.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// lblText20
//
this.lblText20.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.lblText20.AutoSize = true;
this.lblText20.Location = new System.Drawing.Point(31, 240);
this.lblText20.Name = "lblText20";
this.lblText20.Size = new System.Drawing.Size(37, 13);
this.lblText20.TabIndex = 17;
this.lblText20.Text = "Text 3";
this.lblText20.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// frmtest
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(620, 581);
this.Controls.Add(this.lblText20);
this.Controls.Add(this.lblText01);
this.Controls.Add(this.btnClose);
this.Controls.Add(this.btnStart);
this.Controls.Add(this.radioButtonFertigung);
this.Controls.Add(this.radioButtonAnfrage);
this.Controls.Add(this.lblTextTitle);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "frmtest";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Test Titel";
this.ResumeLayout(false);
this.PerformLayout();
}
public frmtest()
{
string testtext1;
MultiLangString multiLangErrorText = new MultiLangString();
multiLangErrorText.AddString(ISOCode.Language.L_de_DE, "Text DE");
multiLangErrorText.AddString(ISOCode.Language.L_en_US, "Text EN");
ISOCode.Language guiLanguage = new Languages().GuiLanguage.GetNumber();
testtext1 = multiLangErrorText.GetStringToDisplay(guiLanguage);
if (String.IsNullOrEmpty(testtext1))
{
//if actual GUI-language is not defined in multi-language-string, use en_US-text-version
testtext1 = multiLangErrorText.GetStringToDisplay(ISOCode.Language.L_en_US);
}
InitializeComponent();
}
#endregion
private void btnClose_Click(object sender, EventArgs e)
{
Close();
}
}