Ejemplo n.º 1
0
        private MeasureResult Evaluate(Rainmeter.Settings.InstanceSettings Instance)
        {
            MeasureResult result = null;

            try
            {
                result = GetResource(Instance);

                result = result.Select(Instance);

                result = result.Filter(Instance);

                string strIndex = Instance.INI_Value("Index");
                if (strIndex.Length > 0)
                {
                    int index = int.Parse(strIndex);
                    result = result.Index(index, Instance);
                }
            }
            catch (Exception e)
            {
                result = new ErrorResult(-1, e.Message);
            }
            finally
            {
                Instance.SetTempValue("Age", 0);
                Instance.SetTempValue("Cached", result);
                Instance.SetTempValue("resetId", OutlookPlugin.resetId);
            }
            return(result);
        }