Starting
This commit is contained in:
74
CobXmlSupport/ShowCode.cs
Normal file
74
CobXmlSupport/ShowCode.cs
Normal file
@ -0,0 +1,74 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user