Example #1
0
        public void InitWorkspace(WorkSpaceReporterBase workSpaceReporterBase, ITargetFrameworkHelper FrameworkHelper)
        {
            // Add event handler for handling non-UI thread exceptions.
            AppDomain currentDomain = AppDomain.CurrentDomain;

            currentDomain.UnhandledException += new UnhandledExceptionEventHandler(StandAloneThreadExceptionHandler);

            Reporter.WorkSpaceReporter = workSpaceReporterBase;

            string phase = string.Empty;

            Amdocs.Ginger.Common.TargetFrameworkHelper.Helper = FrameworkHelper;
            mWorkSpace.OSHelper = OperatingSystemBase.CurrentOperatingSystem;

            BetaFeatures = BetaFeatures.LoadUserPref();
            BetaFeatures.PropertyChanged += BetaFeatureChanged;

            if (BetaFeatures.ShowDebugConsole && !WorkSpace.Instance.RunningFromUnitTest)
            {
                EventHandler.ShowDebugConsole(true);
                BetaFeatures.DisplayStatus();
            }

            //Reporter.ToLog(eLogLevel.INFO, "######## Application version " + ApplicationInfo.ApplicationVersionWithInfo + " Started ! ########");

            Reporter.ToLog(eLogLevel.DEBUG, "Loading user messages pool");
            UserMsgsPool.LoadUserMsgsPool();
            StatusMsgsPool.LoadStatusMsgsPool();

            // AppVersion = AppShortVersion;
            // We init the classes dictionary for the Repository Serializer only once
            InitClassTypesDictionary();

            // TODO: need to add a switch what we get from old ginger based on magic key

            Reporter.ToLog(eLogLevel.INFO, "Loading User Profile");

            UserProfile = new UserProfile();
            UserProfile.UserProfileOperations = new UserProfileOperations(UserProfile);
            UserProfile = UserProfile.LoadUserProfile();

            ((UserProfileOperations)UserProfile.UserProfileOperations).UserProfile = UserProfile;

            Reporter.ToLog(eLogLevel.INFO, "Configuring User Type");
            UserProfile.LoadUserTypeHelper();

            if (WorkSpace.Instance.LocalGingerGrid != null)
            {
                Reporter.ToLog(eLogLevel.INFO, "Ginger Grid Started at Port:" + WorkSpace.Instance.LocalGingerGrid.Port);
            }
        }
Example #2
0
        public void InitWorkspace(WorkSpaceReporterBase workSpaceReporterBase, IRepositoryItemFactory repositoryItemFactory)
        {
            // Add event handler for handling non-UI thread exceptions.
            AppDomain currentDomain = AppDomain.CurrentDomain;

            currentDomain.UnhandledException += new UnhandledExceptionEventHandler(StandAloneThreadExceptionHandler);

            Reporter.WorkSpaceReporter = workSpaceReporterBase;

            string phase = string.Empty;

            RepositoryItemHelper.RepositoryItemFactory = repositoryItemFactory;

            BetaFeatures = BetaFeatures.LoadUserPref();
            BetaFeatures.PropertyChanged += BetaFeatureChanged;

            if (BetaFeatures.ShowDebugConsole && !WorkSpace.Instance.RunningFromUnitTest)
            {
                EventHandler.ShowDebugConsole(true);
                BetaFeatures.DisplayStatus();
            }

            Reporter.ToLog(eLogLevel.INFO, "######################## Application version " + ApplicationInfo.ApplicationVersionWithInfo + " Started ! ########################");

            Reporter.ToLog(eLogLevel.DEBUG, "Loading user messages pool");
            UserMsgsPool.LoadUserMsgsPool();
            StatusMsgsPool.LoadStatusMsgsPool();

            // AppVersion = AppShortVersion;
            // We init the classes dictionary for the Repository Serializer only once
            InitClassTypesDictionary();

            // TODO: need to add a switch what we get from old ginger based on magic key

            Reporter.ToLog(eLogLevel.DEBUG, "Loading User Profile");
            UserProfile = UserProfile.LoadUserProfile();

            Reporter.ToLog(eLogLevel.DEBUG, "Configuring User Type");
            UserProfile.LoadUserTypeHelper();

            CheckWebReportFolder();
        }