示例#1
0
        ////////// Used to make form draggable

        public CandySettingsFileViewerWindow()
        {
            InitializeComponent();

            var file =
                $"{Application.StartupPath}\\CandyGalleryUserSettings\\{Program.CandyGalleryWindow.UserSettings.UserName.ToLower()}_CandyGalleryUserSettings.xml";

            if (File.Exists(file))
            {
                var xmlDocument = new XmlDocument {
                    PreserveWhitespace = true
                };
                xmlDocument.LoadXml(File.ReadAllText(file));
                var decryptedContents = SaveLoadSettingsHandler.DecryptUserSettingsDirectFromContent(xmlDocument);
                richTextBox.Text = decryptedContents;
            }
            else
            {
                MessageBox.Show($"Unable to read settings file for: \n\n\"file\"",
                                @"Error Reading Settings", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Dispose();
                Close();
            }

            lblCandySettingsFileViewer.ForeColor =
                CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings.UserInterfaceColorName);
            btnCopySettingsText.ForeColor =
                CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings.UserInterfaceColorName);
            btnSaveSettings.BackColor =
                CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings.UserInterfaceColorName);
        }
 private void SetFormColors()
 {
     lblCandyFavoritesTitle.ForeColor =
         CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings
                                                      .UserInterfaceColorName);
     lblCurrentMediaPath.ForeColor =
         CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings
                                                      .UserInterfaceColorName);
     lblJumpToFavorite.ForeColor =
         CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings
                                                      .UserInterfaceColorName);
     lblFilterFavoriteType.ForeColor =
         CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings
                                                      .UserInterfaceColorName);
     btnLastFavorite.ForeColor =
         CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings
                                                      .UserInterfaceColorName);
     btnNextFavorite.ForeColor =
         CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings
                                                      .UserInterfaceColorName);
     btnDeleteFavorite.BackColor =
         CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings
                                                      .UserInterfaceColorName);
     btnViewFavorite.BackColor =
         CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings
                                                      .UserInterfaceColorName);
 }
示例#3
0
        private void ColorTheme_SelectedIndexChanged(object sender, EventArgs e)
        {
            var newUIColor = CandyInterfaceColors.GetInterfaceColorByName(cmbBxColorTheme.Text);

            Program.CandyGalleryWindow.UserSettings.UserInterfaceColorName = newUIColor == CandyInterfaceColors.CandyRed && cmbBxColorTheme.Text != "Cherry" ? "Cherry" : cmbBxColorTheme.Text;
            Program.CandyGalleryWindow.LoadColorOntoInterface(newUIColor);
            LoadColorOntoSettingsPage(newUIColor);
        }
        ////////// Used to make form draggable

        public CandyKeyboardShortcutWindow()
        {
            InitializeComponent();

            lblCandyKeyboardShortcutTitle.ForeColor =
                CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings
                                                             .UserInterfaceColorName);
        }
        ////////// Used to make form draggable

        public CandyVideoWindow()
        {
            InitializeComponent();
            videoPlayer.settings.autoStart = true;
            videoPlayer.settings.volume    = 100;
            KeyPreview = true;
            lblCandyVideoTitle.ForeColor =
                CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings.UserInterfaceColorName);
        }
示例#6
0
 private void ApplyColorToRandomButton_CheckedChanged(object sender, EventArgs e)
 {
     Program.CandyGalleryWindow.UserSettings.ApplyColorToRandomizeButton = chkApplyColorToRandomButton.Checked;
     if (chkApplyColorToRandomButton.Checked)
     {
         Program.CandyGalleryWindow.btnRandomize.BackColor = CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings.UserInterfaceColorName);
     }
     else
     {
         Program.CandyGalleryWindow.btnRandomize.BackColor = Color.DarkGoldenrod;
     }
 }
 private void SetFormColors()
 {
     lblCandyMultiRandomTitle.ForeColor =
         CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings
                                                      .UserInterfaceColorName);
     btnFavoriteSelection.ForeColor =
         CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings
                                                      .UserInterfaceColorName);
     btnOpenSelection.ForeColor =
         CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings
                                                      .UserInterfaceColorName);
     btnRandomBlast.BackColor =
         CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings
                                                      .UserInterfaceColorName);
 }
 private void SelectPictureBox(PictureBox pictureBox)
 {
     if (!string.IsNullOrWhiteSpace(pictureBox.ImageLocation))
     {
         if (pictureBox.ImageLocation == CurrentMediaSelection &&
             pictureBox.BorderStyle == BorderStyle.Fixed3D)
         {
             btnOpenSelection.PerformClick();
             return;
         }
         DeselectMediaSelection();
         CurrentMediaSelection  = pictureBox.ImageLocation;
         pictureBox.BorderStyle = BorderStyle.Fixed3D;
         pictureBox.BackColor   =
             CandyInterfaceColors.GetInterfaceColorByName(Program.CandyGalleryWindow.UserSettings
                                                          .UserInterfaceColorName);
     }
 }