private void InitPayment()
        {
            Debug.Log("CashmaticApp", "InitPayment");
            int amountLeft = Global.subtotale;

            if (_ob.panda.OnPayment)
            {
                int saldato = CashmaticCommands.ReadSaldato();
                amountLeft = Global.subtotale - saldato;
            }
            else
            {
                CashmaticCommands.DeleteCashmaticFiles();
                CashmaticCommands.WriteSubtotale(Global.subtotale);
                _ob.panda.OnPayment = true;
            }

            tblPrice.Text = String.Format("{0:0.00}€", amountLeft / (double)100);

            SetSaldatoChangeListener();
            SetPagatoChangeListener();
            SetErogatoChangeListener();
            SetNonerogatoChangeListener();
            SetErogazioneChangeListener();
        }
        public RefundingProces(RootObject ob, bool CannotDispense)
        {
            Debug.Log("CashmaticApp", "Initializing refunding process");
            InitializeComponent();
            _ob = ob;
            if (!CannotDispense)
            {
                _fileWatcher                     = new FileSystemWatcher();
                _fileWatcher.Path                = Global.cashmaticBasePath;
                _fileWatcher.Filter              = "annulla.txt";
                _fileWatcher.Deleted            += new FileSystemEventHandler(OnDeletedAnnuala);
                _fileWatcher.EnableRaisingEvents = true;

                CashmaticCommands.WriteAnnulla();
            }
            else
            {
                _fileWatcher                     = new FileSystemWatcher();
                _fileWatcher.Path                = Global.cashmaticBasePath;
                _fileWatcher.Filter              = "erogato.txt";
                _fileWatcher.Created            += new FileSystemEventHandler(OnCreatedErogato);
                _fileWatcher.EnableRaisingEvents = true;

                CashmaticCommands.DeleteCashmaticFiles();
                CashmaticCommands.WriteSubtotale(Global.pagato * (-1));
            }
            _ob.panda.OnPayment = false;
        }