181 lines
4.2 KiB
C#
181 lines
4.2 KiB
C#
using DocumentFormat.OpenXml.Wordprocessing;
|
|
|
|
namespace AnchorsTest
|
|
{
|
|
public partial class MainWindowForm : Form
|
|
{
|
|
Controller _controller;
|
|
public static MainWindowForm Instance;
|
|
|
|
|
|
public DataGridView GridViewAnchorState
|
|
{
|
|
get
|
|
{
|
|
return dataGridView1;
|
|
}
|
|
|
|
set
|
|
{
|
|
dataGridView1 = value;
|
|
}
|
|
}
|
|
|
|
public DataGridView GridViewGroupState
|
|
{
|
|
get
|
|
{
|
|
return dataGridView2;
|
|
}
|
|
|
|
set
|
|
{
|
|
dataGridView2 = value;
|
|
}
|
|
}
|
|
|
|
public DataGridView GridViewFinalGroupState
|
|
{
|
|
get
|
|
{
|
|
return dataGridView3;
|
|
}
|
|
|
|
set
|
|
{
|
|
dataGridView3 = value;
|
|
}
|
|
}
|
|
|
|
public DataGridView GridViewEngineState
|
|
{
|
|
get
|
|
{
|
|
return dataGridView4;
|
|
}
|
|
|
|
set
|
|
{
|
|
dataGridView4 = value;
|
|
}
|
|
}
|
|
|
|
|
|
public Label LabelFile1Path
|
|
{
|
|
get
|
|
{
|
|
return file1Path;
|
|
}
|
|
}
|
|
|
|
public Label LabelStatus
|
|
{
|
|
get
|
|
{
|
|
return StatusLabel;
|
|
}
|
|
}
|
|
public Label LabelFile2Path
|
|
{
|
|
get
|
|
{
|
|
return file2Path;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
public MainWindowForm()
|
|
{
|
|
InitializeComponent();
|
|
_controller = Controller.Get;
|
|
_controller.LoadJSConfig();
|
|
Instance = this;
|
|
textBox1.Text = Configuration.Get.TrackingTag.ToString();
|
|
textBox3.Text = Configuration.Get.UpdateTime.ToString();
|
|
}
|
|
|
|
private void B_ChooseFile1_Click(object sender, EventArgs e)
|
|
{
|
|
_controller.ChooseFile1Path();
|
|
}
|
|
private void B_ChooseFile2_Click(object sender, EventArgs e)
|
|
{
|
|
_controller.ChooseFile2Path();
|
|
}
|
|
private void StartRecord_Click(object sender, EventArgs e)
|
|
{
|
|
//_controller.LoadJSConfig();
|
|
//_controller.GetToken();
|
|
|
|
//_controller.GetMonitorTag(Configuration.Get.TrackingTag);
|
|
_controller.StartTrackTag();
|
|
}
|
|
private void stopTrackClick_Click(object sender, EventArgs e)
|
|
{
|
|
_controller.StopTrackTag();
|
|
_controller.SaveTrackTag();
|
|
}
|
|
|
|
private void B_Analyze_Click(object sender, EventArgs e)
|
|
{
|
|
_controller.Analyze();
|
|
}
|
|
|
|
private void B_Upload_Click(object sender, EventArgs e)
|
|
{
|
|
_controller.SaveToExcel();
|
|
}
|
|
|
|
private void textBox1_TextChanged(object sender, EventArgs e)
|
|
{
|
|
if (Configuration.Get.IsTimerRunning == false)
|
|
{
|
|
int result;
|
|
if (int.TryParse(textBox1.Text, out result))
|
|
{
|
|
Configuration.Get.TrackingTag = result;
|
|
}
|
|
else
|
|
{
|
|
textBox1.Text = Configuration.Get.TrackingTag.ToString();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
textBox1.Text = Configuration.Get.TrackingTag.ToString();
|
|
}
|
|
}
|
|
|
|
private void textBox2_TextChanged(object sender, EventArgs e)
|
|
{
|
|
Configuration.Get.FileTagSuffix = textBox2.Text;
|
|
}
|
|
|
|
private void textBox3_TextChanged(object sender, EventArgs e)
|
|
{
|
|
int result;
|
|
if (int.TryParse(textBox3.Text, out result))
|
|
{
|
|
Configuration.Get.UpdateTime = result;
|
|
}
|
|
else
|
|
{
|
|
textBox3.Text = Configuration.Get.UpdateTime.ToString();
|
|
}
|
|
}
|
|
|
|
private void button1_Click(object sender, EventArgs e)
|
|
{
|
|
StatusLabel.Text = Configuration.Get.counterGet.ToString();
|
|
}
|
|
|
|
private void button2_Click(object sender, EventArgs e)
|
|
{
|
|
_controller.LoafForms();
|
|
}
|
|
}
|
|
}
|