Esempio n. 1
0
        /// <summary>
        /// 载入处理
        /// </summary>
        public void OnSolutionLoad()
        {
            if (!Solutions.Contains(Solution))
            {
                Solutions.Add(Solution);
            }
            TryAdd(Entities, Solution.Entities);
            TryAdd(Projects, Solution.Projects);
            TryAdd(Enums, Solution.Enums);
            TryAdd(ApiItems, Solution.ApiItems);

            Solution.EntityList.CollectionChanged  += (s, e) => CollectionChanged(Entities, e);
            Solution.ProjectList.CollectionChanged += (s, e) => CollectionChanged(Projects, e);
            Solution.EnumList.CollectionChanged    += (s, e) => CollectionChanged(Projects, e);
            Solution.ApiList.CollectionChanged     += (s, e) => CollectionChanged(Projects, e);
        }
        /// <summary>
        /// 载入处理
        /// </summary>
        public void OnSolutionLoad()
        {
            if (!Solutions.Contains(Solution))
            {
                Solutions.Add(Solution);
            }
            Entities.AddRange(Solution.Entities);
            Projects.AddRange(Solution.Projects);
            Enums.AddRange(Solution.Enums);
            TypedefItems.AddRange(Solution.TypedefItems);
            NotifyItems.AddRange(Solution.NotifyItems);
            ApiItems.AddRange(Solution.ApiItems);

            Solution.Entities.CollectionChanged     += (s, e) => CollectionChanged(Entities, e);
            Solution.Projects.CollectionChanged     += (s, e) => CollectionChanged(Projects, e);
            Solution.Enums.CollectionChanged        += (s, e) => CollectionChanged(Projects, e);
            Solution.TypedefItems.CollectionChanged += (s, e) => CollectionChanged(TypedefItems, e);
            Solution.ApiItems.CollectionChanged     += (s, e) => CollectionChanged(Projects, e);
            Solution.NotifyItems.CollectionChanged  += (s, e) => CollectionChanged(Projects, e);
        }
Esempio n. 3
0
        public void ManyCalculate(double a, double b, double eps)
        {
            bool   isMin = false;
            double sol;
            double _a = a, _b = b;

            sol = Math.Round(Calculate(_a, _b, !isMin, eps), eps.ToString().Length - 2);
            if (!Solutions.Contains(sol) && Math.Abs(sol - a) > 2 * eps && Math.Abs(sol - b) > 2 * eps)
            {
                Solutions.Add(sol);
                ManyCalculate(sol, b, eps);
                ManyCalculate(a, sol, eps);
            }
            sol = Math.Round(Calculate(_a, _b, isMin, eps), eps.ToString().Length - 2);
            if (!Solutions.Contains(sol) && Math.Abs(sol - a) > 2 * eps && Math.Abs(sol - b) > 2 * eps)
            {
                Solutions.Add(sol);
                ManyCalculate(sol, b, eps);
                ManyCalculate(a, sol, eps);
            }
        }