示例#1
0
        private async void OnSCViewChanging(object sender, ScrollViewerViewChangingEventArgs e)
        {
            var scrollViewer = sender as ScrollViewer;

            HandleGoUpRefreshButtons(sender as ScrollViewer);
            if ((scrollViewer.VerticalOffset - _lastMainVerticalOffset) > 5 && !_isMainHideTitleGrid)
            {
                _isMainHideTitleGrid = true;
            }
            else if (scrollViewer.VerticalOffset < _lastMainVerticalOffset && _isMainHideTitleGrid)
            {
                _isMainHideTitleGrid = false;
                "2".PrintDebug();
                if (scrollViewer.VerticalOffset < 3.0)
                {
                    return;
                    //SCMain.EnableScroll();
                }
            }
            if (scrollViewer.VerticalOffset < 3.0)
            {
                "3".PrintDebug();

                _isMainHideTitleGrid = true;
            }
            if (_lastMainVerticalOffset > scrollViewer.VerticalOffset)
            {
                if (scrollViewer.VerticalOffset < 3.0 && _isMainHideTitleGrid && !_triedFirst)
                {
                    _triedFirst = true;
                    ("DISABELING SC1 SC2").PrintDebug();
                    lastSC1Offset = S1.VerticalOffset;
                    if (S2 != null)
                    {
                        lastSC2Offset = S2.VerticalOffset;
                    }
                    scrollViewer.DisableScroll();
                    await Task.Delay(150);

                    SCMain.EnableScroll();
                    GridMainScrollViewer.Height = double.NaN;
                    await Task.Delay(10);

                    SCMain.EnableScroll();
                    SCMain.ChangeView(null, GridMainScrollViewer.ActualHeight - 10, null);
                    await Task.Delay(750);

                    _triedFirst = false;
                }
            }
            _lastMainVerticalOffset = scrollViewer.VerticalOffset;
        }
示例#2
0
        public SanityCheckerV2(List <Map> _maps, OverworldMap _overworldMap, NPCdata _npcdata, FF1Rom _rom, ItemShopSlot _declaredShopSlot, ShipLocations _shiplocations)
        {
            rom          = _rom;
            overworldMap = _overworldMap;
            maps         = _maps;
            npcdata      = _npcdata;

            locations = new OwLocationData(rom);
            locations.LoadData();

            Shiplocations = _shiplocations;

            allTreasures     = ItemLocations.AllTreasures.Select(r => r as TreasureChest).Where(r => r != null).ToDictionary(r => (byte)(r.Address - 0x3100));
            allQuestNpcs     = ItemLocations.AllNPCItemLocations.Select(r => r as MapObject).Where(r => r != null).ToDictionary(r => r.ObjectId);
            declaredShopSlot = _declaredShopSlot;

            UpdateNpcRequirements();

            Main = new SCMain(_maps, _overworldMap, _npcdata, locations, _rom);
        }
示例#3
0
 private void GoUpButtonClick(object sender, RoutedEventArgs e)
 {
     SCMain.ScrollToElement(0);
 }
示例#4
0
 public void UpdateScrollable()
 {
     SCMain.UpdateScrollSizes();
 }
示例#5
0
 private void ContractFrm_FormClosed(object sender, FormClosedEventArgs e)
 {
     //
     SCMain.getInstance().searchContract();
 }