コード例 #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);
            }
        }
コード例 #3
0
        public LicenseView(IInstallerViewModel model)
        {
            InitializeComponent();

            DataContext = model;
            viewModel   = model;

            try
            {
                Assembly assembly = Assembly.GetExecutingAssembly();

                using (var stream = assembly.GetManifestResourceStream("CloudVeilInstallerUI.Resources.MOZILLA_PUBLIC_LICENSE.rtf"))
                {
                    LicenseBox.SelectAll();
                    LicenseBox.Selection.Load(stream, DataFormats.Rtf);
                }
            }
            catch
            {
                this.LicenseBox.Document.Blocks.Clear();
                this.LicenseBox.AppendText("Failed to load license file. A copy of the license file may be found at https://www.mozilla.org/en-US/MPL/2.0/");
            }
        }
コード例 #4
0
 private void OnHelpLicenseClicked(object sender, EventArgs e)
 {
     RCSim.AircraftEditor.Dialogs.LicenseBox license = new LicenseBox();
     license.ShowDialog();
 }
コード例 #5
0
        void ReleaseDesignerOutlets()
        {
            if (AddTagButton != null)
            {
                AddTagButton.Dispose();
                AddTagButton = null;
            }

            if (ArrangerBox != null)
            {
                ArrangerBox.Dispose();
                ArrangerBox = null;
            }

            if (BackgroundBox != null)
            {
                BackgroundBox.Dispose();
                BackgroundBox = null;
            }

            if (BookmarkLabelBox != null)
            {
                BookmarkLabelBox.Dispose();
                BookmarkLabelBox = null;
            }

            if (BookmarkList != null)
            {
                BookmarkList.Dispose();
                BookmarkList = null;
            }

            if (BookmarkMeasureBox != null)
            {
                BookmarkMeasureBox.Dispose();
                BookmarkMeasureBox = null;
            }

            if (ComposerBox != null)
            {
                ComposerBox.Dispose();
                ComposerBox = null;
            }

            if (CopyrightBox != null)
            {
                CopyrightBox.Dispose();
                CopyrightBox = null;
            }

            if (DifficultyBox != null)
            {
                DifficultyBox.Dispose();
                DifficultyBox = null;
            }

            if (FingerHintBox != null)
            {
                FingerHintBox.Dispose();
                FingerHintBox = null;
            }

            if (HandsBox != null)
            {
                HandsBox.Dispose();
                HandsBox = null;
            }

            if (LicenseBox != null)
            {
                LicenseBox.Dispose();
                LicenseBox = null;
            }

            if (MadeFamousByBox != null)
            {
                MadeFamousByBox.Dispose();
                MadeFamousByBox = null;
            }

            if (PartsBox != null)
            {
                PartsBox.Dispose();
                PartsBox = null;
            }

            if (PropertiesGroup != null)
            {
                PropertiesGroup.Dispose();
                PropertiesGroup = null;
            }

            if (RatingBox != null)
            {
                RatingBox.Dispose();
                RatingBox = null;
            }

            if (RemoveBookmarkButton != null)
            {
                RemoveBookmarkButton.Dispose();
                RemoveBookmarkButton = null;
            }

            if (RemoveTagButton != null)
            {
                RemoveTagButton.Dispose();
                RemoveTagButton = null;
            }

            if (RetargetButton != null)
            {
                RetargetButton.Dispose();
                RetargetButton = null;
            }

            if (SongList != null)
            {
                SongList.Dispose();
                SongList = null;
            }

            if (SubtitleBox != null)
            {
                SubtitleBox.Dispose();
                SubtitleBox = null;
            }

            if (TagBox != null)
            {
                TagBox.Dispose();
                TagBox = null;
            }

            if (TagList != null)
            {
                TagList.Dispose();
                TagList = null;
            }

            if (TitleBox != null)
            {
                TitleBox.Dispose();
                TitleBox = null;
            }

            if (UniqueIdBox != null)
            {
                UniqueIdBox.Dispose();
                UniqueIdBox = null;
            }
        }