This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
/
Form1.vb
44 lines (38 loc) · 1.59 KB
/
Form1.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Text
Imports System.Windows.Forms
Imports DevExpress.XtraEditors
Imports DevExpress.XtraScheduler
Imports DevExpress.XtraScheduler.Drawing
Namespace OneMinuteDragDrop
Partial Public Class Form1
Inherits Form
Private dragHandler As AppointmentDragHelper
Private resizeHandler As AppointmentResizeHelper
Public Sub New()
InitializeComponent()
schedulerControl1.DayView.AppointmentDisplayOptions.SnapToCellsMode = AppointmentSnapToCellsMode.Never
schedulerControl1.WorkWeekView.AppointmentDisplayOptions.SnapToCellsMode = AppointmentSnapToCellsMode.Never
dragHandler = New AppointmentDragHelper(schedulerControl1)
resizeHandler = New AppointmentResizeHelper(schedulerControl1)
End Sub
Private Sub checkEdit1_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles checkEdit1.CheckedChanged
If DirectCast(sender, CheckEdit).Checked Then
dragHandler.AttachToControl()
Else
dragHandler.DetachFromControl()
End If
End Sub
Private Sub checkEdit2_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles checkEdit2.CheckedChanged
If DirectCast(sender, CheckEdit).Checked Then
resizeHandler.AttachToControl()
Else
resizeHandler.DetachFromControl()
End If
End Sub
End Class
End Namespace