CmisSync.TransmissionDataSource.GetTransmissionItem C# (CSharp) Method

GetTransmissionItem() public method

public GetTransmissionItem ( int row ) : Transmission
row int
return CmisSync.Lib.FileTransmission.Transmission
        public Transmission GetTransmissionItem(int row) {
            lock (lockTransmissionItems) {
                if (row < TransmissionItems.Count) {
                    return TransmissionItems[row];
                }
                return null;
            }
        }

Usage Example

コード例 #1
0
        void HandleSelectionDidChange(object sender, EventArgs e)
        {
            using (var a = new NSAutoreleasePool()) {
                BeginInvokeOnMainThread(delegate {
                    if (TableView.SelectedRowCount > 0)
                    {
                        TableRowMenuOpen.Enabled = false;
                        foreach (int row in TableView.SelectedRows)
                        {
                            var item = DataSource.GetTransmissionItem(row);
                            if (item != null && item.Done)
                            {
                                TableRowMenuOpen.Enabled = true;
                                break;
                            }
                        }

                        TableView.Menu = TableRowContextMenu;
                    }
                    else
                    {
                        TableView.Menu = new NSMenu();
                    }
                });
            };
        }