Exemplo n.º 1
0
 /// <summary>
 /// This method is required for Windows Forms designer support.
 /// Do not change the method contents inside the source code editor. The Forms designer might
 /// not be able to load this method if it was changed manually.
 /// </summary>
 private void InitializeComponent()
 {
     Calendar.DrawTool drawTool1 = new Calendar.DrawTool();
     this.appointments_DayView = new Calendar.DayView();
     this.optician_ComboBox    = new System.Windows.Forms.ComboBox();
     this.SuspendLayout();
     //
     // appointments_DayView
     //
     drawTool1.DayView = this.appointments_DayView;
     this.appointments_DayView.ActiveTool           = drawTool1;
     this.appointments_DayView.Dock                 = System.Windows.Forms.DockStyle.Bottom;
     this.appointments_DayView.Font                 = new System.Drawing.Font("Segoe UI", 8F);
     this.appointments_DayView.Location             = new System.Drawing.Point(0, 21);
     this.appointments_DayView.Margin               = new System.Windows.Forms.Padding(0);
     this.appointments_DayView.Name                 = "appointments_DayView";
     this.appointments_DayView.SelectionEnd         = new System.DateTime(((long)(0)));
     this.appointments_DayView.SelectionStart       = new System.DateTime(((long)(0)));
     this.appointments_DayView.Size                 = new System.Drawing.Size(284, 241);
     this.appointments_DayView.StartDate            = new System.DateTime(((long)(0)));
     this.appointments_DayView.TabIndex             = 0;
     this.appointments_DayView.Text                 = "dayView1";
     this.appointments_DayView.ResolveAppointments += new Calendar.ResolveAppointmentsEventHandler(this.Appointment_DayViewResolveAppointments);
     //
     // optician_ComboBox
     //
     this.optician_ComboBox.Dock                  = System.Windows.Forms.DockStyle.Top;
     this.optician_ComboBox.DropDownStyle         = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.optician_ComboBox.FormattingEnabled     = true;
     this.optician_ComboBox.Location              = new System.Drawing.Point(0, 0);
     this.optician_ComboBox.Margin                = new System.Windows.Forms.Padding(0);
     this.optician_ComboBox.Name                  = "optician_ComboBox";
     this.optician_ComboBox.Size                  = new System.Drawing.Size(284, 21);
     this.optician_ComboBox.TabIndex              = 1;
     this.optician_ComboBox.SelectedIndexChanged += new System.EventHandler(this.optician_ComboBox_SelectedIndexChanged);
     //
     // AppointmentsOnDate
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(284, 262);
     this.Controls.Add(this.optician_ComboBox);
     this.Controls.Add(this.appointments_DayView);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
     this.Name            = "AppointmentsOnDate";
     this.Text            = "Appointment Check";
     this.ResumeLayout(false);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     Calendar.DrawTool drawTool3 = new Calendar.DrawTool();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WeekReport));
     this.dayView       = new Calendar.DayView();
     this.backButton    = new System.Windows.Forms.Button();
     this.forwardButton = new System.Windows.Forms.Button();
     this.toolTip       = new System.Windows.Forms.ToolTip(this.components);
     this.monthCalendar = new System.Windows.Forms.MonthCalendar();
     this.curWeekButton = new System.Windows.Forms.Button();
     this.refreshButton = new System.Windows.Forms.Button();
     this.SuspendLayout();
     //
     // dayView
     //
     drawTool3.DayView                = this.dayView;
     this.dayView.ActiveTool          = drawTool3;
     this.dayView.AllowInplaceEditing = false;
     this.dayView.AllowNew            = false;
     this.dayView.Anchor              = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                               | System.Windows.Forms.AnchorStyles.Left)
                                                                              | System.Windows.Forms.AnchorStyles.Right)));
     this.dayView.DaysToShow         = 7;
     this.dayView.Font               = new System.Drawing.Font("Microsoft Sans Serif", 8F);
     this.dayView.HalfHourHeight     = 34;
     this.dayView.Location           = new System.Drawing.Point(186, 3);
     this.dayView.Name               = "dayView";
     this.dayView.SelectionEnd       = new System.DateTime(((long)(0)));
     this.dayView.SelectionStart     = new System.DateTime(((long)(0)));
     this.dayView.Size               = new System.Drawing.Size(190, 333);
     this.dayView.StartDate          = new System.DateTime(((long)(0)));
     this.dayView.TabIndex           = 0;
     this.dayView.WorkingHourEnd     = 23;
     this.dayView.WorkingHourStart   = 0;
     this.dayView.WorkingMinuteEnd   = 59;
     this.dayView.WorkingMinuteStart = 0;
     //
     // backButton
     //
     this.backButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
     this.backButton.Image     = ((System.Drawing.Image)(resources.GetObject("backButton.Image")));
     this.backButton.Location  = new System.Drawing.Point(11, 20);
     this.backButton.Name      = "backButton";
     this.backButton.Size      = new System.Drawing.Size(24, 23);
     this.backButton.TabIndex  = 1;
     this.toolTip.SetToolTip(this.backButton, "Past week");
     this.backButton.Click += new System.EventHandler(this.backButton_Click);
     //
     // forwardButton
     //
     this.forwardButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
     this.forwardButton.Image     = ((System.Drawing.Image)(resources.GetObject("forwardButton.Image")));
     this.forwardButton.Location  = new System.Drawing.Point(150, 20);
     this.forwardButton.Name      = "forwardButton";
     this.forwardButton.Size      = new System.Drawing.Size(24, 23);
     this.forwardButton.TabIndex  = 3;
     this.toolTip.SetToolTip(this.forwardButton, "Next week");
     this.forwardButton.Click += new System.EventHandler(this.forwardButton_Click);
     //
     // toolTip
     //
     this.toolTip.AutoPopDelay = 5000;
     this.toolTip.InitialDelay = 100;
     this.toolTip.ReshowDelay  = 50;
     //
     // monthCalendar
     //
     this.monthCalendar.Enabled         = false;
     this.monthCalendar.FirstDayOfWeek  = System.Windows.Forms.Day.Sunday;
     this.monthCalendar.Location        = new System.Drawing.Point(6, 17);
     this.monthCalendar.Name            = "monthCalendar";
     this.monthCalendar.ShowTodayCircle = false;
     this.monthCalendar.TabIndex        = 4;
     //
     // curWeekButton
     //
     this.curWeekButton.Location = new System.Drawing.Point(11, 184);
     this.curWeekButton.Name     = "curWeekButton";
     this.curWeekButton.Size     = new System.Drawing.Size(92, 23);
     this.curWeekButton.TabIndex = 5;
     this.curWeekButton.Text     = "Current Week";
     this.curWeekButton.UseVisualStyleBackColor = true;
     this.curWeekButton.Click += new System.EventHandler(this.curWeekButton_Click);
     //
     // refreshButton
     //
     this.refreshButton.Location = new System.Drawing.Point(11, 225);
     this.refreshButton.Name     = "refreshButton";
     this.refreshButton.Size     = new System.Drawing.Size(92, 23);
     this.refreshButton.TabIndex = 6;
     this.refreshButton.Text     = "Refresh Data";
     this.refreshButton.UseVisualStyleBackColor = true;
     this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
     //
     // WeekReport
     //
     this.Controls.Add(this.refreshButton);
     this.Controls.Add(this.curWeekButton);
     this.Controls.Add(this.forwardButton);
     this.Controls.Add(this.backButton);
     this.Controls.Add(this.dayView);
     this.Controls.Add(this.monthCalendar);
     this.Name = "WeekReport";
     this.Size = new System.Drawing.Size(384, 344);
     this.ResumeLayout(false);
 }
Exemplo n.º 3
0
        public DayView()
        {
            //COMP2003: Not compatible with 2003
                //SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
                SetStyle(ControlStyles.UserPaint, true);
                SetStyle(ControlStyles.AllPaintingInWmPaint, true);
                SetStyle(ControlStyles.DoubleBuffer, true);
                SetStyle(ControlStyles.ResizeRedraw, true);
            SetStyle(ControlStyles.Selectable, true);

            scrollbar = new VScrollBar();
            scrollbar.SmallChange = halfHourHeight;
            scrollbar.LargeChange = halfHourHeight * 2;
            scrollbar.Dock = DockStyle.Right;
            scrollbar.Visible = allowScroll;
            scrollbar.Scroll += new ScrollEventHandler(scrollbar_Scroll);
            AdjustScrollbar();
            scrollbar.Value = (startHour * 2 * halfHourHeight);

            this.Controls.Add(scrollbar);

            editbox = new TextBox();
            editbox.Multiline = true;
            editbox.Visible = false;
            editbox.BorderStyle = BorderStyle.None;
            editbox.KeyUp += new KeyEventHandler(editbox_KeyUp);
                //COMP2003:Not compatible with 2003
            //editbox.Margin = Padding.Empty;

            this.Controls.Add(editbox);

            drawTool = new DrawTool();
            drawTool.DayView = this;

            selectionTool = new SelectionTool();
            selectionTool.DayView = this;
            selectionTool.Complete += new EventHandler(selectionTool_Complete);

            activeTool = drawTool;

            UpdateWorkingHours();

            this.Renderer = new Office12Renderer();
        }
Exemplo n.º 4
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     Calendar.DrawTool drawTool3 = new Calendar.DrawTool();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WeekReport));
     this.dayView = new Calendar.DayView();
     this.backButton = new System.Windows.Forms.Button();
     this.forwardButton = new System.Windows.Forms.Button();
     this.toolTip = new System.Windows.Forms.ToolTip(this.components);
     this.monthCalendar = new System.Windows.Forms.MonthCalendar();
     this.curWeekButton = new System.Windows.Forms.Button();
     this.refreshButton = new System.Windows.Forms.Button();
     this.SuspendLayout();
     //
     // dayView
     //
     drawTool3.DayView = this.dayView;
     this.dayView.ActiveTool = drawTool3;
     this.dayView.AllowInplaceEditing = false;
     this.dayView.AllowNew = false;
     this.dayView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                 | System.Windows.Forms.AnchorStyles.Left)
                 | System.Windows.Forms.AnchorStyles.Right)));
     this.dayView.DaysToShow = 7;
     this.dayView.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F);
     this.dayView.HalfHourHeight = 34;
     this.dayView.Location = new System.Drawing.Point(186, 3);
     this.dayView.Name = "dayView";
     this.dayView.SelectionEnd = new System.DateTime(((long)(0)));
     this.dayView.SelectionStart = new System.DateTime(((long)(0)));
     this.dayView.Size = new System.Drawing.Size(190, 333);
     this.dayView.StartDate = new System.DateTime(((long)(0)));
     this.dayView.TabIndex = 0;
     this.dayView.WorkingHourEnd = 23;
     this.dayView.WorkingHourStart = 0;
     this.dayView.WorkingMinuteEnd = 59;
     this.dayView.WorkingMinuteStart = 0;
     //
     // backButton
     //
     this.backButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
     this.backButton.Image = ((System.Drawing.Image)(resources.GetObject("backButton.Image")));
     this.backButton.Location = new System.Drawing.Point(11, 20);
     this.backButton.Name = "backButton";
     this.backButton.Size = new System.Drawing.Size(24, 23);
     this.backButton.TabIndex = 1;
     this.toolTip.SetToolTip(this.backButton, "Past week");
     this.backButton.Click += new System.EventHandler(this.backButton_Click);
     //
     // forwardButton
     //
     this.forwardButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
     this.forwardButton.Image = ((System.Drawing.Image)(resources.GetObject("forwardButton.Image")));
     this.forwardButton.Location = new System.Drawing.Point(150, 20);
     this.forwardButton.Name = "forwardButton";
     this.forwardButton.Size = new System.Drawing.Size(24, 23);
     this.forwardButton.TabIndex = 3;
     this.toolTip.SetToolTip(this.forwardButton, "Next week");
     this.forwardButton.Click += new System.EventHandler(this.forwardButton_Click);
     //
     // toolTip
     //
     this.toolTip.AutoPopDelay = 5000;
     this.toolTip.InitialDelay = 100;
     this.toolTip.ReshowDelay = 50;
     //
     // monthCalendar
     //
     this.monthCalendar.Enabled = false;
     this.monthCalendar.FirstDayOfWeek = System.Windows.Forms.Day.Sunday;
     this.monthCalendar.Location = new System.Drawing.Point(6, 17);
     this.monthCalendar.Name = "monthCalendar";
     this.monthCalendar.ShowTodayCircle = false;
     this.monthCalendar.TabIndex = 4;
     //
     // curWeekButton
     //
     this.curWeekButton.Location = new System.Drawing.Point(11, 184);
     this.curWeekButton.Name = "curWeekButton";
     this.curWeekButton.Size = new System.Drawing.Size(92, 23);
     this.curWeekButton.TabIndex = 5;
     this.curWeekButton.Text = "Current Week";
     this.curWeekButton.UseVisualStyleBackColor = true;
     this.curWeekButton.Click += new System.EventHandler(this.curWeekButton_Click);
     //
     // refreshButton
     //
     this.refreshButton.Location = new System.Drawing.Point(11, 225);
     this.refreshButton.Name = "refreshButton";
     this.refreshButton.Size = new System.Drawing.Size(92, 23);
     this.refreshButton.TabIndex = 6;
     this.refreshButton.Text = "Refresh Data";
     this.refreshButton.UseVisualStyleBackColor = true;
     this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
     //
     // WeekReport
     //
     this.Controls.Add(this.refreshButton);
     this.Controls.Add(this.curWeekButton);
     this.Controls.Add(this.forwardButton);
     this.Controls.Add(this.backButton);
     this.Controls.Add(this.dayView);
     this.Controls.Add(this.monthCalendar);
     this.Name = "WeekReport";
     this.Size = new System.Drawing.Size(384, 344);
     this.ResumeLayout(false);
 }