Initial commit

This commit is contained in:
ChiKyun Kim
2025-07-17 16:11:46 +09:00
parent 4865711adc
commit 4a1b1924ba
743 changed files with 230954 additions and 0 deletions

View File

@@ -0,0 +1,102 @@
using AR;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Project.Dialog
{
public partial class RegExRule : Form
{
public RegExRule()
{
InitializeComponent();
this.dataSet1.Component_Reel_RegExRule.TableNewRow += (s1, e1) => {
if(PUB.Result.isSetvModel)
e1.Row["CustCode"] = PUB.Result.vModel.Title;
};
}
private void RegExRule_Load(object sender, EventArgs e)
{
RefreshList(PUB.Result.vModel.Title);
}
private void component_Reel_RegExRuleBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
this.Validate();
this.bs.EndEdit();
this.tam.UpdateAll(this.dataSet1);
var modelName = PUB.Result.vModel.Title;
PUB.Result.BCDPattern = PUB.GetPatterns(modelName, false);
PUB.Result.BCDIgnorePattern = PUB.GetPatterns(modelName, true);
PUB.log.Add($"모델패턴로딩:{PUB.Result.BCDPattern.Count}/{PUB.Result.BCDIgnorePattern.Count}");
}
private void RefreshList(string cust)
{
try
{
this.ta.FillByWithSample(this.dataSet1.Component_Reel_RegExRule, cust);
foreach(DataGridViewRow drow in this.dv1.Rows)
{
var drv = drow.DataBoundItem as DataRowView;
if (drv == null) continue;
var dr = drv.Row as DataSet1.Component_Reel_RegExRuleRow;
if (dr.IsCustCodeNull() || dr.CustCode.isEmpty())
drow.DefaultCellStyle.BackColor = Color.DimGray;
else
drow.DefaultCellStyle.BackColor = Color.WhiteSmoke;
}
dv1.AutoResizeColumns();
}
catch (System.Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message);
}
}
private void toolStripButton1_Click(object sender, EventArgs e)
{
RefreshList(PUB.Result.vModel.Title);
}
private void bs_CurrentChanged(object sender, EventArgs e)
{
var drv = this.bs.Current as DataRowView;
if (drv == null) return;
var dr = drv.Row as DataSet1.Component_Reel_RegExRuleRow;
}
private void toolStripButton2_Click(object sender, EventArgs e)
{
try
{
DataSet1 ds1 = new DataSet1();
this.ta.FillAll(ds1.Component_Reel_RegExRule);
var path = UTIL.MakePath("Export", "BarcodeRule.xml");
var fi = new System.IO.FileInfo(path);
if (fi.Directory.Exists == false) fi.Directory.Create();
ds1.Component_Reel_RegExRule.WriteXml(path);
UTIL.MsgI($"Export list File = {path},count={ds1.Component_Reel_RegExRule.Count}");
}
catch (System.Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message);
}
}
}
}