Formatting FIxes (#58)
This commit is contained in:
parent
57fb9fb525
commit
096d39609e
1318 changed files with 11633 additions and 22129 deletions
|
|
@ -416,10 +416,7 @@ namespace Server.Gumps
|
|||
return list;
|
||||
}
|
||||
|
||||
private static bool IsCustomEnum(Type type)
|
||||
{
|
||||
return type.IsDefined(typeofCustomEnum, false);
|
||||
}
|
||||
private static bool IsCustomEnum(Type type) => type.IsDefined(typeofCustomEnum, false);
|
||||
|
||||
public static void OnValueChanged(object obj, PropertyInfo prop, Stack<StackEntry> stack)
|
||||
{
|
||||
|
|
@ -448,15 +445,9 @@ namespace Server.Gumps
|
|||
return ce.Names;
|
||||
}
|
||||
|
||||
private static bool HasAttribute(Type type, Type check, bool inherit)
|
||||
{
|
||||
return type.GetCustomAttributes(check, inherit).Length > 0;
|
||||
}
|
||||
private static bool HasAttribute(Type type, Type check, bool inherit) => type.GetCustomAttributes(check, inherit).Length > 0;
|
||||
|
||||
private static bool IsType(Type type, Type check)
|
||||
{
|
||||
return type == check || type.IsSubclassOf(check);
|
||||
}
|
||||
private static bool IsType(Type type, Type check) => type == check || type.IsSubclassOf(check);
|
||||
|
||||
private static bool IsType(Type type, Type[] check)
|
||||
{
|
||||
|
|
@ -467,10 +458,7 @@ namespace Server.Gumps
|
|||
return false;
|
||||
}
|
||||
|
||||
private string ValueToString(PropertyInfo prop)
|
||||
{
|
||||
return ValueToString(m_Object, prop);
|
||||
}
|
||||
private string ValueToString(PropertyInfo prop) => ValueToString(m_Object, prop);
|
||||
|
||||
public static string ValueToString(object obj, PropertyInfo prop)
|
||||
{
|
||||
|
|
@ -666,15 +654,9 @@ namespace Server.Gumps
|
|||
{
|
||||
private Type m_Start;
|
||||
|
||||
public GroupComparer(Type start)
|
||||
{
|
||||
m_Start = start;
|
||||
}
|
||||
public GroupComparer(Type start) => m_Start = start;
|
||||
|
||||
public int Compare(KeyValuePair<Type, List<PropertyInfo>> x, KeyValuePair<Type, List<PropertyInfo>> y)
|
||||
{
|
||||
return GetDistance(x.Key).CompareTo(GetDistance(y.Key));
|
||||
}
|
||||
public int Compare(KeyValuePair<Type, List<PropertyInfo>> x, KeyValuePair<Type, List<PropertyInfo>> y) => GetDistance(x.Key).CompareTo(GetDistance(y.Key));
|
||||
|
||||
private int GetDistance(Type type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -96,15 +96,9 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
|
||||
public string Center(string text)
|
||||
{
|
||||
return $"<CENTER>{text}</CENTER>";
|
||||
}
|
||||
public string Center(string text) => $"<CENTER>{text}</CENTER>";
|
||||
|
||||
public string Color(string text, int color)
|
||||
{
|
||||
return $"<BASEFONT COLOR=#{color:X6}>{text}</BASEFONT>";
|
||||
}
|
||||
public string Color(string text, int color) => $"<BASEFONT COLOR=#{color:X6}>{text}</BASEFONT>";
|
||||
|
||||
public void AddTypeButton(int x, int y, int buttonID, string text, ModelBodyType type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,10 +11,8 @@ namespace Server.Gumps
|
|||
private string[] m_Names;
|
||||
|
||||
public SetCustomEnumGump(PropertyInfo prop, Mobile mobile, object o, Stack<StackEntry> stack, int propspage,
|
||||
List<object> list, string[] names) : base(prop, mobile, o, stack, propspage, list, names, null)
|
||||
{
|
||||
List<object> list, string[] names) : base(prop, mobile, o, stack, propspage, list, names, null) =>
|
||||
m_Names = names;
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo relayInfo)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue