Ejemplo n.º 1
0
        private void updateTimer_Tick()
        {
            Timer timer = new Timer();

            timer.Interval = (1 * 1000);
            timer.Tick    += new EventHandler(timer_Tick);
            timer.Start();
            Label1.Text = "Free RAM: " + Convert.ToInt64(ramCounter.NextValue()).ToString() + " MB";
            label4.Text = "CPU: " + Convert.ToInt64(cpuCounter.NextValue()).ToString() + " %";
            Label2.Text = @"Folder Size: C:\adb " + CheckFileSize.GetDirectorySize(@"C:\adb") + " MB";
        }
Ejemplo n.º 2
0
 private void flashtwrp_Click(object sender, EventArgs e)
 {
     if (!File.Exists(@"C:\adb\TWRP\OrangeFox-R10.1_01-Stable-lavender.zip"))
     {
         MessageBox.Show("Can´t find TWRP OrangeFox image...", "TWRP Missing", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         Downloads.downloadcall("Downloading OrangeFox-R10.1_01-Stable-lavender...", "https://files.orangefox.tech/OrangeFox-Stable/lavender/OrangeFox-R10.1_01-Stable-lavender.zip", @"C:\adb\TWRP\OrangeFox-R10.1_01-Stable-lavender.zip");
     }
     else
     {
         if (!File.Exists(@"C:\adb\TWRP\recovery.img"))
         {
             CheckFileSize.TWRP();
         }
         else
         {
             TextBox2.Text = "Checking device connection...";
             if (IsConnected())
             {
                 System.Threading.Thread.Sleep(1000);
                 TextBox2.Text = "Flashing TWRP OrangeFox...";
                 System.Threading.Thread.Sleep(1000);
                 Adb.FastbootExecuteCommand(@"\fastboot.exe ", @"flash recovery C:\adb\TWRP\recovery.img");
                 System.Threading.Thread.Sleep(3000);
                 Adb.FastbootExecuteCommand(@"\adb.exe ", @"reboot recovery");
                 TextBox2.Text = "Booting into OrangeFox...";
                 System.Threading.Thread.Sleep(2000);
                 MessageBox.Show("TWRP Installed!", "Flash: TWRP", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 visual_reLoad();
             }
             else
             {
                 TextBox2.Text = "Please connect your device...";
                 System.Threading.Thread.Sleep(1000);
                 MessageBox.Show("Device doesn´t found, Please connect the phone and check if developer (adb) options are enabled", "Flash: Warning!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                 visual_reLoad();
             }
         }
         visual_reLoad();
     }
 }
Ejemplo n.º 3
0
 private void timer_Tick(object sender, EventArgs e)
 {
     Label1.Text = "Free RAM: " + Convert.ToInt64(ramCounter.NextValue()).ToString() + " MB";
     label4.Text = "CPU: " + Convert.ToInt64(cpuCounter.NextValue()).ToString() + " %";
     Label2.Text = @"Folder Size: C:\adb " + CheckFileSize.GetDirectorySize(@"C:\adb") + " MB";
 }
Ejemplo n.º 4
0
        private void ClearAllFoldersToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var result = MessageBox.Show("Do you want to clear all the folders? You will remove all files except for the important ones. " + CheckFileSize.GetDirectorySize(@"C:\adb") + " MB", "Warning!", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (result == DialogResult.Yes)
            {
                var paths = new[] { "C:\\adb\\.settings", "C:\\adb\\TWRP", "C:\\adb\\MIFlash", "C:\\adb\\MIUnlock", "C:\\adb\\xiaomiglobalfastboot", "C:\\adb\\xiaomiglobalfastboot\\MI", "C:\\adb\\xiaomieu", "C:\\adb\\xiaomiglobalrecovery" };

                foreach (var path in paths)
                {
                    if (Directory.Exists(path))
                    {
                        Directory.SetCurrentDirectory(@"C:\adb");
                        Directory.Delete(path, true);
                    }
                }
                MessageBox.Show("All Folders cleared! The app will restart!", "Clear Folders", MessageBoxButtons.OK, MessageBoxIcon.Information);
                RefreshTool();
            }
        }