Esempio n. 1
0
        protected virtual void fireOnSortOrderChanged(BottomButtons view)
        {
            var handler = this.OnSortOrderChanged;

            if (handler != null)
            {
                handler(view);
            }
        }
Esempio n. 2
0
        private void fireOnHiddenVesselsChanged(BottomButtons bottomButtons)
        {
            var handler = this.OnHiddenVesselsChanged;

            if (handler != null)
            {
                handler(bottomButtons);
            }
        }
        internal VesselListController(HaystackContinued haystack, BottomButtons bottomButtons)
        {
            this.haystack = haystack;
            bottomButtons.OnNearbyChanged        += onNearbyChanged;
            bottomButtons.OnHiddenVesselsChanged += onHiddenVesselChanged;
            bottomButtons.OnSortOrderChanged     += onSortOrderChanged;

            this.listIsAscending = bottomButtons.IsAscendingSortOrder;

            this.vesselComparer = Comparers.CombinedComparer <Vessel> .FromOne(new Comparers.VesselNameComparer());
        }
Esempio n. 4
0
        //btnTerminateFilePath

        internal ExpandedVesselInfo(HaystackContinued haystack, BottomButtons bottomButtons, DefaultScrollerView defaultScrollerView,
                                    GroupedScrollerView groupedScrollerView)
        {
            this.haystack            = haystack;
            this.defaultScrollerView = defaultScrollerView;
            this.groupedScrollerView = groupedScrollerView;

            this.defaultScrollerView.OnSelectionChanged    += view => this.updateData();
            this.defaultScrollerView.OnSelectedItemClicked += view => this.IsExpanded = !this.IsExpanded;
            this.groupedScrollerView.OnSelectionChanged    += view => this.updateData();
            this.groupedScrollerView.OnSelectedItemClicked += view => this.IsExpanded = !this.IsExpanded;

            this.bottomButtons = bottomButtons;
            this.windowRect    = new Rect(this.haystack.WinRect.xMax, this.haystack.WinRect.y, 0,
                                          this.haystack.winRect.height);
        }
Esempio n. 5
0
        public void Awake()
        {
            HSUtils.DebugLog("HaystackContinued#Awake");

            this.bottomButtons = new BottomButtons();
            this.bottomButtons.LoadSettings();

            this.vesselListController = new VesselListController(this, this.bottomButtons);
            this.defaultScrollerView  = new DefaultScrollerView(this, this.vesselListController);
            this.groupedScrollerView  = new GroupedScrollerView(this, this.vesselListController);
            this.expandedVesselInfo   = new ExpandedVesselInfo(this, this.bottomButtons, this.defaultScrollerView,
                                                               this.groupedScrollerView);
            this.resizeHandle = new ResizeHandle();


            windowId = Resources.rnd.Next(1000, 2000000);
        }
        private void onNearbyChanged(BottomButtons view)
        {
            if (!HSUtils.IsInFlight)
            {
                return;
            }

            this.updateActiveVessel();

            if (view.IsNearbyOnly)
            {
                this.vesselComparer = this.vesselComparer.Add(new Comparers.VesselNearbyComparer(this.activeVessel));
            }
            else
            {
                this.vesselComparer = this.vesselComparer.Remove <Comparers.VesselNearbyComparer>();
            }

            this.RefreshFilteredList();
        }
 internal void GUISetup(BottomButtons bottomButtons)
 {
     bottomButtons.OnGroupByChanged += view => this.reset();
 }
Esempio n. 8
0
 internal VesselInfoView(HaystackContinued haystackContinued)
 {
     this.haystackContinued   = haystackContinued;
     this.bottomButtons       = this.haystackContinued.bottomButtons;
     this.dockingPortListView = new DockingPortListView(haystackContinued);
 }
 private void onHiddenVesselChanged(BottomButtons view)
 {
     this.RefreshFilteredList();
 }
Esempio n. 10
0
        private void onSortOrderChanged(BottomButtons view)
        {
            this.listIsAscending = view.IsAscendingSortOrder;

            this.RefreshFilteredList();
        }