예제 #1
0
        public ViewModelItemTooltipSolarPanelControl(IItem item)
        {
            this.protoItemSolarPanel = (IProtoItemSolarPanel)item.ProtoItem;
            this.Refresh();

            this.itemPrivateState = item.GetPrivateState <ItemWithDurabilityPrivateState>();
            this.itemPrivateState.ClientSubscribe(_ => _.DurabilityCurrent,
                                                  _ => this.Refresh(),
                                                  this);
            this.Refresh();
        }
예제 #2
0
 public static ItemTooltipSolarPanelControl Create(IProtoItemSolarPanel protoItemSolarPanel)
 {
     return(new() { protoItemSolarPanel = protoItemSolarPanel });
 }
예제 #3
0
 public ViewModelItemTooltipSolarPanelControl(IProtoItemSolarPanel protoItemSolarPanel)
 {
     this.protoItemSolarPanel = protoItemSolarPanel;
     this.Refresh();
 }