예제 #1
0
파일: Calendar.cs 프로젝트: gartidas/HRM
        /// <summary>
        /// Calendar Constructor
        /// </summary>
        public Calendar()
        {
            InitializeComponent();
            _calendarDate       = DateTime.Now;
            _dayOfWeekFont      = new Font("Arial", 10, FontStyle.Regular);
            _daysFont           = new Font("Arial", 10, FontStyle.Regular);
            _todayFont          = new Font("Arial", 10, FontStyle.Bold);
            _dateHeaderFont     = new Font("Arial", 12, FontStyle.Bold);
            _dayViewTimeFont    = new Font("Arial", 10, FontStyle.Bold);
            _showArrowControls  = true;
            _showDateInHeader   = true;
            _showTodayButton    = true;
            _showingToolTip     = false;
            _clickedEvent       = null;
            _showDisabledEvents = false;
            _showDashedBorderOnDisabledEvents = true;
            _dimDisabledEvents   = true;
            AllowEditingEvents   = true;
            _highlightCurrentDay = true;
            _calendarView        = CalendarViews.Month;
            _scrollPanel         = new ScrollPanel();

            _scrollPanel.RightButtonClicked += ScrollPanelRightButtonClicked;

            _events            = new List <IEvent>();
            _rectangles        = new List <Rectangle>();
            _calendarDays      = new Dictionary <int, Point>();
            _calendarEvents    = new List <CalendarEvent>();
            _showEventTooltips = true;
            _eventTip          = new EventToolTip {
                Visible = false
            };

            Controls.Add(_eventTip);

            LoadPresetHolidays = true;

            _scrollPanel.Visible = false;
            Controls.Add(_scrollPanel);
        }
예제 #2
0
파일: Calendar.cs 프로젝트: westre/Petje-op
        /// <summary>
        /// Calendar Constructor
        /// </summary>
        public Calendar()
        {
            InitializeComponent();
            _calendarDate = DateTime.Now;
            _dayOfWeekFont = new Font("Arial", 10, FontStyle.Regular);
            _daysFont = new Font("Arial", 10, FontStyle.Regular);
            _todayFont = new Font("Arial", 10, FontStyle.Bold);
            _dateHeaderFont = new Font("Arial", 12, FontStyle.Bold);
            _dayViewTimeFont = new Font("Arial", 10, FontStyle.Bold);
            _showArrowControls = true;
            _showDateInHeader = true;
            _showTodayButton = true;
            _showingToolTip = false;
            _clickedEvent = null;
            _showDisabledEvents = false;
            _showDashedBorderOnDisabledEvents = true;
            _dimDisabledEvents = true;
            AllowEditingEvents = true;
            _highlightCurrentDay = true;
            _calendarView = CalendarViews.Month;
            _scrollPanel = new ScrollPanel();

            _scrollPanel.RightButtonClicked += ScrollPanelRightButtonClicked;

            _events = new List<IEvent>();
            _rectangles = new List<Rectangle>();
            _calendarDays = new Dictionary<int, Point>();
            _calendarEvents = new List<CalendarEvent>();
            _showEventTooltips = true;
            _eventTip = new EventToolTip { Visible = false };

            Controls.Add(_eventTip);

            LoadPresetHolidays = true;

            _scrollPanel.Visible = false;
            Controls.Add(_scrollPanel);
        }