75 lines
1.6 KiB
C#
75 lines
1.6 KiB
C#
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 System.Diagnostics;
|
|
|
|
|
|
namespace CobXmlSupport
|
|
{
|
|
public partial class ShowCode : Form
|
|
{
|
|
string oldTxt;
|
|
public ShowCode()
|
|
{
|
|
InitializeComponent();
|
|
oldTxt = "";
|
|
}
|
|
|
|
public TextBox CodeShower
|
|
{
|
|
get { return txtCode; }
|
|
set { txtCode = value; }
|
|
}
|
|
|
|
public string Labeltext
|
|
{
|
|
get { return lblCodeType.Text; }
|
|
set { lblCodeType.Text = value; }
|
|
}
|
|
|
|
private GenCobCode parentWindow;
|
|
|
|
public GenCobCode Parent
|
|
{
|
|
get { return parentWindow; }
|
|
set { parentWindow = value; }
|
|
}
|
|
|
|
private void btnClose_Click(object sender, EventArgs e)
|
|
{
|
|
this.Close();
|
|
}
|
|
|
|
private void txtCode_KeyDown(object sender, KeyEventArgs e)
|
|
{
|
|
if (e.Control && e.KeyCode == Keys.A)
|
|
{
|
|
txtCode.SelectAll();
|
|
}
|
|
}
|
|
|
|
private void txtCode_TextChanged(object sender, EventArgs e)
|
|
{
|
|
if (txtCode.Text.Length > oldTxt.Length)
|
|
{
|
|
string tmpNewText = txtCode.Text.Substring(oldTxt.Length);
|
|
|
|
// Debug.Write(tmpNewText);
|
|
// Tag bort denna kommentering för att testa på vad som precis skrivs på log-fönster.
|
|
oldTxt = txtCode.Text;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|