Beispiel #1
0
 public static bool IsServer()
 {
     if (Licensing.GetCurrentCompName() == Licensing.GetServerCompName())
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #2
0
        public static string GetServerCompName()
        {
            string srv_name = string.Empty;

            if (!File.Exists(@"CL.DLL"))
            {
                return(srv_name);
            }

            string unc_path = Licensing.GetUncPath(new FileInfo(@"CL.DLL"));

            if (Licensing.IsLAN())
            {
                int first_sep = unc_path.IndexOf("\\", 2); //start_path.IndexOf("\\", 2);
                srv_name = unc_path.Substring(2, first_sep - 2);
            }
            else
            {
                srv_name = Licensing.GetCurrentCompName();
            }

            return(srv_name.ToLower());
        }