Exemple #1
0
        private bool ObjectUnique(Common.Inventory.CService ModifiedObject)
        {
            bool unique = true;

            foreach (CService server in ObjectCollection)
            {
                if (server.Name == tbServiceName.Text.Trim())
                {
                    unique = false;
                }
            }
            if (!unique)
            {
                MessageBoxEx.Show(this, "Server object \"" + tbServiceName.Text + "\" has been already added to the list. \r\nPlease edit the existing entry.", Core.ProductName, MessageBoxButton.OK, MessageBoxImage.Error);
            }
            return(unique);
        }
Exemple #2
0
        private bool ObjectValidates(Common.Inventory.CService ModifiedObject)
        {
            bool valid = false;

            if (ModifiedObject != null)
            {
                if (ModifiedObject.IP != null)
                {
                    valid = true;
                }
            }
            if (!valid)
            {
                MessageBoxEx.Show(this, "Server \"" + tbServiceName.Text + "\" does not resolve to a valid IP address. \r\nVerify server connectivity and that DNS is configured correctly.", Core.ProductName, MessageBoxButton.OK, MessageBoxImage.Error);
            }
            return(valid);
        }