Exemplo n.º 1
0
        /// <summary>
        /// Initialize this instance.
        /// </summary>
        private void Initialize()
        {
            ServicesTableView.AddColumn(NSTableColumnHelper.ToNSTableColumn(Constants.TableColumnIconId, string.Empty, true, 20));
            ServicesTableView.MoveColumn(ServicesTableView.ColumnCount - 1, 0);

            PscTableView.AddColumn(NSTableColumnHelper.ToNSTableColumn(Constants.TableColumnIconId, string.Empty, true, 20));
            PscTableView.MoveColumn(PscTableView.ColumnCount - 1, 0);

            isAutoRefresh                      = false;
            lastRefreshTimestamp               = DateTime.Now.ToString(Constants.DateFormat);
            SiteAffinityButton.Activated      += SiteAffinityButton_Activated;
            AutoRefreshButton.Activated       += AutoRefreshButton_Activated;
            IntervalComboBox.SelectionChanged += IntervalComboBox_SelectionChanged;
            RefreshButton.Activated           += RefreshState_Activated;
            timer = new Timer(timerAutoRefresh_Tick, null, -1, -1);
        }
Exemplo n.º 2
0
        void HandleDiscoveredService(object sender, NSErrorEventArgs e)
        {
            var peripheral = (CBPeripheral)sender;

            foreach (CBService service in peripheral.Services)
            {
                Console.WriteLine("Discovered Service: {0}", service.Description);

                if (!services.Contains(service))
                {
                    services.Add(service);
                }
            }

            ServicesTableView.ReloadData();
        }
Exemplo n.º 3
0
 /// <summary>
 /// Sets the services table view.
 /// </summary>
 /// <param name="services">Services.</param>
 public void SetServicesTableView(List <ServiceDto> services)
 {
     ServicesTableView.Delegate   = new ServicesTableViewDelegate(this);
     ServicesTableView.DataSource = new ServiceDataSource(services);
     ServicesTableView.ReloadData();
 }
Exemplo n.º 4
0
        void ReleaseDesignerOutlets()
        {
            if (AutoRefreshButton != null)
            {
                AutoRefreshButton.Dispose();
                AutoRefreshButton = null;
            }

            if (ContentPanel != null)
            {
                ContentPanel.Dispose();
                ContentPanel = null;
            }

            if (CurrentStatusTextField != null)
            {
                CurrentStatusTextField.Dispose();
                CurrentStatusTextField = null;
            }

            if (DomainControllerTextField != null)
            {
                DomainControllerTextField.Dispose();
                DomainControllerTextField = null;
            }

            if (HealthtextField != null)
            {
                HealthtextField.Dispose();
                HealthtextField = null;
            }

            if (HostnameHeader != null)
            {
                HostnameHeader.Dispose();
                HostnameHeader = null;
            }

            if (HostnameServiceHeaderTextField != null)
            {
                HostnameServiceHeaderTextField.Dispose();
                HostnameServiceHeaderTextField = null;
            }

            if (IntervalComboBox != null)
            {
                IntervalComboBox.Dispose();
                IntervalComboBox = null;
            }

            if (IpAddressTextField != null)
            {
                IpAddressTextField.Dispose();
                IpAddressTextField = null;
            }

            if (LastRefreshTextField != null)
            {
                LastRefreshTextField.Dispose();
                LastRefreshTextField = null;
            }

            if (LegacyModeWarning != null)
            {
                LegacyModeWarning.Dispose();
                LegacyModeWarning = null;
            }

            if (PscTableView != null)
            {
                PscTableView.Dispose();
                PscTableView = null;
            }

            if (RefreshButton != null)
            {
                RefreshButton.Dispose();
                RefreshButton = null;
            }

            if (ServicesheaderTextField != null)
            {
                ServicesheaderTextField.Dispose();
                ServicesheaderTextField = null;
            }

            if (ServicesTableView != null)
            {
                ServicesTableView.Dispose();
                ServicesTableView = null;
            }

            if (SiteAffinityButton != null)
            {
                SiteAffinityButton.Dispose();
                SiteAffinityButton = null;
            }

            if (SitenameTextField != null)
            {
                SitenameTextField.Dispose();
                SitenameTextField = null;
            }

            if (StatusTextField != null)
            {
                StatusTextField.Dispose();
                StatusTextField = null;
            }
        }