Beispiel #1
0
        public void ReadSettings()
        {
            var filePath = new System.IO.FileInfo(Manager.ServerDirectory.FullName + "/RealmsFilter.json");

            if (!filePath.Exists)
            {
                Log.Info("No RealmsFilter.json, using default settings");
                return;
            }
            try
            {
                var    txt        = System.IO.File.ReadAllText(filePath.FullName);
                var    reader     = new JsonFx.Json.JsonReader();
                var    dictionary = (Dictionary <string, object>)reader.Read(txt);
                string filterMode = null;
                TryGetValue(dictionary, "FilterMode", ref filterMode);
                Log.Debug($"filterMode: {filterMode}");
                if (filterMode != null)
                {
                    FilterMode = (FilterModeType)Enum.Parse(typeof(FilterModeType), filterMode);
                }
                Log.Info("Loaded settings from RealmsFilter.json");
            }
            catch (Exception e)
            {
                Log.Error($"Couldn't read BasicAutoServer.json. Is your json malformed?\n{e}");
            }
        }
Beispiel #2
0
 /// <summary>
 /// Sets the filter modes for this sampler.
 /// </summary>
 /// <param name="minFilter">The minification filter that will be used.</param>
 /// <param name="magFilter">The magnification filter that will be used.</param>
 /// <since_tizen> 3 </since_tizen>
 public void SetFilterMode(FilterModeType minFilter, FilterModeType magFilter)
 {
     Interop.Sampler.Sampler_SetFilterMode(swigCPtr, (int)minFilter, (int)magFilter);
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }