void CancelButton_Clicked() { if (!IsExeAvailable.ForMode(mIsGluonMode)) { TrackFeatureUseEvent.For(mRepSpec, mCancelInstallFrom); } Close(); }
void CheckForPlasticExe() { // executable becomes available halfway through the install // we do not want to say install is done too early // when progress control finishes, cancel button will be enabled // then we can check for exe existing if (mCancelButton.enabledSelf && IsExeAvailable.ForMode(mIsGluonMode)) { mMessageLabel.text = "Plastic SCM installed. You can now use the feature."; mCancelButton.text = PlasticLocalization.GetString(PlasticLocalization.Name.CloseButton); mRequireMessageLabel.AddToClassList("display-none"); mDownloadCloudEditionButton.AddToClassList("display-none"); mDownloadEnterpriseButton.AddToClassList("display-none"); } }
void OnGUI() { if (mException != null) { DoExceptionErrorArea(); return; } try { // IMPORTANT: disable collab (if needed) // must be executed before the next if statement // where we check if collab is enabled if (mDisableCollabIfEnabledWhenLoaded) { mDisableCollabIfEnabledWhenLoaded = false; DisableCollabIfEnabled(ProjectPath.FromApplicationDataPath( Application.dataPath)); } if (CollabPlugin.IsEnabled()) { // execute Close() once after all inspectors update // to avoid our window to be drawn in back color EditorApplication.delayCall = Close; return; } bool isPlasticExeAvailable = IsExeAvailable.ForMode(mIsGluonMode); bool clientNeedsConfiguration = UnityConfigurationChecker.NeedsConfiguration(); var welcomeView = GetWelcomeView(); if (clientNeedsConfiguration && welcomeView.autoLoginState == AutoLogin.State.Off) { welcomeView.autoLoginState = AutoLogin.State.Started; } if (welcomeView.autoLoginState == AutoLogin.State.OrganizationChoosed) { OnEnable(); welcomeView.autoLoginState = AutoLogin.State.InitializingPlastic; } if (NeedsToDisplayWelcomeView(clientNeedsConfiguration, mWkInfo)) { welcomeView.OnGUI(clientNeedsConfiguration); return; } //TODO: Codice - beta: hide the switcher until the update dialog is implemented //DrawGuiModeSwitcher.ForMode( // isGluonMode, plasticClient, changesTreeView, editorWindow); DoTabToolbar( isPlasticExeAvailable, mWkInfo, mViewSwitcher, mIsGluonMode); mViewSwitcher.TabViewGUI(); if (mWorkspaceWindow.IsOperationInProgress()) { DrawProgressForOperations.For( mWorkspaceWindow, mWorkspaceWindow.Progress, position.width); } mStatusBar.OnGUI( mWkInfo, mWorkspaceWindow, mViewSwitcher, mViewSwitcher, mIncomingChangesNotifier, mIsGluonMode); } catch (Exception ex) { if (IsExitGUIException(ex)) { throw; } GUI.enabled = true; if (IsIMGUIPaintException(ex)) { ExceptionsHandler.LogException("PlasticWindow", ex); return; } mException = ex; DoExceptionErrorArea(); ExceptionsHandler.HandleException("OnGUI", ex); } }
void OnGUI() { if (mException != null) { DoExceptionErrorArea(); return; } try { if (!IsExeAvailable.ForMode(mIsGluonMode)) { DrawToolNotAvailableNotification. ForMode(position.width, mIsGluonMode); return; } if (UnityConfigurationChecker.NeedsConfiguration()) { DoNoConfigAvailableArea(mIsGluonMode); return; } if (mWkInfo == null) { GetCreateWorkspaceView().OnGUI(); return; } DoHeader( mWkInfo, mPlasticClient, mViewSwitcher, mViewSwitcher, mIsGluonMode, mIncomingChangesNotificationPanel); DoTabToolbar( mWkInfo, mPlasticClient, mViewSwitcher, mIsGluonMode); mViewSwitcher.TabViewGUI(); if (mPlasticClient.IsOperationInProgress()) { DrawProgressForOperations.For( mPlasticClient, mPlasticClient.Progress, position.width); } } catch (Exception ex) { if (IsExitGUIException(ex)) { throw; } mException = ex; GUI.enabled = true; DoExceptionErrorArea(); ExceptionsHandler.HandleException("OnGUI", ex); } }
void OnGUI() { if (mException != null) { DoExceptionErrorArea(); return; } try { bool isPlasticExeAvailable = IsExeAvailable.ForMode(mIsGluonMode); bool clientNeedsConfiguration = UnityConfigurationChecker.NeedsConfiguration(); if (NeedsToDisplayWelcomeView( isPlasticExeAvailable, clientNeedsConfiguration, mWkInfo)) { GetWelcomeView().OnGUI( isPlasticExeAvailable, clientNeedsConfiguration, mIsGluonMode); return; } DoHeader( mWkInfo, mPlasticClient, mViewSwitcher, mViewSwitcher, mIsGluonMode, mIncomingChangesNotificationPanel, mIncomingChangesFromMainNotificationPanel); DoTabToolbar( mWkInfo, mPlasticClient, mViewSwitcher, mIsGluonMode); mViewSwitcher.TabViewGUI(); if (mPlasticClient.IsOperationInProgress()) { DrawProgressForOperations.For( mPlasticClient, mPlasticClient.Progress, position.width); } } catch (Exception ex) { if (IsExitGUIException(ex)) { throw; } GUI.enabled = true; if (IsIMGUIPaintException(ex)) { ExceptionsHandler.LogException("PlasticWindow", ex); return; } mException = ex; DoExceptionErrorArea(); ExceptionsHandler.HandleException("OnGUI", ex); } }
void OnGUI() { if (mException != null) { DoExceptionErrorArea(); return; } try { // IMPORTANT: disable collab (if needed) // must be executed before the next if statement // where we check if collab is enabled if (mDisableCollabIfEnabledWhenLoaded) { mDisableCollabIfEnabledWhenLoaded = false; DisableCollabIfEnabled(ProjectPath.FromApplicationDataPath( Application.dataPath)); } if (CollabPlugin.IsEnabled()) { // execute Close() once after all inspectors update // to avoid our window to be drawn in back color EditorApplication.delayCall = Close; return; } bool isPlasticExeAvailable = IsExeAvailable.ForMode(mIsGluonMode); bool clientNeedsConfiguration = UnityConfigurationChecker.NeedsConfiguration(); if (NeedsToDisplayWelcomeView( isPlasticExeAvailable, clientNeedsConfiguration, mWkInfo)) { GetWelcomeView().OnGUI( isPlasticExeAvailable, clientNeedsConfiguration, mIsGluonMode); return; } DoHeader( mWkInfo, mPlasticClient, mViewSwitcher, mViewSwitcher, mIsGluonMode, mIncomingChangesNotificationPanel); DoTabToolbar( mWkInfo, mPlasticClient, mViewSwitcher, mIsGluonMode); mViewSwitcher.TabViewGUI(); if (mPlasticClient.IsOperationInProgress()) { DrawProgressForOperations.For( mPlasticClient, mPlasticClient.Progress, position.width); } } catch (Exception ex) { if (IsExitGUIException(ex)) { throw; } GUI.enabled = true; if (IsIMGUIPaintException(ex)) { ExceptionsHandler.LogException("PlasticWindow", ex); return; } mException = ex; DoExceptionErrorArea(); ExceptionsHandler.HandleException("OnGUI", ex); } }