Exemplo n.º 1
0
        public static void Initialize(BaseSplashForm splashForm, BaseOptions options, BaseOptionsForm optionsForm)
        {
            if (Initialized_)
            {
                throw new System.InvalidOperationException("DBApplication already initialized");
            }

            if (optionsForm != null && OptionsForm_ == null)
            {
                OptionsForm_ = optionsForm;
            }

            if (OptionsForm_ == null)
            {
                throw new System.InvalidOperationException("OptionsForm should be setuped by Initialize or OptionsForm property");
            }

            OptionsControlsManager.RegisterOptionControl(typeof(UILanguageOptionsControl), "General", 0, "UI Language", 0);


            if (options == null && Options_ == null)
            {
                Options_ = new BaseOptions();
            }
            else if (Options_ == null)
            {
                Options_ = options;
            }

            if (Options_ == null)
            {
                throw new System.InvalidOperationException("Options should be setuped by Initialize or Options property");
            }


            if (SplashForm_ == null && splashForm == null && !SkipSplashForm_)
            {
                splashForm = new FreeCL.Forms.BaseSplashForm();
            }

            if (splashForm != null)
            {
                splashForm.Show();
                System.Windows.Forms.Application.DoEvents();
                SplashForm_ = splashForm;
            }

            Options_ = BaseOptions.Load(Options_);

            Initialized_ = true;
            System.Windows.Forms.Application.DoEvents();
        }
Exemplo n.º 2
0
        public static void ShowSplashForm(BaseSplashForm splashForm)
        {
            try
            {
                System.Windows.Forms.Application.EnableVisualStyles();
                System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false);
            }
            catch {}

            if (splashForm == null && !SkipSplashForm_)
            {
                splashForm = new FreeCL.Forms.BaseSplashForm();
            }

            if (splashForm != null)
            {
                splashForm.Show();
                System.Windows.Forms.Application.DoEvents();
                SplashForm_ = splashForm;
            }
        }
Exemplo n.º 3
0
        public static void ShowSplashForm(BaseSplashForm splashForm)
        {
            try
            {
            System.Windows.Forms.Application.EnableVisualStyles();
            System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false);
            }
            catch{}

            if(splashForm == null && !SkipSplashForm_)
                splashForm = new FreeCL.Forms.BaseSplashForm();

            if(splashForm != null)
            {
                splashForm.Show();
                System.Windows.Forms.Application.DoEvents();
                SplashForm_ = splashForm;
            }
        }
Exemplo n.º 4
0
        public static void Initialize(BaseSplashForm splashForm, BaseOptions options, BaseOptionsForm optionsForm)
        {
            if(Initialized_)
                throw new System.InvalidOperationException("DBApplication already initialized");

            if(optionsForm != null && OptionsForm_ == null)
                OptionsForm_ = optionsForm;

            if(OptionsForm_ == null)
                throw new System.InvalidOperationException("OptionsForm should be setuped by Initialize or OptionsForm property");

            OptionsControlsManager.RegisterOptionControl(typeof(UILanguageOptionsControl), "General", 0, "UI Language", 0);

            if(options == null && Options_ == null)
                Options_ = new BaseOptions();
            else if(Options_ == null)
                Options_ = options;

            if(Options_ == null)
                throw new System.InvalidOperationException("Options should be setuped by Initialize or Options property");

            if(SplashForm_ == null && splashForm == null && !SkipSplashForm_)
                splashForm = new FreeCL.Forms.BaseSplashForm();

            if(splashForm != null)
            {
                splashForm.Show();
                System.Windows.Forms.Application.DoEvents();
                SplashForm_ = splashForm;
            }

            Options_ = BaseOptions.Load(Options_);

            Initialized_ = true;
            System.Windows.Forms.Application.DoEvents();
        }