Ejemplo n.º 1
0
 public DeviceInfoViewModel(AmsNetId target)
 {
     Target = target;
     try
     {
         TargetName = AmsRouter.ListRoutes().Where(x => x.NetId == Target.ToString()).FirstOrDefault().Name;
     }
     catch { }
 }
        private void OpenRemoteDesktop(object sender, EventArgs e)
        {
            var target = _systemManager.GetTargetNetId();

            var ipAddress = AmsRouter.ListRoutes()
                            .Where(route => route.NetId == target)
                            .FirstOrDefault()
                            .Address;

            if (!string.IsNullOrEmpty(ipAddress))
            {
                RemoteDesktop.Connect(ipAddress);
            }
        }
        public TcRteInstallViewModel(string target)
        {
            Target = target;

            try
            {
                TargetName = AmsRouter.ListRoutes().Where(x => x.NetId == Target).FirstOrDefault().Name;
            }
            catch { }

            InstallCommand = new AsyncRelayCommand(InstallAsync, CanInstall);
            SearchCommand  = new AsyncRelayCommand(SearchAsync, CanSearch);

            Connections = new ObservableCollection <LocalAreaConnection>();
        }