Initial commit
This commit is contained in:
71
Handler/Project/Dialog/fZPLEditor.cs
Normal file
71
Handler/Project/Dialog/fZPLEditor.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using AR;
|
||||
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;
|
||||
|
||||
namespace Project.Dialog
|
||||
{
|
||||
public partial class fZPLEditor : Form
|
||||
{
|
||||
string fn = string.Empty;
|
||||
public fZPLEditor(string fn_)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.fn = fn_;
|
||||
this.FormClosed += FZPLEditor_FormClosed;
|
||||
}
|
||||
|
||||
private void FZPLEditor_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
PUB.log.RaiseMsg -= Log_RaiseMsg;
|
||||
}
|
||||
|
||||
private void fZPLEditor_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.richTextBox1.Text = System.IO.File.ReadAllText(this.fn, System.Text.Encoding.Default);
|
||||
PUB.log.RaiseMsg += Log_RaiseMsg;
|
||||
}
|
||||
|
||||
private void Log_RaiseMsg(DateTime LogTime, string TypeStr, string Message)
|
||||
{
|
||||
this.logTextBox1.AddMsg(LogTime, TypeStr, Message);
|
||||
}
|
||||
|
||||
private void toolStripButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
//load
|
||||
if(UTIL.MsgQ("다시 불러 올까요?") == DialogResult.Yes)
|
||||
this.richTextBox1.Text = System.IO.File.ReadAllText(this.fn, System.Text.Encoding.Default);
|
||||
}
|
||||
|
||||
private void toolStripButton2_Click(object sender, EventArgs e)
|
||||
{
|
||||
//save
|
||||
if(UTIL.MsgQ("저장 할까요?")== DialogResult.Yes)
|
||||
System.IO.File.WriteAllText(this.fn, this.richTextBox1.Text.Trim(), System.Text.Encoding.Default);
|
||||
}
|
||||
|
||||
private void toolStripButton4_Click(object sender, EventArgs e)
|
||||
{
|
||||
//right
|
||||
if (PUB.PrinterR.IsOpen)
|
||||
PUB.PrinterR.Print(this.richTextBox1.Text);
|
||||
else PUB.log.AddAT("프린터R연결 안됨");
|
||||
}
|
||||
|
||||
private void toolStripButton3_Click(object sender, EventArgs e)
|
||||
{
|
||||
//left
|
||||
if (PUB.PrinterL.IsOpen)
|
||||
PUB.PrinterL.Print(this.richTextBox1.Text);
|
||||
else
|
||||
PUB.log.AddAT("프린터L 연결 안됨");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user