private void btnON_Click(object sender, RoutedEventArgs e) { if (MessageBox.Show(this, "Do you want Charge on?", "Conform", MessageBoxButton.YesNo) == MessageBoxResult.Yes) { MELSEC.SetPulse("M550"); } }
private void btnMdmsSave_Click(object sender, RoutedEventArgs e) { MELSEC.SetText("D4000", txtCstID1.Text, 8); MELSEC.SetText("D4008", txtCstID2.Text, 8); MELSEC.SetText("D4010", txtCstID3.Text, 8); MELSEC.SetText("D4018", txtCstID4.Text, 8); MELSEC.SetText("D4020", txtCstID5.Text, 8); GBL.cstID[0] = txtCstID1.Text; GBL.cstID[1] = txtCstID2.Text; GBL.cstID[2] = txtCstID3.Text; GBL.cstID[3] = txtCstID4.Text; GBL.cstID[4] = txtCstID5.Text; blockRead.DataRead(); txtCstID1a.Text = blockRead.GetText("D4000", 8); txtCstID2a.Text = blockRead.GetText("D4008", 8); txtCstID3a.Text = blockRead.GetText("D4010", 8); txtCstID4a.Text = blockRead.GetText("D4018", 8); txtCstID5a.Text = blockRead.GetText("D4020", 8); IniFile inifile = new IniFile(); inifile.WriteStr("M-DMS", "CSTID1", GBL.cstID[0]); inifile.WriteStr("M-DMS", "CSTID2", GBL.cstID[1]); inifile.WriteStr("M-DMS", "CSTID3", GBL.cstID[2]); inifile.WriteStr("M-DMS", "CSTID4", GBL.cstID[3]); inifile.WriteStr("M-DMS", "CSTID5", GBL.cstID[4]); MessageBox.Show("Saved CST-ID."); }
private void chkReset_Click(object sender, RoutedEventArgs e) { if (MessageBox.Show(this, "Do you want Reset?", "Conform", MessageBoxButton.YesNo) == MessageBoxResult.Yes) { MELSEC.SetPulse("M3104"); } }
private void btnOperator_Checked(object sender, RoutedEventArgs e) { MELSEC.SetPulse("L2000"); if (pageOperator == null) { return; } frame1.Navigate(pageOperator); }
private void btnMain_Click(object sender, RoutedEventArgs e) { MELSEC.SetPulse("L2000"); if (pageOperator == null) { return; } rbOperator.IsChecked = true; frame1.Navigate(pageOperator); }
private void btnLockOn_Click(object sender, RoutedEventArgs e) { DlgPassword dlg = new DlgPassword(); dlg.Owner = Application.Current.MainWindow; if (dlg.ShowDialog() == true) { MELSEC.SetDevice("M003150", 0); // Open MELSEC.SetDevice("M003151", 1); // Close } }
private void btnLockOff_Click(object sender, RoutedEventArgs e) { if (randomRead.GetData("L3109") != 1) { MessageBox.Show("Not mantance mode, please change mode."); return; } DlgPassword dlg = new DlgPassword(); dlg.Owner = Application.Current.MainWindow; if (dlg.ShowDialog() == true) { MELSEC.SetDevice("M003150", 1); // Open MELSEC.SetDevice("M003151", 0); // Close DlgMaintrance dlg2 = new DlgMaintrance(); dlg2.Owner = Application.Current.MainWindow; dlg2.ShowDialog(); } }
private void chkManualMode_Click(object sender, RoutedEventArgs e) { MELSEC.SetPulse("M3109"); GBL.operatorScreenActive = 2; frame1.Navigate(pageOperator); }
private void btnTriger_Click(object sender, RoutedEventArgs e) { MELSEC.SetPulse("M004040"); }
private void btnSkip_Click(object sender, RoutedEventArgs e) { MELSEC.SetDevice("M004043", 0); MELSEC.SetDevice("M004043", 1); MELSEC.SetDevice("M004043", 0); }
private void chkBuzzerStop_Click(object sender, RoutedEventArgs e) { MELSEC.SetInvert("L3106"); }
private void btnResetNG_Click(object sender, RoutedEventArgs e) { MELSEC.SetPulse("M004042"); }
private void chkCycleStop_Click(object sender, RoutedEventArgs e) { MELSEC.SetPulse("M3101"); }
private void btnModeChange_MouseUp(object sender, MouseButtonEventArgs e) { MELSEC.SetDevice("M003149", 0); }
private void btnLight_Click(object sender, RoutedEventArgs e) { MELSEC.SetInvert("M3010"); }
private void btnFWD_MouseUp(object sender, MouseButtonEventArgs e) { MELSEC.SetDevice("M003145", 0); }
private void btnKeyIn_Click(object sender, RoutedEventArgs e) { MELSEC.SetPulse("M004017", 0); }
public static void Close() { LocalDB.Dispose(); MELSEC.Close(); }
private void btnChargeBarDown_Click(object sender, RoutedEventArgs e) { MELSEC.SetPulse("M1557"); }
private void btnCenterOff_Click(object sender, RoutedEventArgs e) { MELSEC.SetPulse("M1551"); }
private void btnFloatOff_Click(object sender, RoutedEventArgs e) { MELSEC.SetPulse("M1555"); }
private void btnComplete_Click(object sender, RoutedEventArgs e) { MELSEC.SetPulse("M004017", 0); MELSEC.SetInvert("M004019"); }
private void chkStart_MouseUp(object sender, MouseButtonEventArgs e) { MELSEC.SetDevice("M3100", 0); }
private void btnOFF_Click(object sender, RoutedEventArgs e) { MELSEC.SetPulse("M551"); }
private void btnBWD_MouseDown(object sender, MouseButtonEventArgs e) { MELSEC.SetDevice("M003146", 1); }