Exemplo n.º 1
0
        private static void AddExtraFlashable(BackgroundWorker worker)
        {
            if (Form1.form.extra_dataGridView.Rows.Count < 1)
            {
                return;
            }

            SetJobNum(++JobNum);
            for (int i = 0; i < Form1.form.extra_dataGridView.Rows.Count; i++)
            {
                string type = Form1.form.extra_dataGridView["GridViewType", i].Value.ToString();
                string name = Form1.form.extra_dataGridView["GridViewName", i].Value.ToString();
                if (!File.Exists(name))
                {
                    Logger.WriteLog("Error adding Extra File '" + name + "': File does not exist");
                    continue;
                }

                if (type == "Flashable zip")
                {
                    ExtraFiles.AddExtraFlashable(worker, name);
                }
                else
                {
                    ExtraFiles.AddAPKFile(worker, name, type);
                }
            }
        }
Exemplo n.º 2
0
        private static void AddExtras(BackgroundWorker worker)
        {
            if (Form1.form.include_checklist.CheckedItems.Count < 1)
            {
                return;
            }

            Logger.WriteLog("Adding extra files");
            SetJobNum(++JobNum);
            foreach (string item in Form1.form.include_checklist.CheckedItems)
            {
                ExtraFiles.AddExtraFiles(worker, item.ToLower(), Form1.form.ftf_textbox.Text);
            }
        }
Exemplo n.º 3
0
        private void ftf_button_Click(object sender, EventArgs e)
        {
            if (isWorking)
            {
                return;
            }

            openFileDialog1.Filter      = "FTF Files|*.ftf|All files|*";
            openFileDialog1.Multiselect = false;
            DialogResult result = openFileDialog1.ShowDialog();

            if (result != DialogResult.OK)
            {
                return;
            }

            ftf_textbox.Text = openFileDialog1.FileName;
            ExtraFiles.FetchSinFromFTF(openFileDialog1.FileName);
            include_checklist.Enabled = true;
            openFileDialog1.FileName  = string.Empty;
        }