public static void AddComponents(Entity subject) { ItemBase.AddComponents(subject); Equippable.AddTo(subject, null); SlotComponent.AddTo(subject, Slot.Id); BowComponent.AddTo(subject); ItemActivation.AddTo(subject, GetChargeAction); }
public static void AddComponents(Entity subject) { ItemBase.AddComponents(subject); // Item stuff Equippable.AddTo(subject, null); SlotComponent.AddTo(subject, Slot.Id); ItemActivation.AddTo(subject, GetAction); }
public void ListView_Activation_Set_GetReturnsExpected(ItemActivation value) { var listView = new ListView { Activation = value }; Assert.Equal(value, listView.Activation); // Set same. listView.Activation = value; Assert.Equal(value, listView.Activation); }
public ListView() { items = new ListViewItemCollection(this); columns = new ColumnHeaderCollection(this); listItems = new ArrayList(); autoArrange = true; hideSelection = true; labelWrap = true; multiSelect = true; scrollable = true; activation = ItemActivation.Standard; alignStyle = ListViewAlignment.Top; borderStyle = BorderStyle.Fixed3D; headerStyle = ColumnHeaderStyle.Clickable; sorting = SortOrder.None; viewStyle = View.LargeIcon; }
public void ListView_Activation_SetWithHandle_GetReturnsExpected(ItemActivation value, int expectedInvalidatedCallCount) { var listView = new ListView(); Assert.NotEqual(IntPtr.Zero, listView.Handle); int invalidatedCallCount = 0; listView.Invalidated += (sender, e) => invalidatedCallCount++; listView.Activation = value; Assert.Equal(value, listView.Activation); Assert.Equal(expectedInvalidatedCallCount, invalidatedCallCount); // Set same. listView.Activation = value; Assert.Equal(value, listView.Activation); Assert.Equal(expectedInvalidatedCallCount, invalidatedCallCount); }
public void ListView_Activation_SetHotTrackingNotOneClick_ThrowsArgumentException(ItemActivation value) { var listView = new ListView { HotTracking = true }; Assert.Throws <ArgumentException>("value", () => listView.Activation = value); Assert.Equal(ItemActivation.OneClick, listView.Activation); }
public void ListView_Activation_SetHotTrackingInvalidValue_ThrowsInvalidEnumArgumentException(ItemActivation value) { var listView = new ListView { HotTracking = true }; Assert.Throws <InvalidEnumArgumentException>("value", () => listView.Activation = value); }