private void OnIngridientOver(object sender, IngridientsOverEventArgs args)
        {
            List <Ingridient> ings = args.Ingridients;
            StringBuilder     sb   = new StringBuilder();

            for (int i = 0; i < ings.Count; ++i)
            {
                sb.AppendLine("\nOvered - " + ings[i].Name);
            }
            Logger.RecordMessageToLog(sb.ToString());
        }
Esempio n. 2
0
        protected void OnIngrOverEvent(List <Ingridient> oversIngridients)
        {
            if (oversIngridients == null || IngrOverEvent == null)
            {
                return;
            }
            IngridientsOverEventArgs args = new IngridientsOverEventArgs(oversIngridients);

            StringBuilder sb = new StringBuilder();

            sb.AppendLine("Methods of IngrOverEvent");

            foreach (Delegate item in IngrOverEvent.GetInvocationList())
            {
                sb.AppendLine("\n-Method:" + item.Method + "  Target type:" + item.Target);
            }

            Logger.RecordToProgramLog(sb.ToString());

            IngrOverEvent.Invoke(this, args);
        }