static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // This code registers a report storage that uses System.DataSet.
            reportStorage = new DataSetReportStorage();

            // Uncomment these lines to register a report storage that uses XPO.
            //XpoDefault.DataLayer = XpoDefault.GetDataLayer(DevExpress.Xpo.DB.AccessConnectionProvider.GetConnectionString("ReportStorage.mdb"), DevExpress.Xpo.DB.AutoCreateOption.DatabaseAndSchema);
            // reportStorage = new XpoReportStorage(new UnitOfWork());

            // Uncomment this line to register a report storage, which uses Zip file.
            // reportStorage = new ZipReportStorage();

            ReportStorageExtension.RegisterExtensionGlobal(reportStorage);
            Application.Run(new Form1());
        }
        private void CreateDesigner(string relativeReportBasePath)
        {
            DesignForm = CreateDesignForm();
            var controller = DesignForm.DesignMdiController;

            // Hide Scripting & HTML Preview
            controller.SetCommandVisibility(ReportCommand.ShowScriptsTab, CommandVisibility.None);
            controller.SetCommandVisibility(ReportCommand.ShowHTMLViewTab, CommandVisibility.None);

            // Use ReportController during PrintPreview
            this.UseReportControllerDuringPrintPreview();

            // Pass Datasource to Subreports
            this.SetupDesignTimeSubreportDatasourcePassing();

            // Add toolbar button to select Datasource
            AddToolbarButton_SelectDataSource(DesignForm);

            // Relative Path ReportSourceURL (Sad this is static/global.  Bad Design, DevExpress.)
            var relativePathStorage = new RelativePathReportStorage(relativeReportBasePath);

            ReportStorageExtension.RegisterExtensionGlobal(relativePathStorage);
        }
Esempio n. 3
0
        //static void Main(string [] args)

        static void Main()
        {
#if (DEBUG)
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
#endif
            //if (args.Length == 0)
            //{

            Application.EnableVisualStyles();
            DevExpress.UserSkins.BonusSkins.Register();
            DevExpress.Skins.SkinManager.EnableFormSkins();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            string applicationStyle = CustomApplicationSettings.Instance.ApplicationStyle;

            DevExpress.Skins.SkinManager.Default.RegisterAssembly(typeof(DevExpress.UserSkins.CDSSkin).Assembly);
            DevExpress.XtraSplashScreen.SplashScreenManager.RegisterUserSkins(typeof(DevExpress.UserSkins.CDSSkin).Assembly);

            if (applicationStyle.Length == 0)
            {
                DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("CDS Blue");
            }
            else
            {
                DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(applicationStyle);
            }

            //DevExpress.Utils.AppearanceObject.DefaultFont = new Font("Courier New", 10);
            //DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("Office 2010 Silver");

            DevExpress.Utils.AppearanceObject.DefaultFont = new System.Drawing.Font(CustomApplicationSettings.Instance.FontType, CustomApplicationSettings.Instance.FontSize);



            //Apply Windows 8 Style
            //DevExpress.LookAndFeel.UserLookAndFeel.Default.UseDefaultLookAndFeel = false;
            //DevExpress.LookAndFeel.UserLookAndFeel.Default.UseWindowsXPTheme = false;
            //DevExpress.LookAndFeel.UserLookAndFeel.Default.Style = LookAndFeelStyle.Skin;
            //DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName = "Metropolis";

            // Set up the culture that determines the datetime format etc.
            System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo("en-us", true);
            culture.NumberFormat.CurrencyDecimalDigits    = 2;
            culture.NumberFormat.CurrencyDecimalSeparator = ".";
            culture.NumberFormat.CurrencySymbol           = "";

            culture.DateTimeFormat.ShortDatePattern = "yyyy/MM/dd";

            culture.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Monday;

            System.Threading.Thread.CurrentThread.CurrentCulture = culture;

            DevExpress.Utils.FormatInfo.AlwaysUseThreadFormat = true;

            reportStorage   = new Reporting.Report.Extensions.ReportExtension();
            designExtension = new Reporting.Report.Extensions.DesignExtension();

            ReportStorageExtension.RegisterExtensionGlobal(ReportStorage);
            ReportDesignExtension.RegisterExtension(DesignExtension, "Custom");

            ReportTemplateExtension.RegisterExtensionGlobal(new Reporting.Report.Templates.CustomTemplateExtension());

            ConfigureExceptionHandling();
            CreateUpdateTrayIcon();
            Signin();
            //}
            //else if (args[0] == "-show-app-list")
            //{

            //    Application.EnableVisualStyles();
            //    DevExpress.UserSkins.BonusSkins.Register();
            //    DevExpress.Skins.SkinManager.EnableFormSkins();
            //    Application.EnableVisualStyles();
            //    Application.SetCompatibleTextRenderingDefault(false);
            //    Xceed.Grid.Licenser.LicenseKey = "GRD36AUKKUZ4A75Y8CA";
            //    DevExpress.LookAndFeel.UserLookAndFeel.Default.UseDefaultLookAndFeel = false;
            //    DevExpress.LookAndFeel.UserLookAndFeel.Default.UseWindowsXPTheme = false;
            //    DevExpress.LookAndFeel.UserLookAndFeel.Default.Style = LookAndFeelStyle.Skin;
            //    DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName = "Metropolis";


            //    AppLauncher launcher = new AppLauncher();
            //    launcher.Location = new System.Drawing.Point((Cursor.Position.X - (launcher.Width / 2) < 0) ? 10 : Cursor.Position.X - (launcher.Width / 2), ((Screen.PrimaryScreen.Bounds.Height) - (new Taskbar()).Bounds.Height) - launcher.Height- 10);
            //    Application.Run(launcher);

            //    //Cursor.Position = new System.Drawing.Point(Cursor.Position.X, (Screen.PrimaryScreen.Bounds.Height) - (new Taskbar()).Bounds.Height);
            //}
        }