Mini Kabibi Habibi

Current Path : C:/Users/Public/Documents/DXperience 13.1 Demos/Reporting/CS/ReportMainDemo/
Upload File :
Current File : C:/Users/Public/Documents/DXperience 13.1 Demos/Reporting/CS/ReportMainDemo/frmMain.cs

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using DevExpress.XtraBars;
using DevExpress.LookAndFeel;
using System.IO;
using DevExpress.XtraPrinting.Preview;
using DevExpress.XtraBars.Ribbon;
using DevExpress.XtraBars.Docking2010.Views;
using DevExpress.XtraReports.UI;
using System.Threading;
using DevExpress.XtraPrinting;
using DevExpress.DXperience.Demos;
using DevExpress.Utils;
using DevExpress.Tutorials;

namespace XtraReportsDemos {
    public class frmMain : DevExpress.DXperience.Demos.RibbonMainForm {
		protected override void SetFormParam() {
            this.Icon = ResourceImageHelper.CreateIconFromResources("XtraReportsDemos.AppIcon.ico", typeof(frmMain).Assembly);
		}
        protected override string DemoName { get { return "DevExpress Reports Demo (C# code)"; } }
        protected override void ShowModule(string name, DevExpress.XtraEditors.GroupControl group, DevExpress.LookAndFeel.DefaultLookAndFeel lookAndFeel, DevExpress.Utils.Frames.ApplicationCaption caption) {
            DemosInfo.ShowModule(name, group, caption, RibbonMenuManager);
        }
		[STAThread]
		static void Main() {
            string path = FilesHelper.FindingFileName(AppDomain.CurrentDomain.BaseDirectory, @"Data\nwind.mdb", false);
            ConnectionHelper.ApplyDataDirectory(Path.GetDirectoryName(path));
			DevExpress.UserSkins.BonusSkins.Register();
            Application.Run(new frmMain());
		}
		protected override void FillNavBar() {
			base.FillNavBar();
			this.navBarControl1.SkinExplorerBarViewScrollStyle = DevExpress.XtraNavBar.SkinExplorerBarViewScrollStyle.ScrollBar;
			//this.navBarControl1.LargeImages = null;
		}
        protected override void ShowAbout() {
            DevExpress.Utils.About.AboutForm.Show(typeof(XtraReport), DevExpress.Utils.About.ProductKind.XtraReports, DevExpress.Utils.About.ProductInfoStage.Registered);
        }
	}
	public class DemosInfo : ModulesInfo {
        public static void ShowModule(string name, DevExpress.XtraEditors.GroupControl group, DevExpress.Utils.Frames.ApplicationCaption caption, RibbonMenuManager manager) {
			DevExpress.DXperience.Demos.ModuleInfo item = DemosInfo.GetItem(name);
			Cursor currentCursor = Cursor.Current;
			Cursor.Current = Cursors.WaitCursor;
			try {
				Control oldTutorial = null;
				if(Instance.CurrentModuleBase != null) {
					if(Instance.CurrentModuleBase.Name == name)
						return;
					Instance.CurrentModuleBase.TModule.Visible = false;
				}

                TutorialControlBase tutorial = item.TModule as TutorialControlBase;
				tutorial.Bounds = group.DisplayRectangle;
				Instance.CurrentModuleBase = item;
				tutorial.Visible = false;
				group.Controls.Add(tutorial);
				tutorial.Dock = DockStyle.Fill;
                tutorial.RibbonMenuManager = manager;
				tutorial.TutorialName = name;
				tutorial.Caption = caption;
				tutorial.Visible = true;
				tutorial.BringToFront();
				tutorial.Focus();
				if(oldTutorial != null)
					oldTutorial.Visible = false;
			}
			finally {
				Cursor.Current = currentCursor;
			}
			RaiseModuleChanged();
		}
	}
    public class About : ucAboutPage {
        public About() {
            InitializeComponent();
        }
        protected override string ProductText {
            get {
                return "Introducing XtraReports - our next generation of multi-platform reporting solutions for Windows Forms! With full Microsoft Visual Studio .NET integration, flexible architecture and an outstanding set of special tools, XtraReports is essential for creating even the most complex reports in the shortest possible time.\r\n\r\nAs with all Developer Express .NET components, full source code is available and your purchase is backed by a 60-day no questions asked money back guarantee."; 
                    //"The XtraTreeList Suite is a comprehensive WinForms TreeView and ListView control - a multi-purpose data visualization system that can display information as a TREE, a GRID, or a combination of both - in either data-bound or unbound mode. This unique synergy between a traditional grid and a traditional TreeView allows you to create cutting-edge and visually appealing application interfaces for your end-users.\r\n\r\nGive the XtraTreeList Suite a try and see for yourself - if it is not the best and most comprehensive product library of its kind, return it to us within the first 60 days from purchase for an UNCONDITIONAL no questions asked refund!";
            }
        }
        protected override Image ProductImage {
            get {
                return DevExpress.Utils.ResourceImageHelper.CreateImageFromResources("DevExpress.XtraReports.Images.XtraReports.png", typeof(XtraReport).Assembly); ;
            }
        }
        protected override Image ProductImageLight {
            get {
                return DevExpress.Utils.ResourceImageHelper.CreateImageFromResources("DevExpress.XtraReports.Images.XtraReports_light.png", typeof(XtraReport).Assembly); ;
            }
        }
        protected override DevExpress.Utils.About.ProductKind ProductKind {
            get {
                return DevExpress.Utils.About.ProductKind.XtraReports;
            }
        }
        private void InitializeComponent() {
            this.SuspendLayout();
            // 
            // About
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Name = "About";
            this.Size = new System.Drawing.Size(439, 260);
            this.ResumeLayout(false);

        }
        protected override void Dispose(bool disposing) {
            if(disposing) {
                if(components != null) {
                    components.Dispose();
                }
            }
            base.Dispose(disposing);
        }
        private System.ComponentModel.IContainer components = null;
    }
}