Beispiel #1
0
        protected override void RegisterSettings()
        {
            SkinManager.EnableFormSkinsIfNotVista();

            if (Config.IsDebug)
            {
                UserLookAndFeel.Default.SkinName = "Office 2010 Black";
            }
            else
            {
                UserLookAndFeel.Default.SkinName = "Office 2010 Blue";
            }
            Dialog.DefaultTitle = "Shomrei Torah Billing";

            //TODO: Register HebrewDate editor

            RegisterRowDetail <Person>(p => new Forms.PersonDetails(p)
            {
                MdiParent = MainForm
            }.Show());
            RegisterRowDetail <Pledge>(p => new Forms.PledgeEditPopup(p).Show(MainForm));
            RegisterRowDetail <Payment>(p => new Forms.PaymentEditPopup(p).Show(MainForm));

            SeatingReservation.Schema.ToString();            //Force static ctor
            RegisterRowDetail <SeatingReservation>(p => new Events.Seating.SeatingReservationPopup(p).Show(MainForm));

            GridManager.RegisterColumn(Pledge.Schema.Columns["UnlinkedAmount"],
                                       new ColumnController(c => {
                c.DisplayFormat.FormatType   = FormatType.Numeric;
                c.DisplayFormat.FormatString = "c";

                c.MaxWidth = 85;
                c.SummaryItem.DisplayFormat = "{0:c} Total Unpaid-for";
                c.SummaryItem.SummaryType   = SummaryItemType.Sum;
            })
                                       );

            GridManager.RegisterBehavior(Deposit.Schema,
                                         DeletionBehavior.WithMessages <Deposit>(
                                             singular: d => "Are you sure you want to delete this " + d.Amount.ToString("c", CultureInfo.CurrentCulture) + " deposit?\r\nThe payments will not be deleted.",
                                             plural: deposits => "Are you sure you want to delete "
                                             + (deposits.Count().ToString(CultureInfo.InvariantCulture) + " pledges containing "
                                                + deposits.Sum(p => p.Amount).ToString("c", CultureInfo.CurrentCulture) + "?\r\nThe payments in the deposits will not be deleted.")
                                             ));

            GridManager.RegisterColumn((SmartGridColumn sgc) => {
                return(sgc.View.GetSourceSchema() == SeatingReservation.Schema && sgc.FieldName == "Person");
            }, new MissingPersonController());
            RegisterLookupValidation();
        }
Beispiel #2
0
        /// <summary>
        /// უკეთებს ინიციალიზაციას DevExpress კონტროლებს.
        /// უნდა გაეშვას პროგრამის დაწყებისთანავე.
        /// </summary>
        /// <param name="defaultFont">DevExpress კონტროლების სტანდარტული შრიფტი.</param>
        /// <param name="registerSkins"></param>
        public static void InitDevExpress(Font defaultFont, bool registerSkins = true)
        {
            using (new XtraForm())
            { }//ეს კვერცხობა იმიტომ უნდა რო. ყველა ფორმა დიდებოდა :( წინა ვერსიაში არ ჭირდებოდა

            if (registerSkins)
            {
                RegisterSkins();
            }

            AppearanceObject.ControlAppearance.Font = defaultFont;
            AppearanceObject.DefaultFont            = defaultFont;
            AppearanceObject.EmptyAppearance.Font   = defaultFont;
            SkinManager.EnableFormSkinsIfNotVista();
        }
Beispiel #3
0
        public static void InitializeAll()
        {
            DesignModeHelper.TurnOffDesignMode();

            SkinManager.Default.RegisterAssembly(typeof(ZetaTestSkin).Assembly);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Below Windows Vista, use form skins.
            SkinManager.EnableFormSkinsIfNotVista();

            //UserLookAndFeel.Default.ActiveLookAndFeel.SetSkinStyle(SkinNameDialogForms);
            UserLookAndFeel.Default.SetSkinStyle(SkinNameDialogForms);
            AppearanceObject.DefaultFont = StandardFont;

            _badc = new MyDefaultBarAndDockingController();
            _badc.Apply();
        }
Beispiel #4
0
        /// <summary>
        /// Setzt den Default Look and Feel
        /// </summary>
        /// <param name="style"></param>
        /// <param name="skinName">Name des Skins</param>
        public void SetLookAndFeel(EStyles style, string skinName)
        {
            //Setzen der Appearance
            BonusSkins.Register();

            SkinManager.EnableFormSkins();
            SkinManager.EnableFormSkinsIfNotVista();

            switch (style)
            {
            case EStyles.Default:
                _defaultLF.SetDefaultStyle();
                break;

            case EStyles.Flat:
                _defaultLF.SetFlatStyle();
                break;

            case EStyles.Ultraflat:
                _defaultLF.SetUltraFlatStyle();
                break;

            case EStyles.Style3D:
                _defaultLF.SetStyle3D();
                break;

            case EStyles.Office2003:
                _defaultLF.SetOffice2003Style();
                break;

            case EStyles.XP:
                _defaultLF.SetWindowsXPStyle();
                break;

            case EStyles.Skin:
                _defaultLF.SetSkinStyle(skinName);
                break;

            default:
                break;
            }
        }
Beispiel #5
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            //SkinManager.EnableFormSkins();
            SkinManager.EnableMdiFormSkins();
            SkinManager.EnableFormSkinsIfNotVista();
            BonusSkins.Register();
            OfficeSkins.Register();
            //增加版本号检查 版本不一致 强制更新
            VersionService vr = new VersionService();

            vr.VersionUpdate();


            //DictionOrFilePathOperator.UserNo = "root";
            // ServiceManager.ResourceService.ImagesPath = AppDomain.CurrentDomain.BaseDirectory + "Images\\";

            //string systemProperty = ServiceManager.SystemService.GetSystemProperty("SystemTitle", "FirstLogin");


            System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("zh-CN");
            Bootstrap.ApplicationDataDirectory = Directory.GetCurrentDirectory() + @"\Cache";

            if (Bootstrap.Load())
            {
                Bootstrap.RegisterAssemblyResources(System.Reflection.Assembly.GetExecutingAssembly());
                try
                {
                    Application.Run(new Login());
                }
                catch (Exception ew)
                {
                    MessageBox.Show(ew.Message);
                }
            }
        }
Beispiel #6
0
        void SetSkin(string skinName)
        {
            DevExpress.UserSkins.BonusSkins.Register();

            if (IsValidSkinName(skinName))
            {
                SkinManager.EnableFormSkins();
                SkinManager.EnableMdiFormSkins();
                SkinManager.EnableFormSkinsIfNotVista();

                UserLookAndFeel.Default.Style = LookAndFeelStyle.Skin;
                UserLookAndFeel.Default.SetSkinStyle(skinName);

                LookAndFeelHelper.ForceDefaultLookAndFeelChanged();
            }
            else
            {
                SkinManager.DisableFormSkins();
                SkinManager.DisableMdiFormSkins();

                UserLookAndFeel.Default.UseDefaultLookAndFeel = true;
            }
        }