Example #1
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.window = ((Calendar.MainWindow)(target));
     return;
     case 2:
     this.Calendar = ((System.Windows.Controls.Calendar)(target));
     
     #line 34 "..\..\MainWindow.xaml"
     this.Calendar.SelectedDatesChanged += new System.EventHandler<System.Windows.Controls.SelectionChangedEventArgs>(this.Calendar_SelectedDatesChanged);
     
     #line default
     #line hidden
     return;
     case 3:
     this.textBox = ((System.Windows.Controls.TextBox)(target));
     return;
     case 4:
     this.textBox_Date = ((System.Windows.Controls.TextBox)(target));
     
     #line 72 "..\..\MainWindow.xaml"
     this.textBox_Date.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.textBox_Date_TextChanged_1);
     
     #line default
     #line hidden
     return;
     case 5:
     this.button = ((System.Windows.Controls.Button)(target));
     
     #line 73 "..\..\MainWindow.xaml"
     this.button.Click += new System.Windows.RoutedEventHandler(this.button_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Example #2
0
        public CalendarDay(MainWindow parent, int day)
        {
            this.dayNumber = day;
            this.parent = parent;
            events = new List<BLL.CalendarEvent>();

            textShadow.Color = Color.FromRgb(0, 0, 0);
            textShadow.ShadowDepth = 2;

            grid = new Grid();
            grid.Width = 90;
            grid.Height = 90;
            grid.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            grid.VerticalAlignment = System.Windows.VerticalAlignment.Top;
            ImageBrush br = new ImageBrush();
            br.ImageSource = new BitmapImage(new Uri("../../Images/DayBG" + rng.Next(1, 5) + ".png", UriKind.Relative));
            grid.Background = br;

            grid.MouseDown += new System.Windows.Input.MouseButtonEventHandler(DayClicked);
            grid.MouseEnter += new System.Windows.Input.MouseEventHandler(MouseEnter);
            grid.MouseLeave += new System.Windows.Input.MouseEventHandler(MouseLeave);

            EventOverlay = new Image();
            EventOverlay.Width = 90;
            EventOverlay.Height = 90;
            EventOverlay.Source = new BitmapImage(new Uri("../../Images/DayEventOverlay.png", UriKind.Relative));
            EventOverlay.Opacity = 0;
            grid.Children.Add(EventOverlay);

            this.temperature = new Label();
            this.temperature.FontFamily = defaultFont;
            //this.temperature.FontWeight = FontWeights.Bold;
            this.temperature.Foreground = Brushes.AliceBlue;
            this.temperature.Effect = textShadow;
            this.temperature.HorizontalAlignment = HorizontalAlignment.Right;
            this.temperature.Margin = new System.Windows.Thickness(0, 30, 7, 0);
            grid.Children.Add(this.temperature);

            this.eventLabel = new Label();
            this.eventLabel.FontFamily = defaultFont;
            //this.eventLabel.FontWeight = FontWeights.Bold;
            this.eventLabel.Foreground = Brushes.AliceBlue;
            this.eventLabel.Effect = textShadow;
            this.eventLabel.VerticalAlignment = VerticalAlignment.Bottom;
            this.eventLabel.HorizontalAlignment = HorizontalAlignment.Left;
            this.eventLabel.Margin = new System.Windows.Thickness(7, 0, 0, 7);
            grid.Children.Add(this.eventLabel);

            Highlight = new Image();
            Highlight.Width = 90;
            Highlight.Height = 90;
            Highlight.Source = new BitmapImage(new Uri("../../Images/DayHighlight.png", UriKind.Relative));
            Highlight.Opacity = 0;
            grid.Children.Add(Highlight);

            dayLabel = new Label();
            dayLabel.Content = dayNumber;
            dayLabel.FontWeight = FontWeights.Bold;
            dayLabel.Foreground = Brushes.Moccasin;
            dayLabel.FontFamily = defaultFont;
            dayLabel.Effect = textShadow;
            dayLabel.Margin = new System.Windows.Thickness(7, 7, 0, 0);
            grid.Children.Add(dayLabel);

            shadeOverlayTop = new Image();
            shadeOverlayTop.Width = 90;
            shadeOverlayTop.Height = 45;
            shadeOverlayTop.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            shadeOverlayTop.VerticalAlignment = System.Windows.VerticalAlignment.Top;
            shadeOverlayTop.Source = new BitmapImage(new Uri("../../Images/ShadeTop0.png", UriKind.Relative));
            grid.Children.Add(shadeOverlayTop);
            shadeOverlayTop.Opacity = 0;

            shadeOverlayBottom = new Image();
            shadeOverlayBottom.Width = 90;
            shadeOverlayBottom.Height = 45;
            shadeOverlayBottom.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            shadeOverlayBottom.VerticalAlignment = System.Windows.VerticalAlignment.Bottom;
            shadeOverlayBottom.Source = new BitmapImage(new Uri("../../Images/ShadeTop0.png", UriKind.Relative));
            grid.Children.Add(shadeOverlayBottom);
            shadeOverlayBottom.Opacity = 0;
        }
Example #3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Window = ((Calendar.MainWindow)(target));

            #line 8 "..\..\..\View\MainWindow.xaml"
                this.Window.KeyDown += new System.Windows.Input.KeyEventHandler(this.WindowKeyDown);

            #line default
            #line hidden
                return;

            case 2:
                this.TextBlockDisplayedDate = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 3:
                this.weekDays = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.monday = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 5:
                this.tuesday = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 6:
                this.wednesday = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 7:
                this.thursday = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 8:
                this.friday = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 9:
                this.saturday = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 10:
                this.sunday = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 11:
                this.daysOfMonth = ((System.Windows.Controls.Grid)(target));
                return;

            case 12:
                this.TextBlockCell0 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 13:
                this.TextBlockCell1 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 14:
                this.TextBlockCell2 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 15:
                this.TextBlockCell3 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 16:
                this.TextBlockCell4 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 17:
                this.TextBlockCell5 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 18:
                this.TextBlockCell6 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 19:
                this.TextBlockCell7 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 20:
                this.TextBlockCell8 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 21:
                this.TextBlockCell9 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 22:
                this.TextBlockCell10 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 23:
                this.TextBlockCell11 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 24:
                this.TextBlockCell12 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 25:
                this.TextBlockCell13 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 26:
                this.TextBlockCell14 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 27:
                this.TextBlockCell15 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 28:
                this.TextBlockCell16 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 29:
                this.TextBlockCell17 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 30:
                this.TextBlockCell18 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 31:
                this.TextBlockCell19 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 32:
                this.TextBlockCell20 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 33:
                this.TextBlockCell21 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 34:
                this.TextBlockCell22 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 35:
                this.TextBlockCell23 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 36:
                this.TextBlockCell24 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 37:
                this.TextBlockCell25 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 38:
                this.TextBlockCell26 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 39:
                this.TextBlockCell27 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 40:
                this.TextBlockCell28 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 41:
                this.TextBlockCell29 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 42:
                this.TextBlockCell30 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 43:
                this.TextBlockCell31 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 44:
                this.TextBlockCell32 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 45:
                this.TextBlockCell33 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 46:
                this.TextBlockCell34 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 47:
                this.TextBlockCell35 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 48:
                this.TextBlockCell36 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 49:
                this.TextBlockCell37 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 50:
                this.TextBlockCell38 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 51:
                this.TextBlockCell39 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 52:
                this.TextBlockCell40 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 53:
                this.TextBlockCell41 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 54:
                this.ButtonLogOut = ((System.Windows.Controls.Button)(target));

            #line 136 "..\..\..\View\MainWindow.xaml"
                this.ButtonLogOut.Click += new System.Windows.RoutedEventHandler(this.ButtonLogOut_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        public DayOverviewWindow(MainWindow parent)
        {
            InitializeComponent();

            this.parent = parent;
        }