PO/Library/Artifacts/e4/e46551add30ff25d6d2248ffade...

157 lines
8.7 KiB
Plaintext
Raw Normal View History

2022-01-12 10:06:03 +03:00
<0F>"<22>2019.4.19f1<00><><EFBFBD><EFBFBD> <00><>f<EFBFBD><66>!<21>5<>9<EFBFBD>4Q<0E><>B<00>7<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><><00> E<00> <00><00>#<00>.<00>,<00>5a<00> <00><00>#<00>.<00>,<00><00><00>r<00> <00><00># <00>.<00>,
<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD> <01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD> @<00><00><00> Q<00>j<00><00><00>J<00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><00><00>j<00><><EFBFBD><EFBFBD><EFBFBD><00>\<00><00><><EFBFBD><EFBFBD><EFBFBD><00>H<00>r<00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>H<00>w<00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>H<00><><00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>y<00>
<00> <00><00>#!<00>.<00>,"<00><00><><00><><EFBFBD><EFBFBD>#@1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>$<00><00><00>%.<00>j<00>&<00><00><><00><><EFBFBD><EFBFBD>'<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>(<00><00><00><00>)<00>j<00><><EFBFBD><EFBFBD><EFBFBD>*<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD>+<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>,@<00><00><00>-Q<00>j<00>.y<00>
<00> /<00><00>#0<00>.<00>,1<00> <00><>2@<00><00><> 3@<00><00>#4<00>.<00>,5<00>H<00><><00><><EFBFBD><EFBFBD>6<01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>7@<00><00><00>8Q<00>j<00>9H<00><><00><><EFBFBD><EFBFBD>:<01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>;@<00><00><00><Q<00>j<00>=H<00><><00><><EFBFBD><EFBFBD>><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>?@<00><00><00>@Q<00>j<00>AMonoImporterPPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_ExternalObjectsSourceAssetIdentifiertypeassemblynamem_UsedFileIDsm_DefaultReferencesexecutionOrdericonm_UserDatam_AssetBundleNamem_AssetBundleVariants<00><><EFBFBD>G<EFBFBD><47>܏Z56<35>:!@i<>J*<00><00>7<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><><00>E<00> <00><00><00>.<00><00>(a<00> <00><00><00>.<00><00><00><00>r<00> <00><00> <00>.<00>
<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD> <01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD> @<00><00><00> Q<00>j<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00><00><00>=<00><><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><01><00><00><00><00>j<00><><EFBFBD><EFBFBD><EFBFBD><01>H<00><><00><><EFBFBD><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>y<00>
<00> <00><00><00>.<00><00>y<00>Q <00><00><00>.<00> <00><00><00>X!H<00>i<00><><EFBFBD><EFBFBD>"<10>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>#@<00><00><00>$Q<00>j<00>%H<00>u<00><><EFBFBD><EFBFBD>&<10>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>'@<00><00><00>(Q<00>j<00>)PPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_DefaultReferencesm_Iconm_ExecutionOrderm_ClassNamem_Namespace\<00>y<EFBFBD>`x<00>y<EFBFBD>$DrawIncomingChangesNotificationPanel<65>using UnityEditor;
using UnityEngine;
using Codice.CM.Common;
using PlasticGui;
using PlasticGui.Gluon;
using PlasticGui.WorkspaceWindow.PendingChanges;
using Unity.PlasticSCM.Editor.UI;
using GluonShowIncomingChanges = PlasticGui.Gluon.WorkspaceWindow.ShowIncomingChanges;
namespace Unity.PlasticSCM.Editor
{
internal class NotificationPanelData
{
internal enum StyleType
{
None,
Red,
Green,
}
internal bool HasUpdateAction;
internal string InfoText;
internal string ActionText;
internal string TooltipText;
internal StyleType NotificationStyle;
internal void Clear()
{
HasUpdateAction = false;
InfoText = string.Empty;
ActionText = string.Empty;
TooltipText = string.Empty;
NotificationStyle = StyleType.None;
}
}
interface IIncomingChangesNotificationPanel
{
bool IsVisible
{
get;
}
NotificationPanelData Data
{
get;
}
}
internal static class DrawIncomingChangesNotificationPanel
{
internal static void ForMode(
WorkspaceInfo workspaceInfo,
WorkspaceWindow workspaceWindow,
IMergeViewLauncher mergeViewLauncher,
IGluonViewSwitcher gluonSwitcher,
bool isGluonMode,
bool isVisible,
NotificationPanelData notificationPanelData)
{
if (!isVisible)
return;
GUIContent labelContent = new GUIContent(
notificationPanelData.InfoText, notificationPanelData.TooltipText);
GUIContent buttonContent = new GUIContent(
notificationPanelData.ActionText, notificationPanelData.TooltipText);
float panelWidth = GetPanelWidth(
labelContent, buttonContent,
UnityStyles.Notification.Label, EditorStyles.miniButton);
EditorGUILayout.BeginHorizontal(
GetStyle(notificationPanelData.NotificationStyle),
GUILayout.Width(panelWidth));
GUILayout.Label(labelContent, UnityStyles.Notification.Label);
DoActionButton(
workspaceInfo, workspaceWindow,
mergeViewLauncher, gluonSwitcher, isGluonMode,
notificationPanelData.HasUpdateAction,
buttonContent, EditorStyles.miniButton);
EditorGUILayout.EndHorizontal();
}
static void DoActionButton(
WorkspaceInfo workspaceInfo,
WorkspaceWindow workspaceWindow,
IMergeViewLauncher mergeViewLauncher,
IGluonViewSwitcher gluonSwitcher,
bool isGluonMode,
bool isUpdateAction,
GUIContent buttonContent,
GUIStyle buttonStyle)
{
if (!GUILayout.Button(
buttonContent, buttonStyle,
GUILayout.ExpandHeight(true),
GUILayout.MinWidth(40)))
return;
if (isUpdateAction)
{
workspaceWindow.UpdateWorkspace();
return;
}
ShowIncomingChangesForMode(
workspaceInfo, mergeViewLauncher,
gluonSwitcher, isGluonMode);
}
static void ShowIncomingChangesForMode(
WorkspaceInfo workspaceInfo,
IMergeViewLauncher mergeViewLauncher,
IGluonViewSwitcher gluonSwitcher,
bool isGluonMode)
{
if (isGluonMode)
{
GluonShowIncomingChanges.FromNotificationBar(
workspaceInfo, gluonSwitcher);
return;
}
ShowIncomingChanges.FromNotificationBar(
workspaceInfo, mergeViewLauncher);
}
static GUIStyle GetStyle(
NotificationPanelData.StyleType styleType)
{
if (styleType == NotificationPanelData.StyleType.Red)
return UnityStyles.Notification.RedNotification;
return UnityStyles.Notification.GreenNotification;
}
static float GetPanelWidth(
GUIContent labelContent, GUIContent buttonContent,
GUIStyle labelStyle, GUIStyle buttonStyle)
{
return labelStyle.CalcSize(labelContent).x +
buttonStyle.CalcSize(buttonContent).x + 12;
}
}
}
$DrawIncomingChangesNotificationPanelUnity.PlasticSCM.Editor