예제 #1
0
 public void DCSelectedOTHERS()
 {
     oConfigMng.LoadConfig();
     DownloadsMng.TOOLDOWNLOAD(LoadDeviceServer.othersserver, oConfigMng.Config.DeviceFirmware + ".xml", oConfigMng.Config.DeviceFirmware);
     cAppend("Device channel selected: " + oConfigMng.Config.DeviceFirmware);
     DCSelected();
 }
예제 #2
0
        public void downloadcall(string xmlname, string xmlpath)
        {
            var call = new DownloadUI();

            DownloadsMng.TOOLDOWNLOAD(oConfigMng.Config.DeviceCodenmae, xmlname, xmlpath);
            oConfigMng.Config.DownloadFileSizeTWRPPermanent = DownloadsMng.filename;
            oConfigMng.SaveConfig();
            openChildForm2(call);
        }
예제 #3
0
        private void TWRPPermanent_Load(object sender, EventArgs e)
        {
            oConfigMng.LoadConfig();

            if (oConfigMng.Config.ToolTheme == "light")
            {
                materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;
            }
            if (oConfigMng.Config.ToolTheme == "dark")
            {
                materialSkinManager.Theme = MaterialSkinManager.Themes.DARK;
            }

            if (oConfigMng.Config.DeviceCodenmae == oConfigMng.Config.DeviceCodenmae)
            {
                LoadDeviceServer.CheckDevice(oConfigMng.Config.DeviceCodenmae + ".xml", oConfigMng.Config.DeviceCodenmae);
            }
            string fileName = @"C:\adb\TWRP\" + LoadDeviceServer.twrpinstallername;

            if (File.Exists(fileName))
            {
                long   length = new FileInfo(fileName).Length;
                string vIn    = oConfigMng.Config.DownloadFileSizeTWRPPermanent;
                long   vOut   = Convert.ToInt64(vIn);
                if (length == vOut)
                {
                    DownloadsMng.TOOLDOWNLOAD(oConfigMng.Config.DeviceCodenmae, "/TWRPINSTALLER.xml", "TWRP");
                    label1.Text = "Hey! " + LoadDeviceServer.twrpinstallername + " it's already downloaded, first you need to boot TWRP and then flash it!";
                    cancel.Text = "OK";
                    return;
                }
                else
                {
                    oConfigMng.Config.DownloadFileSizeTWRPPermanent = "";
                    label1.Text      = "Hey! " + LoadDeviceServer.twrpinstallername + " it's already downloaded but file is corrupted!, download again please!";
                    download.Enabled = true;
                    return;
                }
            }
            else
            {
                download.Enabled = true;
            }
        }