Example #1
0
        partial void OrganizePublications(NSObject sender)
        {
            var    NSApp     = NSApplication.SharedApplication;
            string bookTitle = NSApp.KeyWindow.Title;

            if (bookTitle == "Content")
            {
                bookTitle = PublicationsDataManager.SharedInstance.CurrentPublication.Name;
            }
            var orgPubsPanelCtl = new OrganizePublicationsPanelController(bookTitle);
            var organizeWindow  = orgPubsPanelCtl.Window;

            organizeWindow.WindowShouldClose += (t) => true;
            organizeWindow.WillClose         += delegate(object obj, EventArgs e){
                int bookID = orgPubsPanelCtl.BookIDDeleted;

                NSApp.EndSheet(organizeWindow);

                if (orgPubsPanelCtl.IsDeletePublication)
                {
                    publicationsWindowController.PublicationsVC.HandleDeletePublictaionByBookID(bookID);
                }
                else if (orgPubsPanelCtl.IsDraggedPublicaiton)
                {
                    publicationsWindowController.PublicationsVC.HandleSortPublictaions(orgPubsPanelCtl.BookIDArray);
                }
            };

            NSApp.BeginSheet(organizeWindow, NSApp.MainWindow);
        }
Example #2
0
 public PubsTableViewDataSource(OrganizePublicationsPanelController controller)
 {
     panelController = controller;
 }