예제 #1
0
 public virtual void _0001(AttributeStyle v)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (v < (AttributeStyle)0 || v > (AttributeStyle)1)
     {
         throw new ArgumentOutOfRangeException("value");
     }
     _SerializerError = v;
 }
 public FormatAttributesCommand(AttributeStyle style, IReadOnlyList <SearchResult> results, IReadOnlyList <string> returnValues = null)
 {
     _style        = style;
     _results      = results;
     _returnValues = returnValues;
     if (_returnValues is null)
     {
         _returnValues = new List <string>();
     }
 }
예제 #3
0
 public PrototypeError()
 {
     //Discarded unreachable code: IL_0002, IL_0006
     //IL_0003: Incompatible stack heights: 0 vs 1
     //IL_0007: Incompatible stack heights: 0 vs 1
     SingletonReader.PushGlobal();
     base._002Ector();
     helperError      = (FacadeComposer)0;
     _ExceptionError  = (InternalArrayTypeE)0;
     m_DatabaseError  = (ApplicationState)0;
     _FactoryError    = (ConnectActionCursor)0;
     _AttributeError  = (PageDicCandidate)0;
     m_PageError      = (TaskListAnnotation)0;
     _SerializerError = (AttributeStyle)0;
     m_ParserError    = (SparklineAxisMinMaxValues)0;
     _CallbackError   = (CacheActions)0;
     roleError        = CodeListAnnotation.m_TokenError;
     writerError      = IndexerTest.m_DecoratorTest;
     m_ItemError      = CodeListAnnotation.m_DispatcherError;
     listenerError    = PublisherRequestStrategy._0001();
 }
예제 #4
0
파일: TextStore.cs 프로젝트: mind0n/hive
 internal TextServicesAttribute(Guid guid, AttributeStyle style)
 {
     _guid = guid;
     _style = style;
 }
예제 #5
0
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            StyleAttribute styleAttribute = (StyleAttribute)attribute;
            AttributeStyle style          = styleAttribute.style;
            bool           styleValid     = false;

            while (!styleValid)
            {
                styleValid = TryStylize();
            }

            bool TryStylize()
            {
                switch (style)
                {
                case AttributeStyle.FoldOut:
                    if (property.propertyType != SerializedPropertyType.Boolean)
                    {
                        DrawError(typeof(bool));
                        style = AttributeStyle.Default;
                        return(false);
                    }
                    property.boolValue = EditorGUI.Foldout(position, property.boolValue, label);
                    break;

                case AttributeStyle.Bold:
                case AttributeStyle.Slim:
                case AttributeStyle.BoldSlim:
                    GUIStyle labelStyle;
                    switch (style)
                    {
                    case AttributeStyle.Bold:
                        labelStyle = EditorStyles.boldLabel;
                        break;

                    case AttributeStyle.Slim:
                        labelStyle = EditorStyles.miniLabel;
                        break;

                    case AttributeStyle.BoldSlim:
                        labelStyle = EditorStyles.miniBoldLabel;
                        break;

                    default:
                        labelStyle = EditorStyles.label;
                        break;
                    }
                    Rect labelRect = new Rect(position.x, position.y, EditorGUIUtility.labelWidth, labelStyle.CalcSize(label).y);

                    EditorGUI.LabelField(labelRect, label, labelStyle);
                    EditorGUI.PropertyField(position, property);
                    break;

                default:
                    base.OnGUI(position, property, label);
                    break;
                }
                return(true);
            }

            void DrawError(Type requiredType) => Debug.LogWarning("Property was not of the required type: " + requiredType.Name + " when trying to apply the " + style.ToString() + " style.");
        }
예제 #6
0
 public StyleAttribute(AttributeStyle style)
 {
     this.style = style;
 }
예제 #7
0
 public override void _0001(AttributeStyle value)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     m_ExpressionProperty._0001(value);
 }