Beispiel #1
0
        public static bool IsStarted(string adhocStatusFile)
        {
            PhotomanagerFactory.WaitUnlock(adhocStatusFile);
            string localizedKey;
            string localizedValue;
            var    ci = CultureInfo.InstalledUICulture;

            switch (ci.TwoLetterISOLanguageName.ToUpper())
            {
            case "NL":
                localizedKey   = "Status";
                localizedValue = "gestart";
                break;

            default:
                localizedKey   = "Status";
                localizedValue = "started";
                break;
            }
            string result = ReadFromAdHocStatus(adhocStatusFile, localizedKey);

            if (result.Trim().ToLower().Equals(localizedValue))
            {
                return(true);
            }
            return(false);
        }
Beispiel #2
0
        public static string LastModified(string adhocStatusFile)
        {
            PhotomanagerFactory.WaitUnlock(adhocStatusFile);
            var adhocStatusFileInfo = new FileInfo(adhocStatusFile);

            return($"Laatst aangepast op {adhocStatusFileInfo.LastWriteTime:dd-MM-yyyy HH:mm:ss}");
        }
Beispiel #3
0
 public static string NetworkStatus(string adhocStatusFile)
 {
     PhotomanagerFactory.WaitUnlock(adhocStatusFile);
     using (var sr = new StreamReader(adhocStatusFile))
     {
         return(sr.ReadToEnd());
     }
 }
Beispiel #4
0
        public static bool IsCorrectSsid(string adhocStatusFile, string ssidName)
        {
            PhotomanagerFactory.WaitUnlock(adhocStatusFile);
            string localizedKey;
            var    ci = CultureInfo.InstalledUICulture;

            switch (ci.TwoLetterISOLanguageName.ToUpper())
            {
            case "NL":
                localizedKey = "SSID-naam";
                break;

            default:
                localizedKey = "SSID name";
                break;
            }
            string searchSsidName = ReadFromAdHocStatus(adhocStatusFile, localizedKey).Replace("\"", "");

            if (searchSsidName.Trim().ToLower().Equals(ssidName.ToLower()))
            {
                return(true);
            }
            return(false);
        }