예제 #1
0
        protected virtual void fireOnSortOrderChanged(BottomButtons view)
        {
            var handler = this.OnSortOrderChanged;

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

            if (handler != null)
            {
                handler(bottomButtons);
            }
        }
예제 #3
0
        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());
        }
예제 #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);
        }
예제 #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);
        }
예제 #6
0
        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();
        }
예제 #7
0
 internal void GUISetup(BottomButtons bottomButtons)
 {
     bottomButtons.OnGroupByChanged += view => this.reset();
 }
예제 #8
0
 internal VesselInfoView(HaystackContinued haystackContinued)
 {
     this.haystackContinued   = haystackContinued;
     this.bottomButtons       = this.haystackContinued.bottomButtons;
     this.dockingPortListView = new DockingPortListView(haystackContinued);
 }
예제 #9
0
 private void onHiddenVesselChanged(BottomButtons view)
 {
     this.RefreshFilteredList();
 }
예제 #10
0
        private void onSortOrderChanged(BottomButtons view)
        {
            this.listIsAscending = view.IsAscendingSortOrder;

            this.RefreshFilteredList();
        }