├── README.md
├── sample_6_7
├── Properties
│ ├── licenses.licx
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ └── Resources.resx
├── RoomBookingReport.cs
├── packages.config
├── PivotOverview.cs
├── DashboardControls
│ ├── Venues.cs
│ ├── Placeholder.cs
│ ├── VenueDetails.cs
│ ├── EventsCurrentYear.cs
│ ├── RoomBookingsCurrentYear.cs
│ ├── Venues.Designer.cs
│ ├── VenueDetails.Designer.cs
│ ├── EventsCurrentYear.Designer.cs
│ ├── RoomBookingsCurrentYear.Designer.cs
│ ├── Placeholder.designer.cs
│ ├── Venues.resx
│ ├── Placeholder.resx
│ ├── VenueDetails.resx
│ ├── EventsCurrentYear.resx
│ └── RoomBookingsCurrentYear.resx
├── Dashboard.cs
├── Resources
│ ├── venue.svg
│ ├── customers.svg
│ ├── savechanges.svg
│ ├── roombooking-alt.svg
│ ├── discardchanges.svg
│ ├── report.svg
│ ├── pivotoverview.svg
│ ├── printexport.svg
│ ├── dashboard.svg
│ └── event.svg
├── Program.cs
├── PrintPreview.cs
├── app.config
├── MainForm.cs
├── RoomBookingView.cs
├── CustomerList.cs
├── EventView.cs
├── RoomBookingReport.resx
├── PrintPreview.resx
├── MainForm.resx
├── CustomerList.resx
├── PivotOverview.resx
├── RoomBookingView.resx
├── Dashboard.resx
├── EventView.resx
├── RoomBookingView.Designer.cs
├── TransactionalChangeHandler.cs
├── Dashboard.Designer.cs
├── MainForm.Designer.cs
└── sample_6_7.csproj
├── sample_6_7.sln
├── .gitattributes
└── .gitignore
/README.md:
--------------------------------------------------------------------------------
1 | start
--------------------------------------------------------------------------------
/sample_6_7/Properties/licenses.licx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/sample_6_7/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/sample_6_7/RoomBookingReport.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Collections;
4 | using System.ComponentModel;
5 | using DevExpress.XtraReports.UI;
6 |
7 | namespace sample_6_7 {
8 | public partial class RoomBookingReport : DevExpress.XtraReports.UI.XtraReport {
9 | public RoomBookingReport() {
10 | InitializeComponent();
11 | }
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/sample_6_7/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/sample_6_7/PivotOverview.cs:
--------------------------------------------------------------------------------
1 | using DevExpress.XtraEditors;
2 |
3 | namespace sample_6_7 {
4 | public partial class PivotOverview : XtraUserControl {
5 | public PivotOverview() {
6 | InitializeComponent();
7 | }
8 |
9 | private void printExportItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {
10 | Program.MainForm.ShowPrintPreview("Pivot Overview", pivotGridControl1);
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/sample_6_7/DashboardControls/Venues.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Text;
7 | using System.Linq;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using DevExpress.XtraEditors;
11 |
12 | namespace sample_6_7.DashboardControls {
13 | public partial class Venues : DevExpress.XtraEditors.XtraUserControl {
14 | public Venues() {
15 | InitializeComponent();
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/sample_6_7/DashboardControls/Placeholder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Text;
7 | using System.Linq;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using DevExpress.XtraEditors;
11 |
12 | namespace sample_6_7.DashboardControls {
13 | public partial class Placeholder : DevExpress.XtraEditors.XtraUserControl {
14 | public Placeholder() {
15 | InitializeComponent();
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/sample_6_7/DashboardControls/VenueDetails.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Text;
7 | using System.Linq;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using DevExpress.XtraEditors;
11 |
12 | namespace sample_6_7.DashboardControls {
13 | public partial class VenueDetails : DevExpress.XtraEditors.XtraUserControl {
14 | public VenueDetails() {
15 | InitializeComponent();
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/sample_6_7/DashboardControls/EventsCurrentYear.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Text;
7 | using System.Linq;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using DevExpress.XtraEditors;
11 |
12 | namespace sample_6_7.DashboardControls {
13 | public partial class EventsCurrentYear : DevExpress.XtraEditors.XtraUserControl {
14 | public EventsCurrentYear() {
15 | InitializeComponent();
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/sample_6_7/DashboardControls/RoomBookingsCurrentYear.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Text;
7 | using System.Linq;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using DevExpress.XtraEditors;
11 |
12 | namespace sample_6_7.DashboardControls {
13 | public partial class RoomBookingsCurrentYear : DevExpress.XtraEditors.XtraUserControl {
14 | public RoomBookingsCurrentYear() {
15 | InitializeComponent();
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/sample_6_7/Dashboard.cs:
--------------------------------------------------------------------------------
1 | using DevExpress.XtraEditors;
2 | using sample_6_7.DashboardControls;
3 | using System.Windows.Forms;
4 |
5 | namespace sample_6_7 {
6 | public partial class Dashboard : XtraUserControl {
7 | public Dashboard() {
8 | InitializeComponent();
9 | }
10 |
11 | private void widgetView_QueryControl(object sender, DevExpress.XtraBars.Docking2010.Views.QueryControlEventArgs e) {
12 | e.Control = e.Document.ControlName switch
13 | {
14 | "EventsCurrentYear" => new EventsCurrentYear(),
15 | "RoomBookingsCurrentYear" => new RoomBookingsCurrentYear(),
16 | "VenueDetails" => new VenueDetails(),
17 | "Venues" => new Venues(),
18 | _ => new Control()
19 | };
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/sample_6_7/Resources/venue.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sample_6_7/Resources/customers.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sample_6_7/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Windows.Forms;
5 | using DevExpress.Skins;
6 | using DevExpress.Xpo;
7 | using DevExpress.Xpo.DB;
8 | using pct.BizRulez;
9 | using EventsDB.Validation;
10 | using pct.BizRulez.Rules;
11 | using EventsDB;
12 | using EventsDB.Populate;
13 |
14 | namespace sample_6_7 {
15 | static class Program {
16 | ///
17 | /// The main entry point for the application.
18 | ///
19 | [STAThread]
20 | static void Main() {
21 | Application.EnableVisualStyles();
22 | Application.SetCompatibleTextRenderingDefault(false);
23 |
24 | SkinManager.EnableMdiFormSkins();
25 |
26 | DemoDatabase.Populate();
27 |
28 | mainForm = new MainForm();
29 | Application.Run(MainForm);
30 | }
31 |
32 | static MainForm mainForm;
33 | public static MainForm MainForm {
34 | get {
35 | return mainForm;
36 | }
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/sample_6_7/PrintPreview.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Text;
7 | using System.Linq;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using DevExpress.XtraEditors;
11 | using DevExpress.XtraPrinting.Preview;
12 | using DevExpress.XtraPrinting;
13 |
14 | namespace sample_6_7 {
15 | public partial class PrintPreview : DevExpress.XtraEditors.XtraUserControl {
16 | public PrintPreview() {
17 | InitializeComponent();
18 | }
19 |
20 | public PrintPreview(Action initAction) : this() {
21 | this.initAction = initAction;
22 | }
23 |
24 | Action initAction;
25 |
26 | void ShowDocument(Action init) {
27 | init(documentViewer);
28 | }
29 |
30 | public void ShowDocument(PrintingSystemBase printingSystem) {
31 | ShowDocument(dv => dv.DocumentSource = printingSystem);
32 | }
33 |
34 | private void documentViewer_Load(object sender, EventArgs e) {
35 | initAction?.Invoke(this);
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/sample_6_7/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace sample_6_7.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/sample_6_7.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30204.135
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sample_6_7", "sample_6_7\sample_6_7.csproj", "{9269B2D5-39EA-4D65-BCDA-5628A409CFEC}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {9269B2D5-39EA-4D65-BCDA-5628A409CFEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {9269B2D5-39EA-4D65-BCDA-5628A409CFEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {9269B2D5-39EA-4D65-BCDA-5628A409CFEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {9269B2D5-39EA-4D65-BCDA-5628A409CFEC}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {BDA71A62-23BE-49F2-8926-F96793BCD5F2}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/sample_6_7/Resources/savechanges.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sample_6_7/Resources/roombooking-alt.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sample_6_7/Resources/discardchanges.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sample_6_7/Resources/report.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sample_6_7/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("sample_6_7")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("sample_6_7")]
13 | [assembly: AssemblyCopyright("Copyright © 2009 - 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("00947cba-0262-4125-98c2-fb9b623e9206")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/sample_6_7/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | System
12 |
13 |
14 | True
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/sample_6_7/DashboardControls/Venues.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace sample_6_7.DashboardControls {
2 | partial class Venues {
3 | ///
4 | /// Required designer variable.
5 | ///
6 | private System.ComponentModel.IContainer components = null;
7 |
8 | ///
9 | /// Clean up any resources being used.
10 | ///
11 | /// true if managed resources should be disposed; otherwise, false.
12 | protected override void Dispose(bool disposing) {
13 | if (disposing && (components != null)) {
14 | components.Dispose();
15 | }
16 | base.Dispose(disposing);
17 | }
18 |
19 | #region Component Designer generated code
20 |
21 | ///
22 | /// Required method for Designer support - do not modify
23 | /// the contents of this method with the code editor.
24 | ///
25 | private void InitializeComponent() {
26 | this.placeholder1 = new sample_6_7.DashboardControls.Placeholder();
27 | this.SuspendLayout();
28 | //
29 | // placeholder1
30 | //
31 | this.placeholder1.Dock = System.Windows.Forms.DockStyle.Fill;
32 | this.placeholder1.Location = new System.Drawing.Point(0, 0);
33 | this.placeholder1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
34 | this.placeholder1.Name = "placeholder1";
35 | this.placeholder1.Size = new System.Drawing.Size(150, 150);
36 | this.placeholder1.TabIndex = 0;
37 | //
38 | // Venues
39 | //
40 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
41 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
42 | this.Controls.Add(this.placeholder1);
43 | this.Name = "Venues";
44 | this.ResumeLayout(false);
45 |
46 | }
47 |
48 | #endregion
49 |
50 | private Placeholder placeholder1;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/sample_6_7/DashboardControls/VenueDetails.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace sample_6_7.DashboardControls {
2 | partial class VenueDetails {
3 | ///
4 | /// Required designer variable.
5 | ///
6 | private System.ComponentModel.IContainer components = null;
7 |
8 | ///
9 | /// Clean up any resources being used.
10 | ///
11 | /// true if managed resources should be disposed; otherwise, false.
12 | protected override void Dispose(bool disposing) {
13 | if (disposing && (components != null)) {
14 | components.Dispose();
15 | }
16 | base.Dispose(disposing);
17 | }
18 |
19 | #region Component Designer generated code
20 |
21 | ///
22 | /// Required method for Designer support - do not modify
23 | /// the contents of this method with the code editor.
24 | ///
25 | private void InitializeComponent() {
26 | this.placeholder1 = new sample_6_7.DashboardControls.Placeholder();
27 | this.SuspendLayout();
28 | //
29 | // placeholder1
30 | //
31 | this.placeholder1.Dock = System.Windows.Forms.DockStyle.Fill;
32 | this.placeholder1.Location = new System.Drawing.Point(0, 0);
33 | this.placeholder1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
34 | this.placeholder1.Name = "placeholder1";
35 | this.placeholder1.Size = new System.Drawing.Size(150, 150);
36 | this.placeholder1.TabIndex = 0;
37 | //
38 | // VenueDetails
39 | //
40 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
41 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
42 | this.Controls.Add(this.placeholder1);
43 | this.Name = "VenueDetails";
44 | this.ResumeLayout(false);
45 |
46 | }
47 |
48 | #endregion
49 |
50 | private Placeholder placeholder1;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/sample_6_7/DashboardControls/EventsCurrentYear.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace sample_6_7.DashboardControls {
2 | partial class EventsCurrentYear {
3 | ///
4 | /// Required designer variable.
5 | ///
6 | private System.ComponentModel.IContainer components = null;
7 |
8 | ///
9 | /// Clean up any resources being used.
10 | ///
11 | /// true if managed resources should be disposed; otherwise, false.
12 | protected override void Dispose(bool disposing) {
13 | if (disposing && (components != null)) {
14 | components.Dispose();
15 | }
16 | base.Dispose(disposing);
17 | }
18 |
19 | #region Component Designer generated code
20 |
21 | ///
22 | /// Required method for Designer support - do not modify
23 | /// the contents of this method with the code editor.
24 | ///
25 | private void InitializeComponent() {
26 | this.placeholder1 = new sample_6_7.DashboardControls.Placeholder();
27 | this.SuspendLayout();
28 | //
29 | // placeholder1
30 | //
31 | this.placeholder1.Dock = System.Windows.Forms.DockStyle.Fill;
32 | this.placeholder1.Location = new System.Drawing.Point(0, 0);
33 | this.placeholder1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
34 | this.placeholder1.Name = "placeholder1";
35 | this.placeholder1.Size = new System.Drawing.Size(150, 150);
36 | this.placeholder1.TabIndex = 0;
37 | //
38 | // EventsCurrentYear
39 | //
40 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
41 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
42 | this.Controls.Add(this.placeholder1);
43 | this.Name = "EventsCurrentYear";
44 | this.ResumeLayout(false);
45 |
46 | }
47 |
48 | #endregion
49 |
50 | private Placeholder placeholder1;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/sample_6_7/Resources/pivotoverview.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sample_6_7/DashboardControls/RoomBookingsCurrentYear.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace sample_6_7.DashboardControls {
2 | partial class RoomBookingsCurrentYear {
3 | ///
4 | /// Required designer variable.
5 | ///
6 | private System.ComponentModel.IContainer components = null;
7 |
8 | ///
9 | /// Clean up any resources being used.
10 | ///
11 | /// true if managed resources should be disposed; otherwise, false.
12 | protected override void Dispose(bool disposing) {
13 | if (disposing && (components != null)) {
14 | components.Dispose();
15 | }
16 | base.Dispose(disposing);
17 | }
18 |
19 | #region Component Designer generated code
20 |
21 | ///
22 | /// Required method for Designer support - do not modify
23 | /// the contents of this method with the code editor.
24 | ///
25 | private void InitializeComponent() {
26 | this.placeholder1 = new sample_6_7.DashboardControls.Placeholder();
27 | this.SuspendLayout();
28 | //
29 | // placeholder1
30 | //
31 | this.placeholder1.Dock = System.Windows.Forms.DockStyle.Fill;
32 | this.placeholder1.Location = new System.Drawing.Point(0, 0);
33 | this.placeholder1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
34 | this.placeholder1.Name = "placeholder1";
35 | this.placeholder1.Size = new System.Drawing.Size(150, 150);
36 | this.placeholder1.TabIndex = 0;
37 | //
38 | // RoomBookingsCurrentYear
39 | //
40 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
41 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
42 | this.Controls.Add(this.placeholder1);
43 | this.Name = "RoomBookingsCurrentYear";
44 | this.ResumeLayout(false);
45 |
46 | }
47 |
48 | #endregion
49 |
50 | private Placeholder placeholder1;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/sample_6_7/Resources/printexport.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sample_6_7/Resources/dashboard.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sample_6_7/DashboardControls/Placeholder.designer.cs:
--------------------------------------------------------------------------------
1 | namespace sample_6_7.DashboardControls {
2 | partial class Placeholder {
3 | ///
4 | /// Required designer variable.
5 | ///
6 | private System.ComponentModel.IContainer components = null;
7 |
8 | ///
9 | /// Clean up any resources being used.
10 | ///
11 | /// true if managed resources should be disposed; otherwise, false.
12 | protected override void Dispose(bool disposing) {
13 | if (disposing && (components != null)) {
14 | components.Dispose();
15 | }
16 | base.Dispose(disposing);
17 | }
18 |
19 | #region Component Designer generated code
20 |
21 | ///
22 | /// Required method for Designer support - do not modify
23 | /// the contents of this method with the code editor.
24 | ///
25 | private void InitializeComponent() {
26 | this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
27 | this.SuspendLayout();
28 | //
29 | // labelControl1
30 | //
31 | this.labelControl1.Appearance.BackColor = System.Drawing.Color.Ivory;
32 | this.labelControl1.Appearance.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Bold);
33 | this.labelControl1.Appearance.Options.UseBackColor = true;
34 | this.labelControl1.Appearance.Options.UseFont = true;
35 | this.labelControl1.Appearance.Options.UseTextOptions = true;
36 | this.labelControl1.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
37 | this.labelControl1.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
38 | this.labelControl1.Dock = System.Windows.Forms.DockStyle.Fill;
39 | this.labelControl1.Location = new System.Drawing.Point(0, 0);
40 | this.labelControl1.Name = "labelControl1";
41 | this.labelControl1.Size = new System.Drawing.Size(580, 280);
42 | this.labelControl1.TabIndex = 0;
43 | this.labelControl1.Text = "UI Placeholder";
44 | //
45 | // Placeholder
46 | //
47 | this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 23F);
48 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
49 | this.Controls.Add(this.labelControl1);
50 | this.Name = "Placeholder";
51 | this.Size = new System.Drawing.Size(580, 280);
52 | this.ResumeLayout(false);
53 |
54 | }
55 |
56 | #endregion
57 |
58 | private DevExpress.XtraEditors.LabelControl labelControl1;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/sample_6_7/Resources/event.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/sample_6_7/MainForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using DevExpress.XtraBars;
10 | using DevExpress.XtraBars.Docking2010.Views;
11 | using DevExpress.XtraPrinting;
12 |
13 | namespace sample_6_7 {
14 | public partial class MainForm : DevExpress.XtraBars.Ribbon.RibbonForm {
15 | public MainForm() {
16 | InitializeComponent();
17 | }
18 |
19 | private void MainForm_Load(object sender, EventArgs e) {
20 | var buttonViews = new Dictionary {
21 | { dashboardItem, ShowOrActivate("Dashboard") },
22 | { customersItem, ShowOrActivate("Customers") },
23 | { eventsItem, ShowOrActivate("Events") },
24 | { roomBookingsItem, ShowOrActivate("Room Bookings") },
25 | { pivotOverviewItem, ShowOrActivate("Pivot Overview") }
26 | };
27 |
28 | foreach (var barItem in buttonViews.Keys) {
29 | barItem.ItemClick += (s, ev) => {
30 | buttonViews[barItem]();
31 | };
32 | }
33 | }
34 |
35 | delegate BaseDocument ShowOrActivateDelegate(Action initDocument = null);
36 |
37 | ShowOrActivateDelegate ShowOrActivate(string caption) =>
38 | (Action initDocument) => {
39 | var controlName = typeof(T).Name;
40 | var doc = tabbedView.Documents.FirstOrDefault(d => d.ControlName == controlName && d.Caption == caption);
41 | if (doc == null) {
42 | doc = tabbedView.AddDocument(caption, controlName);
43 | initDocument?.Invoke(doc);
44 | }
45 | if (doc != null)
46 | tabbedView.Controller.Activate(doc);
47 | return doc;
48 | };
49 |
50 | private void tabbedView_QueryControl(object sender, QueryControlEventArgs e) {
51 | e.Control = e.Document.ControlName switch
52 | {
53 | "Dashboard" => new Dashboard(),
54 | "CustomerList" => new CustomerList(),
55 | "EventView" => new EventView(),
56 | "RoomBookingView" => new RoomBookingView(),
57 | "PivotOverview" => new PivotOverview(),
58 | "PrintPreview" => new PrintPreview(e.Document.Tag as Action),
59 | _ => new Control()
60 | };
61 | }
62 |
63 | private void exitItem_ItemClick(object sender, DevExpress.XtraBars.Ribbon.BackstageViewItemEventArgs e) {
64 | Close();
65 | }
66 |
67 | private void ribbon_Merge(object sender, DevExpress.XtraBars.Ribbon.RibbonMergeEventArgs e) {
68 | if (e.MergeOwner.MergedCategories.Count > 0) {
69 | var page = e.MergeOwner.MergedCategories[0].Pages[0];
70 | if (page != null)
71 | ribbon.SelectedPage = page;
72 | }
73 | }
74 |
75 | void ShowPrintPreview(string caption, Action initPreview) {
76 | ShowOrActivate($"{caption} (Print Preview)")(document => {
77 | document.Tag = initPreview;
78 | });
79 | }
80 |
81 | public void ShowPrintPreview(string caption, PrintingSystemBase printingSystem) {
82 | ShowPrintPreview(caption, pp => pp.ShowDocument(printingSystem));
83 | }
84 |
85 | public void ShowPrintPreview(string caption, IPrintable printableComponent) {
86 | var printingSystem = new PrintingSystem();
87 | var link = new PrintableComponentLink(printingSystem);
88 | link.Component = printableComponent;
89 | link.CreateDocument();
90 | ShowPrintPreview(caption, printingSystem);
91 | }
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/sample_6_7/RoomBookingView.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using System.Windows.Forms;
3 | using DevExpress.XtraEditors;
4 | using DevExpress.Xpo;
5 | using EventsDB;
6 | using System.Collections.Generic;
7 | using EventsDB.Populate;
8 | using DevExpress.XtraBars.Docking2010;
9 | using DevExpress.XtraBars.Docking2010.Views;
10 |
11 | namespace sample_6_7 {
12 | public partial class RoomBookingView : XtraUserControl {
13 | public RoomBookingView() {
14 | InitializeComponent();
15 | }
16 |
17 | private void RoomBookingView_Load(object sender, System.EventArgs e) {
18 | TransactionalChangeHandler.Hookup(
19 | DocumentManager.FromControl(ParentForm).View, unitOfWork, saveChangesItem,
20 | discardChangesItem, null, null, null, null, null, null,
21 | RoomBookingView_Closing,
22 | saveChangesItem_ItemClick,
23 | discardChangesItem_ItemClick);
24 | }
25 |
26 | #region Change Handling
27 | private void saveChangesItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {
28 | // use my own ValidateAndCommit
29 | ValidateAndCommit();
30 | }
31 |
32 | private bool ValidateAndCommit() {
33 | var checkables = TransactionalChangeHandler.GetCheckables(unitOfWork);
34 | if (TransactionalChangeHandler.Validate(checkables) == false)
35 | return false;
36 |
37 | var relatedRooms = checkables.
38 | OfType().
39 | Where(rb => rb.Room != null).
40 | Select(rb => rb.Room);
41 |
42 | var relatedRoomResults = DemoDatabase.BizRulezChecker.Check("save", relatedRooms).ToList();
43 | if (relatedRoomResults.Count > 0) {
44 | XtraMessageBox.Show("There have been errors during data validation.");
45 | return false;
46 | }
47 |
48 | unitOfWork.CommitChanges();
49 | return true;
50 | }
51 |
52 | private void RoomBookingView_Closing(object sender, DocumentCancelEventArgs e) {
53 | if (TransactionalChangeHandler.ObjectsToSave(unitOfWork)) {
54 | var answer = XtraMessageBox.Show("There are unsaved changes. Do you want to validate and save before closing the list?", "Question",
55 | MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
56 | if (answer == DialogResult.Yes) {
57 | // use my own ValidateAndCommit
58 | if (!ValidateAndCommit())
59 | e.Cancel = true;
60 | }
61 | else if (answer == DialogResult.Cancel)
62 | e.Cancel = true;
63 | }
64 | }
65 |
66 | private void discardChangesItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {
67 | if (TransactionalChangeHandler.ObjectsToSave(unitOfWork)) {
68 | if (XtraMessageBox.Show("This operation is going to discard all unsaved changes. Are you sure you want to proceed?", "Question",
69 | MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) {
70 | //scheduler.BeginUpdate();
71 | try {
72 | // Use my own DiscardChanges
73 | DiscardChanges(unitOfWork, null);
74 | }
75 | finally {
76 | //scheduler.EndUpdate();
77 | }
78 | }
79 | }
80 | }
81 |
82 | public void DiscardChanges(UnitOfWork unitOfWork, XPBaseCollection collection) {
83 | var deletedTLObjects = TransactionalChangeHandler.GetDeletedTLObjects(unitOfWork);
84 |
85 | foreach (var newObject in TransactionalChangeHandler.GetSavedNewObjects(unitOfWork)) {
86 | TransactionalChangeHandler.ResetAssociations(newObject);
87 |
88 | // special behavior for this form
89 | if (newObject is RoomBooking) {
90 | // remove the appointment from the collection, this doesn't
91 | // happen automatically
92 | var appt = schedulerStorage.Appointments.Items.Find(
93 | a => object.ReferenceEquals(a.GetRow(schedulerStorage), newObject));
94 | schedulerStorage.Appointments.Remove(appt);
95 | }
96 | }
97 |
98 | unitOfWork.ReloadChangedObjects();
99 |
100 | // special behavior: get the right collection first
101 | var roomBookingCollection = (IList)schedulerStorage.Appointments.DataSource;
102 | foreach (var item in deletedTLObjects)
103 | roomBookingCollection.Add(item);
104 | }
105 |
106 |
107 | #endregion
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/sample_6_7/CustomerList.cs:
--------------------------------------------------------------------------------
1 | using EventsDB;
2 | using DevExpress.XtraEditors;
3 | using DevExpress.XtraBars.Docking2010;
4 | using DevExpress.XtraGrid.Views.Base;
5 | using DevExpress.XtraEditors.Controls;
6 | using EventsDB.Populate;
7 | using System.Text;
8 | using System.Collections.Generic;
9 | using DevExpress.XtraGrid.Columns;
10 | using DevExpress.XtraEditors.DXErrorProvider;
11 | using System;
12 | using System.Linq;
13 | using DevExpress.XtraPrinting;
14 |
15 | namespace sample_6_7 {
16 | public partial class CustomerList : XtraUserControl {
17 | public CustomerList() {
18 | InitializeComponent();
19 | }
20 |
21 | private void CustomerList_Load(object sender, System.EventArgs e) {
22 | TransactionalChangeHandler.Hookup(
23 | DocumentManager.FromControl(ParentForm).View, unitOfWork, saveChangesItem,
24 | discardChangesItem, customerCollection);
25 | }
26 |
27 | private void customerView_ValidatingEditor(object sender, DevExpress.XtraEditors.Controls.BaseContainerValidateEditorEventArgs e) {
28 | //if (sender is ColumnView view) {
29 | // if (view.FocusedColumn.FieldName == "Name") {
30 | // //view.ActiveEditor.EditValue
31 | // e.Valid = false;
32 | // e.ErrorText = "Something is wrong with the value";
33 | // }
34 | //}
35 | }
36 |
37 | private void view_ValidateRow(object sender, ValidateRowEventArgs e) {
38 | //if (sender is ColumnView view &&
39 | // view.GetRow(e.RowHandle) is Customer customer) {
40 | // // ...
41 | //}
42 |
43 |
44 | //if (e.Row is Customer customer) {
45 | // if (customer.Name != "Correct Value") {
46 | // e.Valid = false;
47 | // //e.ErrorText = "Name doesn't have the correct value";
48 |
49 | // if (sender is ColumnView view) {
50 | // view.SetColumnError(colName, "Something is wrong with this name.");
51 | // }
52 | // }
53 | //}
54 |
55 | ValidateViewRow(sender as ColumnView, e);
56 | }
57 |
58 | private static void ValidateViewRow(ColumnView view, ValidateRowEventArgs e) {
59 | var checkResults = DemoDatabase.BizRulezChecker.Check("save", e.Row).ToList();
60 | if (checkResults.Count > 0) {
61 | e.Valid = false;
62 | if (view != null) {
63 | StringBuilder rowMessages = new StringBuilder();
64 | Dictionary colMessages = new Dictionary();
65 | foreach (var result in checkResults) {
66 | if (result.Rule.AffectedFieldNames != null && result.Rule.AffectedFieldNames.Count > 0) {
67 | foreach (string affectedFieldName in result.Rule.AffectedFieldNames) {
68 | var column = view.Columns.ColumnByFieldName(affectedFieldName);
69 | StringBuilder colBuilder;
70 | if (colMessages.ContainsKey(column)) {
71 | colBuilder = colMessages[column];
72 | }
73 | else {
74 | colBuilder = new StringBuilder();
75 | colMessages[column] = colBuilder;
76 | }
77 | colBuilder.AppendLine(result.ErrorInfo);
78 | }
79 | }
80 | else {
81 | rowMessages.AppendLine(result.ErrorInfo);
82 | }
83 | }
84 | view.SetColumnError(null, rowMessages.ToString(), ErrorType.Critical);
85 | foreach (GridColumn column in view.Columns) {
86 | if (colMessages.ContainsKey(column))
87 | view.SetColumnError(column, colMessages[column].ToString(), ErrorType.Critical);
88 | else
89 | view.SetColumnError(column, String.Empty);
90 | }
91 | }
92 | }
93 | }
94 |
95 | private void view_InvalidRowException(object sender, InvalidRowExceptionEventArgs e) {
96 | e.ExceptionMode = ExceptionMode.NoAction;
97 | }
98 |
99 | private void customerView_CustomColumnDisplayText(object sender, CustomColumnDisplayTextEventArgs e) {
100 | if (e.Column == invoiceContactColumn &&
101 | e.Value is CustomerContact contact) {
102 | e.DisplayText = contact.Name;
103 | }
104 | }
105 |
106 | private void customerView_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) {
107 | if (e.Column == invoiceContactColumn) {
108 | if (sender is ColumnView view) {
109 | if (view.GetRow(e.RowHandle) is Customer customer) {
110 | invoiceContactLookupEdit.DataSource = customer.Contacts;
111 | e.RepositoryItem = invoiceContactLookupEdit;
112 | }
113 | }
114 | }
115 | }
116 |
117 | private void printExportItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {
118 | //grid.ShowPrintPreview();
119 |
120 | var ps = new PrintingSystem();
121 | var link = new PrintableComponentLink(ps);
122 | link.Component = grid;
123 | //link.ShowPreviewDialog();
124 |
125 | link.CreateDocument();
126 | Program.MainForm.ShowPrintPreview("Customers", ps);
127 | }
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/sample_6_7/EventView.cs:
--------------------------------------------------------------------------------
1 | using DevExpress.XtraEditors;
2 | using EventsDB;
3 | using DevExpress.XtraBars.Docking2010;
4 | using System;
5 | using System.Linq;
6 | using DevExpress.XtraScheduler;
7 | using DevExpress.LookAndFeel;
8 | using DevExpress.XtraPrinting;
9 | using DevExpress.XtraPrintingLinks;
10 | using System.Drawing.Printing;
11 |
12 | namespace sample_6_7 {
13 | public partial class EventView : XtraUserControl {
14 | public EventView() {
15 | InitializeComponent();
16 |
17 | eventGrid.BindingContext[eventGrid.DataSource].CurrentChanged += new EventHandler(eventGridView_CurrentChanged);
18 | }
19 |
20 | private void EventView_Load(object sender, System.EventArgs e) {
21 | TransactionalChangeHandler.Hookup(
22 | DocumentManager.FromControl(ParentForm).View, unitOfWork, commitChangesItem,
23 | discardChangesItem, eventCollection);
24 | }
25 |
26 | private void eventGrid_Load(object sender, System.EventArgs e) {
27 | ConfigureScheduler();
28 | }
29 |
30 | private Event GetFocusedEvent() {
31 | return (Event)eventGridView.GetFocusedRow();
32 | }
33 |
34 | private void ConfigureScheduler() {
35 | const int maxVisibleDays = 5;
36 |
37 | var ev = GetFocusedEvent();
38 | if (ev != null) {
39 | scheduler.Enabled = true;
40 | scheduler.LimitInterval.Start = ev.StartDate;
41 | scheduler.LimitInterval.End = ev.EndDate.AddDays(1);
42 | int days = ((int)(ev.EndDate - ev.StartDate).TotalDays) + 1;
43 | scheduler.DayView.DayCount = Math.Min(days, maxVisibleDays);
44 | if (days > maxVisibleDays) {
45 | dayScrollerPanel.Visible = true;
46 | dayScrollbar.Maximum = days - maxVisibleDays;
47 | dayScrollbar.Value = 0;
48 | }
49 | else
50 | dayScrollerPanel.Visible = false;
51 |
52 | scheduler.DayView.TopRowTime = new TimeSpan(
53 | ev.CapacityRequirements.Min(cr => cr.StartTime.TimeOfDay.Ticks)) -
54 | new TimeSpan(0, 30, 0);
55 |
56 | storage.Appointments.DataSource = ev.CapacityRequirements;
57 | }
58 | else {
59 | storage.Appointments.DataSource = null;
60 | scheduler.Enabled = false;
61 | }
62 | }
63 |
64 | void eventGridView_CurrentChanged(object sender, EventArgs e) {
65 | ConfigureScheduler();
66 | }
67 |
68 | private void dayScrollbar_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) {
69 | scheduler.Start = scheduler.LimitInterval.Start.AddDays(e.NewValue);
70 | }
71 |
72 | private void scheduler_VisibleIntervalChanged(object sender, EventArgs e) {
73 | dayScrollbar.Value = scheduler.Start > scheduler.LimitInterval.Start ?
74 | (int)(scheduler.Start - scheduler.LimitInterval.Start).TotalDays : 0;
75 | }
76 |
77 | private void scheduler_PopupMenuShowing(object sender, DevExpress.XtraScheduler.PopupMenuShowingEventArgs e) {
78 | // You can find out precisely which menu it is that's being shown now, like this:
79 | // if (e.Menu.Id == SchedulerMenuItemId.AppointmentMenu)
80 |
81 | e.Menu.RemoveMenuItem(SchedulerMenuItemId.EditSeries);
82 | e.Menu.RemoveMenuItem(SchedulerMenuItemId.StatusSubMenu);
83 | e.Menu.RemoveMenuItem(SchedulerMenuItemId.LabelSubMenu);
84 | e.Menu.RemoveMenuItem(SchedulerMenuItemId.NewAllDayEvent);
85 | e.Menu.RemoveMenuItem(SchedulerMenuItemId.NewRecurringAppointment);
86 | e.Menu.RemoveMenuItem(SchedulerMenuItemId.NewRecurringEvent);
87 | e.Menu.RemoveMenuItem(SchedulerMenuItemId.GotoDate);
88 | e.Menu.RemoveMenuItem(SchedulerMenuItemId.GotoThisDay);
89 | e.Menu.RemoveMenuItem(SchedulerMenuItemId.GotoToday);
90 | e.Menu.RemoveMenuItem(SchedulerMenuItemId.RestoreOccurrence);
91 | e.Menu.RemoveMenuItem(SchedulerMenuItemId.SwitchViewMenu);
92 | e.Menu.RemoveMenuItem(SchedulerMenuItemId.SplitAppointment);
93 |
94 | var item = e.Menu.GetMenuItemById(SchedulerMenuItemId.NewAppointment);
95 | if (item != null)
96 | item.Caption = "New Capacity &Requirement";
97 | }
98 |
99 | private void scheduler_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e) {
100 | e.ViewInfo.Appearance.BackColor = DXSkinColors.FillColors.Warning;
101 |
102 | if (e.ViewInfo.Appointment.GetRow(storage) is CapacityRequirement capReq &&
103 | capReq.RoomBooking != null)
104 | e.ViewInfo.Appearance.BackColor = DXSkinColors.FillColors.Success;
105 | }
106 |
107 | private void scheduler_InitAppointmentDisplayText(object sender, AppointmentDisplayTextEventArgs e) {
108 | if (e.ViewInfo.Appointment.GetRow(storage) is CapacityRequirement capReq &&
109 | capReq.RoomBooking != null)
110 | e.Text = $"{e.Appointment.Subject} ({capReq.RoomBooking.Room.Name})";
111 | }
112 |
113 | private void printExportItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {
114 | var ps = new PrintingSystem();
115 | var gridLink = new PrintableComponentLink(ps) { Component = eventGrid };
116 | var schedulerLink = new PrintableComponentLink(ps) { Component = scheduler };
117 | var combinedLink = new CompositeLink(ps) {
118 | PaperKind = PaperKind.A4
119 | };
120 | combinedLink.Links.AddRange(new[] {
121 | schedulerLink,
122 | gridLink
123 | });
124 |
125 | combinedLink.ShowPreviewDialog();
126 | }
127 | }
128 | }
--------------------------------------------------------------------------------
/sample_6_7/DashboardControls/Venues.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/sample_6_7/DashboardControls/Placeholder.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/sample_6_7/DashboardControls/VenueDetails.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/sample_6_7/DashboardControls/EventsCurrentYear.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/sample_6_7/DashboardControls/RoomBookingsCurrentYear.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/sample_6_7/RoomBookingReport.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 17, 17
122 |
123 |
--------------------------------------------------------------------------------
/sample_6_7/PrintPreview.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 17, 17
122 |
123 |
--------------------------------------------------------------------------------
/sample_6_7/MainForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 17, 17
122 |
123 |
124 | 71
125 |
126 |
--------------------------------------------------------------------------------
/sample_6_7/CustomerList.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 242, 17
122 |
123 |
124 | 134, 17
125 |
126 |
127 | 399, 17
128 |
129 |
--------------------------------------------------------------------------------
/sample_6_7/PivotOverview.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 17, 17
122 |
123 |
124 | 187, 17
125 |
126 |
127 | 278, 17
128 |
129 |
--------------------------------------------------------------------------------
/sample_6_7/RoomBookingView.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 251, 17
122 |
123 |
124 | 359, 17
125 |
126 |
127 | 494, 17
128 |
129 |
--------------------------------------------------------------------------------
/sample_6_7/Dashboard.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 470, 17
122 |
123 |
124 | 251, 17
125 |
126 |
127 | 338, 17
128 |
129 |
130 | 650, 17
131 |
132 |
--------------------------------------------------------------------------------
/sample_6_7/EventView.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 17, 17
122 |
123 |
124 | 271, 17
125 |
126 |
127 | 401, 16
128 |
129 |
130 | 509, 16
131 |
132 |
133 | 659, 16
134 |
135 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Ww][Ii][Nn]32/
27 | [Aa][Rr][Mm]/
28 | [Aa][Rr][Mm]64/
29 | bld/
30 | [Bb]in/
31 | [Oo]bj/
32 | [Oo]ut/
33 | [Ll]og/
34 | [Ll]ogs/
35 |
36 | # Visual Studio 2015/2017 cache/options directory
37 | .vs/
38 | # Uncomment if you have tasks that create the project's static files in wwwroot
39 | #wwwroot/
40 |
41 | # Visual Studio 2017 auto generated files
42 | Generated\ Files/
43 |
44 | # MSTest test Results
45 | [Tt]est[Rr]esult*/
46 | [Bb]uild[Ll]og.*
47 |
48 | # NUnit
49 | *.VisualState.xml
50 | TestResult.xml
51 | nunit-*.xml
52 |
53 | # Build Results of an ATL Project
54 | [Dd]ebugPS/
55 | [Rr]eleasePS/
56 | dlldata.c
57 |
58 | # Benchmark Results
59 | BenchmarkDotNet.Artifacts/
60 |
61 | # .NET Core
62 | project.lock.json
63 | project.fragment.lock.json
64 | artifacts/
65 |
66 | # ASP.NET Scaffolding
67 | ScaffoldingReadMe.txt
68 |
69 | # StyleCop
70 | StyleCopReport.xml
71 |
72 | # Files built by Visual Studio
73 | *_i.c
74 | *_p.c
75 | *_h.h
76 | *.ilk
77 | *.meta
78 | *.obj
79 | *.iobj
80 | *.pch
81 | *.pdb
82 | *.ipdb
83 | *.pgc
84 | *.pgd
85 | *.rsp
86 | *.sbr
87 | *.tlb
88 | *.tli
89 | *.tlh
90 | *.tmp
91 | *.tmp_proj
92 | *_wpftmp.csproj
93 | *.log
94 | *.vspscc
95 | *.vssscc
96 | .builds
97 | *.pidb
98 | *.svclog
99 | *.scc
100 |
101 | # Chutzpah Test files
102 | _Chutzpah*
103 |
104 | # Visual C++ cache files
105 | ipch/
106 | *.aps
107 | *.ncb
108 | *.opendb
109 | *.opensdf
110 | *.sdf
111 | *.cachefile
112 | *.VC.db
113 | *.VC.VC.opendb
114 |
115 | # Visual Studio profiler
116 | *.psess
117 | *.vsp
118 | *.vspx
119 | *.sap
120 |
121 | # Visual Studio Trace Files
122 | *.e2e
123 |
124 | # TFS 2012 Local Workspace
125 | $tf/
126 |
127 | # Guidance Automation Toolkit
128 | *.gpState
129 |
130 | # ReSharper is a .NET coding add-in
131 | _ReSharper*/
132 | *.[Rr]e[Ss]harper
133 | *.DotSettings.user
134 |
135 | # TeamCity is a build add-in
136 | _TeamCity*
137 |
138 | # DotCover is a Code Coverage Tool
139 | *.dotCover
140 |
141 | # AxoCover is a Code Coverage Tool
142 | .axoCover/*
143 | !.axoCover/settings.json
144 |
145 | # Coverlet is a free, cross platform Code Coverage Tool
146 | coverage*.json
147 | coverage*.xml
148 | coverage*.info
149 |
150 | # Visual Studio code coverage results
151 | *.coverage
152 | *.coveragexml
153 |
154 | # NCrunch
155 | _NCrunch_*
156 | .*crunch*.local.xml
157 | nCrunchTemp_*
158 |
159 | # MightyMoose
160 | *.mm.*
161 | AutoTest.Net/
162 |
163 | # Web workbench (sass)
164 | .sass-cache/
165 |
166 | # Installshield output folder
167 | [Ee]xpress/
168 |
169 | # DocProject is a documentation generator add-in
170 | DocProject/buildhelp/
171 | DocProject/Help/*.HxT
172 | DocProject/Help/*.HxC
173 | DocProject/Help/*.hhc
174 | DocProject/Help/*.hhk
175 | DocProject/Help/*.hhp
176 | DocProject/Help/Html2
177 | DocProject/Help/html
178 |
179 | # Click-Once directory
180 | publish/
181 |
182 | # Publish Web Output
183 | *.[Pp]ublish.xml
184 | *.azurePubxml
185 | # Note: Comment the next line if you want to checkin your web deploy settings,
186 | # but database connection strings (with potential passwords) will be unencrypted
187 | *.pubxml
188 | *.publishproj
189 |
190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
191 | # checkin your Azure Web App publish settings, but sensitive information contained
192 | # in these scripts will be unencrypted
193 | PublishScripts/
194 |
195 | # NuGet Packages
196 | *.nupkg
197 | # NuGet Symbol Packages
198 | *.snupkg
199 | # The packages folder can be ignored because of Package Restore
200 | **/[Pp]ackages/*
201 | # except build/, which is used as an MSBuild target.
202 | !**/[Pp]ackages/build/
203 | # Uncomment if necessary however generally it will be regenerated when needed
204 | #!**/[Pp]ackages/repositories.config
205 | # NuGet v3's project.json files produces more ignorable files
206 | *.nuget.props
207 | *.nuget.targets
208 |
209 | # Microsoft Azure Build Output
210 | csx/
211 | *.build.csdef
212 |
213 | # Microsoft Azure Emulator
214 | ecf/
215 | rcf/
216 |
217 | # Windows Store app package directories and files
218 | AppPackages/
219 | BundleArtifacts/
220 | Package.StoreAssociation.xml
221 | _pkginfo.txt
222 | *.appx
223 | *.appxbundle
224 | *.appxupload
225 |
226 | # Visual Studio cache files
227 | # files ending in .cache can be ignored
228 | *.[Cc]ache
229 | # but keep track of directories ending in .cache
230 | !?*.[Cc]ache/
231 |
232 | # Others
233 | ClientBin/
234 | ~$*
235 | *~
236 | *.dbmdl
237 | *.dbproj.schemaview
238 | *.jfm
239 | *.pfx
240 | *.publishsettings
241 | orleans.codegen.cs
242 |
243 | # Including strong name files can present a security risk
244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
245 | #*.snk
246 |
247 | # Since there are multiple workflows, uncomment next line to ignore bower_components
248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
249 | #bower_components/
250 |
251 | # RIA/Silverlight projects
252 | Generated_Code/
253 |
254 | # Backup & report files from converting an old project file
255 | # to a newer Visual Studio version. Backup files are not needed,
256 | # because we have git ;-)
257 | _UpgradeReport_Files/
258 | Backup*/
259 | UpgradeLog*.XML
260 | UpgradeLog*.htm
261 | ServiceFabricBackup/
262 | *.rptproj.bak
263 |
264 | # SQL Server files
265 | *.mdf
266 | *.ldf
267 | *.ndf
268 |
269 | # Business Intelligence projects
270 | *.rdl.data
271 | *.bim.layout
272 | *.bim_*.settings
273 | *.rptproj.rsuser
274 | *- [Bb]ackup.rdl
275 | *- [Bb]ackup ([0-9]).rdl
276 | *- [Bb]ackup ([0-9][0-9]).rdl
277 |
278 | # Microsoft Fakes
279 | FakesAssemblies/
280 |
281 | # GhostDoc plugin setting file
282 | *.GhostDoc.xml
283 |
284 | # Node.js Tools for Visual Studio
285 | .ntvs_analysis.dat
286 | node_modules/
287 |
288 | # Visual Studio 6 build log
289 | *.plg
290 |
291 | # Visual Studio 6 workspace options file
292 | *.opt
293 |
294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
295 | *.vbw
296 |
297 | # Visual Studio LightSwitch build output
298 | **/*.HTMLClient/GeneratedArtifacts
299 | **/*.DesktopClient/GeneratedArtifacts
300 | **/*.DesktopClient/ModelManifest.xml
301 | **/*.Server/GeneratedArtifacts
302 | **/*.Server/ModelManifest.xml
303 | _Pvt_Extensions
304 |
305 | # Paket dependency manager
306 | .paket/paket.exe
307 | paket-files/
308 |
309 | # FAKE - F# Make
310 | .fake/
311 |
312 | # CodeRush personal settings
313 | .cr/personal
314 |
315 | # Python Tools for Visual Studio (PTVS)
316 | __pycache__/
317 | *.pyc
318 |
319 | # Cake - Uncomment if you are using it
320 | # tools/**
321 | # !tools/packages.config
322 |
323 | # Tabs Studio
324 | *.tss
325 |
326 | # Telerik's JustMock configuration file
327 | *.jmconfig
328 |
329 | # BizTalk build output
330 | *.btp.cs
331 | *.btm.cs
332 | *.odx.cs
333 | *.xsd.cs
334 |
335 | # OpenCover UI analysis results
336 | OpenCover/
337 |
338 | # Azure Stream Analytics local run output
339 | ASALocalRun/
340 |
341 | # MSBuild Binary and Structured Log
342 | *.binlog
343 |
344 | # NVidia Nsight GPU debugger configuration file
345 | *.nvuser
346 |
347 | # MFractors (Xamarin productivity tool) working folder
348 | .mfractor/
349 |
350 | # Local History for Visual Studio
351 | .localhistory/
352 |
353 | # BeatPulse healthcheck temp database
354 | healthchecksdb
355 |
356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
357 | MigrationBackup/
358 |
359 | # Ionide (cross platform F# VS Code tools) working folder
360 | .ionide/
361 |
362 | # Fody - auto-generated XML schema
363 | FodyWeavers.xsd
--------------------------------------------------------------------------------
/sample_6_7/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | ..\Resources\dashboard.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.1
123 |
124 |
125 | ..\Resources\roombooking-alt.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.1
126 |
127 |
128 | ..\Resources\discardchanges.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.1
129 |
130 |
131 | ..\Resources\customers.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.1
132 |
133 |
134 | ..\Resources\report.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.1
135 |
136 |
137 | ..\Resources\event.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.1
138 |
139 |
140 | ..\Resources\pivotoverview.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.1
141 |
142 |
143 | ..\Resources\savechanges.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.1
144 |
145 |
146 | ..\Resources\venue.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.1
147 |
148 |
149 | ..\Resources\printexport.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.1
150 |
151 |
--------------------------------------------------------------------------------
/sample_6_7/RoomBookingView.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace sample_6_7 {
2 | partial class RoomBookingView {
3 | ///
4 | /// Required designer variable.
5 | ///
6 | private System.ComponentModel.IContainer components = null;
7 |
8 | ///
9 | /// Clean up any resources being used.
10 | ///
11 | /// true if managed resources should be disposed; otherwise, false.
12 | protected override void Dispose(bool disposing) {
13 | if (disposing && (components != null)) {
14 | components.Dispose();
15 | }
16 | base.Dispose(disposing);
17 | }
18 |
19 | #region Windows Form Designer generated code
20 |
21 | ///
22 | /// Required method for Designer support - do not modify
23 | /// the contents of this method with the code editor.
24 | ///
25 | private void InitializeComponent() {
26 | this.components = new System.ComponentModel.Container();
27 | this.saveChangesItem = new DevExpress.XtraBars.BarButtonItem();
28 | this.discardChangesItem = new DevExpress.XtraBars.BarButtonItem();
29 | this.unitOfWork = new DevExpress.Xpo.UnitOfWork(this.components);
30 | this.splitContainerControl1 = new DevExpress.XtraEditors.SplitContainerControl();
31 | this.splitContainerControl2 = new DevExpress.XtraEditors.SplitContainerControl();
32 | this.venueCollection = new DevExpress.Xpo.XPCollection(this.components);
33 | this.schedulerStorage = new DevExpress.XtraScheduler.SchedulerStorage(this.components);
34 | this.ribbonControl1 = new DevExpress.XtraBars.Ribbon.RibbonControl();
35 | this.ribbonPageCategory1 = new DevExpress.XtraBars.Ribbon.RibbonPageCategory();
36 | this.ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage();
37 | this.ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
38 | ((System.ComponentModel.ISupportInitialize)(this.unitOfWork)).BeginInit();
39 | ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).BeginInit();
40 | this.splitContainerControl1.SuspendLayout();
41 | ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl2)).BeginInit();
42 | this.splitContainerControl2.SuspendLayout();
43 | ((System.ComponentModel.ISupportInitialize)(this.venueCollection)).BeginInit();
44 | ((System.ComponentModel.ISupportInitialize)(this.schedulerStorage)).BeginInit();
45 | ((System.ComponentModel.ISupportInitialize)(this.ribbonControl1)).BeginInit();
46 | this.SuspendLayout();
47 | //
48 | // saveChangesItem
49 | //
50 | this.saveChangesItem.Caption = "Save Changes";
51 | this.saveChangesItem.Id = 0;
52 | this.saveChangesItem.ImageOptions.SvgImage = global::sample_6_7.Properties.Resources.savechanges;
53 | this.saveChangesItem.Name = "saveChangesItem";
54 | //
55 | // discardChangesItem
56 | //
57 | this.discardChangesItem.Caption = "Discard Changes";
58 | this.discardChangesItem.Id = 1;
59 | this.discardChangesItem.ImageOptions.SvgImage = global::sample_6_7.Properties.Resources.discardchanges;
60 | this.discardChangesItem.Name = "discardChangesItem";
61 | //
62 | // splitContainerControl1
63 | //
64 | this.splitContainerControl1.Dock = System.Windows.Forms.DockStyle.Fill;
65 | this.splitContainerControl1.Horizontal = false;
66 | this.splitContainerControl1.Location = new System.Drawing.Point(0, 150);
67 | this.splitContainerControl1.Name = "splitContainerControl1";
68 | this.splitContainerControl1.Panel1.Text = "Panel1";
69 | this.splitContainerControl1.Panel2.Controls.Add(this.splitContainerControl2);
70 | this.splitContainerControl1.Panel2.Text = "Panel2";
71 | this.splitContainerControl1.Size = new System.Drawing.Size(607, 210);
72 | this.splitContainerControl1.SplitterPosition = 95;
73 | this.splitContainerControl1.TabIndex = 4;
74 | this.splitContainerControl1.Text = "splitContainerControl1";
75 | //
76 | // splitContainerControl2
77 | //
78 | this.splitContainerControl2.Dock = System.Windows.Forms.DockStyle.Fill;
79 | this.splitContainerControl2.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.Panel2;
80 | this.splitContainerControl2.Location = new System.Drawing.Point(0, 0);
81 | this.splitContainerControl2.Name = "splitContainerControl2";
82 | this.splitContainerControl2.Panel1.Text = "Panel1";
83 | this.splitContainerControl2.Panel2.Text = "Panel2";
84 | this.splitContainerControl2.Size = new System.Drawing.Size(607, 105);
85 | this.splitContainerControl2.SplitterPosition = 178;
86 | this.splitContainerControl2.TabIndex = 0;
87 | this.splitContainerControl2.Text = "splitContainerControl2";
88 | //
89 | // venueCollection
90 | //
91 | this.venueCollection.ObjectType = typeof(EventsDB.Venue);
92 | this.venueCollection.Session = this.unitOfWork;
93 | //
94 | // schedulerStorage
95 | //
96 | this.schedulerStorage.Appointments.CustomFieldMappings.Add(new DevExpress.XtraScheduler.AppointmentCustomFieldMapping("CustomCapReq", "CapacityRequirement!"));
97 | this.schedulerStorage.Appointments.Mappings.End = "EndTime";
98 | this.schedulerStorage.Appointments.Mappings.ResourceId = "Room!Key";
99 | this.schedulerStorage.Appointments.Mappings.Start = "StartTime";
100 | this.schedulerStorage.EnableReminders = false;
101 | this.schedulerStorage.Resources.Mappings.Caption = "Name";
102 | this.schedulerStorage.Resources.Mappings.Id = "Oid";
103 | //
104 | // ribbonControl1
105 | //
106 | this.ribbonControl1.ExpandCollapseItem.Id = 0;
107 | this.ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] {
108 | this.ribbonControl1.ExpandCollapseItem,
109 | this.ribbonControl1.SearchEditItem,
110 | this.saveChangesItem,
111 | this.discardChangesItem});
112 | this.ribbonControl1.Location = new System.Drawing.Point(0, 0);
113 | this.ribbonControl1.MaxItemId = 1;
114 | this.ribbonControl1.Name = "ribbonControl1";
115 | this.ribbonControl1.PageCategories.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageCategory[] {
116 | this.ribbonPageCategory1});
117 | this.ribbonControl1.Size = new System.Drawing.Size(607, 150);
118 | //
119 | // ribbonPageCategory1
120 | //
121 | this.ribbonPageCategory1.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
122 | this.ribbonPageCategory1.Appearance.Options.UseBackColor = true;
123 | this.ribbonPageCategory1.Name = "ribbonPageCategory1";
124 | this.ribbonPageCategory1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] {
125 | this.ribbonPage1});
126 | this.ribbonPageCategory1.Text = "Room Bookings";
127 | //
128 | // ribbonPage1
129 | //
130 | this.ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
131 | this.ribbonPageGroup1});
132 | this.ribbonPage1.Name = "ribbonPage1";
133 | this.ribbonPage1.Text = "Data Operations";
134 | //
135 | // ribbonPageGroup1
136 | //
137 | this.ribbonPageGroup1.ItemLinks.Add(this.saveChangesItem);
138 | this.ribbonPageGroup1.ItemLinks.Add(this.discardChangesItem);
139 | this.ribbonPageGroup1.Name = "ribbonPageGroup1";
140 | this.ribbonPageGroup1.Text = "Persistence";
141 | //
142 | // RoomBookingsView
143 | //
144 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
145 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
146 | this.Controls.Add(this.splitContainerControl1);
147 | this.Controls.Add(this.ribbonControl1);
148 | this.Name = "RoomBookingsView";
149 | this.Size = new System.Drawing.Size(607, 360);
150 | this.Load += new System.EventHandler(this.RoomBookingView_Load);
151 | ((System.ComponentModel.ISupportInitialize)(this.unitOfWork)).EndInit();
152 | ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).EndInit();
153 | this.splitContainerControl1.ResumeLayout(false);
154 | ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl2)).EndInit();
155 | this.splitContainerControl2.ResumeLayout(false);
156 | ((System.ComponentModel.ISupportInitialize)(this.venueCollection)).EndInit();
157 | ((System.ComponentModel.ISupportInitialize)(this.schedulerStorage)).EndInit();
158 | ((System.ComponentModel.ISupportInitialize)(this.ribbonControl1)).EndInit();
159 | this.ResumeLayout(false);
160 | this.PerformLayout();
161 |
162 | }
163 |
164 | #endregion
165 | private DevExpress.Xpo.UnitOfWork unitOfWork;
166 | private DevExpress.XtraEditors.SplitContainerControl splitContainerControl1;
167 | private DevExpress.Xpo.XPCollection venueCollection;
168 | private DevExpress.XtraBars.BarButtonItem saveChangesItem;
169 | private DevExpress.XtraBars.BarButtonItem discardChangesItem;
170 | private DevExpress.XtraEditors.SplitContainerControl splitContainerControl2;
171 | private DevExpress.XtraScheduler.SchedulerStorage schedulerStorage;
172 | private DevExpress.XtraBars.Ribbon.RibbonControl ribbonControl1;
173 | private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage1;
174 | private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1;
175 | private DevExpress.XtraBars.Ribbon.RibbonPageCategory ribbonPageCategory1;
176 | }
177 | }
--------------------------------------------------------------------------------
/sample_6_7/TransactionalChangeHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Windows.Forms;
4 | using DevExpress.Xpo;
5 | using DevExpress.XtraBars;
6 | using DevExpress.XtraEditors;
7 | using DevExpress.Xpo.Metadata;
8 | using System.Collections.Generic;
9 | using EventsDB;
10 | using EventsDB.Populate;
11 | using DevExpress.XtraBars.Docking2010.Views;
12 |
13 | namespace sample_6_7 {
14 | public static class TransactionalChangeHandler {
15 | public static void Hookup(BaseView view, UnitOfWork unitOfWork, BarButtonItem saveChangesItem, BarButtonItem discardChangesItem, XPBaseCollection topLevelCollection)
16 | where T : class {
17 | Hookup(view, unitOfWork, saveChangesItem, discardChangesItem, topLevelCollection,
18 | null, null, null, null, null, null, null, null);
19 | }
20 | public static void Hookup(BaseView view, UnitOfWork unitOfWork,
21 | BarButtonItem saveChangesItem, BarButtonItem discardChangesItem,
22 | XPBaseCollection topLevelCollection,
23 | SessionManipulationEventHandler afterCommitTransactionEventHandler,
24 | SessionManipulationEventHandler afterRollbackTransactionEventHandler,
25 | ObjectChangeEventHandler objectChangedEventHandler,
26 | ObjectManipulationEventHandler objectDeletedEventHandler,
27 | ObjectManipulationEventHandler objectSavedEventHandler,
28 | DocumentCancelEventHandler documentClosingHandler,
29 | ItemClickEventHandler saveChangesItemClickEventHandler,
30 | ItemClickEventHandler discardChangesItemClickEventHandler)
31 | where T : class {
32 | var container = new TransactionalChangeEventHandlerContainer(
33 | view, unitOfWork, saveChangesItem,
34 | discardChangesItem, topLevelCollection
35 | );
36 |
37 | unitOfWork.AfterCommitTransaction +=
38 | afterCommitTransactionEventHandler ??
39 | container.SessionManipulationHandler;
40 | unitOfWork.AfterRollbackTransaction +=
41 | afterRollbackTransactionEventHandler ??
42 | container.SessionManipulationHandler;
43 | unitOfWork.ObjectChanged +=
44 | objectChangedEventHandler ?? container.ObjectChangeHandler;
45 | unitOfWork.ObjectDeleted +=
46 | objectDeletedEventHandler ??
47 | container.ObjectManipulationHandler;
48 | unitOfWork.ObjectSaved +=
49 | objectSavedEventHandler ?? container.ObjectManipulationHandler;
50 |
51 | view.DocumentClosing +=
52 | documentClosingHandler ?? container.DocumentClosingHandler;
53 |
54 | saveChangesItem.ItemClick +=
55 | saveChangesItemClickEventHandler ??
56 | container.SaveChangesItemClickHandler;
57 | discardChangesItem.ItemClick +=
58 | discardChangesItemClickEventHandler ??
59 | container.DiscardChangesItemClickHandler;
60 | }
61 |
62 | public static IEnumerable GetCheckables(UnitOfWork unitOfWork) {
63 | var savedObjects = unitOfWork.GetObjectsToSave();
64 | var checkables = savedObjects.Cast().Where(o => !o.IsDeleted);
65 | return checkables;
66 | }
67 |
68 | public static bool Validate(IEnumerable checkables) {
69 | var results = DemoDatabase.BizRulezChecker.Check("save", checkables).ToList();
70 | if (results.Count > 0) {
71 | XtraMessageBox.Show("There have been errors during data validation.");
72 | return false;
73 | }
74 | return true;
75 | }
76 |
77 | public static bool ValidateAndCommit(UnitOfWork unitOfWork) {
78 | if (Validate(GetCheckables(unitOfWork))) {
79 | unitOfWork.CommitChanges();
80 | return true;
81 | }
82 |
83 | return false;
84 | }
85 |
86 | public static bool ObjectsToSave(UnitOfWork unitOfWork) {
87 | return unitOfWork.GetObjectsToSave().Count > 0 ||
88 | unitOfWork.GetObjectsToDelete().Count > 0;
89 | }
90 |
91 | public static List GetDeletedTLObjects(UnitOfWork unitOfWork)
92 | where T : class {
93 | return unitOfWork.GetObjectsToDelete().Cast().
94 | OfType().ToList();
95 | }
96 |
97 | public static IEnumerable GetSavedNewObjects(UnitOfWork unitOfWork) {
98 | return unitOfWork.GetObjectsToSave().Cast().
99 | Where(o => unitOfWork.IsNewObject(o));
100 | }
101 |
102 | public static void ResetAssociations(XPBaseObject newObject) {
103 | foreach (var member in newObject.ClassInfo.ObjectProperties.
104 | Cast().
105 | Where(mi => mi.IsAssociation)) {
106 | member.SetValue(newObject, null);
107 | }
108 | }
109 |
110 | public static void RemoveTLObjects(XPBaseCollection collection, XPBaseObject ob)
111 | where T : class {
112 | var obAsT = ob as T;
113 | if (obAsT != null)
114 | collection.BaseRemove(ob);
115 | }
116 |
117 | public static void DiscardChanges(UnitOfWork unitOfWork, XPBaseCollection collection) where T : class {
118 | // remember which top-level objects were going to be deleted
119 | // so we can restore them back into the UI collection
120 | var deletedTLObjects = GetDeletedTLObjects(unitOfWork);
121 |
122 | // as long as the unit of work hasn't been committed, the newly added
123 | // objects are recognized by the IsNewObject method
124 | // for the elements that had been added, find their association
125 | // properties and set their values to null, so that they are
126 | // removed from the collections they had been added to
127 | foreach (var newObject in GetSavedNewObjects(unitOfWork)) {
128 | ResetAssociations(newObject);
129 | RemoveTLObjects(collection, newObject);
130 | }
131 |
132 | unitOfWork.ReloadChangedObjects();
133 |
134 | // add the deleted objects back into the top level collection
135 | collection.BaseAddRange(deletedTLObjects);
136 | }
137 |
138 |
139 | private class TransactionalChangeEventHandlerContainer where T : class {
140 | BaseView view;
141 | UnitOfWork unitOfWork;
142 | BarButtonItem saveChangesItem;
143 | BarButtonItem discardChangesItem;
144 | XPBaseCollection topLevelCollection;
145 |
146 | public TransactionalChangeEventHandlerContainer(BaseView view, UnitOfWork unitOfWork,
147 | BarButtonItem saveChangesItem, BarButtonItem discardChangesItem,
148 | XPBaseCollection topLevelCollection) {
149 | this.view = view;
150 | this.unitOfWork = unitOfWork;
151 | this.saveChangesItem = saveChangesItem;
152 | this.discardChangesItem = discardChangesItem;
153 | this.topLevelCollection = topLevelCollection;
154 |
155 | this.unitOfWork.TrackPropertiesModifications = true;
156 |
157 | EvalTransactionState();
158 | }
159 |
160 | public void ObjectManipulationHandler(object sender, ObjectManipulationEventArgs e) {
161 | EvalTransactionState();
162 | }
163 |
164 | public void SessionManipulationHandler(object sender, SessionManipulationEventArgs e) {
165 | EvalTransactionState();
166 | }
167 |
168 | void RemoveFromObjectToSaveIfNeeded(Session session, object o) {
169 | if (session.TrackPropertiesModifications && (session.IsObjectToSave(o) || session.IsObjectToDelete(o))) {
170 | var classInfo = session.GetClassInfo(o);
171 |
172 | if (classInfo.HasModifications(o)) {
173 | foreach (XPMemberInfo property in classInfo.PersistentProperties) {
174 | if (property.GetModified(o)) {
175 | if (!object.Equals(property.GetOldValue(o), property.GetValue(o))) {
176 | return;
177 | }
178 | }
179 | }
180 | }
181 | session.RemoveFromLists(o);
182 | if (session.GetObjectsToSave().Count == 0 && session.GetObjectsToDelete().Count == 0) {
183 | session.DropChanges();
184 | }
185 | }
186 | }
187 |
188 | public void ObjectChangeHandler(object sender, ObjectChangeEventArgs e) {
189 | if (e.Reason == ObjectChangeReason.CancelEdit)
190 | RemoveFromObjectToSaveIfNeeded(unitOfWork, e.Object);
191 | EvalTransactionState();
192 | }
193 |
194 | void EvalTransactionState() {
195 | var objectsToSave = TransactionalChangeHandler.ObjectsToSave(unitOfWork);
196 | saveChangesItem.Enabled =
197 | discardChangesItem.Enabled = objectsToSave;
198 | }
199 |
200 | public void DocumentClosingHandler(object sender, DocumentCancelEventArgs e) {
201 | if (TransactionalChangeHandler.ObjectsToSave(unitOfWork)) {
202 | var answer = XtraMessageBox.Show("There are unsaved changes. Do you want to validate and save before closing the list?", "Question",
203 | MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
204 | if (answer == DialogResult.Yes) {
205 | if (!TransactionalChangeHandler.ValidateAndCommit(unitOfWork))
206 | e.Cancel = true;
207 | }
208 | else if (answer == DialogResult.Cancel)
209 | e.Cancel = true;
210 | }
211 | }
212 |
213 | public void SaveChangesItemClickHandler(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {
214 | TransactionalChangeHandler.ValidateAndCommit(unitOfWork);
215 | }
216 |
217 | public void DiscardChangesItemClickHandler(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {
218 | if (ObjectsToSave(unitOfWork)) {
219 | if (XtraMessageBox.Show("This operation is going to discard all unsaved changes. Are you sure you want to proceed?", "Question",
220 | MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) {
221 | TransactionalChangeHandler.DiscardChanges(unitOfWork, topLevelCollection);
222 | }
223 | }
224 | }
225 | }
226 | }
227 | }
--------------------------------------------------------------------------------
/sample_6_7/Dashboard.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace sample_6_7 {
2 | partial class Dashboard {
3 | ///
4 | /// Required designer variable.
5 | ///
6 | private System.ComponentModel.IContainer components = null;
7 |
8 | ///
9 | /// Clean up any resources being used.
10 | ///
11 | /// true if managed resources should be disposed; otherwise, false.
12 | protected override void Dispose(bool disposing) {
13 | if (disposing && (components != null)) {
14 | components.Dispose();
15 | }
16 | base.Dispose(disposing);
17 | }
18 |
19 | #region Windows Form Designer generated code
20 |
21 | ///
22 | /// Required method for Designer support - do not modify
23 | /// the contents of this method with the code editor.
24 | ///
25 | private void InitializeComponent() {
26 | this.components = new System.ComponentModel.Container();
27 | DevExpress.XtraBars.Docking2010.Views.Widget.WidgetDockingContainer widgetDockingContainer1 = new DevExpress.XtraBars.Docking2010.Views.Widget.WidgetDockingContainer();
28 | DevExpress.XtraBars.Docking2010.Views.Widget.WidgetDockingContainer widgetDockingContainer2 = new DevExpress.XtraBars.Docking2010.Views.Widget.WidgetDockingContainer();
29 | DevExpress.XtraBars.Docking2010.Views.Widget.WidgetDockingContainer widgetDockingContainer3 = new DevExpress.XtraBars.Docking2010.Views.Widget.WidgetDockingContainer();
30 | DevExpress.XtraBars.Docking2010.Views.Widget.WidgetDockingContainer widgetDockingContainer4 = new DevExpress.XtraBars.Docking2010.Views.Widget.WidgetDockingContainer();
31 | DevExpress.XtraBars.Docking2010.Views.Widget.WidgetDockingContainer widgetDockingContainer5 = new DevExpress.XtraBars.Docking2010.Views.Widget.WidgetDockingContainer();
32 | DevExpress.XtraBars.Docking2010.Views.Widget.WidgetDockingContainer widgetDockingContainer6 = new DevExpress.XtraBars.Docking2010.Views.Widget.WidgetDockingContainer();
33 | this.eventsCurrentYearDocument = new DevExpress.XtraBars.Docking2010.Views.Widget.Document(this.components);
34 | this.roomBookingsCurrentYearDocument = new DevExpress.XtraBars.Docking2010.Views.Widget.Document(this.components);
35 | this.venuesDocument = new DevExpress.XtraBars.Docking2010.Views.Widget.Document(this.components);
36 | this.venueDetailsDocument = new DevExpress.XtraBars.Docking2010.Views.Widget.Document(this.components);
37 | this.roomBookingCollection = new DevExpress.Xpo.XPCollection(this.components);
38 | this.session = new DevExpress.Xpo.Session(this.components);
39 | this.eventCollection = new DevExpress.Xpo.XPCollection(this.components);
40 | this.singleVenueChartLink = new DevExpress.XtraPrinting.PrintableComponentLink(this.components);
41 | this.printExportItem = new DevExpress.XtraBars.BarButtonItem();
42 | this.ribbonControl1 = new DevExpress.XtraBars.Ribbon.RibbonControl();
43 | this.ribbonPageCategory1 = new DevExpress.XtraBars.Ribbon.RibbonPageCategory();
44 | this.ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage();
45 | this.ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
46 | this.documentManager1 = new DevExpress.XtraBars.Docking2010.DocumentManager(this.components);
47 | this.widgetView = new DevExpress.XtraBars.Docking2010.Views.Widget.WidgetView(this.components);
48 | ((System.ComponentModel.ISupportInitialize)(this.eventsCurrentYearDocument)).BeginInit();
49 | ((System.ComponentModel.ISupportInitialize)(this.roomBookingsCurrentYearDocument)).BeginInit();
50 | ((System.ComponentModel.ISupportInitialize)(this.venuesDocument)).BeginInit();
51 | ((System.ComponentModel.ISupportInitialize)(this.venueDetailsDocument)).BeginInit();
52 | ((System.ComponentModel.ISupportInitialize)(this.roomBookingCollection)).BeginInit();
53 | ((System.ComponentModel.ISupportInitialize)(this.session)).BeginInit();
54 | ((System.ComponentModel.ISupportInitialize)(this.eventCollection)).BeginInit();
55 | ((System.ComponentModel.ISupportInitialize)(this.ribbonControl1)).BeginInit();
56 | ((System.ComponentModel.ISupportInitialize)(this.documentManager1)).BeginInit();
57 | ((System.ComponentModel.ISupportInitialize)(this.widgetView)).BeginInit();
58 | this.SuspendLayout();
59 | //
60 | // eventsCurrentYearDocument
61 | //
62 | this.eventsCurrentYearDocument.Caption = "Events / Current Year";
63 | this.eventsCurrentYearDocument.ControlName = "EventsCurrentYear";
64 | //
65 | // roomBookingsCurrentYearDocument
66 | //
67 | this.roomBookingsCurrentYearDocument.Caption = "Room Bookings / Current Year";
68 | this.roomBookingsCurrentYearDocument.ColumnIndex = 1;
69 | this.roomBookingsCurrentYearDocument.ControlName = "RoomBookingsCurrentYear";
70 | //
71 | // venuesDocument
72 | //
73 | this.venuesDocument.Caption = "Venues";
74 | this.venuesDocument.ControlName = "Venues";
75 | this.venuesDocument.RowIndex = 1;
76 | //
77 | // venueDetailsDocument
78 | //
79 | this.venueDetailsDocument.Caption = "Venue Details";
80 | this.venueDetailsDocument.ColumnIndex = 1;
81 | this.venueDetailsDocument.ControlName = "VenueDetails";
82 | this.venueDetailsDocument.RowIndex = 1;
83 | //
84 | // roomBookingCollection
85 | //
86 | this.roomBookingCollection.ObjectType = typeof(EventsDB.RoomBooking);
87 | this.roomBookingCollection.Session = this.session;
88 | //
89 | // eventCollection
90 | //
91 | this.eventCollection.ObjectType = typeof(EventsDB.Event);
92 | this.eventCollection.Session = this.session;
93 | //
94 | // singleVenueChartLink
95 | //
96 | this.singleVenueChartLink.PaperKind = System.Drawing.Printing.PaperKind.A4;
97 | //
98 | // printExportItem
99 | //
100 | this.printExportItem.Caption = "Print && Export";
101 | this.printExportItem.Id = 0;
102 | this.printExportItem.ImageOptions.SvgImage = global::sample_6_7.Properties.Resources.printexport;
103 | this.printExportItem.Name = "printExportItem";
104 | //
105 | // ribbonControl1
106 | //
107 | this.ribbonControl1.ExpandCollapseItem.Id = 0;
108 | this.ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] {
109 | this.ribbonControl1.ExpandCollapseItem,
110 | this.ribbonControl1.SearchEditItem,
111 | this.printExportItem});
112 | this.ribbonControl1.Location = new System.Drawing.Point(0, 0);
113 | this.ribbonControl1.MaxItemId = 1;
114 | this.ribbonControl1.Name = "ribbonControl1";
115 | this.ribbonControl1.PageCategories.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageCategory[] {
116 | this.ribbonPageCategory1});
117 | this.ribbonControl1.Size = new System.Drawing.Size(931, 150);
118 | //
119 | // ribbonPageCategory1
120 | //
121 | this.ribbonPageCategory1.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
122 | this.ribbonPageCategory1.Appearance.Options.UseBackColor = true;
123 | this.ribbonPageCategory1.Name = "ribbonPageCategory1";
124 | this.ribbonPageCategory1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] {
125 | this.ribbonPage1});
126 | this.ribbonPageCategory1.Text = "Dashboard";
127 | //
128 | // ribbonPage1
129 | //
130 | this.ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
131 | this.ribbonPageGroup1});
132 | this.ribbonPage1.Name = "ribbonPage1";
133 | this.ribbonPage1.Text = "Data Operations";
134 | //
135 | // ribbonPageGroup1
136 | //
137 | this.ribbonPageGroup1.ItemLinks.Add(this.printExportItem);
138 | this.ribbonPageGroup1.Name = "ribbonPageGroup1";
139 | this.ribbonPageGroup1.Text = "Tools";
140 | //
141 | // documentManager1
142 | //
143 | this.documentManager1.ContainerControl = this;
144 | this.documentManager1.MenuManager = this.ribbonControl1;
145 | this.documentManager1.View = this.widgetView;
146 | this.documentManager1.ViewCollection.AddRange(new DevExpress.XtraBars.Docking2010.Views.BaseView[] {
147 | this.widgetView});
148 | //
149 | // widgetView
150 | //
151 | this.widgetView.Documents.AddRange(new DevExpress.XtraBars.Docking2010.Views.BaseDocument[] {
152 | this.eventsCurrentYearDocument,
153 | this.roomBookingsCurrentYearDocument,
154 | this.venuesDocument,
155 | this.venueDetailsDocument});
156 | this.widgetView.FreeLayoutProperties.FreeLayoutItems.AddRange(new DevExpress.XtraBars.Docking2010.Views.Widget.Document[] {
157 | this.eventsCurrentYearDocument,
158 | this.roomBookingsCurrentYearDocument,
159 | this.venuesDocument,
160 | this.venueDetailsDocument});
161 | this.widgetView.LayoutMode = DevExpress.XtraBars.Docking2010.Views.Widget.LayoutMode.FreeLayout;
162 | widgetDockingContainer2.Element = this.eventsCurrentYearDocument;
163 | widgetDockingContainer3.Element = this.roomBookingsCurrentYearDocument;
164 | widgetDockingContainer1.Nodes.AddRange(new DevExpress.XtraBars.Docking2010.Views.Tabbed.DockingContainer[] {
165 | widgetDockingContainer2,
166 | widgetDockingContainer3});
167 | widgetDockingContainer5.Element = this.venuesDocument;
168 | widgetDockingContainer6.Element = this.venueDetailsDocument;
169 | widgetDockingContainer4.Nodes.AddRange(new DevExpress.XtraBars.Docking2010.Views.Tabbed.DockingContainer[] {
170 | widgetDockingContainer5,
171 | widgetDockingContainer6});
172 | this.widgetView.RootContainer.Nodes.AddRange(new DevExpress.XtraBars.Docking2010.Views.Tabbed.DockingContainer[] {
173 | widgetDockingContainer1,
174 | widgetDockingContainer4});
175 | this.widgetView.RootContainer.Orientation = System.Windows.Forms.Orientation.Vertical;
176 | this.widgetView.QueryControl += new DevExpress.XtraBars.Docking2010.Views.QueryControlEventHandler(this.widgetView_QueryControl);
177 | //
178 | // Dashboard
179 | //
180 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
181 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
182 | this.Controls.Add(this.ribbonControl1);
183 | this.Name = "Dashboard";
184 | this.Size = new System.Drawing.Size(931, 686);
185 | ((System.ComponentModel.ISupportInitialize)(this.eventsCurrentYearDocument)).EndInit();
186 | ((System.ComponentModel.ISupportInitialize)(this.roomBookingsCurrentYearDocument)).EndInit();
187 | ((System.ComponentModel.ISupportInitialize)(this.venuesDocument)).EndInit();
188 | ((System.ComponentModel.ISupportInitialize)(this.venueDetailsDocument)).EndInit();
189 | ((System.ComponentModel.ISupportInitialize)(this.roomBookingCollection)).EndInit();
190 | ((System.ComponentModel.ISupportInitialize)(this.session)).EndInit();
191 | ((System.ComponentModel.ISupportInitialize)(this.eventCollection)).EndInit();
192 | ((System.ComponentModel.ISupportInitialize)(this.ribbonControl1)).EndInit();
193 | ((System.ComponentModel.ISupportInitialize)(this.documentManager1)).EndInit();
194 | ((System.ComponentModel.ISupportInitialize)(this.widgetView)).EndInit();
195 | this.ResumeLayout(false);
196 | this.PerformLayout();
197 |
198 | }
199 |
200 | #endregion
201 | private DevExpress.Xpo.Session session;
202 | private DevExpress.Xpo.XPCollection eventCollection;
203 | private DevExpress.Xpo.XPCollection roomBookingCollection;
204 | private DevExpress.XtraPrinting.PrintableComponentLink singleVenueChartLink;
205 | private DevExpress.XtraBars.BarButtonItem printExportItem;
206 | private DevExpress.XtraBars.Ribbon.RibbonControl ribbonControl1;
207 | private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage1;
208 | private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1;
209 | private DevExpress.XtraBars.Ribbon.RibbonPageCategory ribbonPageCategory1;
210 | private DevExpress.XtraBars.Docking2010.DocumentManager documentManager1;
211 | private DevExpress.XtraBars.Docking2010.Views.Widget.WidgetView widgetView;
212 | private DevExpress.XtraBars.Docking2010.Views.Widget.Document eventsCurrentYearDocument;
213 | private DevExpress.XtraBars.Docking2010.Views.Widget.Document roomBookingsCurrentYearDocument;
214 | private DevExpress.XtraBars.Docking2010.Views.Widget.Document venuesDocument;
215 | private DevExpress.XtraBars.Docking2010.Views.Widget.Document venueDetailsDocument;
216 | }
217 | }
--------------------------------------------------------------------------------
/sample_6_7/MainForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace sample_6_7 {
2 | partial class MainForm {
3 | ///
4 | /// Required designer variable.
5 | ///
6 | private System.ComponentModel.IContainer components = null;
7 |
8 | ///
9 | /// Clean up any resources being used.
10 | ///
11 | /// true if managed resources should be disposed; otherwise, false.
12 | protected override void Dispose(bool disposing) {
13 | if (disposing && (components != null)) {
14 | components.Dispose();
15 | }
16 | base.Dispose(disposing);
17 | }
18 |
19 | #region Windows Form Designer generated code
20 |
21 | ///
22 | /// Required method for Designer support - do not modify
23 | /// the contents of this method with the code editor.
24 | ///
25 | private void InitializeComponent() {
26 | this.components = new System.ComponentModel.Container();
27 | this.ribbon = new DevExpress.XtraBars.Ribbon.RibbonControl();
28 | this.backstageViewControl1 = new DevExpress.XtraBars.Ribbon.BackstageViewControl();
29 | this.exitItem = new DevExpress.XtraBars.Ribbon.BackstageViewButtonItem();
30 | this.dashboardItem = new DevExpress.XtraBars.BarButtonItem();
31 | this.customersItem = new DevExpress.XtraBars.BarButtonItem();
32 | this.eventsItem = new DevExpress.XtraBars.BarButtonItem();
33 | this.roomBookingsItem = new DevExpress.XtraBars.BarButtonItem();
34 | this.pivotOverviewItem = new DevExpress.XtraBars.BarButtonItem();
35 | this.roomBookingReportItem = new DevExpress.XtraBars.BarButtonItem();
36 | this.barStaticItem1 = new DevExpress.XtraBars.BarStaticItem();
37 | this.skinRibbonGalleryBarItem1 = new DevExpress.XtraBars.SkinRibbonGalleryBarItem();
38 | this.skinPaletteRibbonGalleryBarItem1 = new DevExpress.XtraBars.SkinPaletteRibbonGalleryBarItem();
39 | this.ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage();
40 | this.ribbonPageGroup3 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
41 | this.ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
42 | this.ribbonPageGroup2 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
43 | this.ribbonPage2 = new DevExpress.XtraBars.Ribbon.RibbonPage();
44 | this.ribbonPageGroup4 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
45 | this.ribbonStatusBar1 = new DevExpress.XtraBars.Ribbon.RibbonStatusBar();
46 | this.documentManager1 = new DevExpress.XtraBars.Docking2010.DocumentManager(this.components);
47 | this.tabbedView = new DevExpress.XtraBars.Docking2010.Views.Tabbed.TabbedView(this.components);
48 | ((System.ComponentModel.ISupportInitialize)(this.ribbon)).BeginInit();
49 | ((System.ComponentModel.ISupportInitialize)(this.backstageViewControl1)).BeginInit();
50 | ((System.ComponentModel.ISupportInitialize)(this.documentManager1)).BeginInit();
51 | ((System.ComponentModel.ISupportInitialize)(this.tabbedView)).BeginInit();
52 | this.SuspendLayout();
53 | //
54 | // ribbon
55 | //
56 | this.ribbon.ApplicationButtonDropDownControl = this.backstageViewControl1;
57 | this.ribbon.ExpandCollapseItem.Id = 0;
58 | this.ribbon.Items.AddRange(new DevExpress.XtraBars.BarItem[] {
59 | this.ribbon.ExpandCollapseItem,
60 | this.ribbon.SearchEditItem,
61 | this.dashboardItem,
62 | this.customersItem,
63 | this.eventsItem,
64 | this.roomBookingsItem,
65 | this.pivotOverviewItem,
66 | this.roomBookingReportItem,
67 | this.barStaticItem1,
68 | this.skinRibbonGalleryBarItem1,
69 | this.skinPaletteRibbonGalleryBarItem1});
70 | this.ribbon.Location = new System.Drawing.Point(0, 0);
71 | this.ribbon.MaxItemId = 11;
72 | this.ribbon.MdiMergeStyle = DevExpress.XtraBars.Ribbon.RibbonMdiMergeStyle.Always;
73 | this.ribbon.Name = "ribbon";
74 | this.ribbon.OptionsPageCategories.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageCategoryAlignment.Right;
75 | this.ribbon.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] {
76 | this.ribbonPage1,
77 | this.ribbonPage2});
78 | this.ribbon.Size = new System.Drawing.Size(934, 158);
79 | this.ribbon.StatusBar = this.ribbonStatusBar1;
80 | this.ribbon.Merge += new DevExpress.XtraBars.Ribbon.RibbonMergeEventHandler(this.ribbon_Merge);
81 | //
82 | // backstageViewControl1
83 | //
84 | this.backstageViewControl1.Items.Add(this.exitItem);
85 | this.backstageViewControl1.Location = new System.Drawing.Point(346, 238);
86 | this.backstageViewControl1.Name = "backstageViewControl1";
87 | this.backstageViewControl1.OwnerControl = this.ribbon;
88 | this.backstageViewControl1.Size = new System.Drawing.Size(480, 150);
89 | this.backstageViewControl1.TabIndex = 10;
90 | this.backstageViewControl1.VisibleInDesignTime = true;
91 | //
92 | // exitItem
93 | //
94 | this.exitItem.Caption = "Exit";
95 | this.exitItem.Name = "exitItem";
96 | this.exitItem.ItemClick += new DevExpress.XtraBars.Ribbon.BackstageViewItemEventHandler(this.exitItem_ItemClick);
97 | //
98 | // dashboardItem
99 | //
100 | this.dashboardItem.Caption = "Dashboard";
101 | this.dashboardItem.Id = 1;
102 | this.dashboardItem.ImageOptions.SvgImage = global::sample_6_7.Properties.Resources.dashboard;
103 | this.dashboardItem.Name = "dashboardItem";
104 | //
105 | // customersItem
106 | //
107 | this.customersItem.Caption = "Customers";
108 | this.customersItem.Id = 2;
109 | this.customersItem.ImageOptions.SvgImage = global::sample_6_7.Properties.Resources.customers;
110 | this.customersItem.Name = "customersItem";
111 | //
112 | // eventsItem
113 | //
114 | this.eventsItem.Caption = "Events";
115 | this.eventsItem.Id = 4;
116 | this.eventsItem.ImageOptions.SvgImage = global::sample_6_7.Properties.Resources._event;
117 | this.eventsItem.Name = "eventsItem";
118 | //
119 | // roomBookingsItem
120 | //
121 | this.roomBookingsItem.Caption = "Room Bookings";
122 | this.roomBookingsItem.Id = 5;
123 | this.roomBookingsItem.ImageOptions.SvgImage = global::sample_6_7.Properties.Resources.roombooking_alt;
124 | this.roomBookingsItem.Name = "roomBookingsItem";
125 | //
126 | // pivotOverviewItem
127 | //
128 | this.pivotOverviewItem.Caption = "Pivot Overview";
129 | this.pivotOverviewItem.Id = 6;
130 | this.pivotOverviewItem.ImageOptions.SvgImage = global::sample_6_7.Properties.Resources.pivotoverview;
131 | this.pivotOverviewItem.Name = "pivotOverviewItem";
132 | //
133 | // roomBookingReportItem
134 | //
135 | this.roomBookingReportItem.Caption = "Room Booking Report";
136 | this.roomBookingReportItem.Id = 7;
137 | this.roomBookingReportItem.ImageOptions.SvgImage = global::sample_6_7.Properties.Resources.report;
138 | this.roomBookingReportItem.Name = "roomBookingReportItem";
139 | //
140 | // barStaticItem1
141 | //
142 | this.barStaticItem1.Caption = "Ready";
143 | this.barStaticItem1.Id = 8;
144 | this.barStaticItem1.Name = "barStaticItem1";
145 | //
146 | // skinRibbonGalleryBarItem1
147 | //
148 | this.skinRibbonGalleryBarItem1.Caption = "skinRibbonGalleryBarItem1";
149 | this.skinRibbonGalleryBarItem1.Id = 9;
150 | this.skinRibbonGalleryBarItem1.Name = "skinRibbonGalleryBarItem1";
151 | //
152 | // skinPaletteRibbonGalleryBarItem1
153 | //
154 | this.skinPaletteRibbonGalleryBarItem1.Caption = "skinPaletteRibbonGalleryBarItem1";
155 | this.skinPaletteRibbonGalleryBarItem1.Id = 10;
156 | this.skinPaletteRibbonGalleryBarItem1.Name = "skinPaletteRibbonGalleryBarItem1";
157 | //
158 | // ribbonPage1
159 | //
160 | this.ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
161 | this.ribbonPageGroup3,
162 | this.ribbonPageGroup1,
163 | this.ribbonPageGroup2});
164 | this.ribbonPage1.Name = "ribbonPage1";
165 | this.ribbonPage1.Text = "Navigation";
166 | //
167 | // ribbonPageGroup3
168 | //
169 | this.ribbonPageGroup3.ItemLinks.Add(this.dashboardItem);
170 | this.ribbonPageGroup3.Name = "ribbonPageGroup3";
171 | this.ribbonPageGroup3.Text = "Global";
172 | //
173 | // ribbonPageGroup1
174 | //
175 | this.ribbonPageGroup1.ItemLinks.Add(this.customersItem);
176 | this.ribbonPageGroup1.ItemLinks.Add(this.eventsItem);
177 | this.ribbonPageGroup1.ItemLinks.Add(this.roomBookingsItem);
178 | this.ribbonPageGroup1.Name = "ribbonPageGroup1";
179 | this.ribbonPageGroup1.Text = "Data";
180 | //
181 | // ribbonPageGroup2
182 | //
183 | this.ribbonPageGroup2.ItemLinks.Add(this.pivotOverviewItem);
184 | this.ribbonPageGroup2.ItemLinks.Add(this.roomBookingReportItem);
185 | this.ribbonPageGroup2.Name = "ribbonPageGroup2";
186 | this.ribbonPageGroup2.Text = "Data Analysis";
187 | //
188 | // ribbonPage2
189 | //
190 | this.ribbonPage2.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
191 | this.ribbonPageGroup4});
192 | this.ribbonPage2.Name = "ribbonPage2";
193 | this.ribbonPage2.Text = "Style";
194 | //
195 | // ribbonPageGroup4
196 | //
197 | this.ribbonPageGroup4.ItemLinks.Add(this.skinRibbonGalleryBarItem1);
198 | this.ribbonPageGroup4.ItemLinks.Add(this.skinPaletteRibbonGalleryBarItem1);
199 | this.ribbonPageGroup4.Name = "ribbonPageGroup4";
200 | this.ribbonPageGroup4.Text = "Skins";
201 | //
202 | // ribbonStatusBar1
203 | //
204 | this.ribbonStatusBar1.ItemLinks.Add(this.barStaticItem1);
205 | this.ribbonStatusBar1.Location = new System.Drawing.Point(0, 657);
206 | this.ribbonStatusBar1.Name = "ribbonStatusBar1";
207 | this.ribbonStatusBar1.Ribbon = this.ribbon;
208 | this.ribbonStatusBar1.Size = new System.Drawing.Size(934, 24);
209 | //
210 | // documentManager1
211 | //
212 | this.documentManager1.MdiParent = this;
213 | this.documentManager1.MenuManager = this.ribbon;
214 | this.documentManager1.RibbonAndBarsMergeStyle = DevExpress.XtraBars.Docking2010.Views.RibbonAndBarsMergeStyle.Always;
215 | this.documentManager1.View = this.tabbedView;
216 | this.documentManager1.ViewCollection.AddRange(new DevExpress.XtraBars.Docking2010.Views.BaseView[] {
217 | this.tabbedView});
218 | //
219 | // tabbedView
220 | //
221 | this.tabbedView.QueryControl += new DevExpress.XtraBars.Docking2010.Views.QueryControlEventHandler(this.tabbedView_QueryControl);
222 | //
223 | // MainForm
224 | //
225 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
226 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
227 | this.ClientSize = new System.Drawing.Size(934, 681);
228 | this.Controls.Add(this.ribbonStatusBar1);
229 | this.Controls.Add(this.backstageViewControl1);
230 | this.Controls.Add(this.ribbon);
231 | this.IsMdiContainer = true;
232 | this.Name = "MainForm";
233 | this.Ribbon = this.ribbon;
234 | this.StatusBar = this.ribbonStatusBar1;
235 | this.Text = "Event Management";
236 | this.Load += new System.EventHandler(this.MainForm_Load);
237 | ((System.ComponentModel.ISupportInitialize)(this.ribbon)).EndInit();
238 | ((System.ComponentModel.ISupportInitialize)(this.backstageViewControl1)).EndInit();
239 | ((System.ComponentModel.ISupportInitialize)(this.documentManager1)).EndInit();
240 | ((System.ComponentModel.ISupportInitialize)(this.tabbedView)).EndInit();
241 | this.ResumeLayout(false);
242 | this.PerformLayout();
243 |
244 | }
245 |
246 | #endregion
247 | private DevExpress.XtraBars.Ribbon.RibbonControl ribbon;
248 | private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage1;
249 | private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1;
250 | private DevExpress.XtraBars.Ribbon.RibbonStatusBar ribbonStatusBar1;
251 | private DevExpress.XtraBars.Ribbon.BackstageViewControl backstageViewControl1;
252 | private DevExpress.XtraBars.Ribbon.BackstageViewButtonItem exitItem;
253 | private DevExpress.XtraBars.BarButtonItem dashboardItem;
254 | private DevExpress.XtraBars.BarButtonItem customersItem;
255 | private DevExpress.XtraBars.BarButtonItem eventsItem;
256 | private DevExpress.XtraBars.BarButtonItem roomBookingsItem;
257 | private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup3;
258 | private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup2;
259 | private DevExpress.XtraBars.BarButtonItem pivotOverviewItem;
260 | private DevExpress.XtraBars.BarButtonItem roomBookingReportItem;
261 | private DevExpress.XtraBars.BarStaticItem barStaticItem1;
262 | private DevExpress.XtraBars.Docking2010.DocumentManager documentManager1;
263 | private DevExpress.XtraBars.Docking2010.Views.Tabbed.TabbedView tabbedView;
264 | private DevExpress.XtraBars.SkinRibbonGalleryBarItem skinRibbonGalleryBarItem1;
265 | private DevExpress.XtraBars.SkinPaletteRibbonGalleryBarItem skinPaletteRibbonGalleryBarItem1;
266 | private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage2;
267 | private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup4;
268 | }
269 | }
270 |
271 |
--------------------------------------------------------------------------------
/sample_6_7/sample_6_7.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | latest
5 |
6 |
7 | Debug
8 | AnyCPU
9 | 9.0.30729
10 | 2.0
11 | {9269B2D5-39EA-4D65-BCDA-5628A409CFEC}
12 | WinExe
13 | Properties
14 | sample_6_7
15 | sample_6_7
16 | v4.8
17 | 512
18 |
19 |
20 |
21 |
22 | 4.0
23 | publish\
24 | true
25 | Disk
26 | false
27 | Foreground
28 | 7
29 | Days
30 | false
31 | false
32 | true
33 | 0
34 | 1.0.0.%2a
35 | false
36 | false
37 | true
38 |
39 |
40 |
41 | true
42 | full
43 | false
44 | bin\Debug\
45 | DEBUG;TRACE
46 | prompt
47 | 4
48 | false
49 | AllRules.ruleset
50 | x86
51 | false
52 |
53 |
54 | pdbonly
55 | true
56 | bin\Release\
57 | TRACE
58 | prompt
59 | 4
60 | AllRules.ruleset
61 | false
62 |
63 |
64 |
65 |
66 |
67 | ..\packages\DevExpress.Data.21.1.3\lib\net452\DevExpress.Data.v21.1.dll
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | ..\packages\DevExpress.Xpo.21.1.3\lib\net452\DevExpress.Xpo.v21.1.dll
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 | ..\packages\DXTraining.EventsDB.21.1.0.1\lib\net452\DXTraining.EventsDB.dll
105 |
106 |
107 | ..\packages\BizRulez.1.0.2\lib\net40\pct.BizRulez.dll
108 |
109 |
110 |
111 | 3.5
112 |
113 |
114 |
115 |
116 | 3.5
117 |
118 |
119 | 3.5
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 | UserControl
130 |
131 |
132 | CustomerList.cs
133 |
134 |
135 | UserControl
136 |
137 |
138 | Dashboard.cs
139 |
140 |
141 | UserControl
142 |
143 |
144 | EventsCurrentYear.cs
145 |
146 |
147 | UserControl
148 |
149 |
150 | Placeholder.cs
151 |
152 |
153 | UserControl
154 |
155 |
156 | RoomBookingsCurrentYear.cs
157 |
158 |
159 | UserControl
160 |
161 |
162 | VenueDetails.cs
163 |
164 |
165 | UserControl
166 |
167 |
168 | Venues.cs
169 |
170 |
171 | UserControl
172 |
173 |
174 | EventView.cs
175 |
176 |
177 | UserControl
178 |
179 |
180 | PivotOverview.cs
181 |
182 |
183 | UserControl
184 |
185 |
186 | PrintPreview.cs
187 |
188 |
189 | Component
190 |
191 |
192 | RoomBookingReport.cs
193 |
194 |
195 | UserControl
196 |
197 |
198 | RoomBookingView.cs
199 |
200 |
201 | Form
202 |
203 |
204 | MainForm.cs
205 |
206 |
207 |
208 |
209 | CustomerList.cs
210 |
211 |
212 | Dashboard.cs
213 |
214 |
215 | EventsCurrentYear.cs
216 |
217 |
218 | Placeholder.cs
219 |
220 |
221 | RoomBookingsCurrentYear.cs
222 |
223 |
224 | VenueDetails.cs
225 |
226 |
227 | Venues.cs
228 |
229 |
230 | EventView.cs
231 |
232 |
233 | PivotOverview.cs
234 |
235 |
236 | PrintPreview.cs
237 |
238 |
239 | RoomBookingReport.cs
240 |
241 |
242 | RoomBookingView.cs
243 | Designer
244 |
245 |
246 | MainForm.cs
247 |
248 |
249 |
250 | ResXFileCodeGenerator
251 | Designer
252 |
253 |
254 |
255 |
256 | SettingsSingleFileGenerator
257 | Settings.Designer.cs
258 |
259 |
260 | True
261 | Settings.settings
262 | True
263 |
264 |
265 |
266 |
267 |
268 | False
269 | .NET Framework 3.5 SP1 Client Profile
270 | false
271 |
272 |
273 | False
274 | .NET Framework 3.5 SP1
275 | true
276 |
277 |
278 | False
279 | Windows Installer 3.1
280 | true
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
321 |
--------------------------------------------------------------------------------