private void FrmMain_Load(object sender, EventArgs e)
        {
            //Load Reports from file and create its item in the interface
            LoadCReports();
            //Load Skins and layout
            InitSkinGallery();
            DevExpress.XtraBars.Helpers.SkinHelper.InitSkinGallery(rgbiSkins, true, true);
            rgbiSkins.GalleryItemClick += rgbiSkins_GalleryItemClick;
            if (System.IO.File.Exists(FXFW.SqlDB.StyleSettingsPath))
                UserLookAndFeel.Default.SetSkinStyle(LoadSettings(FXFW.SqlDB.StyleSettingsPath).SkinName);

            IsMdiContainer = true;

            using (SplashFrm SC = new SplashFrm())// Show Splash Screen..
                SC.ShowDialog();
            //using (LoginFrm FrmLogin = new LoginFrm())
            //{
            //    // Create Administrator user if not exists b4 show login form
            //    //RoleDetialFrm role = new RoleDetialFrm();
            //    //role.PrepareAdminRole();
            //    //role.Dispose();
            //    FrmLogin.ShowDialog();
            //}

            //LoadUserPriv(FXFW.SqlDB.UserInfo.UserID);
        }
Example #2
0
 static void Application_Idle(object sender, EventArgs e)
 {
     splash.Close();
     Application.Idle -= idleTemp;
     idleTemp          = null;
     splash            = null;
 }
Example #3
0
        static void Main(string[] args)
        {
            PerfomeChangeExe();
   
            Alert.AlertClick += (o, e) => { Program.Logger.ShowHideLogWindow = true; };

            if (System.IO.File.Exists(Application.StartupPath + @"\RibbonSettings.xml"))
                System.IO.File.Delete(Application.StartupPath + @"\RibbonSettings.xml");

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

            DevExpress.Skins.SkinManager.EnableFormSkins();
            DevExpress.UserSkins.BonusSkins.Register();
            UserLookAndFeel.Default.SetSkinStyle("DevExpress Style");

            if (FXFW.SqlDB.LoadSqlDBPath("RetirementCenter") && Authentication())
            {
                LoadAppSetting();
                FXFW.SqlDB.LoadSQLReports();
                Logger = new FXFW.Logger(FXFW.Logger.LanguageInfo.Arabic, Application.ProductName, Properties.Resources.EESoft, false);
                
                try
                {
                    LoadStartupArgs(args);
                    LoadAppOptions(); //CreateDirectories();
                    //Members.DataSources.TeachersUnion.ConnectionHelper.Connect(DevExpress.Xpo.DB.AutoCreateOption.None);
                    if (!CheckExpiration())
                    {
                        MessageBox.Show("Problem found in database, data maybe lose if you continue" + Environment.NewLine + "Are you sure want to continue" + Environment.NewLine + "?",
                            "Error", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Error);
                        System.Diagnostics.Process.GetCurrentProcess().Kill();
                    }

                    System.Threading.ThreadPool.QueueUserWorkItem((o) =>
                    {
                        using (SplashFrm SC = new SplashFrm())// Show Splash Screen..
                            SC.ShowDialog();
                    });
                    using (LoginFrm FrmLogin = new LoginFrm())
                    {
                        //Create Administrator user if not exists b4 show login form
                        if (!SQLProvider.PrepareBaseRole())
                            return;
                        DatabaseScripts.FireScript();//add my views
                        FrmLogin.ShowDialog();
                    }

                    SQLProvider.PerformUpdate();

                    Application.Run(new MainFrm());
                }
                catch (Exception ex)
                {
                    msgDlg.Show(ex.Message);
                    Program.Logger.LogThis(null, Application.ProductName, FXFW.Logger.OpType.fail, ex, null, null);
                }
            }
        }
Example #4
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     splash = new SplashFrm();
     splash.Show();
     idleTemp          = new EventHandler(Application_Idle);
     Application.Idle += idleTemp;
     Application.Run(new AMBR());
 }
Example #5
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            try
            {
                LoggingManager.Start();

                //DEBUG trial license
                //OnlineCatalogLicenses.CreateTrialLicense(@"D:\Coding\Workspaces\Atum\OperatorStation\Atum.Studio\bin\Debug\Settings\Licenses.dat");

                FontManager.LoadDefaultFonts();
                //ConnectivityManager.Start();
                MaterialManager.Start(true);
                UserProfileManager.Start();
                LicenseClientManager.Start();

                if (!UserProfileManager.UserProfile.Settings_Skip_Welcome_Screen_On_Next_Start || IsTrialLicenseExpired() || IsLicenseExpiring())
                {
                    Thread splashThread = new Thread(new ThreadStart(
                                                         delegate
                    {
                        splashForm = new SplashFrm();
                        splashForm.ControlClosed += SplashForm_ControlClosed;
                        splashForm.RecentFilesOpenExistsProject         += SplashForm_OpenExistsProject;
                        splashForm.RecentFilesOpenNewProject            += SplashForm_OpenNewProject;
                        splashForm.RecentFilesSelectedRecentFileChanged += SplashForm_OpenExistsProject;
                        splashForm.UnLicensedProgramControlLicensedProgramControlOpenExistingProject += SplashForm_OpenExistsProject;
                        splashForm.UnLicensedProgramControlLicensedProgramControlOpenNewProject      += SplashForm_OpenNewProject;
                        splashForm.SplashSkipWelcomClicked += SplashForm_OpenNewProject;

                        Application.Run(splashForm);
                    }
                                                         ));

                    splashThread.SetApartmentState(ApartmentState.STA);
                    splashThread.Start();
                    splashThread.Join();
                }
                else
                {
                    var mainForm = InitializeMainForm();
                    Application.Run(mainForm);
                }
            }
            catch (Exception exc)
            {
                LicenseClientManager.Stop();
                MessageBox.Show(exc.StackTrace.Replace("Atum.Studio", "OperatorStation"));
                DAL.Managers.LoggingManager.WriteToLog("Fatal error happened", "Main", exc);
                Debug.WriteLine(exc.Message);
            }
        }
        public UnlicensedProgramControl(SplashFrm splashFrm)
        {
            SplashForm = splashFrm;
            InitializeComponent();

            this.pbWarning.Image = SVGParser.GetBitmapFromSVG(Resources.SVGImages.warning, pbWarning.Size);
            this.pbClose.Image   = SVGParser.GetBitmapFromSVG(Resources.SVGImages.cross_white, pbClose.Size);

            if (FontManager.Loaded)
            {
                this.lbl30DaysTrial.Font = FontManager.Montserrat14Regular;
            }
        }
        private void MainFrm_Load(object sender, EventArgs e)
        {
            //Load Reports from file and create its item in the interface
            LoadSQLReports();
            //Load Skins and layout
            DevExpress.XtraBars.Helpers.SkinHelper.InitSkinGallery(galleryControlSkins, true);
            UserLookAndFeel.Default.StyleChanged += Default_StyleChanged;
            if (System.IO.File.Exists(FXFW.SqlDB.StyleSettingsPath))
                UserLookAndFeel.Default.SetSkinStyle(LoadSettings(FXFW.SqlDB.StyleSettingsPath).SkinName);
            if (System.IO.File.Exists(FXFW.SqlDB.duckSettingsPath))
                dockManagerMain.RestoreLayoutFromXml(FXFW.SqlDB.duckSettingsPath);
            // Show Splash Screen..
            using (SplashFrm SC = new SplashFrm())
                SC.ShowDialog();
            // Show Login Screen..
            using (LoginFrm FrmLogin = new LoginFrm())
            {
                // Create Administrator user if not exists b4 show login form
                RoleDetialFrm role = new RoleDetialFrm();
                role.PrepareAdminRole();
                role.Dispose();

                FrmLogin.ShowDialog();
            }
            //Get ready all forms (Disabled)
            RebuildForms();
            //must choose asase_code to enable the application //Load CD_Asase
            LoadCD_Asase();

            LoadUserPriv(FXFW.SqlDB.UserInfo.UserID);
        }