void CheckIncomingChanges.IUpdateIncomingChanges.Show( string infoText, string actionText, string tooltipText, CheckIncomingChanges.Severity severity) { PlasticNotification.Status status = PlasticNotification.Status.None; if (severity == CheckIncomingChanges.Severity.Info) { status = PlasticNotification.Status.IncomingChanges; } else if (severity == CheckIncomingChanges.Severity.Warning) { status = PlasticNotification.Status.Conflicts; } PlasticPlugin.SetNotificationStatus( mPlasticWindow, status); UpdateData( mNotification, infoText, actionText, tooltipText, status); mHasNotification = true; mPlasticWindow.Repaint(); }
public override void OnGUI(Rect rect) { GUIStyle collabButtonStyle = "AppCommand"; var disable = EditorApplication.isPlaying; using (new EditorGUI.DisabledScope(disable)) { if (m_CurrentState == ToolbarButtonState.Plastic) { var icon = PlasticPlugin.GetPluginIcon(); EditorGUIUtility.SetIconSize(new Vector2(16, 16)); if (GUI.Button(rect, new GUIContent(icon, "Plastic SCM"), collabButtonStyle)) { PlasticWindow.Open(); } EditorGUIUtility.SetIconSize(Vector2.zero); } else { var icon = GetIconForState(); EditorGUIUtility.SetIconSize(new Vector2(16, 16)); if (GUI.Button(rect, icon, collabButtonStyle)) { CollaborateWindow.Init(); } EditorGUIUtility.SetIconSize(Vector2.zero); } } }
void CheckIncomingChanges.IUpdateIncomingChanges.Hide() { PlasticPlugin.SetNotificationStatus( mPlasticWindow, PlasticNotification.Status.None); mNotification.Clear(); mHasNotification = false; mPlasticWindow.Repaint(); }
internal void DownloadRepositoryToPathIfNeeded( string cloudRepository, string cloudOrganization, string projectPath, string unityAccessToken) { AssetDatabase.DisallowAutoRefresh(); try { BuildProgressSpeedAndRemainingTime.ProgressData progressData = new BuildProgressSpeedAndRemainingTime.ProgressData(DateTime.Now); ThreadPool.QueueUserWorkItem( DownloadRepository, new DownloadRepositoryParameters() { CloudOrganization = cloudOrganization, CloudRepository = cloudRepository, ProjectPath = projectPath, AccessToken = unityAccessToken }); while (!mOperationFinished) { if (mDisplayProgress) { DisplayProgress( mUpdateNotifier.GetUpdateStatus(), progressData, cloudRepository); } Thread.Sleep(150); } } finally { EditorUtility.ClearProgressBar(); AssetDatabase.AllowAutoRefresh(); RefreshAsset.UnityAssetDatabase(); if (!mOperationFailed) { PlasticPlugin.Enable(); ShowWindow.PlasticAfterDownloadingProject(); } } }