Esempio n. 1
0
        private void ShowConfiguration(EM4325Tag.ConfigData cfg)
        {
            string[] cfgStrings;

            cfgStrings = EM4325Tag.ConfigToStrings(cfg);

            foreach (string s in cfgStrings)
            {
                AddLog(s);
            }
        }
Esempio n. 2
0
        private void StartCustomSensor()
        {
            if (TagReady)
            {
                bool                 ok  = false;
                CustomConfigDlg      dlg = null;
                EM4325Tag.ConfigData cfg = new EM4325Tag.ConfigData();

                try
                {
                    cfg = CurrentTag.Configuration;
                    ok  = true;
                }
                catch (Exception e)
                {
                    AddLog("Could not read current configuration.");
                }

                if (ok)
                {
                    dlg = new CustomConfigDlg(cfg.custom);

                    if (dlg.ShowDialog() == DialogResult.OK)
                    {
                        AddLog("Starting custom...");
                    }
                    else
                    {
                        ok = false;
                    }
                }

                if (ok)
                {
                    try
                    {
                        CurrentTag.StartCustom(dlg.Config, dlg.TimeStampRequired, dlg.ResetAlarmsEnabled, BlockCfgChk.Checked);
                    }
                    catch (Exception e)
                    {
                        AddLog("Custom start failed.");
                        AddLog("Error: " + e.Message);
                    }
                }
            }
        }