|
|
@ -73,16 +73,7 @@ namespace ButcherFactory.SegmentProductionAuto_ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void SegmentProductionAutoForm_FormClosing(object sender, FormClosingEventArgs e) |
|
|
void SegmentProductionAutoForm_FormClosing(object sender, FormClosingEventArgs e) |
|
|
{ |
|
|
|
|
|
var unSyncCount = SegmentProductionBL.GetUnSyncCount(); |
|
|
|
|
|
if (unSyncCount > 0) |
|
|
|
|
|
{ |
|
|
|
|
|
if (MessageBox.Show(string.Format("{0}条数据等待上传,确认关闭?", unSyncCount), "关闭确认", MessageBoxButtons.OKCancel) != DialogResult.OK) |
|
|
|
|
|
{ |
|
|
|
|
|
e.Cancel = true; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
if (initTask != null && initTask.IsAlive) |
|
|
if (initTask != null && initTask.IsAlive) |
|
|
initTask.Abort(); |
|
|
initTask.Abort(); |
|
|
if (uploadData != null && uploadData.IsAlive) |
|
|
if (uploadData != null && uploadData.IsAlive) |
|
|
@ -90,6 +81,7 @@ namespace ButcherFactory.SegmentProductionAuto_ |
|
|
if (checkInStoreState != null && checkInStoreState.IsAlive) |
|
|
if (checkInStoreState != null && checkInStoreState.IsAlive) |
|
|
checkInStoreState.Abort(); |
|
|
checkInStoreState.Abort(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public WeightDetails mCache; |
|
|
public WeightDetails mCache; |
|
|
|
|
|
|
|
|
protected override void OnLoad(EventArgs e) |
|
|
protected override void OnLoad(EventArgs e) |
|
|
@ -163,8 +155,8 @@ namespace ButcherFactory.SegmentProductionAuto_ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void BindBasicInfo() |
|
|
void BindBasicInfo() |
|
|
{ |
|
|
|
|
|
this.Invoke(new Action(() => |
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
this.BeginInvoke(new Action(() => |
|
|
{ |
|
|
{ |
|
|
productBatchSelect.EBindComboBox<ProductBatch>(null, 6, "Date"); |
|
|
productBatchSelect.EBindComboBox<ProductBatch>(null, 6, "Date"); |
|
|
config = XmlUtil.DeserializeFromFile<NotAuto.SegmentProductionFormConfig>(); |
|
|
config = XmlUtil.DeserializeFromFile<NotAuto.SegmentProductionFormConfig>(); |
|
|
@ -624,11 +616,22 @@ namespace ButcherFactory.SegmentProductionAuto_ |
|
|
} |
|
|
} |
|
|
Thread.Sleep(5000); |
|
|
Thread.Sleep(5000); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void closeBtn_Click(object sender, EventArgs e) |
|
|
|
|
|
{ |
|
|
|
|
|
Close(); |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void closeBtn_Click(object sender, EventArgs e) |
|
|
|
|
|
{ |
|
|
|
|
|
var unSyncCount = SegmentProductionBL.GetUnSyncCount(); |
|
|
|
|
|
bool close = true; |
|
|
|
|
|
if (unSyncCount > 0) |
|
|
|
|
|
{ |
|
|
|
|
|
if (MessageBox.Show(string.Format("{0}条数据等待上传,确认关闭?", unSyncCount), "关闭确认", MessageBoxButtons.OKCancel) != DialogResult.OK) |
|
|
|
|
|
{ |
|
|
|
|
|
close = false; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
Thread.Sleep(500); |
|
|
|
|
|
if (close) |
|
|
|
|
|
Close(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void goodsSetBtn_Click(object sender, EventArgs e) |
|
|
private void goodsSetBtn_Click(object sender, EventArgs e) |
|
|
@ -922,5 +925,23 @@ namespace ButcherFactory.SegmentProductionAuto_ |
|
|
MessageBox.Show(msg); |
|
|
MessageBox.Show(msg); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private const int CP_NOCLOSE_BUTTON = 0x200; |
|
|
|
|
|
|
|
|
|
|
|
protected override CreateParams CreateParams |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
get |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
CreateParams myCp = base.CreateParams; |
|
|
|
|
|
|
|
|
|
|
|
myCp.ClassStyle = myCp.ClassStyle | CP_NOCLOSE_BUTTON; |
|
|
|
|
|
|
|
|
|
|
|
return myCp; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |