private void OnSelectionChanged(WindowBase sender, UISelectionChangeEventArgs eventArgs) { if (!(sender == this.mSelectedTable)) { if (this.mSourceTable.SelectedItem >= 0) { TableRow row = this.mSourceTable.GetRow(this.mSourceTable.SelectedItem); if (row != null) { DualPanelMinorPets.DualPaneSimPickerRowController dualPaneSimPickerRowController = row.RowController as DualPanelMinorPets.DualPaneSimPickerRowController; if (dualPaneSimPickerRowController != null && dualPaneSimPickerRowController.Enabled) { this.mRightArrow.Enabled = true; return; } this.mRightArrow.Enabled = false; return; } } else { this.mRightArrow.Enabled = false; } return; } if (this.mSelectedTable.SelectedItem >= 0 && this.mSelectedTable.GetRow(this.mSelectedTable.SelectedItem) != null) { this.mLeftArrow.Enabled = true; return; } this.mLeftArrow.Enabled = false; }
private void OnGridDoubleClicked(TableContainer sender, TableRow row) { bool flag = false; if (sender.ID == 99576784u) { DualPanelMinorPets.DualPaneSimPickerRowController dualPaneSimPickerRowController = row.RowController as DualPanelMinorPets.DualPaneSimPickerRowController; ObjectPicker.RowInfo info = dualPaneSimPickerRowController.Info; this.mSelectedSims.Remove(info); flag = true; } else { DualPanelMinorPets.DualPaneSimPickerRowController dualPaneSimPickerRowController2 = row.RowController as DualPanelMinorPets.DualPaneSimPickerRowController; if (dualPaneSimPickerRowController2.Enabled) { ObjectPicker.RowInfo info2 = dualPaneSimPickerRowController2.Info; this.mSelectedSims.Add(info2); flag = true; } } if (flag) { Audio.StartSound("ui_panel_shift"); this.mLeftArrow.Enabled = false; this.mRightArrow.Enabled = false; this.RepopulateSourceTable(); this.RepopulateSelectedSimTable(); } }
private void RepopulateSelectedSimTable() { this.mSelectedTable.Clear(); new List <ObjectPicker.RowInfo>(); foreach (ObjectPicker.RowInfo current in this.mSelectedSims) { TableRow tableRow = this.mSelectedTable.CreateRow(); DualPanelMinorPets.DualPaneSimPickerRowController rowController = new DualPanelMinorPets.DualPaneSimPickerRowController(tableRow, this.mSelectedTable, current); tableRow.RowController = rowController; this.mSelectedTable.AddRow(tableRow); } }
private void OnArrowClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { if (sender.ID == 99576788u) { TableRow row = this.mSelectedTable.GetRow(this.mSelectedTable.SelectedItem); DualPanelMinorPets.DualPaneSimPickerRowController dualPaneSimPickerRowController = row.RowController as DualPanelMinorPets.DualPaneSimPickerRowController; ObjectPicker.RowInfo info = dualPaneSimPickerRowController.Info; this.mSelectedSims.Remove(info); } else { TableRow row2 = this.mSourceTable.GetRow(this.mSourceTable.SelectedItem); DualPanelMinorPets.DualPaneSimPickerRowController dualPaneSimPickerRowController2 = row2.RowController as DualPanelMinorPets.DualPaneSimPickerRowController; ObjectPicker.RowInfo info2 = dualPaneSimPickerRowController2.Info; this.mSelectedSims.Add(info2); } this.mLeftArrow.Enabled = false; this.mRightArrow.Enabled = false; this.RepopulateSourceTable(); this.RepopulateSelectedSimTable(); }
private void RepopulateSourceTable() { int row = -1; int num = -1; this.mSourceTable.GetFirstVisibleCell(ref num, ref row); this.mSourceTable.Clear(); foreach (ObjectPicker.RowInfo current in this.mSims) { if (!this.mSelectedSims.Contains(current)) { TableRow tableRow = this.mSourceTable.CreateRow(); DualPanelMinorPets.DualPaneSimPickerRowController dualPaneSimPickerRowController = new DualPanelMinorPets.DualPaneSimPickerRowController(tableRow, this.mSourceTable, current); tableRow.RowController = dualPaneSimPickerRowController; dualPaneSimPickerRowController.Enabled = true; this.mSourceTable.AddRow(tableRow); } } this.mSourceTable.ClearSelection(); this.mRightArrow.Enabled = false; this.mSourceTable.Flush(); this.mSourceTable.ScrollRowToTop(row); }
private void RepopulateSelectedSimTable() { this.mSelectedTable.Clear(); new List<ObjectPicker.RowInfo>(); foreach (ObjectPicker.RowInfo current in this.mSelectedSims) { TableRow tableRow = this.mSelectedTable.CreateRow(); DualPanelMinorPets.DualPaneSimPickerRowController rowController = new DualPanelMinorPets.DualPaneSimPickerRowController(tableRow, this.mSelectedTable, current); tableRow.RowController = rowController; this.mSelectedTable.AddRow(tableRow); } }