コード例 #1
0
ファイル: AppDelegate.cs プロジェクト: xush1611/GuiTestSharp
        public override void DidFinishLaunching(NSNotification notification)
        {
            ApplicationArgs appArgs = GetApplicationArgs();

            ExceptionsHandler.SetExceptionHandlers(appArgs.IsTestingMode);

            ThreadWaiterBuilder.Initialize(new MacApplicationTimerBuilder());

            WindowHandler.Initialize(this);
            GuiMessage.Initialize(new MacOsGuiMessage());

            NSApplication.SharedApplication.ActivateIgnoringOtherApps(true);

            if (appArgs.IsTestingMode)
            {
                InstallTestAssembliesResolver(appArgs.PathToAssemblies);
            }

            // Tip: you could launch different windows depending on the
            // argument flags.
            WindowHandler.LaunchApplicationWindow();

            if (appArgs.IsTestingMode)
            {
                RemotingHack.ApplyRemotingConfigurationWorkaround();
                WindowHandler.LaunchTest(appArgs.TestInfoFile, appArgs.PathToAssemblies);
            }
        }
コード例 #2
0
ファイル: PlasticApp.cs プロジェクト: fipu-nastava/dipri
        internal static void InitializeIfNeeded()
        {
            if (sIsInitialized)
            {
                return;
            }

            sIsInitialized = true;

            PlasticAPI        = new PlasticAPI();
            PlasticWebRestApi = new PlasticWebRestApi();

            ConfigureLogging();

            GuiMessage.Initialize(new UnityPlasticGuiMessage());

            RegisterExceptionHandlers();

            InitLocalization();

            ThreadWaiter.Initialize(new UnityThreadWaiterBuilder());
            ServicePointConfigurator.ConfigureServicePoint();
            CertificateUi.RegisterHandler(new ChannelCertificateUiImpl());

            SetupFsWatcher();

            EditionManager.Get().DisableCapability(
                EnumEditionCapabilities.Extensions);

            ClientHandlers.Register();

            PlasticGuiConfig.SetConfigFile(
                PlasticGuiConfig.UNITY_GUI_CONFIG_FILE);

            sEventSenderScheduler = EventTracking.Configure(
                PlasticApp.PlasticWebRestApi,
                AssetsPath.IsRunningAsUPMPackage() ?
                ApplicationIdentifier.UnityPackage :
                ApplicationIdentifier.UnityAssetStorePlugin,
                IdentifyEventPlatform.Get());

            if (sEventSenderScheduler != null)
            {
                sPingEventLoop = new PingEventLoop();
                sPingEventLoop.Start();
                sPingEventLoop.SetUnityVersion(Application.unityVersion);

                CollabPlugin.GetVersion(pluginVersion => sPingEventLoop.SetPluginVersion(pluginVersion));
            }

            PlasticMethodExceptionHandling.InitializeAskCredentialsUi(
                new CredentialsUiImpl());
            ClientEncryptionServiceProvider.SetEncryptionPasswordProvider(
                new MissingEncryptionPasswordPromptHandler());
        }
コード例 #3
0
        void OnEnable()
        {
            processor.AssetModificationProcessor.ForceCheckout = EditorPrefs.GetBool("forceCheckoutPlasticSCM");
            wantsMouseMove = true;

            if (mException != null)
            {
                return;
            }

            minSize = new Vector2(
                UnityConstants.PLASTIC_WINDOW_MIN_SIZE_WIDTH,
                UnityConstants.PLASTIC_WINDOW_MIN_SIZE_HEIGHT);

            SetupWindowTitle();

            GuiMessage.Initialize(new UnityPlasticGuiMessage(this));

            PlasticApp.InitializeIfNeeded();

            RegisterApplicationFocusHandlers(this);

            PlasticMethodExceptionHandling.InitializeAskCredentialsUi(
                new CredentialsUiImpl(this));
            ClientEncryptionServiceProvider.SetEncryptionPasswordProvider(
                new MissingEncryptionPasswordPromptHandler(this));

            if (mPlasticAPI == null)
            {
                mPlasticAPI = new PlasticAPI();
            }
            mPlasticWebRestApi = new PlasticWebRestApi();

            mEventSenderScheduler = EventTracking.Configure(
                mPlasticWebRestApi,
                AssetsPath.IsRunningAsUPMPackage() ?
                ApplicationIdentifier.UnityPackage : ApplicationIdentifier.UnityAssetStorePlugin,
                IdentifyEventPlatform.Get());

            if (mEventSenderScheduler != null)
            {
                mPingEventLoop = new PingEventLoop();
                mPingEventLoop.Start();
                mPingEventLoop.SetUnityVersion(Application.unityVersion);

                CollabPlugin.GetVersion(pluginVersion => mPingEventLoop.SetPluginVersion(pluginVersion));
            }

            InitializePlastic();
        }
コード例 #4
0
        void OnEnable()
        {
            if (mException != null)
            {
                return;
            }

            GuiMessage.Initialize(new UnityPlasticGuiMessage(this));

            ConfigureLogging();

            RegisterExceptionHandlers();
            RegisterApplicationFocusHandlers(this);

            InitLocalization();

            ThreadWaiter.Initialize(new UnityThreadWaiterBuilder());
            ServicePointConfigurator.ConfigureServicePoint();
            CertificateUi.RegisterHandler(new ChannelCertificateUiImpl());
            CredentialsUIRegistrar.RegisterCredentialsUI(
                new CredentialsUiImpl(this));
            ClientEncryptionServiceProvider.SetEncryptionPasswordProvider(
                new MissingEncryptionPasswordPromptHandler(this));
            DisableFsWatcherIfNeeded();
            EditionManager.Get().DisableCapability(
                EnumEditionCapabilities.Extensions);

            mPlasticAPI = new PlasticAPI();
            ClientHandlers.Register();

            PlasticGuiConfig.SetConfigFile(PLASTIC_GUI_CONFIG_FILE);

            mPingEventLoop      = new PingEventLoop();
            mEventSenderRestApi = new SimpleEventSenderRestApi(
                PlasticWebApiUris.GetBaseUri());
            mEventSenderScheduler = EventTracking.Configure(
                mEventSenderRestApi,
                ApplicationIdentifier.UnityPackage,
                IdentifyEventPlatform.Get());

            if (mEventSenderScheduler != null)
            {
                mPingEventLoop.Start();
            }

            InitializePlastic();
        }
コード例 #5
0
        static void Main(string[] args)
        {
            try
            {
                ApplicationArgs appArgs = ApplicationArgs.Parse(args);

                ExceptionsHandler.SetExceptionHandlers(appArgs.IsTestingMode);

                ProcessNameSetter.SetProcessName("linux");

                ThreadWaiterBuilder.Initialize(new GtkApplicationTimerBuilder());

                GuiMessage.Initialize(new GtkGuiMessage());

                if (appArgs.IsTestingMode)
                {
                    InstallTestAssembliesResolver(appArgs.PathToAssemblies);
                }

                // Tip: you could launch different windows depending on the
                // argument flags.
                Application.Init();
                WindowHandler.LaunchApplicationWindow();

                if (appArgs.IsTestingMode)
                {
                    WindowHandler.LaunchTest(appArgs.TestInfoFile, appArgs.PathToAssemblies);
                }

                Application.Run();
            }
            catch (Exception ex)
            {
                // You would track the exception here
                Console.Error.WriteLine($"{ex.GetType()}: {ex.Message}");
                Console.Error.WriteLine(ex.StackTrace);

                ExitCode = 1;
                Application.Quit();
            }
            finally
            {
                // You would dispose everything you need here.
                Environment.Exit(ExitCode);
            }
        }
コード例 #6
0
        static void Main(string[] args)
        {
            try
            {
                ApplicationArgs appArgs = ApplicationArgs.Parse(args);

                ExceptionsHandler.SetExceptionHandlers(appArgs.IsTestingMode);

                ThreadWaiterBuilder.Initialize(new WinPlasticTimerBuilder());

                GuiMessage.Initialize(new WindowsGuiMessage());

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

                if (appArgs.IsTestingMode)
                {
                    InstallTestAssembliesResolver(appArgs.PathToAssemblies);
                }

                // Tip: you could launch different windows depending on the
                // argument flags.
                WindowHandler.LaunchApplicationWindow();

                if (appArgs.IsTestingMode)
                {
                    WindowHandler.LaunchTest(appArgs.TestInfoFile, appArgs.PathToAssemblies);
                }

                Application.Run();
            }
            catch
            {
                // You would track the exception here.
                ExitCode = 1;
                Application.Exit();
            }
            finally
            {
                // You would dispose everything you need here.
                Environment.Exit(ExitCode);
            }
        }
コード例 #7
0
        void OnEnable()
        {
            wantsMouseMove = true;

            if (mException != null)
            {
                return;
            }

            GuiMessage.Initialize(new UnityPlasticGuiMessage(this));

            PlasticApp.Initialize();

            RegisterApplicationFocusHandlers(this);

            CredentialsUIRegistrar.RegisterCredentialsUI(
                new CredentialsUiImpl(this));
            ClientEncryptionServiceProvider.SetEncryptionPasswordProvider(
                new MissingEncryptionPasswordPromptHandler(this));

            mPlasticAPI = new PlasticAPI();

            mPingEventLoop      = new PingEventLoop();
            mEventSenderRestApi = new SimpleEventSenderRestApi(
                PlasticWebApiUris.GetBaseUri());
            mEventSenderScheduler = EventTracking.Configure(
                mEventSenderRestApi,
                ApplicationIdentifier.UnityPackage,
                IdentifyEventPlatform.Get());

            if (mEventSenderScheduler != null)
            {
                mPingEventLoop.Start();
            }

            InitializePlastic();

            EditorApplication.update += AutoCommitOperation.AutoCommit;
        }
コード例 #8
0
        void OnEnable()
        {
            wantsMouseMove = true;

            if (mException != null)
            {
                return;
            }

            SetupWindowTitle(false);

            GuiMessage.Initialize(new UnityPlasticGuiMessage(this));

            PlasticApp.InitializeIfNeeded();

            RegisterApplicationFocusHandlers(this);

            PlasticMethodExceptionHandling.InitializeAskCredentialsUi(
                new CredentialsUiImpl(this));
            ClientEncryptionServiceProvider.SetEncryptionPasswordProvider(
                new MissingEncryptionPasswordPromptHandler(this));

            mPlasticAPI        = new PlasticAPI();
            mPlasticWebRestApi = new PlasticWebRestApi();

            mEventSenderScheduler = EventTracking.Configure(
                mPlasticWebRestApi,
                ApplicationIdentifier.UnityPackage,
                IdentifyEventPlatform.Get());

            if (mEventSenderScheduler != null)
            {
                mPingEventLoop = new PingEventLoop();
                mPingEventLoop.Start();
                mPingEventLoop.SetUnityVersion(Application.unityVersion);
            }

            InitializePlastic();
        }