Esempio n. 1
0
        private void SaveButton_Click(object sender, EventArgs e)
        {
            var settingsChanged = false;
            var validated       = true;

            if (Directory.Exists(MainDriveTextbox.Text))
            {
                Properties.Settings.Default.MainDrivePath = MainDriveTextbox.Text;
                settingsChanged = true;
            }
            else if (!string.IsNullOrWhiteSpace(MainDriveTextbox.Text))
            {
                validated = false;
            }

            if (Directory.Exists(Shortcut1Textbox.Text))
            {
                Properties.Settings.Default.Shortcut1Path = Shortcut1Textbox.Text;
                settingsChanged = true;
            }
            else if (!string.IsNullOrWhiteSpace(Shortcut1Textbox.Text))
            {
                validated = false;
            }

            if (Directory.Exists(Shortcut2Textbox.Text))
            {
                Properties.Settings.Default.Shortcut2Path = Shortcut2Textbox.Text;
                settingsChanged = true;
            }
            else if (!string.IsNullOrWhiteSpace(Shortcut2Textbox.Text))
            {
                validated = false;
            }

            Properties.Settings.Default.Save();

            if (!validated)
            {
                MessageBox.Show("Could not set one or more of the default folder paths. Please try again.");
            }

            var theme = MonolithLabel.Font.Underline ? 0 : AzureLabel.Font.Underline ? 1 : ForestLabel.Font.Underline ? 2 : 3;

            settingsChanged |= theme != Properties.Settings.Default.ThemeIndex;
            AppDesignProvider.SetTheme(this, (AppTheme)theme);
            AppDesignProvider.SetCurrentTab(this, (AppTheme)theme, currentTab);

            if (settingsChanged)
            {
                UpdateSettingsButton();
            }

            MainDriveTextbox.Text = Properties.Settings.Default.MainDrivePath;
            Shortcut1Textbox.Text = Properties.Settings.Default.Shortcut1Path;
            Shortcut2Textbox.Text = Properties.Settings.Default.Shortcut2Path;
        }
Esempio n. 2
0
        private void PlayLabel_Click(object sender, EventArgs e)
        {
            currentTab = AppTab.Player;
            AppDesignProvider.SetCurrentTab(this, (AppTheme)Properties.Settings.Default.ThemeIndex, currentTab);

            PlayerLayout.Visible = true;
            ShowsLayout.Visible  = SettingsLayout.Visible = SaveSettingsPanel.Visible = false;
            ErrorLabel.Visible   = RefreshLabel.Visible = AutoplayButton.Visible = false;
        }
Esempio n. 3
0
        private void OnlineLabel_Click(object sender, EventArgs e)
        {
            // Change label font to border & backcolor, hide refresh labels, and populate list from internal list (onlineCartoons)
            currentTab = AppTab.Online;
            AppDesignProvider.SetCurrentTab(this, (AppTheme)Properties.Settings.Default.ThemeIndex, currentTab);

            ShowsLayout.Visible  = true;
            PlayerLayout.Visible = SettingsLayout.Visible = SaveSettingsPanel.Visible = false;
            ErrorLabel.Visible   = RefreshLabel.Visible = AutoplayButton.Visible = false;

            LoadFromOnline();
        }
Esempio n. 4
0
        private void HardDriveLabel_Click(object sender, EventArgs e)
        {
            // Change label border & backcolor, and populate list from hard drive
            currentTab = AppTab.HardDrive;
            AppDesignProvider.SetCurrentTab(this, (AppTheme)Properties.Settings.Default.ThemeIndex, currentTab);

            ShowsLayout.Visible  = AutoplayButton.Visible = true;
            PlayerLayout.Visible = SettingsLayout.Visible = SaveSettingsPanel.Visible = false;
            Refresh();

            LoadFromDrive();
        }
Esempio n. 5
0
        private void SettingsLabel_Click(object sender, EventArgs e)
        {
            MainDriveTextbox.Text = Properties.Settings.Default.MainDrivePath;
            Shortcut1Textbox.Text = Properties.Settings.Default.Shortcut1Path;
            Shortcut2Textbox.Text = Properties.Settings.Default.Shortcut2Path;

            currentTab = AppTab.Settings;
            AppDesignProvider.SetCurrentTab(this, (AppTheme)Properties.Settings.Default.ThemeIndex, currentTab);

            AppDesignProvider.SetThemeLabelFont(this, (AppTheme)Properties.Settings.Default.ThemeIndex);

            ShowsLayout.Visible    = PlayerLayout.Visible = ErrorLabel.Visible = RefreshLabel.Visible = false;
            SettingsLayout.Visible = SaveSettingsPanel.Visible = true;
        }
Esempio n. 6
0
        public MainForm()
        {
            InitializeComponent();
            timer.Tick += Timer_Tick;

            AppDesignProvider.SetTheme(this, (AppTheme)Properties.Settings.Default.ThemeIndex);
            HardDriveLabel_Click(this.HardDriveLabel, null);

            VersionNumberLabel.Text = "Random TV Show\r\nVersion: " +
                                      System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(3);

            if (string.IsNullOrWhiteSpace(Properties.Settings.Default.MainDrivePath))
            {
                Properties.Settings.Default.MainDrivePath = Environment.GetFolderPath(Environment.SpecialFolder.MyVideos);
                Properties.Settings.Default.Save();
            }

            // On load, load shows from the hard drive
            LoadFromDrive();
        }