예제 #1
0
        static Form1()
        {
            // The following code is required to support serialization of multiple custom objects.
            TypeDescriptor.AddAttributes(typeof(XPCollection), new ReportAssociatedComponentAttribute());

            // The following code is required to serialize custom objects.
            ReportExtension.RegisterExtensionGlobal(new ReportExtension());
            ReportDesignExtension.RegisterExtension(new DesignExtension(), ExtensionName);

            string fileName =
                Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\person.mdb";

            if (!File.Exists(fileName))
            {
                UnitOfWork session = CreateSessionByName("person.mdb");
                if (new XPCollection <Person>(session).Count < 6)
                {
                    Person.Create(session, "Name1");
                    Person.Create(session, "Name2");
                    Person.Create(session, "Name3");
                    Person.Create(session, "Name4");
                    Person.Create(session, "Name5");
                    Person.Create(session, "Name6");
                    session.CommitChanges();
                }
            }
        }
예제 #2
0
 static XtraReportBase()
 {
     ParametersRequestExtension.RegisterExtension(new TimePeriodParametersExtention(),
                                                  "DependentEditorsReport");
     ReportDesignExtension.RegisterExtension(new TimePeriodDesignExtention(),
                                             "DependentEditorsReport");
 }
예제 #3
0
        static Form1()
        {
            // The following code is required to support serialization of multiple custom objects.
            TypeDescriptor.AddAttributes(typeof(DataSet), new ReportAssociatedComponentAttribute());
            TypeDescriptor.AddAttributes(typeof(OleDbDataAdapter), new ReportAssociatedComponentAttribute());

            // The following code is required to serialize custom objects.
            ReportExtension.RegisterExtensionGlobal(new ReportExtension());
            ReportDesignExtension.RegisterExtension(new DesignExtension(), ExtensionName);
        }
예제 #4
0
 static Form1()
 {
     ReportDesignExtension.RegisterExtension(new CustomReportExtension(), TeamParameterName);
 }
 static Form1()
 {
     ReportDesignExtension.RegisterExtension(new CustomReportExtension(), TeamParameterName);
     CustomReportStorageExtension.RegisterExtensionGlobal(new CustomReportStorageExtension());
 }
예제 #6
0
파일: Program.cs 프로젝트: tslekwadi/CDS
        //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);
            //}
        }