コード例 #1
0
ファイル: DataGrid.cs プロジェクト: Gravicode/GlideX
 /// <summary>
 /// Triggers a tap cell event.
 /// </summary>
 /// <param name="sender">Object associated with this event.</param>
 /// <param name="args">Tap cell event arguments.</param>
 public void TriggerTapCellEvent(object sender, TapCellEventArgs args)
 {
     if (TapCellEvent != null)
     {
         TapCellEvent(sender, args);
     }
 }
コード例 #2
0
        /// <summary>
        /// Handles the dGridMailbox tap event.
        /// </summary>
        private void dGridMailbox_TapCellEvent(object sender, TapCellEventArgs args)
        {
            object[] data = dGridMailbox.GetRowData(args.RowIndex);

            if (args.ColumnIndex == 0 && args.RowIndex >= 1 && args.RowIndex <= 7)   //if you tapped zeroeth column, turn email addresses on/off
            {
                if (EmailAddressArray[args.RowIndex - 1].State == "OFF")
                {
                    dGridMailbox.SetCellData(args.ColumnIndex, args.RowIndex, "ON");
                    EmailAddressArray[args.RowIndex - 1].State = "ON";
                    //setMailboxField(EmailAddressArray[args.RowIndex-1].Address, args.RowIndex);
                }
                else
                {
                    dGridMailbox.SetCellData(args.ColumnIndex, args.RowIndex, "OFF");
                    EmailAddressArray[args.RowIndex - 1].State = "OFF";
                    //setMailboxField(String.Empty, args.RowIndex); //clear the email address in the ATI so it wont send to this address
                }

                emailChange = true;
                dGridMailbox.Invalidate();
            }

            /*
             * if ((args.ColumnIndex == 1) && (data[0].ToString().IndexOf("SMTP Authen:") != -1)) //if you tapped SMTP Authent field
             * {
             *
             *  if (data[1].ToString() == "no")
             *  {
             *      dGridMailbox.SetCellData(args.ColumnIndex, args.RowIndex, "yes");
             *      emailDevice.setSMTPAuthent(true);
             *  }
             *  else
             *  {
             *      dGridMailbox.SetCellData(args.ColumnIndex, args.RowIndex, "no");
             *      emailDevice.setSMTPAuthent(false);
             *  }
             *
             *  emailChange = true;
             *  dGridMailbox.Invalidate();
             * }
             */
        }
コード例 #3
0
ファイル: ShoppingWindow.cs プロジェクト: MarxW/microKitchen
 void dgShoppingList_TapCellEvent(object sender, TapCellEventArgs args)
 {
     Debug.Print(GlideTouch.Calibrated.ToString());
     ModalResult result = Glide.MessageBoxManager.Show("Delete this item?", "Delete", ModalButtons.YesNo);
     if (result == ModalResult.Yes)
     {
         object[] data = this.dgShoppingList.GetRowData(args.RowIndex);
         if (null != data)
         {
             for (int i = 0; i < this.shoppingList.Length(); i++)
             {
                 ShoppingListItem item = this.shoppingList.GetItem(i);
                 if (item.Name.Equals((string)data[0]) && item.Type == ((string)data[1]).ToShoppingItemTypes() && item.NumberOfItems == (int)data[2])
                 {
                     this.shoppingList.Remove(item);
                     Helpers.Configuration.SaveShoppingList(this.shoppingList);
                     this.UpdateShoppingListDataGrid();
                     break;
                 }
             }
         }
     }
 }
コード例 #4
0
ファイル: Program.cs プロジェクト: darioplatania/404NotFood
        /*DataGrid TapCellEvent*/
        void dataGrid_TapCellEvent(object sender, TapCellEventArgs args)
        {
            // Get the data from the row we tapped.
            object[] data = _dataGrid.GetRowData(args.RowIndex);
            if (data != null)
            {
                /*enable ingredients button*/
                //_ingBtn.Visible = true;
                //_menu.Invalidate();

                GlideUtils.Debug.Print("GetRowData[" + args.RowIndex + "] = ", data);
                /*mem row index*/
                row = args.RowIndex;
                /*select id row*/
                getid = Double.Parse(_dataGrid.GetRowData(args.RowIndex).GetValue(0).ToString());
                /*select name row*/
                getpizza = (string)_dataGrid.GetRowData(args.RowIndex).GetValue(1);
                /*select price row*/
                getprice = Double.Parse(_dataGrid.GetRowData(args.RowIndex).GetValue(2).ToString());
                /*select qnt row*/
                getqnt = (int)_dataGrid.GetRowData(args.RowIndex).GetValue(3);
                Debug.Print("QNT tapcell: " + getqnt);
            }
        }
コード例 #5
0
ファイル: DataGrid.cs プロジェクト: jakesays/Glide
 /// <summary>
 /// Triggers a tap cell event.
 /// </summary>
 /// <param name="sender">Object associated with this event.</param>
 /// <param name="args">Tap cell event arguments.</param>
 public void TriggerTapCellEvent(object sender, TapCellEventArgs args)
 {
     if (TapCellEvent != null)
         TapCellEvent(sender, args);
 }
コード例 #6
0
 void dataGrid_Schedule_TapCellEvent(object sender, TapCellEventArgs args)
 {
     update_DataTextboxes(dataGrid_Schedule.SelectedIndex);
 }