Example #1
0
 private void save()
 {
     IO.save("distance", distance.ToString());
     IO.save("left", ClickLEFT.ToString());
     IO.save("middle", ClickMIDDLE.ToString());
     IO.save("right", ClickRIGHT.ToString());
     IO.save("up", MWheelUP.ToString());
     IO.save("down", MWheelDOWN.ToString());
     IO.save("lastReset", lastReset.ToString());
 }
Example #2
0
        private void GUIrefresh()
        {
            if (mouseEnterflag == true) //Darstellung der Heutigen Statistik wenn Mouse in Form1
            {
                labelLEFT.Text   = (ClickLEFT - ClickLEFT_LOADED).ToString();
                labelMIDDLE.Text = (ClickMIDDLE - ClickMIDDLE_LOADED).ToString();
                labelRIGHT.Text  = (ClickRIGHT - ClickRIGHT_LOADED).ToString();
                sum = (ClickLEFT + ClickMIDDLE + ClickRIGHT) - (ClickLEFT_LOADED + ClickMIDDLE_LOADED + ClickRIGHT_LOADED);
            }
            else
            {
                //Distanz
                double distancerounded = Math.Round(distance, 0);
                labelCM.Text = (distancerounded % 100).ToString() + " cm";
                labelM.Text  = distance.ToString();
                labelM.Text  = (Math.Truncate(distancerounded / 100) % 1000).ToString() + " m";
                labelKM.Text = Math.Truncate(distance / 100000).ToString() + " km";



                //Klicks
                //groupBoxClicks.Text = "Mausklicks";
                labelLEFT.Text   = ClickLEFT.ToString();
                labelMIDDLE.Text = ClickMIDDLE.ToString();
                labelRIGHT.Text  = ClickRIGHT.ToString();
                sum = ClickLEFT + ClickMIDDLE + ClickRIGHT;

                if (sum != 0)
                {
                    double PercLEFTClick   = (ClickLEFT / sum) * 100;
                    double PercMIDDLEClick = (ClickMIDDLE / sum) * 100;
                    double PercRIGHTClick  = (ClickRIGHT / sum) * 100;
                    PercLEFT.Text   = Math.Round(PercLEFTClick, 1).ToString() + " %";
                    PercMIDDLE.Text = Math.Round(PercMIDDLEClick, 1).ToString() + " %";
                    PercRIGHT.Text  = Math.Round(PercRIGHTClick, 1).ToString() + " %";
                }

                //Wheelrounds
                double RoundsUP   = MWheelUP / 24;
                double RoundsDOWN = MWheelDOWN / 24;
                double RoundsABS  = (RoundsUP + RoundsDOWN);
                labelUP.Text   = Math.Truncate(RoundsUP).ToString();
                labelDOWN.Text = Math.Truncate(RoundsDOWN).ToString();
                labelABS.Text  = Math.Truncate(RoundsABS).ToString();


                //Progressbar
                if ((int)Math.Truncate(distance) <= progressBar1.Maximum)
                {
                    progressBar1.Value    = (int)Math.Truncate(distance);
                    Progressbarlabel.Text = Math.Round((Math.Truncate(distance) / destinationDist * 100), 2).ToString() + " %"; //Prozentale Berechnung der zurückgelegten Strecke
                }
                else
                {
                    Progressbarlabel.Text      = "++++ Ziel erreicht ++++";
                    Progressbarlabel.ForeColor = Color.DarkRed;
                }

                //Reset
                LastResetlabel.Text = "Letzter Reset am: " + lastReset.ToString();
            }
        }