예제 #1
0
 /// <summary>
 /// Adds the specified <see cref="GX.SimpleArrayData"/> to this instance.
 /// [Google Extension]
 /// </summary>
 /// <param name="array">The <c>SimpleArrayData</c> to add to this instance.</param>
 /// <exception cref="ArgumentNullException">array is null.</exception>
 /// <exception cref="InvalidOperationException">
 /// array belongs to another <see cref="Element"/>.
 /// </exception>
 public void AddArray(GX.SimpleArrayData array)
 {
     this.AddChild(array);
 }
예제 #2
0
	private void OnRoleRemove(object sender, GX.EventArgs<KeyValuePair<ulong, Role>> args)
	{
		try
		{
			RemoveFlag(args.Data.Value.GetComponent<Entity>());
		}
		catch (MissingReferenceException) { }
	}
예제 #3
0
 /// <summary>
 /// Adds the specified <see cref="GX.SimpleArrayField"/> to this instance.
 /// [Google extension]
 /// </summary>
 /// <param name="array">The <c>SimpleArrayField</c> to add to this instance.</param>
 /// <exception cref="System.ArgumentNullException">array is null.</exception>
 /// <exception cref="System.InvalidOperationException">
 /// array belongs to another <see cref="Element"/>.
 /// </exception>
 public void AddArray(GX.SimpleArrayField array)
 {
     this.AddChild(array);
 }
예제 #4
0
	private void OnRoleAdd(object sender, GX.EventArgs<KeyValuePair<ulong, Role>> args)
	{
		if (args.Data.Value.ServerInfo.charid != MainRole.ServerInfo.userdata.charid)
			AddFlag(args.Data.Value.GetComponent<Entity>(), uiFlagRole);
	}
예제 #5
0
	private void OnNpcAdd(object sender, GX.EventArgs<KeyValuePair<ulong, Npc>> args)
	{
		AddFlag(args.Data.Value.GetComponent<Entity>(), GetNpcFlag(args.Data.Value));
	}
예제 #6
0
        /// <summary>获取衍生属性
        ///
        /// </summary>
        public static void GetOtherProp()
        {
            //switch (GX)
            //{
            //    case 1://连杆
            //        GX = 21;
            //        break;
            //    case 2://缸头
            //        GX = 22;
            //        break;
            //    case 3://飞轮
            //        GX = 25;
            //        break;
            //    case 4://化油器
            //        GX = 28;
            //        break;
            //    case 5://干检
            //        GX = 24;
            //        break;
            //    case 12://气门
            //        GX = 23;
            //        break;
            //    case 13://点火器
            //        GX = 26;
            //        break;
            //    default:
            //        GX = 0;
            //        break;
            //}
            //switch (GX)
            //{
            //    case 1://连杆
            //    case 2://缸头
            //    case 3://飞轮
            //    case 4://化油器
            //    case 5://干检
            //    case 12://气门
            //    case 13://点火器
            //        GX_Enum = GX.ToEnum<GX_EnumType>();
            //        break;
            //    default:
            //        GX_Enum = GX_EnumType.未定义;
            //        break;
            //}

            GX_Enum = GX.ToEnum <GX_EnumType>();
            GXType_EnumType GXType_EnumType_Temp;

            switch (GX_Enum)
            {
            case GX_EnumType.未定义:
            default:
                GXType_EnumType_Temp = GXType_EnumType.未定义;
                break;

            case GX_EnumType.连杆:
            case GX_EnumType.化油器:
            case GX_EnumType.缸头:
            case GX_EnumType.飞轮:
                GXType_EnumType_Temp = GXType_EnumType.扭力;
                break;

            case GX_EnumType.气门:
            case GX_EnumType.点火器:
                GXType_EnumType_Temp = GXType_EnumType.人工;
                break;

            case GX_EnumType.干检:
                GXType_EnumType_Temp = GXType_EnumType.干检;
                break;

            case GX_EnumType.绑定:
                GXType_EnumType_Temp = GXType_EnumType.绑定;
                break;
            }
            GXType_Enum = GXType_EnumType_Temp;
        }
예제 #7
0
 void Command_Error(object sender, GX.Patterns.ErrorEventArgs e)
 {
     if (MessageBox.Show(e.Error.Message + "\nContinue?", "Error", MessageBoxButton.YesNo, MessageBoxImage.Error) == MessageBoxResult.No)
     {
         this.Close();
     }
 }
예제 #8
0
 /// <summary>
 /// Adds the specified <see cref="GX.Option"/> to this instance.
 /// [Google Extension]
 /// </summary>
 /// <param name="option">
 /// The <c>Option</c> to add to this instance.
 /// </param>
 /// <exception cref="System.ArgumentNullException">option is null.</exception>
 /// <exception cref="System.InvalidOperationException">
 /// option belongs to another <see cref="Element"/>.
 /// </exception>
 public void AddGXOption(GX.Option option)
 {
     this.AddChild(option);
 }