Beispiel #1
0
        private void OnJobItemsChanged(object sender, EventArgs e)
        {
            RefiningVM dc = (RefiningVM)DataContext;

            RefinaryJobs.SuspendLayout();
            RefinaryJobs.Items.Clear();
            foreach (var item in dc.CurrentJobs)
            {
                var newJobUC = new JobUC();
                newJobUC.DataContext = item;
                RefinaryJobs.Items.Add(newJobUC);
            }
            RefinaryJobs.ResumeLayout();
        }
Beispiel #2
0
 internal void HardRefresh()
 {
     if (_selectedEntity.Entity.HasDataBlob <CargoStorageDB>())
     {
         var storeDB = _selectedEntity.Entity.GetDataBlob <CargoStorageDB>();
         _storeVM = new CargoStorageVM(_state.Game.StaticData, storeDB);
         _storeVM.SetUpdateListner(_selectedEntity.Entity.Manager.ManagerSubpulses);
     }
     if (_selectedEntity.Entity.HasDataBlob <RefiningDB>())
     {
         var refinaryDB = _selectedEntity.Entity.GetDataBlob <RefiningDB>();
         _refineryVM = new RefiningVM(_state.Game, _selectedEntity.CmdRef, refinaryDB);
         _refineryVM.SetUpdateListner(_selectedEntity.Entity.Manager.ManagerSubpulses);
     }
     _cargoList = new CargoListPannelSimple(_staticData, _selectedEntity);
 }