Exemple #1
0
        public override void DoWindowContents(Rect inRect)
        {
            drawing = this;

            try
            {
                var session = Session;

                if (session == null)
                {
                    Close();
                }
                else if (session.uiDirty)
                {
                    CountToTransferChanged();
                    startingTile    = session.startingTile;
                    destinationTile = session.destinationTile;

                    session.uiDirty = false;
                }

                base.DoWindowContents(inRect);
            }
            finally
            {
                drawing = null;
            }
        }
        private void AddItems()
        {
            var dialog = new CaravanFormingProxy(map, reform, null, mapAboutToBeRemoved);

            dialog.autoSelectTravelSupplies = false;
            dialog.CalculateAndRecacheTransferables();
            transferables = dialog.transferables;
        }
        private CaravanFormingProxy PrepareDummyDialog()
        {
            var dialog = new CaravanFormingProxy(map, reform, null, mapAboutToBeRemoved)
            {
                transferables   = transferables,
                startingTile    = startingTile,
                destinationTile = destinationTile,
                thisWindowInstanceEverOpened = true,
                autoSelectTravelSupplies     = false,
            };

            return(dialog);
        }