예제 #1
0
        public MainWindow()
        {
            this.Hide();
            InitializeComponent();
            if (!Config.Init())
            {
                _cfgWin = new ConfigWindow();
            }
            else
            {
                try
                {
                    this.dBDisplay = new DBDisplay(this);
                    this.DBDisplay.Navigate(this.dBDisplay);
                    Thread.Sleep(250);
                    this.RightFrame.Navigate(new PlayerWindow());
                    Thread.Sleep(250);
                    this.CatFrame.Navigate(new CatSearch(this.dBDisplay));
                    Thread.Sleep(250);
                    this.playlistShow = new PlaylistShow();
                    this.Calendar.Navigate(new CalendarPage(this.playlistShow, this));
                    Thread.Sleep(250);
                    this.Playlist.Navigate(this.playlistShow);
                }
                catch (Exception ex) {
                    Debug.WriteLine(ex.Message);
                    Console.WriteLine(ex.Message);
                }
            }

            this.Show();
        }
        public CalendarPage(PlaylistShow plShow, MainWindow parent)
        {
            this.parent = parent;
            this.plShow = plShow;

            InitializeComponent();
            //this.PlaylistDate.SelectedDate = DateTime.Today;

            for (int i = 0; i < 24; i++)
            {
                TextBlock text = new TextBlock();
                text.Text               = String.Format("{0:00}h", i);
                text.Background         = Brushes.WhiteSmoke;
                text.MouseLeftButtonUp += Hour_Click;
                text.Margin             = new Thickness(5, 0, 5, 0);

                this.HourPanel.Children.Add(text);
            }
            ((TextBlock)this.HourPanel.Children[0]).Background = Brushes.Gray;
        }