예제 #1
0
파일: NetVis.cs 프로젝트: radtek/Netvision
        private void lstView_Click(object sender, EventArgs e)
        {
            Application.DoEvents();
            try
            {
                lstNetworkDevices.Items.Clear();
                lstIPAddress.DataSource = null;
                lstStorage.Items.Clear();
                lstSoftware.Items.Clear();
                SelectedMachineName = lstView.SelectedItems[0].SubItems[1].Text;

                if (DomainProvider.GetInstance().IsDomainAdministrator || Dns.GetHostName() == SelectedMachineName)
                {
                    InitCursor();
                    GetListofSofwares();
                    PopulateNetworkDevices();
                    FillStorage();
                    ResetCursor();
                }
                else
                {
                    MessageBox.Show("Please login as domain admin to see other system details");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #2
0
        public ActionResult Scan()
        {
            var loggedInUser = User.Identity.Name.Split('\\')[1];
            var domain       = DomainProvider.GetInstance().EnumerateDomains(loggedInUser);
            var machines     = NetworkProvider.GetInstance().DomainNetworkComputers(domain.FirstOrDefault());

            return(View(machines));
        }
예제 #3
0
파일: NetVis.cs 프로젝트: radtek/NetTool
        private void PopulateDomain()
        {
            var loggedinUser = WindowsIdentity.GetCurrent().Name.Split('\\')[1];
            var domains      = DomainProvider.GetInstance().EnumerateDomains(loggedinUser);

            lblDomain.Text       = string.Format("Domain({0})", domains.Count);
            lstDomain.DataSource = domains;

            SelectedDomain = domains.FirstOrDefault();
        }