Exemplo n.º 1
0
        private void PowerSaves_Form_Load(object sender, EventArgs e)
        {
            Translate_Class.Translate(this);

            foreach (HIDDevice.interfaceDetails USB_Device in HIDDevice.getConnectedDevices())
            {
                if (USB_Device.product.Trim() == "NFC-Portal" && USB_Device.manufacturer.Trim() == "Datel")
                {
                    USBHID_DevicePath = USB_Device.devicePath;
                    label3.Text       = USB_Device.product + " of " + USB_Device.manufacturer;
                    textBox1.Text     = USB_Device.serialNumber;
                    break;
                }
            }

            if (USBHID_DevicePath == "")
            {
                MessageBox.Show(i18n.__("PowerSaves_No_PowerSaves"), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Close();
            }
            else
            {
                this.Opacity = 100;
            }
        }
Exemplo n.º 2
0
        private void Flash_Form_Load(object sender, EventArgs e)
        {
            Translate_Class.Translate(this);

            comboBox3.SelectedIndex = 0;

            comboBox2.SelectedIndex = 1;

            comboBox1.DataSource    = COMPortInfo.GetCOMPortsInfo();
            comboBox1.DisplayMember = "Description";
            comboBox1.ValueMember   = "Name";

            if (comboBox1.Items.Count > 0)
            {
                Com_Loaded = true;
                comboBox1.SelectedIndex = 0;
                comboBox1_SelectedIndexChanged(this, EventArgs.Empty);
                this.Opacity = 100;
            }
            else
            {
                MessageBox.Show(i18n.__("NFC_No_Com_Port"), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Close();
            }

            if (Action_Write)
            {
                button2.Text = i18n.__("NFC_Create_Amiibo_Tag");
            }
            if (!Action_Write)
            {
                checkBox1.Visible = false;
            }
        }
Exemplo n.º 3
0
        private void About_Form_Shown(object sender, System.EventArgs e)
        {
            Translate_Class.Translate(this);
            thTextBox_Animate = new Thread(() => AnimateTxtBox(textBox2));
            thTextBox_Animate.Start();

            thTextBox_Animate2 = new Thread(() => AnimateTxtBox(textBox3));
            thTextBox_Animate2.Start();

            thTextBox_Animate3 = new Thread(() => AnimateTxtBox(textBox4));
            thTextBox_Animate3.Start();
        }
Exemplo n.º 4
0
        private void Main_Form_Shown(object sender, EventArgs e)
        {
            thCheck_Clipboard = new Thread(Check_Clipboard);
            thCheck_Clipboard.SetApartmentState(ApartmentState.STA);

            Load_Languages();

            if (File.Exists(AmiiBomb_Config_File))
            {
                Config = JsonConvert.DeserializeObject <Config_Class>(File.ReadAllText(AmiiBomb_Config_File));
                if (Config.Bin_Folder_Path == null)
                {
                    AskBinFolder();
                }
                if (Config.KeyFile_Path == null)
                {
                    AskAmiiboKey();
                }
                if (Config.Locale == null)
                {
                    Config.Locale = I18n.GetLocale();
                }
            }
            else
            {
                AskBinFolder();
                AskAmiiboKey();
            }

            if (Config.Locale != null)
            {
                I18n.SetLocale(Config.Locale);
                Translate_Class.Translate(this);
            }

            if (!thCheck_Clipboard.IsAlive)
            {
                thCheck_Clipboard.Start();
            }

            if (Config.Bin_Folder_Path != null)
            {
                LoadAmiiboBinFolder();
                FileWatcher();
            }

            if (Config.KeyFile_Path != null)
            {
                LoadAmiiboKey();
            }

            Controls_Size();
        }
Exemplo n.º 5
0
        private void Load_Languages()
        {
            string[] Lang_Files = Directory.GetFiles("lang", "*.lang");

            foreach (string LangFile in Lang_Files)
            {
                string            FileLocale = Path.GetFileNameWithoutExtension(LangFile);
                ToolStripMenuItem items      = new ToolStripMenuItem();
                items.Tag          = FileLocale;
                items.Text         = Translate_Class.GetLocale(FileLocale);
                items.Image        = Image.FromFile(@"lang\" + FileLocale + ".png");
                items.ImageScaling = ToolStripItemImageScaling.None;
                items.Click       += new EventHandler(LanguagesToolStripMenuItem_Click);
                languagesToolStripMenuItem.DropDownItems.Add(items);
            }
        }
Exemplo n.º 6
0
        private void Editor_TPWolf_Form_Load(object sender, EventArgs e)
        {
            Translate_Class.Translate(this);

            AppData = Amiibo_Class.Dump_AppData(File.ReadAllBytes(Current_File_Bin));

            if (AppData[0x11] < 1 || AppData[0x11] > 40)
            {
                AppData[0x11] = 1;
            }
            if (AppData[0x12] < 1 || AppData[0x12] > 80)
            {
                AppData[0x12] = 0;
            }

            trackBar1.Value = AppData[0x11]; //Level
            trackBar2.Value = AppData[0x12]; //Heart
        }
Exemplo n.º 7
0
        private void Arduino_Form_Load(object sender, EventArgs e)
        {
            Translate_Class.Translate(this);

            comboBox1.DataSource    = COMPortInfo.GetCOMPortsInfo();
            comboBox1.DisplayMember = "Description";
            comboBox1.ValueMember   = "Name";

            if (comboBox1.Items.Count > 0)
            {
                comboBox1.SelectedIndex = 0;
                comboBox2.SelectedIndex = 3;
                this.Opacity            = 100;
            }
            else
            {
                MessageBox.Show(i18n.__("AmiiBombuino_No_Com_Port"), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Close();
            }
        }
Exemplo n.º 8
0
        private void Main_Form_Shown(object sender, EventArgs e)
        {
            thCheck_Clipboard = new Thread(Check_Clipboard);
            thCheck_Clipboard.SetApartmentState(ApartmentState.STA);

            Load_Languages();

            if (File.Exists(AmiiBomb_Config_File))
            {
                Config = JsonConvert.DeserializeObject <Config_Class>(File.ReadAllText(AmiiBomb_Config_File));
                if (Config.Bin_Folder_Path == null)
                {
                    AskBinFolder();
                }
                if (Config.KeyFile_Path == null)
                {
                    AskAmiiboKey();
                }
                if (Config.Locale == null)
                {
                    Config.Locale = I18n.GetLocale();
                }

                switch (Config.Database)
                {
                case 1:
                    amiibolifeToolStripMenuItem.Checked = false;
                    amiiboAPIToolStripMenuItem.Checked  = true;
                    break;

                default:
                    amiibolifeToolStripMenuItem.Checked = true;
                    amiiboAPIToolStripMenuItem.Checked  = false;
                    break;
                }

                activeFilesCachingToolStripMenuItem.Checked = Config.Cache;
            }
            else
            {
                AskBinFolder();
                AskAmiiboKey();
            }

            if (Config.Locale != null)
            {
                I18n.SetLocale(Config.Locale);
                Translate_Class.Translate(this);
            }

            if (!thCheck_Clipboard.IsAlive)
            {
                thCheck_Clipboard.Start();
            }

            if (Config.Bin_Folder_Path != null)
            {
                LoadAmiiboBinFolder();
                treeView1.Nodes[0].Expand();
                treeView1.SelectedNode = treeView1.Nodes[0];
                FolderWatcher();
            }

            if (Config.KeyFile_Path != null)
            {
                LoadAmiiboKey();
            }

            Controls_Size();
        }
Exemplo n.º 9
0
 private void About_Form_Shown(object sender, System.EventArgs e)
 {
     Translate_Class.Translate(this);
 }