コード例 #1
0
ファイル: DualPanelShopping.cs プロジェクト: yakoder/NRaas
 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;
 }
コード例 #2
0
ファイル: DualPanelShopping.cs プロジェクト: yakoder/NRaas
        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();
            }
        }
コード例 #3
0
ファイル: DualPanelShopping.cs プロジェクト: yakoder/NRaas
 private void RepopulateSourceTable()
 {
     try
     {
         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);
     }
     catch (System.Exception ex)
     {
         CommonMethodsOFBBistroSet.PrintMessage("DualPanelSource: " + ex.Message);
     }
 }
コード例 #4
0
ファイル: DualPanelShopping.cs プロジェクト: yakoder/NRaas
 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);
     }
 }
コード例 #5
0
ファイル: DualPanelShopping.cs プロジェクト: yakoder/NRaas
 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();
 }
コード例 #6
0
ファイル: DualPanelShopping.cs プロジェクト: Robobeurre/NRaas
 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);
     }
 }
コード例 #7
0
ファイル: DualPanelShopping.cs プロジェクト: Robobeurre/NRaas
 private void RepopulateSourceTable()
 {
     try
     {
         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);
     }
     catch (System.Exception ex)
     {
         CommonMethodsOFBBistroSet.PrintMessage("DualPanelSource: " + ex.Message);
     }
 }