public void AddNest(VmNest nest, String airportCode) { JwList<VmNest> v = null; if( ! _nests.ContainsKey(airportCode) ) { v = new JwList<VmNest>(); _nests[airportCode] = v; } else { v = _nests[airportCode]; } v.Add(nest); }
//# __________ PROTOCOL :: CONSTRUCTOR __________ #// public VmAddNestScanEngine(VmNest parentNest) { ParentNest = parentNest; LogoBitmap = VmImageManager.Default.GetNestBarLogoImage(); SpacerBitmap = VmImageManager.Default.GetNestBarSpacerImage(); ModuleBitmap = VmImageManager.Default.GetNestBarModuleImage(); DoExitDelegate = delegate(VmPickerEngine pe) { System.Windows.Forms.MessageBox.Show("exit nest scan engine"); }; // kludge (err) - Language Instructions = "Add Nest, Pick 'Child':"; ScanItemEngine = GetScanItemEngine(); ScanItemAsNestEngine = GetScanItemAsNestEngine(); ScanNestEngine = GetScanNestEngine(); UseScanItemFlag = false; LocalLogContext = "AddNstScn"; }
//# __________ PROTOCOL :: PRIVATE __________ #// public void DoCommonExit(VmNest nest) { VmNestManager.Default.Replace(nest); Nest = nest; DoExitEvent(); }
public void ShowNest(VmNest nest) { if( nest == null ) _nestSubpanel.ShowInitial(); else { _nestSubpanel.ShowNest(nest); } }
//# __________ PROTOCOL :: PRIVATE __________ #// public void Show( bool tagIsDuplicate, VmTag tag, VmNest nest, VmItemEventStatistics itemStatistics, VmAliasEventStatistics aliasStatistics) { _tagSubpanel.ShowTag(tagIsDuplicate, tag); if( ShowNestFlag ) ShowNest(nest); if( ShowStatisticsFlag ) ShowStatistics(itemStatistics, aliasStatistics); }
public void SetNest(VmNest nest) { ItemEventManager.SetNest(nest); AliasEventManager.SetNest(nest); }
public VmNest _ReplaceNest(VmNest n) { // n = (VmNest)n.Clone(); _PutNest(n); return n; }
public void _AddNest(VmNest n) { _PutNest(n); }
public void PopulateNest(VmNest nest) { JwList<VmNestedItem> v = VmAirportData.Default.AirportOutputData.GetNestedItemFile(nest.Id).GetAll(); foreach( VmNestedItem ni in v) { nest.AddTag(ni.Kilograms); } }
//# __________ PROTOCOL :: PRIVATE __________ #// public bool HandleNestChange(VmNest nest) { // err - lets consider always leaving the subpanel white. return false; }
//# __________ PROTOCOL :: PUBLIC __________ #// public void ShowNest(VmNest nest) { HandleNestChange(nest); if( nest == null ) { ShowInitial(); } else if( nest.IsLoose() ) { ShowLoose(nest); } else { double weight = (VmProperties.Default.ShouldUseMetric() ) ? nest.Kilograms : nest.GetPounds(); double d = Math.Round(weight, 1); _nameLabel.Text = nest.GetName(); _weightLabel.Text = d + ""; _pieceCountLabel.Text = nest.PieceCount + ""; } }
public void ShowLoose(VmNest nest) { _nameLabel.Text = VmLanguage.Default.GetLoose(); _weightLabel.Text = "N/A"; _pieceCountLabel.Text = "N/A"; }
public void AssignImpromptuNest(VmNest nest) { _impromptuNest = nest; DoExitEvent(); }
public void SetUpNest(VmNest nest) { VmNestSetUpModel model = new VmNestSetUpModel(); model.LocationCode = LocationCode; model.Nest = nest; _modelMap[LocationCode] = model; ShowReviewPanel(); }
// kludge(err): if already on scanitempanel, don't reshow it..just refresh it. public void ShowScanItemPanelEfficiently() { if( VmApplication.Default.Control == GetScanItemPanel() && JwUtility.IsEqual(_lastNestAtRefresh,Nest)) GetScanItemPanel().ActivatePanel(); else { _lastNestAtRefresh = Nest; ShowScanItemPanel(); } }
public void InitializeEditNestEngine() { VmVnEditNestEngine e = new VmVnEditNestEngine(); e.LogoBitmap = LogoBitmap; e.SpacerBitmap = SpacerBitmap; e.ModuleBitmap = ModuleBitmap; e.DoExitDelegate = delegate(VmPickerEngine pe) { VmVnEditNestEngine engine = (VmVnEditNestEngine)pe; Nest = engine.Nest; ShowChooseItemPanel(); }; e.Instructions = Instructions; _editNestEngine = e; }
public void AddNest(VmNest nest) { // kludge (err) - throw exception for null value? if( AliasedAirportCode == null ) return; DestinationConsolidator.AddNest(nest, AliasedAirportCode); }
public void Replace(VmNest nest) { switch(nest.GetNestType()) { case VmNestType.CONTAINER: { ReplaceContainer( (VmContainer)nest ); break; } case VmNestType.ULD: { ReplaceUld( (VmUld)nest ); break; } case VmNestType.CART: { ReplaceCart( (VmCart)nest ); break; } case VmNestType.VIRTUAL: { ReplaceVirtual( (VmVirtualNest)nest ); break; } case VmNestType.FLIGHT: { ReplaceFlight( (VmFlightNest)nest ); break; } case VmNestType.FLIGHT_DESTINATION: { ReplaceFlightDestination( (VmFlightDestinationNest)nest ); break; } case VmNestType.DELEGATE: { ReplaceDelegate( (VmItemNest)nest ); break; } case VmNestType.LOOSE: { throw new Exception("opening loose nest not handled."); } default: { throw new Exception("Unexpected nest type of code " + nest.GetNestType()); } } }
public void AssignImpromptuNest(VmNest nest) { if( nest == null ) return; DestinationConsolidator.ImpromptuNest = nest; }
public void _PutNest(VmNest n) { _nestMap[n.Id] = n; }
public void MapDestinationToNest( String locationCode, VmNest nest) { DestinationConsolidator.AddNest(nest, locationCode); }
public void OpenNest(VmNest nest) { PickerEngine.Nest = nest; }
public void OpenNest(VmNest nest) { Engine.Nest = nest; }