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");
     }
 }
示例#2
0
        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.");
        }
示例#3
0
 private void chkReset_Click(object sender, RoutedEventArgs e)
 {
     if (MessageBox.Show(this, "Do you want Reset?", "Conform", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
     {
         MELSEC.SetPulse("M3104");
     }
 }
示例#4
0
 private void btnOperator_Checked(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("L2000");
     if (pageOperator == null)
     {
         return;
     }
     frame1.Navigate(pageOperator);
 }
示例#5
0
 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();
            }
        }
示例#8
0
 private void chkManualMode_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M3109");
     GBL.operatorScreenActive = 2;
     frame1.Navigate(pageOperator);
 }
示例#9
0
 private void btnTriger_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M004040");
 }
示例#10
0
 private void btnSkip_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetDevice("M004043", 0);
     MELSEC.SetDevice("M004043", 1);
     MELSEC.SetDevice("M004043", 0);
 }
示例#11
0
 private void chkBuzzerStop_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetInvert("L3106");
 }
示例#12
0
 private void btnResetNG_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M004042");
 }
示例#13
0
 private void chkCycleStop_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M3101");
 }
示例#14
0
 private void btnModeChange_MouseUp(object sender, MouseButtonEventArgs e)
 {
     MELSEC.SetDevice("M003149", 0);
 }
示例#15
0
 private void btnLight_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetInvert("M3010");
 }
示例#16
0
 private void btnFWD_MouseUp(object sender, MouseButtonEventArgs e)
 {
     MELSEC.SetDevice("M003145", 0);
 }
示例#17
0
 private void btnKeyIn_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M004017", 0);
 }
示例#18
0
 public static void Close()
 {
     LocalDB.Dispose();
     MELSEC.Close();
 }
示例#19
0
 private void btnChargeBarDown_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M1557");
 }
示例#20
0
 private void btnCenterOff_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M1551");
 }
示例#21
0
 private void btnFloatOff_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M1555");
 }
示例#22
0
 private void btnComplete_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M004017", 0);
     MELSEC.SetInvert("M004019");
 }
示例#23
0
 private void chkStart_MouseUp(object sender, MouseButtonEventArgs e)
 {
     MELSEC.SetDevice("M3100", 0);
 }
 private void btnOFF_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M551");
 }
示例#25
0
 private void btnBWD_MouseDown(object sender, MouseButtonEventArgs e)
 {
     MELSEC.SetDevice("M003146", 1);
 }