コード例 #1
0
            public override void CommitEditingStyle(UITableView aTableView, UITableViewCellEditingStyle aEditingStyle, NSIndexPath aIndexPath)
            {
                if (aEditingStyle == UITableViewCellEditingStyle.Delete)
                {
                    iList.RemoveAt(aIndexPath.Row);

                    aTableView.DeleteRows(new NSIndexPath[] { aIndexPath }, UITableViewRowAnimation.Right);

                    iOption.Set(StringListConverter.ListToString(iList));
                }
            }
コード例 #2
0
        private void ButtonRemoveClick(object sender, EventArgs e)
        {
            // just remove the values from the option list and let the eventing
            // update the view

            int offset = 0;

            foreach (int index in iListFolders.SelectedIndices)
            {
                iList.RemoveAt(index + offset--);
            }

            iOption.Set(StringListConverter.ListToString(iList));
        }
コード例 #3
0
ファイル: OptionMonobjc.cs プロジェクト: daviddw/Kinsky
        private void ActionEventRemove(Id aSender)
        {
            NSIndexSet rows = iTableView.SelectedRowIndexes;

            uint index = rows.LastIndex;

            while (index != FoundationFramework.NSNotFound)
            {
                if (index < iList.Count)
                {
                    iList.RemoveAt((int)index);
                    iOption.Set(StringListConverter.ListToString(iList));
                }
                index = rows.IndexLessThanIndex(index);
            }
        }
コード例 #4
0
                private bool Update(UITextField aTextField)
                {
                    if (iIndex < iList.Count)
                    {
                        if (string.IsNullOrEmpty(aTextField.Text))
                        {
                            iList.RemoveAt(iIndex);
                        }
                        else
                        {
                            if (Uri.IsWellFormedUriString(aTextField.Text, UriKind.Absolute))
                            {
                                iList[iIndex] = aTextField.Text;
                            }
                            else
                            {
                                return(false);
                            }
                        }
                    }
                    else
                    {
                        if (!string.IsNullOrEmpty(aTextField.Text))
                        {
                            if (Uri.IsWellFormedUriString(aTextField.Text, UriKind.Absolute))
                            {
                                iList.Add(aTextField.Text);
                            }
                            else
                            {
                                return(false);
                            }
                        }
                    }

                    iOption.Set(StringListConverter.ListToString(iList));

                    return(true);
                }
コード例 #5
0
ファイル: OptionMonobjc.cs プロジェクト: daviddw/Kinsky
 protected void Add(string aValue)
 {
     iList.Add(aValue);
     iOption.Set(StringListConverter.ListToString(iList));
 }