public GlobalTopologyNode(IPscHighAvailabilityService service, ServerDto serverDto, ManagementDto managementDto)
        {
            DisplayName    = serverDto.DomainName;
            _managementDto = managementDto;
            _serverDto     = serverDto;
            _service       = service;
            Hosts          = new List <NodeDto> ();
            IsConnected    = true;
            NetworkChange.NetworkAvailabilityChanged += (object sender, NetworkAvailabilityEventArgs e) => {
                IsConnected = e.IsAvailable;
            };
            RefreshTopology();
            UpdateNodes();
            var interval = Constants.CacheCycleRefreshInterval * Constants.MilliSecsMultiplier;

            timer = new Timer(timerAutoRefresh_Tick, null, 0, interval);
        }
        /// <summary>
        /// Awakes from nib.
        /// </summary>
        public override void AwakeFromNib()
        {
            base.AwakeFromNib();
            _service            = new PscHighAvailabilityService(PscHighAvailabilityAppEnvironment.Instance.Logger, PscHighAvailabilityAppEnvironment.Instance);
            this.Window.MinSize = new CoreGraphics.CGSize()
            {
                Height = 607, Width = 820
            };
            this.Window.Title            = Constants.SuiteName + " " + Constants.ToolName;
            ServerToolBarItem.Activated += OnServerToolBarItem_Activated;

            NSNotificationCenter.DefaultCenter.AddObserver((NSString)"ReloadOutlineView", ReloadOutlineView);
            NSNotificationCenter.DefaultCenter.AddObserver((NSString)"ReloadTableView", ReloadTableView);
            RefreshToolBarItem.Label      = "Refresh Topology";
            RefreshToolBarItem.Activated += (object sender, EventArgs e) => {
                TopologyRefresh();
            };
            CacheImages();
        }
Example #3
0
 // Call to load from the XIB/NIB file
 /// <summary>
 /// Initializes a new instance of the <see cref="VMPSCHighAvailability.UI.MonitorController"/> class.
 /// </summary>
 public MonitorController(IPscHighAvailabilityService service) : base("Monitor", NSBundle.MainBundle)
 {
     _service = service;
 }