Exemplo n.º 1
0
 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)
             {
                 DualPanelShopping.DualPaneSimPickerRowController dualPaneSimPickerRowController = row.RowController as DualPanelShopping.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;
 }
Exemplo n.º 2
0
        private void OnGridDoubleClicked(TableContainer sender, TableRow row)
        {
            bool flag = false;

            if (sender.ID == 99576784u)
            {
                DualPanelShopping.DualPaneSimPickerRowController dualPaneSimPickerRowController = row.RowController as DualPanelShopping.DualPaneSimPickerRowController;
                ObjectPicker.RowInfo info = dualPaneSimPickerRowController.Info;
                this.mSelectedSims.Remove(info);
                flag = true;
            }
            else
            {
                DualPanelShopping.DualPaneSimPickerRowController dualPaneSimPickerRowController2 = row.RowController as DualPanelShopping.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();
            }
        }
Exemplo n.º 3
0
 private void RepopulateSelectedSimTable()
 {
     this.mSelectedTable.Clear();
     new List <ObjectPicker.RowInfo>();
     foreach (ObjectPicker.RowInfo current in this.mSelectedSims)
     {
         TableRow tableRow = this.mSelectedTable.CreateRow();
         DualPanelShopping.DualPaneSimPickerRowController rowController = new DualPanelShopping.DualPaneSimPickerRowController(tableRow, this.mSelectedTable, current, mMultiplyer);
         tableRow.RowController = rowController;
         this.mSelectedTable.AddRow(tableRow);
     }
 }
Exemplo n.º 4
0
 private void OnArrowClick(WindowBase sender, UIButtonClickEventArgs eventArgs)
 {
     if (sender.ID == 99576788u)
     {
         TableRow row = this.mSelectedTable.GetRow(this.mSelectedTable.SelectedItem);
         DualPanelShopping.DualPaneSimPickerRowController dualPaneSimPickerRowController = row.RowController as DualPanelShopping.DualPaneSimPickerRowController;
         ObjectPicker.RowInfo info = dualPaneSimPickerRowController.Info;
         this.mSelectedSims.Remove(info);
     }
     else
     {
         TableRow row2 = this.mSourceTable.GetRow(this.mSourceTable.SelectedItem);
         DualPanelShopping.DualPaneSimPickerRowController dualPaneSimPickerRowController2 = row2.RowController as DualPanelShopping.DualPaneSimPickerRowController;
         ObjectPicker.RowInfo info2 = dualPaneSimPickerRowController2.Info;
         this.mSelectedSims.Add(info2);
     }
     this.mLeftArrow.Enabled  = false;
     this.mRightArrow.Enabled = false;
     this.RepopulateSourceTable();
     this.RepopulateSelectedSimTable();
 }
Exemplo n.º 5
0
        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();
                    DualPanelShopping.DualPaneSimPickerRowController dualPaneSimPickerRowController = new DualPanelShopping.DualPaneSimPickerRowController(tableRow, this.mSourceTable, current, mMultiplyer);
                    tableRow.RowController = dualPaneSimPickerRowController;
                    dualPaneSimPickerRowController.Enabled = true;
                    this.mSourceTable.AddRow(tableRow);
                }
            }
            this.mSourceTable.ClearSelection();
            this.mRightArrow.Enabled = false;
            this.mSourceTable.Flush();
            this.mSourceTable.ScrollRowToTop(row);
        }
Exemplo n.º 6
0
 private void RepopulateSelectedSimTable()
 {
     this.mSelectedTable.Clear();
     new List<ObjectPicker.RowInfo>();
     foreach (ObjectPicker.RowInfo current in this.mSelectedSims)
     {
         TableRow tableRow = this.mSelectedTable.CreateRow();
         DualPanelShopping.DualPaneSimPickerRowController rowController = new DualPanelShopping.DualPaneSimPickerRowController(tableRow, this.mSelectedTable, current, mMultiplyer);
         tableRow.RowController = rowController;
         this.mSelectedTable.AddRow(tableRow);
     }
 }
Exemplo n.º 7
0
 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();
             DualPanelShopping.DualPaneSimPickerRowController dualPaneSimPickerRowController = new DualPanelShopping.DualPaneSimPickerRowController(tableRow, this.mSourceTable, current, mMultiplyer);
             tableRow.RowController = dualPaneSimPickerRowController;
             dualPaneSimPickerRowController.Enabled = true;
             this.mSourceTable.AddRow(tableRow);
         }
     }
     this.mSourceTable.ClearSelection();
     this.mRightArrow.Enabled = false;
     this.mSourceTable.Flush();
     this.mSourceTable.ScrollRowToTop(row);
 }