public bool Save(bool FOUND, bool Quantum, FormRefrigtz Curent, ref bool LoadTree, bool MovementsAStarGreedyHeuristicFound, bool IInoreSelfObjects, bool UsePenaltyRegardMechnisam, bool BestMovments, bool PredictHeuristic, bool OnlySelf, bool AStarGreedyHeuristic, bool ArrangmentsChanged) { Object OO = new Object(); lock (OO) { try { RefrigtzW.AllDraw Stote = Curent.Draw; if (!File.Exists(AllDrawKindString)) { GalleryStudio.RefregizMemmory rt = new GalleryStudio.RefregizMemmory(MovementsAStarGreedyHeuristicFound, IInoreSelfObjects, UsePenaltyRegardMechnisam, BestMovments, PredictHeuristic, OnlySelf, AStarGreedyHeuristic, ArrangmentsChanged ); //if (!Quantum) { if (Curent.Draw != null) { Curent.Draw = Curent.RootFound(); rt.AllDrawCurrentAccess = Curent.Draw; rt.RewriteAllDraw(FormRefrigtz.OrderPlate); RefrigtzW.AllDraw.DrawTable = false; } } } else if (File.Exists(AllDrawKindString)) { File.Delete(FormRefrigtz.AllDrawKindString); GalleryStudio.RefregizMemmory rt = new GalleryStudio.RefregizMemmory(MovementsAStarGreedyHeuristicFound, IInoreSelfObjects, UsePenaltyRegardMechnisam, BestMovments, PredictHeuristic, OnlySelf, AStarGreedyHeuristic, ArrangmentsChanged ); if (Curent.Draw != null) { Curent.Draw = Curent.RootFound(); rt.AllDrawCurrentAccess = Curent.Draw; rt.RewriteAllDraw(FormRefrigtz.OrderPlate); RefrigtzW.AllDraw.DrawTable = false; } } Curent.Draw = Stote; return(true); #pragma warning disable CS0162 // Unreachable code detected return(true); #pragma warning restore CS0162 // Unreachable code detected } catch (Exception t) { Log(t); return(false); } } }
public bool Load(bool FOUND, bool Quantum, FormRefrigtz Curent, ref bool LoadTree, bool MovementsAStarGreedyHeuristicFound, bool IInoreSelfObjects, bool UsePenaltyRegardMechnisam, bool BestMovments, bool PredictHeuristic, bool OnlySelf, bool AStarGreedyHeuristic, bool ArrangmentsChanged) { Object OO = new Object(); lock (OO) { DrawManagement(FOUND, UsePenaltyRegardMechnisam, AStarGreedyHeuristic); bool DrawDrawen = false; //Load Middle Targets. try { if (File.Exists(FormRefrigtz.AllDrawKindString)) { if (FormRefrigtz.MovmentsNumber >= 0) { //if (!Quantum) { GalleryStudio.RefregizMemmory tr = new GalleryStudio.RefregizMemmory(MovementsAStarGreedyHeuristicFound, IInoreSelfObjects, UsePenaltyRegardMechnisam, BestMovments, PredictHeuristic, OnlySelf, AStarGreedyHeuristic, ArrangmentsChanged); t = (RefrigtzW.AllDraw)tr.Load(Quantum, FormRefrigtz.OrderPlate); if (t != null) { Curent.Draw = t; LoadTree = true; Curent.Draw = Curent.RootFound(); Curent.Draw.UpdateLoseAndWinDepenOfKind(FormRefrigtz.OrderPlate); t = Curent.Draw; DrawDrawen = true; } } } File.Delete(FormRefrigtz.AllDrawKindString); } } catch (Exception t) { Log(t); } return(DrawDrawen); } }