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);
 }
示例#2
0
 //# __________ 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";
 }
示例#3
0
 //# __________ PROTOCOL :: PRIVATE __________ #//
 public void DoCommonExit(VmNest nest)
 {
     VmNestManager.Default.Replace(nest);
     Nest = nest;
     DoExitEvent();
 }
示例#4
0
 public void ShowNest(VmNest nest)
 {
     if( nest == null )
         _nestSubpanel.ShowInitial();
     else
     {
         _nestSubpanel.ShowNest(nest);
     }
 }
示例#5
0
 //# __________ 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);
 }
示例#6
0
 public void SetNest(VmNest nest)
 {
     ItemEventManager.SetNest(nest);
     AliasEventManager.SetNest(nest);
 }
示例#7
0
 public VmNest _ReplaceNest(VmNest n)
 {
     //            n = (VmNest)n.Clone();
     _PutNest(n);
     return n;
 }
示例#8
0
 public void _AddNest(VmNest n)
 {
     _PutNest(n);
 }
示例#9
0
 public void PopulateNest(VmNest nest)
 {
     JwList<VmNestedItem> v = VmAirportData.Default.AirportOutputData.GetNestedItemFile(nest.Id).GetAll();
     foreach( VmNestedItem ni in v)
     {
         nest.AddTag(ni.Kilograms);
     }
 }
示例#10
0
 //# __________ PROTOCOL :: PRIVATE __________ #//
 public bool HandleNestChange(VmNest nest)
 {
     // err - lets consider always leaving the subpanel white.
     return false;
 }
示例#11
0
 //# __________ 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 + "";
     }
 }
示例#12
0
 public void ShowLoose(VmNest nest)
 {
     _nameLabel.Text = VmLanguage.Default.GetLoose();
     _weightLabel.Text = "N/A";
     _pieceCountLabel.Text = "N/A";
 }
示例#13
0
 public void AssignImpromptuNest(VmNest nest)
 {
     _impromptuNest = nest;
     DoExitEvent();
 }
示例#14
0
 public void SetUpNest(VmNest nest)
 {
     VmNestSetUpModel model = new VmNestSetUpModel();
     model.LocationCode = LocationCode;
     model.Nest = nest;
     _modelMap[LocationCode] = model;
     ShowReviewPanel();
 }
示例#15
0
 // 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();
     }
 }
示例#16
0
 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;
 }
示例#17
0
 public void AddNest(VmNest nest)
 {
     // kludge (err) - throw exception for null value?
     if( AliasedAirportCode == null ) return;
     DestinationConsolidator.AddNest(nest, AliasedAirportCode);
 }
示例#18
0
 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());
         }
     }
 }
示例#19
0
 public void AssignImpromptuNest(VmNest nest)
 {
     if( nest == null ) return;
     DestinationConsolidator.ImpromptuNest = nest;
 }
示例#20
0
 public void _PutNest(VmNest n)
 {
     _nestMap[n.Id] = n;
 }
示例#21
0
 public void MapDestinationToNest(
     String locationCode,
     VmNest nest)
 {
     DestinationConsolidator.AddNest(nest, locationCode);
 }
示例#22
0
 public void OpenNest(VmNest nest)
 {
     PickerEngine.Nest = nest;
 }
示例#23
0
 public void OpenNest(VmNest nest)
 {
     Engine.Nest = nest;
 }