コード例 #1
0
        public void ClearSongControls()
        {
            UniqueIdBox.Text = "(No song selected)";
            TitleBox.Clear();
            SubtitleBox.Clear();

            BackgroundBox.Clear();

            ComposerBox.Clear();
            ArrangerBox.Clear();
            CopyrightBox.Clear();
            LicenseBox.Clear();
            MadeFamousByBox.Clear();

            DifficultyBox.Value = 0;
            RatingBox.Value     = 0;

            FingerHintBox.Clear();
            HandsBox.Clear();

            TagBox.Clear();
            TagList.Items.Clear();

            BookmarkMeasureBox.Value = 1;
            BookmarkDescriptionBox.Clear();
            BookmarkList.Items.Clear();

            PropertiesGroup.Enabled = false;
        }
コード例 #2
0
        public void loadPlugins()
        {
            try {
                LicenseBox.Clear();
                LicenseBox.Items.Add("Query", "Core: Queryer", 0);
                LicenseBox.Items.Add("Move", "Core: Mover", 0);
                LicenseBox.Items.Add("Compare", "Core: Compare", 0);
                LicenseBox.Items.Add("CrossJoin", "Core: CrossJoin", 0);
                LicenseBox.Items.Add("ForEach", "Core: ForEach", 0);
                LicenseBox.Items.Add("Chunk", "Core: Chunk", 0);
                Array pls = plugincore.getPlugins();
                foreach (Object pl in pls)
                {
                    LicenseBox.Items.Add(pl.ToString(), "Plugin: " + plugincore.Hook(pl.ToString()) + ", " + plugincore.Type(pl.ToString()) + ", " + plugincore.Description(pl.ToString()), 0);
                }
                var dict = new JavaScriptSerializer().Deserialize <Dictionary <string, object> >(LicenseInformation);

                Microsoft.Win32.RegistryKey key;
                string rootKey = "SOFTWARE\\" + Assembly.GetExecutingAssembly().GetName().Name;
                key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(rootKey);
                if (key == null)
                {
                    key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(rootKey);
                }
                key.SetValue("LicenseInformation", LicenseInformation);
                key.Close();
                foreach (ListViewItem item in LicenseBox.Items)
                {
                    if (LicenseInformation.Contains(item.Name))
                    {
                        item.ImageIndex = 1;
                    }
                    else
                    {
                        item.ImageIndex = 0;
                    }
                }

                if (dict["serial"] != null)
                {
                    SerialLbl.Text = "License Key: " + dict["serial"].ToString();
                }
                if (dict["license"] != null)
                {
                    LicenseLab.Text = "License Type: " + dict["license"].ToString();
                }
                if (dict["expires"] != null)
                {
                    ExpiresLbl.Text = "Expires: " + dict["expires"].ToString();
                }
            } catch (Exception licenseEx) {
                Console.Write(licenseEx.Message);
            }
        }