Beispiel #1
0
        public NSObject ObjectValueForTableColumn(NSTableView table, NSTableColumn col, int row)
        {
            NSString value = NSString.Empty;

            try
            {
                if (Entries != null)
                {
                    VMDNSZoneEntryNode zone = Entries[row];
                    switch (col.Identifier)
                    {
                    case VMDNSConstants.ZONE_NAME:
                        value = (NSString)zone.CurrentZone.Name;
                        break;

                    case VMDNSConstants.DNS_NAME:
                        value = (NSString)zone.CurrentZone.DNSName;
                        break;

                    case VMDNSConstants.ADMIN_EMAIL:
                        value = (NSString)zone.CurrentZone.AdminEmail;
                        break;
                    }
                }
            }
            catch (Exception e)
            {
                //Todo - log exception
            }
            return(value);
        }
Beispiel #2
0
        internal ZoneProperties(VMDNSZoneEntryNode zoneNode)

        {
            InitializeComponent();

            this.zoneNode = zoneNode;

            InitialiseUIFieldsFromZoneValues();
        }
Beispiel #3
0
        public void OnDoubleClickedOutlineView(object sender, EventArgs e)
        {
            int      row  = (int)splitViewController.MainOutlineView.SelectedRow;
            NSObject item = splitViewController.MainOutlineView.ItemAtRow(row);

            if (item is VMDNSZoneEntryNode)
            {
                VMDNSZoneEntryNode zoneNode = item as VMDNSZoneEntryNode;
                zoneNode.ShowProperties();
            }
        }
Beispiel #4
0
 public DnsRecordListView(VMDNSZoneEntryNode zoneNode)
 {
     this.ZoneNode = zoneNode;
     try
     {
         Entries = zoneNode.CurrentZone.ListRecords();
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #5
0
        // SplitView Events

        public void OnDoubleClickedTableView(object sender, EventArgs e)
        {
            int row = (int)splitViewController.MainTableView.SelectedRow;
            INSTableViewDataSource ds = splitViewController.MainTableView.DataSource;

            if (ds is ZoneDetailsListView)
            {
                VMDNSZoneEntryNode zoneNode = (ds as ZoneDetailsListView).Entries[row];
                zoneNode.ShowProperties();
            }
            else if (ds is DnsRecordListView)
            {
                VMDNSZoneEntryNode zoneNode = (ds as DnsRecordListView).ZoneNode;
                VmDnsRecord        record   = (ds as DnsRecordListView).Entries[(int)row];
                zoneNode.ShowRecordProperties(sender, e, record);
            }
        }
Beispiel #6
0
 public DnsRecordListView(VMDNSZoneEntryNode zoneNode, IList <VmDnsRecord> records)
 {
     this.ZoneNode = zoneNode;
     Entries       = records;
 }