Example #1
0
        private void ExtensionCheck()
        {
            string oldPath = TransmitMii_Associations.AssociationPath().ToLower();
            string newPath = Application.ExecutablePath.ToLower();

            if (!string.IsNullOrEmpty(oldPath) && !string.IsNullOrEmpty(newPath))
            {
                if (oldPath != newPath)
                {
                    if (TransmitMii_Associations.CheckAssociation(TransmitMii_Associations.Extension.DOL))
                    {
                        TransmitMii_Associations.AddAssociation(TransmitMii_Associations.Extension.DOL, true, newPath, false);
                    }
                    if (TransmitMii_Associations.CheckAssociation(TransmitMii_Associations.Extension.ELF))
                    {
                        TransmitMii_Associations.AddAssociation(TransmitMii_Associations.Extension.ELF, true, newPath, false);
                    }
                }
            }
        }
Example #2
0
        private void llbLinkExtension_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            ContextMenuStrip cmMenu = new ContextMenuStrip();

            ToolStripMenuItem cmDol = new ToolStripMenuItem("DOL");

            cmDol.Name   = "cmDol";
            cmDol.Click += new EventHandler(cmMenu_Click);
            if (TransmitMii_Associations.CheckAssociation(TransmitMii_Associations.Extension.DOL))
            {
                cmDol.Checked = true;
            }

            ToolStripMenuItem cmElf = new ToolStripMenuItem("ELF");

            cmElf.Name   = "cmElf";
            cmElf.Click += new EventHandler(cmMenu_Click);
            if (TransmitMii_Associations.CheckAssociation(TransmitMii_Associations.Extension.ELF))
            {
                cmElf.Checked = true;
            }

            ToolStripMenuItem cmWad = new ToolStripMenuItem("WAD");

            cmWad.Name   = "cmWad";
            cmWad.Click += new EventHandler(cmMenu_Click);
            if (TransmitMii_Associations.CheckAssociation(TransmitMii_Associations.Extension.WAD))
            {
                cmWad.Checked = true;
            }

            cmMenu.Items.Add(cmDol);
            cmMenu.Items.Add(cmElf);
            cmMenu.Items.Add(cmWad);

            cmMenu.Show(MousePosition);
        }