Exemple #1
0
 private void noteToRecycleComboBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (NV11 != null)
     {
         textBox1.AppendText("Changing note routing...\r\n");
         if (noteToRecycleComboBox.Text == "No Recycling")
         {
             // switch all notes to stacking
             NV11.RouteAllToStack(textBox1);
         }
         else
         {
             // switch all notes to stacking first
             NV11.RouteAllToStack();
             // make sure payout is switched on
             NV11.EnablePayout();
             // switch selected note to payout
             string   s    = noteToRecycleComboBox.Items[noteToRecycleComboBox.SelectedIndex].ToString();
             string[] sArr = s.Split(' ');
             try
             {
                 NV11.ChangeNoteRoute(Int32.Parse(sArr[0]) * 100, sArr[1].ToCharArray(), false, textBox1);
             }
             catch (Exception ex)
             {
                 MessageBox.Show(ex.ToString());
                 return;
             }
         }
     }
 }
Exemple #2
0
        private void cbRecycleChannelNV11_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cbRecycleChannelNV11.Text == "No recycling")
            {
                // switch all notes to stacking by disabling the payout
                NV11.DisablePayout();
            }
            else
            {
                // route all to stack to begin with
                NV11.RouteAllToStack();

                // switch selected note to recycle after enabling payout
                NV11.EnablePayout();
                string   name = cbRecycleChannelNV11.Items[cbRecycleChannelNV11.SelectedIndex].ToString();
                string[] sArr = name.Split(' ');
                try
                {
                    NV11.ChangeNoteRoute(Int32.Parse(sArr[0]) * 100, sArr[1].ToCharArray(), false, textBox1);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                    return;
                }
            }
        }