예제 #1
0
        private void InitializeChildren()
        {
            this.dockLayout = new DockLayoutPanel();
            if (this.Calendar.MultiViewRows == 1 && this.Calendar.MultiViewColumns == 1)
            {
                this.calendarVisualElement = new MonthViewElement(this.calendar, this.calendar.DefaultView);
            }
            else
            {
                this.calendarVisualElement = new MultiMonthViewElement(this.calendar, this.calendar.DefaultView);
            }

            this.calendarStatusElement = new CalendarStatusElement(this);
            this.calendarStatusElement.SetValue(DockLayoutPanel.DockProperty, Dock.Bottom);
            this.calendarStatusElement.SetValue(BoxLayout.StripPositionProperty, BoxLayout.StripPosition.Last);
            if (true == this.Calendar.ShowFooter)
            {
                this.calendarStatusElement.Visibility = ElementVisibility.Visible;
            }

            this.dockLayout.Children.Add(this.calendarStatusElement);
            this.calendarNavigationElement = new CalendarNavigationElement(this);
            this.CalendarNavigationElement.SetValue(DockLayoutPanel.DockProperty, Dock.Top);
            this.calendarNavigationElement.SetValue(BoxLayout.StripPositionProperty, BoxLayout.StripPosition.First);
            this.calendarNavigationElement.Visibility = (this.Calendar.ShowHeader) ? ElementVisibility.Visible : ElementVisibility.Collapsed;
            this.dockLayout.Children.Add(this.calendarNavigationElement);
            this.dockLayout.Children.Add(this.calendarVisualElement);
            this.Children.Add(this.dockLayout);
        }
예제 #2
0
        protected override void DisposeManagedResources()
        {
            this.calendar = null;
            this.view     = null;

            if (this.calendarVisualElement != null)
            {
                this.calendarVisualElement.Dispose();
                this.calendarVisualElement = null;
            }

            if (this.calendarStatusElement != null)
            {
                this.calendarStatusElement.Dispose();
                this.calendarStatusElement = null;
            }

            if (this.calendarNavigationElement != null)
            {
                this.calendarNavigationElement.Dispose();
                this.calendarNavigationElement = null;
            }

            base.DisposeManagedResources();
        }
예제 #3
0
 protected override void DisposeManagedResources()
 {
     this.calendar = (RadCalendar)null;
     this.view     = (CalendarView)null;
     if (this.calendarVisualElement != null)
     {
         this.calendarVisualElement.Dispose();
         this.calendarVisualElement = (MonthViewElement)null;
     }
     if (this.calendarStatusElement != null)
     {
         this.calendarStatusElement.Dispose();
         this.calendarStatusElement = (CalendarStatusElement)null;
     }
     if (this.calendarNavigationElement != null)
     {
         this.calendarNavigationElement.Dispose();
         this.calendarNavigationElement = (CalendarNavigationElement)null;
     }
     LocalizationProvider <CalendarLocalizationProvider> .CurrentProviderChanged -= new EventHandler(this.CalendarLocalizationProvider_CurrentProviderChanged);
     base.DisposeManagedResources();
 }
예제 #4
0
        private void InitializeChildren()
        {
            this.dockLayout            = new DockLayoutPanel();
            this.calendarVisualElement = this.Calendar.MultiViewRows != 1 || this.Calendar.MultiViewColumns != 1 ? (MonthViewElement) new MultiMonthViewElement(this.calendar, this.calendar.DefaultView) : new MonthViewElement(this.calendar, this.calendar.DefaultView);
            this.calendarStatusElement = new CalendarStatusElement(this);
            int num1 = (int)this.calendarStatusElement.SetValue(DockLayoutPanel.DockProperty, (object)Dock.Bottom);
            int num2 = (int)this.calendarStatusElement.SetValue(BoxLayout.StripPositionProperty, (object)BoxLayout.StripPosition.Last);

            if (this.Calendar.ShowFooter)
            {
                this.calendarStatusElement.Visibility = ElementVisibility.Visible;
            }
            this.dockLayout.Children.Add((RadElement)this.calendarStatusElement);
            this.calendarNavigationElement = new CalendarNavigationElement(this);
            int num3 = (int)this.CalendarNavigationElement.SetValue(DockLayoutPanel.DockProperty, (object)Dock.Top);
            int num4 = (int)this.calendarNavigationElement.SetValue(BoxLayout.StripPositionProperty, (object)BoxLayout.StripPosition.First);

            this.calendarNavigationElement.Visibility = this.Calendar.ShowHeader ? ElementVisibility.Visible : ElementVisibility.Collapsed;
            this.dockLayout.Children.Add((RadElement)this.calendarNavigationElement);
            this.dockLayout.Children.Add((RadElement)this.calendarVisualElement);
            this.Children.Add((RadElement)this.dockLayout);
            this.LocalizeStrings();
        }