Beispiel #1
0
    void UpdateProgress()
    {
        if (mProgress == 0)
        {
            return;
        }

        mProgressBar.style.display = DisplayStyle.Flex;

        if (mProgress == 1)
        {
            mProgressBar.value   = 20f;
            mProgressBar.title   = mProgressBar.value.ToString() + "%";
            mTurnedOffLabel.text = PlasticLocalization.GetString(
                PlasticLocalization.Name.TurnOffPlasticSCMClosingWindow);
            mPlasticWindow = Resources.FindObjectsOfTypeAll <PlasticWindow>().First();
            mPlasticWindow.Close();
            mProgress = 2;
            return;
        }
        if (mProgress == 2)
        {
            mProgressBar.value   = 50f;
            mProgressBar.title   = mProgressBar.value.ToString() + "%";
            mTurnedOffLabel.text = PlasticLocalization.GetString(
                PlasticLocalization.Name.TurnOffPlasticSCMCleaning);
            SetupCloudProjectId.SetCloudProjectId("");
            mProgress = 3;
            return;
        }
        if (mProgress == 3)
        {
            mProgressBar.value   = 75f;
            mProgressBar.title   = mProgressBar.value.ToString() + "%";
            mTurnedOffLabel.text = PlasticLocalization.GetString(
                PlasticLocalization.Name.TurnOffPlasticSCMDeleting);
            WorkspaceInfo workspaceInfo =
                FindWorkspace.InfoForApplicationPath(
                    Application.dataPath,
                    PlasticApp.PlasticAPI);
            Plastic.API.RemoveWorkspace(workspaceInfo);
            DrawInspectorOperations.Disable();
            DrawSceneOperations.Disable();
            mProgress = 4;
            return;
        }
        if (mProgress == 4)
        {
            mProgressBar.value   = 100f;
            mProgressBar.title   = mProgressBar.value.ToString() + "%";
            mTurnedOffLabel.text = PlasticLocalization.GetString(
                PlasticLocalization.Name.Done);
            mProgress = 9999;
            return;
        }
    }
Beispiel #2
0
        static void ClosePlasticWindow(PlasticWindow window)
        {
            UnRegisterApplicationFocusHandlers(window);

            PlasticApp.Dispose();

            DrawInspectorOperations.Disable();

            DrawAssetOverlay.Dispose();

            if (window.mEventSenderScheduler != null)
            {
                window.mPingEventLoop.Stop();
                window.mEventSenderScheduler.End();
            }

            DisposeNewIncomingChanges(window);

            AvatarImages.Dispose();
        }
Beispiel #3
0
        internal static void Disable()
        {
            try
            {
                PlasticApp.Dispose();

                if (!sIsEnabledForWorkspace)
                {
                    return;
                }

                AssetsProcessors.Disable();
                AssetMenuItems.Disable();
                DrawAssetOverlay.Disable();
                DrawInspectorOperations.Disable();
            }
            finally
            {
                sIsEnabled             = false;
                sIsEnabledForWorkspace = false;
            }
        }