Ejemplo n.º 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();
        }
Ejemplo n.º 2
0
 public static ItemTooltipSolarPanelControl Create(IProtoItemSolarPanel protoItemSolarPanel)
 {
     return(new() { protoItemSolarPanel = protoItemSolarPanel });
 }
Ejemplo n.º 3
0
 public ViewModelItemTooltipSolarPanelControl(IProtoItemSolarPanel protoItemSolarPanel)
 {
     this.protoItemSolarPanel = protoItemSolarPanel;
     this.Refresh();
 }