Exemplo n.º 1
0
        void IdTimer_Tick(object sender, EventArgs e)
        {
            IdTimer.Stop();

            if (fabiOnline == 0)
            {
                addToLog("ID-Timeout ! No Fabi module found !");
                disconnnectComButton_Click(this, null);
            }
        }
Exemplo n.º 2
0
        public void gotID(String newLine)
        {
            DialogResult dialogResult;

            addToLog("Connected device: " + newLine);
            IdTimer.Stop();
            if (!(newLine.Contains("Flipmouse")))
            {
                disconnnectComButton_Click(this, null);
                dialogResult = MessageBox.Show("The connected device could not be identified - disconnecting!", "FlipMouse not found", MessageBoxButtons.OK);
                return;
            }
            if ((!(newLine.Contains(VERSION_STRING))) && (checkVersion == 1))
            {
                dialogResult = MessageBox.Show(newLine + "The firmware is not 100% compatible to GUI version " + VERSION_STRING + " !\nCurrent releases can be found at: https://github.com/asterics/FLipMouse/releases \nShould the Firmware be updated automatically ? ", "Software/Firmware update recommended", MessageBoxButtons.YesNo);
                if (dialogResult == DialogResult.Yes)
                {
                    disconnnectComButton_Click(this, null);
                    Thread.Sleep(1000);
                    string strCmdText;
                    strCmdText = "/C tycmd.exe upload FlipWare.ino.hex";
                    System.Diagnostics.Process.Start("CMD.exe", strCmdText);
                    return;
                }
            }
            flipMouseOnline = 1;

            dialogResult = MessageBox.Show("Connected device: " + newLine + "Do you want to load the slots and settings which are stored in the FLipMouse device ?", "Load Settings ?", MessageBoxButtons.YesNo);
            if (dialogResult == DialogResult.Yes)
            {
                loadSettingsFromFLipmouse();
                slotNames.Items.Clear();
            }

            irCommandBox.Items.Clear();
            irIdleSequenceBox.Items.Clear();
            sendListIRCommand();
            sendStartReportingCommand();   // start reporting raw values !
        }