本文整理汇总了C#中UITableViewCellEditingStyle类的典型用法代码示例。如果您正苦于以下问题:C# UITableViewCellEditingStyle类的具体用法?C# UITableViewCellEditingStyle怎么用?C# UITableViewCellEditingStyle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UITableViewCellEditingStyle类属于命名空间,在下文中一共展示了UITableViewCellEditingStyle类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CommitEditingStyle
public override void CommitEditingStyle(UITableView tableView, UITableViewCellEditingStyle editingStyle, MonoTouch.Foundation.NSIndexPath indexPath)
{
switch (editingStyle) {
case UITableViewCellEditingStyle.Delete:
// remove the item from the underlying data source
string del;
if (tableItems [indexPath.Row].AltFach != "" && tableItems [indexPath.Row].Lehrer != "") {
del = tableItems [indexPath.Row].AltFach + "%" + tableItems [indexPath.Row].Lehrer;
} else {
del = tableItems [indexPath.Row].Fach + "%" + tableItems [indexPath.Row].Vertreter;
}
int there;
var pm = new PrefManager ();
try {
there = pm.getInt ("ignoredCount");
if (there == 0) {
throw new Exception ();
}
} catch {
pm.setInt ("ignoredCount", 0);
there = 0;
}
there++;
pm.setString ("ignored" + Convert.ToString(there), del);
pm.setInt ("ignoredCount", there);
tableItems.RemoveAt(indexPath.Row);
// delete the row from the table
tableView.DeleteRows (new NSIndexPath[] { indexPath }, UITableViewRowAnimation.Fade);
break;
case UITableViewCellEditingStyle.None:
Console.WriteLine ("CommitEditingStyle:None called");
break;
}
}
开发者ID:reknih,项目名称:informant-ios,代码行数:34,代码来源:TableSource.cs
示例2: CommitEditingStyle
public override void CommitEditingStyle(UITableView tableView, UITableViewCellEditingStyle editingStyle, MonoTouch.Foundation.NSIndexPath indexPath)
{
switch (editingStyle) {
case UITableViewCellEditingStyle.Delete:
// remove the item from the underlying data source
this.RaiseTaskDeleted(indexPath.Row);
tableItems.RemoveAt(indexPath.Row);
// delete the row from the table
tableView.DeleteRows (new NSIndexPath[] { indexPath }, UITableViewRowAnimation.Fade);
break;
case UITableViewCellEditingStyle.Insert:
//---- create a new item and add it to our underlying data
Item obj = new Item();
obj.Name = "Inserted";
obj.Description ="Placeholder";
// obj.imageFileName = "second.png";
tableItems.Insert (indexPath.Row, obj);
//---- insert a new row in the table
tableView.InsertRows (new NSIndexPath[] { indexPath }, UITableViewRowAnimation.Fade);
break;
case UITableViewCellEditingStyle.None:
Console.WriteLine ("CommitEditingStyle:None called");
break;
}
}
开发者ID:KuroiAme,项目名称:Indexer,代码行数:31,代码来源:TableSourceItems.cs
示例3: CommitEditingStyle
public async override void CommitEditingStyle (UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath)
{
if (editingStyle == UITableViewCellEditingStyle.Delete) {
var selectedObject = controller.DataSource.Objects.ElementAtOrDefault (indexPath.Row);
try
{
RootViewController.SetLoadingState(true);
var deleted = await controller.Client.DeleteAsync (selectedObject);
if (deleted)
objects.Remove (selectedObject);
}
catch (InsufficientRightsException)
{
ShowInsuffientRightsMessage (tableView);
}
catch (DeleteFailedException ex)
{
ShowDeleteFailedMessage (tableView, ex);
}
finally
{
RootViewController.SetLoadingState(false);
tableView.ReloadData ();
}
}
}
开发者ID:flolovebit,项目名称:xamarin-evolve-2014,代码行数:27,代码来源:DataSource.cs
示例4: CommitEditingStyle
public override void CommitEditingStyle(UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath)
{
if (editingStyle != UITableViewCellEditingStyle.Delete)
return;
OnElementDeleted (Root[indexPath.Section][indexPath.Row], indexPath);
}
开发者ID:jcaudill,项目名称:FlightLog,代码行数:7,代码来源:SwipeToDeleteTableSource.cs
示例5: CommitEditingStyle
public override void CommitEditingStyle(UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath)
{
if (editingStyle == UITableViewCellEditingStyle.Delete) {
tasks.RemoveAt (indexPath.Row);
tableView.DeleteRows(new NSIndexPath[] { indexPath }, UITableViewRowAnimation.Top);
}
}
开发者ID:pensacola1989,项目名称:TIG-CrossPlatformMobile,代码行数:7,代码来源:TasksTableViewSource.cs
示例6: CommitEditingStyle
public override void CommitEditingStyle (UITableView tableView, UITableViewCellEditingStyle editingStyle, MonoTouch.Foundation.NSIndexPath indexPath)
{
if(editingStyle == UITableViewCellEditingStyle.Delete)
{
this.RaiseTaskDeleted(indexPath.Row);
}
}
开发者ID:GSerjo,项目名称:Seminars,代码行数:7,代码来源:TaskTableSource.cs
示例7: CommitEditingStyle
public override void CommitEditingStyle(UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath)
{
if (editingStyle == UITableViewCellEditingStyle.Delete) {
_taskManager.RemoveItem(_taskManager.TodoItems[indexPath.Row]);
tableView.DeleteRows(new NSIndexPath[] { indexPath }, UITableViewRowAnimation.Top);
}
}
开发者ID:phamthangnd,项目名称:TIG-CrossPlatformMobile,代码行数:7,代码来源:TasksTableViewSource.cs
示例8: CommitEditingStyle
public override void CommitEditingStyle (UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath)
{
var dog = DogList.ElementAt(indexPath.Row);
var actionSheet = new UIActionSheet("") {"Slett hund", Utils.Translate("cancel")};
actionSheet.Title = dog.Navn + " vil bli slettet og fjernet fra alle logger.";
actionSheet.DestructiveButtonIndex = 0;
actionSheet.CancelButtonIndex = 1;
actionSheet.ShowFromTabBar(JaktLoggApp.instance.TabBarController.TabBar);
actionSheet.Clicked += delegate(object sender, UIButtonEventArgs e) {
Console.WriteLine(e.ButtonIndex);
switch (e.ButtonIndex)
{
case 0:
//Slett
JaktLoggApp.instance.DeleteDog(dog);
_controller.Refresh();
break;
case 1:
//Avbryt
break;
}
};
}
开发者ID:darkwood,项目名称:Jaktloggen,代码行数:25,代码来源:DogsTableSource.cs
示例9: CommitEditingStyle
public override void CommitEditingStyle (UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath)
{
if (editingStyle == UITableViewCellEditingStyle.Delete) {
FlexGrid.Columns.RemoveAt (indexPath.Row);
this.TableView.DeleteRows (new NSIndexPath[]{ indexPath }, UITableViewRowAnimation.Automatic);
}
}
开发者ID:GoXuni,项目名称:Xamarin.iOS-Samples,代码行数:7,代码来源:ColumnLayoutEditorTableViewController.cs
示例10: CommitEditingStyle
public override void CommitEditingStyle (UITableView tableView, UITableViewCellEditingStyle editingStyle, Foundation.NSIndexPath indexPath)
{
switch (editingStyle) {
case UITableViewCellEditingStyle.Delete:
TenServiceHelper.DeleteComment (Master.post, Master.TableItems [indexPath.Row], tableView, indexPath, Master.TableItems);
break;
}
}
开发者ID:natevarghese,项目名称:XamarinTen,代码行数:8,代码来源:CommentFeedTableViewSource.cs
示例11: CommitEditingStyle
public void CommitEditingStyle(UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath)
{
if (editingStyle == UITableViewCellEditingStyle.Delete)
{
_glResults.RemoveAt (indexPath.Row);
this.TableView.ReloadData ();
}
}
开发者ID:bholmes,项目名称:IOSSampleApps,代码行数:8,代码来源:GLCubeResultViewController.cs
示例12: BookmarksViewController
public BookmarksViewController(int docId, List<DocumentBookmark> bookmarks, int currentPageNumber, Action<object> callbackAction)
: base(null, null, callbackAction)
{
mDocumentId = docId;
mBookmarks = bookmarks;
mCurrentPageNumber = currentPageNumber;
mEditMode = UITableViewCellEditingStyle.None;
}
开发者ID:xuanvu,项目名称:mTouch-PDFReader,代码行数:8,代码来源:BookmarksViewController.cs
示例13: BookmarksVC
public BookmarksVC(int docId, List<DocumentBookmark> bookmarks, int currentPageNumber, Action<object> callbackAction)
: base(null, null)
{
_documentId = docId;
_bookmarks = bookmarks;
_currentPageNumber = currentPageNumber;
_callbackAction = callbackAction;
_editMode = UITableViewCellEditingStyle.None;
}
开发者ID:phantomlight,项目名称:mTouch-PDFReader,代码行数:9,代码来源:BookmarksVC.cs
示例14: CommitEditingStyle
public override void CommitEditingStyle(UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath)
{
if (editingStyle == UITableViewCellEditingStyle.Delete) {
var medList = new List<Medication> (controller.parentController.pet.medications);
medList.RemoveAt (indexPath.Row);
controller.parentController.pet.medications = medList.ToArray ();
tableView.ReloadData ();
}
}
开发者ID:MobiusGen,项目名称:Animal-Care-iOS,代码行数:9,代码来源:PetMedicinePage.cs
示例15: CommitEditingStyle
public override async void CommitEditingStyle (UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath)
{
if (editingStyle != UITableViewCellEditingStyle.Delete)
return;
await CloudManager.DeleteAsync (records [indexPath.Row]);
records.RemoveAt (indexPath.Row);
tableView.DeleteRows (new [] { indexPath }, UITableViewRowAnimation.Fade);
}
开发者ID:GouriKumari,项目名称:SubmissionSamples,代码行数:9,代码来源:CKReferenceDetailViewController.cs
示例16: CommitEditingStyle
public override void CommitEditingStyle (UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath)
{
//
// In this method, we need to actually carry out the request
//
var section = Container.Root [indexPath.Section];
var element = section [indexPath.Row];
section.Remove (element);
}
开发者ID:moljac,项目名称:MonoMobile.Dialog,代码行数:9,代码来源:DemoEditingAdvanced.cs
示例17: CommitEditingStyle
public override void CommitEditingStyle (UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath)
{
switch (editingStyle) {
case UITableViewCellEditingStyle.Delete:
_db.Delete(rows[indexPath.Row]);
rows.RemoveAt(indexPath.Row);
tableView.DeleteRows(new[]{indexPath}, UITableViewRowAnimation.Fade);
break;
}
}
开发者ID:89sos98,项目名称:sqlite-net,代码行数:10,代码来源:StocksView.xib.cs
示例18: CommitEditingStyle
public override void CommitEditingStyle(UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath)
{
if(editingStyle == UITableViewCellEditingStyle.Delete)
{
var busStop = GetBusStop(indexPath);
_busStops.Remove(busStop);
_busStopRepository.RemoveFavorite(busStop);
tableView.DeleteRows(new [] {indexPath}, UITableViewRowAnimation.Fade);
}
}
开发者ID:runegri,项目名称:MuPP,代码行数:10,代码来源:SimpleBusStopTableViewSource.cs
示例19: CommitEditingStyle
public override void CommitEditingStyle(UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath)
{
switch (editingStyle) {
case UITableViewCellEditingStyle.Delete:
viewModel.RemoveCommand.Execute (indexPath.Row);
break;
case UITableViewCellEditingStyle.None:
break;
}
}
开发者ID:keithballinger,项目名称:MvvmCrossAutoLayout,代码行数:10,代码来源:ListExampleTableViewSource.cs
示例20: CommitEditingStyle
public override void CommitEditingStyle(UITableView tableView, UITableViewCellEditingStyle editingStyle, MonoTouch.Foundation.NSIndexPath indexPath)
{
if(editingStyle == UITableViewCellEditingStyle.Delete)
{
this.RaiseTaskDeleted(indexPath.Row);
// delete the row from the table
tableView.DeleteRows (new NSIndexPath[] { indexPath }, UITableViewRowAnimation.Fade);
}
}
开发者ID:jimallen,项目名称:BoiseCodeCamp,代码行数:10,代码来源:TaskTableSource.cs
注:本文中的UITableViewCellEditingStyle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论