From 9ef810977b555696eaa341cbfd9a7e1465fca4be Mon Sep 17 00:00:00 2001 From: Desislava Yordanova Date: Fri, 18 Jun 2021 16:30:12 +0300 Subject: [PATCH] SchedulerMultipleResourcesEditDialog --- .../SchedulerMultipleResourcesEditDialog.sln | 26 ++ .../Form1.Designer.cs | 94 ++++++ .../Form1.cs | 42 +++ .../Form1.resx | 120 +++++++ .../MultipleResourcesDialog.cs | 299 ++++++++++++++++++ .../MultipleResourcesDialog.resx | 123 +++++++ .../Program.cs | 21 ++ .../Properties/AssemblyInfo.cs | 36 +++ .../Properties/Resources.Designer.cs | 71 +++++ .../Properties/Resources.resx | 117 +++++++ .../Properties/Settings.Designer.cs | 30 ++ .../Properties/Settings.settings | 7 + ...chedulerMultipleResourcesEditDialog.csproj | 111 +++++++ .../Form1.Designer.vb | 83 +++++ .../Form1.resx | 120 +++++++ .../Form1.vb | 30 ++ .../MultipleResourcesDialog.vb | 277 ++++++++++++++++ .../My Project/Application.Designer.vb | 38 +++ .../My Project/Application.myapp | 11 + .../My Project/AssemblyInfo.vb | 35 ++ .../My Project/Resources.Designer.vb | 62 ++++ .../My Project/Resources.resx | 117 +++++++ .../My Project/Settings.Designer.vb | 73 +++++ .../My Project/Settings.settings | 7 + ...edulerMultipleResourcesEditDialogVB.vbproj | 141 +++++++++ 25 files changed, 2091 insertions(+) create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog.sln create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Form1.Designer.cs create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Form1.cs create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Form1.resx create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/MultipleResourcesDialog.cs create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/MultipleResourcesDialog.resx create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Program.cs create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/AssemblyInfo.cs create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/Resources.Designer.cs create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/Resources.resx create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/Settings.Designer.cs create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/Settings.settings create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog.csproj create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/Form1.Designer.vb create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/Form1.resx create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/Form1.vb create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/MultipleResourcesDialog.vb create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Application.Designer.vb create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Application.myapp create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/AssemblyInfo.vb create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Resources.Designer.vb create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Resources.resx create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Settings.Designer.vb create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Settings.settings create mode 100644 Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/SchedulerMultipleResourcesEditDialogVB.vbproj diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog.sln b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog.sln new file mode 100644 index 0000000..11b28ed --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SchedulerMultipleResourcesEditDialog", "SchedulerMultipleResourcesEditDialog\SchedulerMultipleResourcesEditDialog.csproj", "{6CD18A44-B25C-4BFC-AC2C-2DF02FD39EEE}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "SchedulerMultipleResourcesEditDialogVB", "SchedulerMultipleResourcesEditDialogVB\SchedulerMultipleResourcesEditDialogVB.vbproj", "{F6323CDF-1862-46A7-AB9D-ED4D6AF23782}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6CD18A44-B25C-4BFC-AC2C-2DF02FD39EEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6CD18A44-B25C-4BFC-AC2C-2DF02FD39EEE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6CD18A44-B25C-4BFC-AC2C-2DF02FD39EEE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6CD18A44-B25C-4BFC-AC2C-2DF02FD39EEE}.Release|Any CPU.Build.0 = Release|Any CPU + {F6323CDF-1862-46A7-AB9D-ED4D6AF23782}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F6323CDF-1862-46A7-AB9D-ED4D6AF23782}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F6323CDF-1862-46A7-AB9D-ED4D6AF23782}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F6323CDF-1862-46A7-AB9D-ED4D6AF23782}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Form1.Designer.cs b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Form1.Designer.cs new file mode 100644 index 0000000..ba73a5c --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Form1.Designer.cs @@ -0,0 +1,94 @@ +namespace SchedulerMultipleResourcesEditDialog +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + Telerik.WinControls.UI.DateTimeInterval dateTimeInterval1 = new Telerik.WinControls.UI.DateTimeInterval(); + this.radScheduler1 = new Telerik.WinControls.UI.RadScheduler(); + this.radSchedulerNavigator1 = new Telerik.WinControls.UI.RadSchedulerNavigator(); + ((System.ComponentModel.ISupportInitialize)(this.radScheduler1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.radSchedulerNavigator1)).BeginInit(); + this.SuspendLayout(); + // + // radScheduler1 + // + dateTimeInterval1.End = new System.DateTime(((long)(0))); + dateTimeInterval1.Start = new System.DateTime(((long)(0))); + this.radScheduler1.AccessibleInterval = dateTimeInterval1; + this.radScheduler1.AppointmentTitleFormat = null; + this.radScheduler1.Culture = new System.Globalization.CultureInfo("en-US"); + this.radScheduler1.DataSource = null; + this.radScheduler1.Dock = System.Windows.Forms.DockStyle.Fill; + this.radScheduler1.GroupType = Telerik.WinControls.UI.GroupType.None; + this.radScheduler1.HeaderFormat = "dd dddd"; + this.radScheduler1.Location = new System.Drawing.Point(0, 77); + this.radScheduler1.Name = "radScheduler1"; + this.radScheduler1.Size = new System.Drawing.Size(587, 368); + this.radScheduler1.TabIndex = 0; + this.radScheduler1.Text = "radScheduler1"; + this.radScheduler1.AppointmentEditDialogShowing += new System.EventHandler(this.radScheduler1_AppointmentEditDialogShowing); + // + // radSchedulerNavigator1 + // + this.radSchedulerNavigator1.AssociatedScheduler = null; + this.radSchedulerNavigator1.DateFormat = "yyyy/MM/dd"; + this.radSchedulerNavigator1.Dock = System.Windows.Forms.DockStyle.Top; + this.radSchedulerNavigator1.Location = new System.Drawing.Point(0, 0); + this.radSchedulerNavigator1.Name = "radSchedulerNavigator1"; + this.radSchedulerNavigator1.NavigationStepType = Telerik.WinControls.UI.NavigationStepTypes.Day; + // + // + // + this.radSchedulerNavigator1.RootElement.StretchVertically = false; + this.radSchedulerNavigator1.Size = new System.Drawing.Size(587, 77); + this.radSchedulerNavigator1.TabIndex = 1; + this.radSchedulerNavigator1.Text = "radSchedulerNavigator1"; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(587, 445); + this.Controls.Add(this.radScheduler1); + this.Controls.Add(this.radSchedulerNavigator1); + this.Name = "Form1"; + this.Text = "Form1"; + ((System.ComponentModel.ISupportInitialize)(this.radScheduler1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.radSchedulerNavigator1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private Telerik.WinControls.UI.RadScheduler radScheduler1; + private Telerik.WinControls.UI.RadSchedulerNavigator radSchedulerNavigator1; + } +} + diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Form1.cs b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Form1.cs new file mode 100644 index 0000000..d355c40 --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Form1.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using Telerik.WinControls.UI; + +namespace SchedulerMultipleResourcesEditDialog +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + Color[] colors = new Color[]{Color.LightBlue, Color.LightGreen, Color.LightYellow, + Color.Red, Color.Orange, Color.Pink, Color.Purple, Color.Peru, Color.PowderBlue}; + + string[] names = new string[]{"Alan Smith", "Anne Dodsworth", + "Boyan Mastoni", "Richard Duncan", "Maria Shnaider"}; + + for (int i = 0; i < names.Length; i++) + { + Resource resource = new Resource(); + resource.Id = new EventId(i); + resource.Name = names[i]; + resource.Color = colors[i]; + + this.radScheduler1.Resources.Add(resource); + } + + radScheduler1.GroupType = GroupType.Resource; + } + + private void radScheduler1_AppointmentEditDialogShowing(object sender, AppointmentEditDialogShowingEventArgs e) + { + e.AppointmentEditDialog = new MultipleResourcesDialog(); + } + } +} diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Form1.resx b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Form1.resx new file mode 100644 index 0000000..19dc0dd --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/MultipleResourcesDialog.cs b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/MultipleResourcesDialog.cs new file mode 100644 index 0000000..c6f679b --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/MultipleResourcesDialog.cs @@ -0,0 +1,299 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Telerik.WinControls.UI.Scheduler.Dialogs; +using Telerik.WinControls.UI; + +namespace SchedulerMultipleResourcesEditDialog +{ + public class MultipleResourcesDialog : EditAppointmentDialog + { + private Telerik.WinControls.UI.RadListControl listResources; + + public MultipleResourcesDialog() + { + InitializeComponent(); + } + + protected override void LoadSettingsFromEvent(IEvent sourceEvent) + { + base.LoadSettingsFromEvent(sourceEvent); + + if (sourceEvent.ResourceId != null) + { + foreach (RadListDataItem item in this.listResources.Items) + { + if (sourceEvent.ResourceIds.Contains(item.Value as EventId)) + { + item.Selected = true; + } + else + { + item.Selected = false; + } + } + + if (this.schedulerData.GroupType == GroupType.None && sourceEvent.ResourceIds.Count > 1) + { + this.listResources.SelectedIndex = 1; + } + + } + } + + protected override void LoadResources() + { + base.LoadResources(); + + if (this.schedulerData == null) + { + return; + } + + ISchedulerStorage resourceStorage = this.schedulerData.GetResourceStorage(); + this.listResources.Items.Clear(); + + if (this.schedulerData.GroupType == GroupType.None) + { + RadListDataItem item = new RadListDataItem("None"); + item.Value = -1; + this.listResources.Items.Add(item); + } + + foreach (IResource resource in resourceStorage) + { + if (resource.Visible) + { + RadListDataItem item = new RadListDataItem(resource.Name); + item.Value = resource.Id; + this.listResources.Items.Add(item); + } + } + + if (this.listResources.Items.Count > 0) + { + this.listResources.SelectedIndex = 0; + } + } + + protected override void ApplySettingsToEvent(IEvent targetEvent) + { + base.ApplySettingsToEvent(targetEvent); + + if (this.listResources.SelectedIndex >= 0) + { + RadListDataItem selectedItem = listResources.Items[this.listResources.SelectedIndex]; + + if (selectedItem.Text.Equals("None")) + { + if (targetEvent.ResourceIds.Count > 0) + { + targetEvent.ResourceIds.Clear(); + } + } + else + { + targetEvent.ResourceIds.Clear(); + + foreach (RadListDataItem item in listResources.SelectedItems) + { + EventId resourceId = item.Value as EventId; + if (!targetEvent.ResourceIds.Contains(resourceId)) + { + targetEvent.ResourceIds.Add(resourceId); + } + } + } + } + } + + private void InitializeComponent() + { + this.listResources = new Telerik.WinControls.UI.RadListControl(); + ((System.ComponentModel.ISupportInitialize)(this.labelSubject)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.labelLocation)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.labelBackground)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtSubject)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtLocation)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.cmbBackground)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.labelStartTime)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.labelEndTime)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateStart)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.timeStart)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEnd)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.timeEnd)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.chkAllDay)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.labelResource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.cmbResource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.labelStatus)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.cmbShowTimeAs)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textBoxDescription)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.buttonOK)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.buttonCancel)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.buttonDelete)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.buttonRecurrence)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.radSeparator1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.radSeparator2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.radSeparator3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.listResources)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); + this.SuspendLayout(); + // + // cmbBackground + // + // + // + // + this.cmbBackground.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren; + this.cmbBackground.Size = new System.Drawing.Size(180, 20); + // + // dateStart + // + this.dateStart.Value = new System.DateTime(2011, 5, 17, 11, 22, 29, 614); + // + // timeStart + // + this.timeStart.Value = new System.DateTime(2011, 5, 17, 11, 22, 29, 614); + // + // dateEnd + // + this.dateEnd.Value = new System.DateTime(2011, 5, 17, 11, 22, 29, 614); + // + // timeEnd + // + this.timeEnd.Value = new System.DateTime(2011, 5, 17, 11, 22, 29, 614); + // + // chkAllDay + // + // + // + // + this.chkAllDay.RootElement.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(5)))), ((int)(((byte)(5))))); + // + // cmbResource + // + this.cmbResource.Location = new System.Drawing.Point(345, 169); + this.cmbResource.Size = new System.Drawing.Size(180, 20); + this.cmbResource.Visible = false; + // + // cmbShowTimeAs + // + // + // + // + this.cmbShowTimeAs.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren; + this.cmbShowTimeAs.Size = new System.Drawing.Size(178, 20); + // + // textBoxDescription + // + this.textBoxDescription.Location = new System.Drawing.Point(7, 322); + // + // + // + this.textBoxDescription.RootElement.StretchVertically = true; + this.textBoxDescription.Size = new System.Drawing.Size(519, 116); + // + // buttonOK + // + this.buttonOK.Location = new System.Drawing.Point(6, 444); + // + // buttonCancel + // + this.buttonCancel.Location = new System.Drawing.Point(87, 444); + // + // buttonDelete + // + this.buttonDelete.Location = new System.Drawing.Point(168, 444); + // + // buttonRecurrence + // + this.buttonRecurrence.Location = new System.Drawing.Point(249, 444); + // + // radSeparator3 + // + this.radSeparator3.Location = new System.Drawing.Point(6, 306); + // + // listResources + // + this.listResources.CaseSensitiveSort = true; + this.listResources.ItemHeight = 18; + this.listResources.Location = new System.Drawing.Point(79, 169); + this.listResources.Name = "listResources"; + this.listResources.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple; + this.listResources.Size = new System.Drawing.Size(180, 131); + this.listResources.TabIndex = 25; + this.listResources.Text = "radListControl1"; + // + // MultipleResourcesDialog + // + this.ClientSize = new System.Drawing.Size(537, 472); + this.Controls.Add(this.listResources); + this.Name = "MultipleResourcesDialog"; + // + // + // + this.RootElement.ApplyShapeToControl = true; + this.RootElement.MinSize = new System.Drawing.Size(539, 365); + this.Text = "Edit Appointment"; + this.Controls.SetChildIndex(this.listResources, 0); + this.Controls.SetChildIndex(this.radSeparator3, 0); + this.Controls.SetChildIndex(this.cmbResource, 0); + this.Controls.SetChildIndex(this.labelSubject, 0); + this.Controls.SetChildIndex(this.labelLocation, 0); + this.Controls.SetChildIndex(this.labelBackground, 0); + this.Controls.SetChildIndex(this.txtSubject, 0); + this.Controls.SetChildIndex(this.txtLocation, 0); + this.Controls.SetChildIndex(this.cmbBackground, 0); + this.Controls.SetChildIndex(this.labelStartTime, 0); + this.Controls.SetChildIndex(this.labelEndTime, 0); + this.Controls.SetChildIndex(this.dateStart, 0); + this.Controls.SetChildIndex(this.timeStart, 0); + this.Controls.SetChildIndex(this.dateEnd, 0); + this.Controls.SetChildIndex(this.timeEnd, 0); + this.Controls.SetChildIndex(this.chkAllDay, 0); + this.Controls.SetChildIndex(this.labelResource, 0); + this.Controls.SetChildIndex(this.labelStatus, 0); + this.Controls.SetChildIndex(this.cmbShowTimeAs, 0); + this.Controls.SetChildIndex(this.textBoxDescription, 0); + this.Controls.SetChildIndex(this.buttonOK, 0); + this.Controls.SetChildIndex(this.buttonCancel, 0); + this.Controls.SetChildIndex(this.buttonDelete, 0); + this.Controls.SetChildIndex(this.buttonRecurrence, 0); + this.Controls.SetChildIndex(this.radSeparator1, 0); + this.Controls.SetChildIndex(this.radSeparator2, 0); + ((System.ComponentModel.ISupportInitialize)(this.labelSubject)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.labelLocation)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.labelBackground)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtSubject)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtLocation)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.cmbBackground)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.labelStartTime)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.labelEndTime)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateStart)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.timeStart)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEnd)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.timeEnd)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.chkAllDay)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.labelResource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.cmbResource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.labelStatus)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.cmbShowTimeAs)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textBoxDescription)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.buttonOK)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.buttonCancel)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.buttonDelete)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.buttonRecurrence)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.radSeparator1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.radSeparator2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.radSeparator3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.listResources)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + } +} diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/MultipleResourcesDialog.resx b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/MultipleResourcesDialog.resx new file mode 100644 index 0000000..38d368e --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/MultipleResourcesDialog.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Program.cs b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Program.cs new file mode 100644 index 0000000..652f7db --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace SchedulerMultipleResourcesEditDialog +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/AssemblyInfo.cs b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..7c97e46 --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("SchedulerMultipleResourcesEditDialog")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("SchedulerMultipleResourcesEditDialog")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2011")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f7c4f7ec-199b-46e2-9489-1847ec0a879d")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/Resources.Designer.cs b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/Resources.Designer.cs new file mode 100644 index 0000000..17f3ccc --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4959 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SchedulerMultipleResourcesEditDialog.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SchedulerMultipleResourcesEditDialog.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/Resources.resx b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/Settings.Designer.cs b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/Settings.Designer.cs new file mode 100644 index 0000000..d2d3473 --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4959 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SchedulerMultipleResourcesEditDialog.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/Settings.settings b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog.csproj b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog.csproj new file mode 100644 index 0000000..d87c06d --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialog.csproj @@ -0,0 +1,111 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {6CD18A44-B25C-4BFC-AC2C-2DF02FD39EEE} + WinExe + Properties + SchedulerMultipleResourcesEditDialog + SchedulerMultipleResourcesEditDialog + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + + False + ..\..\..\..\..\..\..\work\Development\bin\Debug\Telerik.WinControls.dll + + + False + ..\..\..\..\..\..\..\work\Development\bin\Debug\Telerik.WinControls.Scheduler.dll + + + False + ..\..\..\..\..\..\..\work\Development\bin\Debug\Telerik.WinControls.UI.dll + + + False + ..\..\..\..\..\..\..\work\Development\bin\Debug\TelerikCommon.dll + + + + + Form + + + Form1.cs + + + Form + + + + + Form1.cs + + + MultipleResourcesDialog.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + \ No newline at end of file diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/Form1.Designer.vb b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/Form1.Designer.vb new file mode 100644 index 0000000..510f4e3 --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/Form1.Designer.vb @@ -0,0 +1,83 @@ + _ +Partial Class Form1 + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Dim DateTimeInterval1 As Telerik.WinControls.UI.DateTimeInterval = New Telerik.WinControls.UI.DateTimeInterval + Me.RadScheduler1 = New Telerik.WinControls.UI.RadScheduler + Me.RadSchedulerNavigator1 = New Telerik.WinControls.UI.RadSchedulerNavigator + CType(Me.RadScheduler1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.RadSchedulerNavigator1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'RadScheduler1 + ' + DateTimeInterval1.End = New Date(CType(0, Long)) + DateTimeInterval1.Start = New Date(CType(0, Long)) + Me.RadScheduler1.AccessibleInterval = DateTimeInterval1 + Me.RadScheduler1.AppointmentTitleFormat = Nothing + Me.RadScheduler1.Culture = New System.Globalization.CultureInfo("en-US") + Me.RadScheduler1.DataSource = Nothing + Me.RadScheduler1.Dock = System.Windows.Forms.DockStyle.Fill + Me.RadScheduler1.GroupType = Telerik.WinControls.UI.GroupType.None + Me.RadScheduler1.HeaderFormat = "dd dddd" + Me.RadScheduler1.Location = New System.Drawing.Point(0, 77) + Me.RadScheduler1.Name = "RadScheduler1" + Me.RadScheduler1.Size = New System.Drawing.Size(596, 409) + Me.RadScheduler1.TabIndex = 0 + Me.RadScheduler1.Text = "RadScheduler1" + ' + 'RadSchedulerNavigator1 + ' + Me.RadSchedulerNavigator1.AssociatedScheduler = Nothing + Me.RadSchedulerNavigator1.DateFormat = "yyyy/MM/dd" + Me.RadSchedulerNavigator1.Dock = System.Windows.Forms.DockStyle.Top + Me.RadSchedulerNavigator1.Location = New System.Drawing.Point(0, 0) + Me.RadSchedulerNavigator1.Name = "RadSchedulerNavigator1" + Me.RadSchedulerNavigator1.NavigationStepType = Telerik.WinControls.UI.NavigationStepTypes.Day + ' + ' + ' + Me.RadSchedulerNavigator1.RootElement.StretchVertically = False + Me.RadSchedulerNavigator1.Size = New System.Drawing.Size(596, 77) + Me.RadSchedulerNavigator1.TabIndex = 1 + Me.RadSchedulerNavigator1.Text = "RadSchedulerNavigator1" + ' + 'Form1 + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(596, 486) + Me.Controls.Add(Me.RadScheduler1) + Me.Controls.Add(Me.RadSchedulerNavigator1) + Me.Name = "Form1" + Me.Text = "Form1" + CType(Me.RadScheduler1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.RadSchedulerNavigator1, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + Friend WithEvents RadScheduler1 As Telerik.WinControls.UI.RadScheduler + Friend WithEvents RadSchedulerNavigator1 As Telerik.WinControls.UI.RadSchedulerNavigator + +End Class diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/Form1.resx b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/Form1.resx new file mode 100644 index 0000000..19dc0dd --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/Form1.vb b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/Form1.vb new file mode 100644 index 0000000..badd7b6 --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/Form1.vb @@ -0,0 +1,30 @@ +Imports Telerik.WinControls.UI + +Public Class Form1 + + Public Sub New() + InitializeComponent() + + Dim colors As Color() = New Color() {Color.LightBlue, Color.LightGreen, Color.LightYellow, Color.Red, Color.Orange, Color.Pink, _ + Color.Purple, Color.Peru, Color.PowderBlue} + + Dim names As String() = New String() {"Alan Smith", "Anne Dodsworth", "Boyan Mastoni", "Richard Duncan", "Maria Shnaider"} + + For i As Integer = 0 To names.Length - 1 + Dim resource As New Resource() + resource.Id = New EventId(i) + resource.Name = names(i) + resource.Color = colors(i) + + Me.RadScheduler1.Resources.Add(resource) + Next + + RadScheduler1.GroupType = GroupType.Resource + + End Sub + + Private Sub RadScheduler1_AppointmentEditDialogShowing(ByVal sender As System.Object, ByVal e As Telerik.WinControls.UI.AppointmentEditDialogShowingEventArgs) Handles RadScheduler1.AppointmentEditDialogShowing + e.AppointmentEditDialog = New MultipleResourcesDialog() + End Sub + +End Class diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/MultipleResourcesDialog.vb b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/MultipleResourcesDialog.vb new file mode 100644 index 0000000..2a6ab94 --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/MultipleResourcesDialog.vb @@ -0,0 +1,277 @@ +Imports System +Imports System.Collections.Generic +Imports System.Linq +Imports System.Text +Imports Telerik.WinControls.UI.Scheduler.Dialogs +Imports Telerik.WinControls.UI + +Public Class MultipleResourcesDialog + Inherits EditAppointmentDialog + Private listResources As Telerik.WinControls.UI.RadListControl + + Public Sub New() + InitializeComponent() + End Sub + + Protected Overrides Sub LoadSettingsFromEvent(ByVal sourceEvent As IEvent) + MyBase.LoadSettingsFromEvent(sourceEvent) + + If sourceEvent.ResourceId IsNot Nothing Then + For Each item As RadListDataItem In Me.listResources.Items + If sourceEvent.ResourceIds.Contains(TryCast(item.Value, EventId)) Then + item.Selected = True + Else + item.Selected = False + End If + Next + + If Me.SchedulerData.GroupType = GroupType.None AndAlso sourceEvent.ResourceIds.Count > 1 Then + Me.listResources.SelectedIndex = 1 + + End If + End If + End Sub + + Protected Overrides Sub LoadResources() + MyBase.LoadResources() + + If Me.SchedulerData Is Nothing Then + Return + End If + + Dim resourceStorage As ISchedulerStorage(Of IResource) = Me.SchedulerData.GetResourceStorage() + Me.listResources.Items.Clear() + + If Me.SchedulerData.GroupType = GroupType.None Then + Dim item As New RadListDataItem("None") + item.Value = -1 + Me.listResources.Items.Add(item) + End If + + For Each resource As IResource In resourceStorage + If resource.Visible Then + Dim item As New RadListDataItem(resource.Name) + item.Value = resource.Id + Me.listResources.Items.Add(item) + End If + Next + + If Me.listResources.Items.Count > 0 Then + Me.listResources.SelectedIndex = 0 + End If + End Sub + + Protected Overrides Sub ApplySettingsToEvent(ByVal targetEvent As IEvent) + MyBase.ApplySettingsToEvent(targetEvent) + + If Me.listResources.SelectedIndex >= 0 Then + Dim selectedItem As RadListDataItem = listResources.Items(Me.listResources.SelectedIndex) + + If selectedItem.Text.Equals("None") Then + If targetEvent.ResourceIds.Count > 0 Then + targetEvent.ResourceIds.Clear() + End If + Else + targetEvent.ResourceIds.Clear() + + For Each item As RadListDataItem In listResources.SelectedItems + Dim resourceId As EventId = TryCast(item.Value, EventId) + If Not targetEvent.ResourceIds.Contains(resourceId) Then + targetEvent.ResourceIds.Add(resourceId) + End If + Next + End If + End If + End Sub + + Private Sub InitializeComponent() + Me.listResources = New Telerik.WinControls.UI.RadListControl() + DirectCast(Me.labelSubject, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.labelLocation, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.labelBackground, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.txtSubject, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.txtLocation, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.cmbBackground, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.labelStartTime, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.labelEndTime, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.dateStart, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.timeStart, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.dateEnd, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.timeEnd, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.chkAllDay, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.labelResource, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.cmbResource, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.labelStatus, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.cmbShowTimeAs, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.textBoxDescription, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.buttonOK, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.buttonCancel, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.buttonDelete, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.buttonRecurrence, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.errorProvider, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.radSeparator1, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.radSeparator2, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.radSeparator3, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me.listResources, System.ComponentModel.ISupportInitialize).BeginInit() + DirectCast(Me, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + ' cmbBackground + ' + ' + ' + ' + Me.cmbBackground.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren + Me.cmbBackground.Size = New System.Drawing.Size(180, 20) + ' + ' dateStart + ' + Me.dateStart.Value = New System.DateTime(2011, 5, 17, 11, 22, 29, _ + 614) + ' + ' timeStart + ' + Me.timeStart.Value = New System.DateTime(2011, 5, 17, 11, 22, 29, _ + 614) + ' + ' dateEnd + ' + Me.dateEnd.Value = New System.DateTime(2011, 5, 17, 11, 22, 29, _ + 614) + ' + ' timeEnd + ' + Me.timeEnd.Value = New System.DateTime(2011, 5, 17, 11, 22, 29, _ + 614) + ' + ' chkAllDay + ' + ' + ' + ' + Me.chkAllDay.RootElement.ForeColor = System.Drawing.Color.FromArgb(CInt(CByte(5)), CInt(CByte(5)), CInt(CByte(5))) + ' + ' cmbResource + ' + Me.cmbResource.Location = New System.Drawing.Point(345, 169) + Me.cmbResource.Size = New System.Drawing.Size(180, 20) + Me.cmbResource.Visible = False + ' + ' cmbShowTimeAs + ' + ' + ' + ' + Me.cmbShowTimeAs.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren + Me.cmbShowTimeAs.Size = New System.Drawing.Size(178, 20) + ' + ' textBoxDescription + ' + Me.textBoxDescription.Location = New System.Drawing.Point(7, 322) + ' + ' + ' + Me.textBoxDescription.RootElement.StretchVertically = True + Me.textBoxDescription.Size = New System.Drawing.Size(519, 116) + ' + ' buttonOK + ' + Me.buttonOK.Location = New System.Drawing.Point(6, 444) + ' + ' buttonCancel + ' + Me.buttonCancel.Location = New System.Drawing.Point(87, 444) + ' + ' buttonDelete + ' + Me.buttonDelete.Location = New System.Drawing.Point(168, 444) + ' + ' buttonRecurrence + ' + Me.buttonRecurrence.Location = New System.Drawing.Point(249, 444) + ' + ' radSeparator3 + ' + Me.radSeparator3.Location = New System.Drawing.Point(6, 306) + ' + ' listResources + ' + Me.listResources.CaseSensitiveSort = True + Me.listResources.ItemHeight = 18 + Me.listResources.Location = New System.Drawing.Point(79, 169) + Me.listResources.Name = "listResources" + Me.listResources.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple + Me.listResources.Size = New System.Drawing.Size(180, 131) + Me.listResources.TabIndex = 25 + Me.listResources.Text = "radListControl1" + ' + ' MultipleResourcesDialog + ' + Me.ClientSize = New System.Drawing.Size(537, 472) + Me.Controls.Add(Me.listResources) + Me.Name = "MultipleResourcesDialog" + ' + ' + ' + Me.RootElement.ApplyShapeToControl = True + Me.RootElement.MinSize = New System.Drawing.Size(539, 365) + Me.Text = "Edit Appointment" + Me.Controls.SetChildIndex(Me.listResources, 0) + Me.Controls.SetChildIndex(Me.radSeparator3, 0) + Me.Controls.SetChildIndex(Me.cmbResource, 0) + Me.Controls.SetChildIndex(Me.labelSubject, 0) + Me.Controls.SetChildIndex(Me.labelLocation, 0) + Me.Controls.SetChildIndex(Me.labelBackground, 0) + Me.Controls.SetChildIndex(Me.txtSubject, 0) + Me.Controls.SetChildIndex(Me.txtLocation, 0) + Me.Controls.SetChildIndex(Me.cmbBackground, 0) + Me.Controls.SetChildIndex(Me.labelStartTime, 0) + Me.Controls.SetChildIndex(Me.labelEndTime, 0) + Me.Controls.SetChildIndex(Me.dateStart, 0) + Me.Controls.SetChildIndex(Me.timeStart, 0) + Me.Controls.SetChildIndex(Me.dateEnd, 0) + Me.Controls.SetChildIndex(Me.timeEnd, 0) + Me.Controls.SetChildIndex(Me.chkAllDay, 0) + Me.Controls.SetChildIndex(Me.labelResource, 0) + Me.Controls.SetChildIndex(Me.labelStatus, 0) + Me.Controls.SetChildIndex(Me.cmbShowTimeAs, 0) + Me.Controls.SetChildIndex(Me.textBoxDescription, 0) + Me.Controls.SetChildIndex(Me.buttonOK, 0) + Me.Controls.SetChildIndex(Me.buttonCancel, 0) + Me.Controls.SetChildIndex(Me.buttonDelete, 0) + Me.Controls.SetChildIndex(Me.buttonRecurrence, 0) + Me.Controls.SetChildIndex(Me.radSeparator1, 0) + Me.Controls.SetChildIndex(Me.radSeparator2, 0) + DirectCast(Me.labelSubject, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.labelLocation, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.labelBackground, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.txtSubject, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.txtLocation, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.cmbBackground, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.labelStartTime, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.labelEndTime, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.dateStart, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.timeStart, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.dateEnd, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.timeEnd, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.chkAllDay, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.labelResource, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.cmbResource, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.labelStatus, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.cmbShowTimeAs, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.textBoxDescription, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.buttonOK, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.buttonCancel, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.buttonDelete, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.buttonRecurrence, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.errorProvider, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.radSeparator1, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.radSeparator2, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.radSeparator3, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me.listResources, System.ComponentModel.ISupportInitialize).EndInit() + DirectCast(Me, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub +End Class \ No newline at end of file diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Application.Designer.vb b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Application.Designer.vb new file mode 100644 index 0000000..7c81031 --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Application.Designer.vb @@ -0,0 +1,38 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:2.0.50727.4959 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + 'NOTE: This file is auto-generated; do not modify it directly. To make changes, + ' or if you encounter build errors in this file, go to the Project Designer + ' (go to Project Properties or double-click the My Project node in + ' Solution Explorer), and make changes on the Application tab. + ' + Partial Friend Class MyApplication + + _ + Public Sub New() + MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) + Me.IsSingleInstance = false + Me.EnableVisualStyles = true + Me.SaveMySettingsOnExit = true + Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses + End Sub + + _ + Protected Overrides Sub OnCreateMainForm() + Me.MainForm = Global.SchedulerMultipleResourcesEditDialogVB.Form1 + End Sub + End Class +End Namespace diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Application.myapp b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Application.myapp new file mode 100644 index 0000000..1243847 --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Application.myapp @@ -0,0 +1,11 @@ + + + true + Form1 + false + 0 + true + 0 + 0 + true + diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/AssemblyInfo.vb b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/AssemblyInfo.vb new file mode 100644 index 0000000..92a66b4 --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' General Information about an assembly is controlled through the following +' set of attributes. Change these attribute values to modify the information +' associated with an assembly. + +' Review the values of the assembly attributes + + + + + + + + + + +'The following GUID is for the ID of the typelib if this project is exposed to COM + + +' Version information for an assembly consists of the following four values: +' +' Major Version +' Minor Version +' Build Number +' Revision +' +' You can specify all the values or you can default the Build and Revision Numbers +' by using the '*' as shown below: +' + + + diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Resources.Designer.vb b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Resources.Designer.vb new file mode 100644 index 0000000..c733712 --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Resources.Designer.vb @@ -0,0 +1,62 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:2.0.50727.4959 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My.Resources + + 'This class was auto-generated by the StronglyTypedResourceBuilder + 'class via a tool like ResGen or Visual Studio. + 'To add or remove a member, edit your .ResX file then rerun ResGen + 'with the /str option, or rebuild your VS project. + ' + ' A strongly-typed resource class, for looking up localized strings, etc. + ' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ' + ' Returns the cached ResourceManager instance used by this class. + ' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("SchedulerMultipleResourcesEditDialogVB.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ' + ' Overrides the current thread's CurrentUICulture property for all + ' resource lookups using this strongly typed resource class. + ' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set(ByVal value As Global.System.Globalization.CultureInfo) + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Resources.resx b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Settings.Designer.vb b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Settings.Designer.vb new file mode 100644 index 0000000..93e295a --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:2.0.50727.4959 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) + +#Region "My.Settings Auto-Save Functionality" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.SchedulerMultipleResourcesEditDialogVB.My.MySettings + Get + Return Global.SchedulerMultipleResourcesEditDialogVB.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Settings.settings b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Settings.settings new file mode 100644 index 0000000..85b890b --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/SchedulerMultipleResourcesEditDialogVB.vbproj b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/SchedulerMultipleResourcesEditDialogVB.vbproj new file mode 100644 index 0000000..867ea82 --- /dev/null +++ b/Scheduler/SchedulerMultipleResourcesEditDialog/SchedulerMultipleResourcesEditDialogVB/SchedulerMultipleResourcesEditDialogVB.vbproj @@ -0,0 +1,141 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {F6323CDF-1862-46A7-AB9D-ED4D6AF23782} + WinExe + SchedulerMultipleResourcesEditDialogVB.My.MyApplication + SchedulerMultipleResourcesEditDialogVB + SchedulerMultipleResourcesEditDialogVB + 512 + WindowsForms + v3.5 + On + Binary + Off + On + + + true + full + true + true + bin\Debug\ + SchedulerMultipleResourcesEditDialogVB.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + pdbonly + false + true + true + bin\Release\ + SchedulerMultipleResourcesEditDialogVB.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + + + + + + + + 3.5 + + + 3.5 + + + 3.5 + + + False + ..\..\..\..\..\..\..\work\Development\bin\Debug\Telerik.WinControls.dll + + + False + ..\..\..\..\..\..\..\work\Development\bin\Debug\Telerik.WinControls.Scheduler.dll + + + False + ..\..\..\..\..\..\..\work\Development\bin\Debug\Telerik.WinControls.UI.dll + + + False + ..\..\..\..\..\..\..\work\Development\bin\Debug\TelerikCommon.dll + + + + + + + + + + + + + + + + + Form + + + Form + + + Form1.vb + Form + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + Form1.vb + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + \ No newline at end of file