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 Save(bool FOUND, bool Quantum, ChessForm 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) { object o = new object(); lock (o) { if (!Quantum) { if (!RefrigtzDLL.AllDraw.ChangedInTreeOccured) { return(true); } } else { if (!QuantumRefrigiz.AllDraw.ChangedInTreeOccured) { return(true); } } } //System.Threading.Thread ttt = new System.Threading.Thread(new System.Threading.ThreadStart(Wait)); //ttt.Start(); //ttt.Join(); /*if (!Quantum) * { * while (Curent.Draw.AStarGreedyString != null) * Curent.Draw = Curent.Draw.AStarGreedyString; * } * else * { * while (Curent.DrawQ.AStarGreedyString != null) * Curent.DrawQ = Curent.DrawQ.AStarGreedyString; * } * if (UsePenaltyRegardMechnisam && AStarGreedyHeuristic) * AllDrawKind = 4; * else * if ((!UsePenaltyRegardMechnisam) && AStarGreedyHeuristic) * AllDrawKind = 3; * if (UsePenaltyRegardMechnisam && (!AStarGreedyHeuristic)) * AllDrawKind = 2; * if ((!UsePenaltyRegardMechnisam) && (!AStarGreedyHeuristic)) * AllDrawKind = 1; * //Set Configuration To True for some unknown reason!. * //UpdateConfigurationTableVal = true; * SetAllDrawKindString(); */ try { RefrigtzDLL.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(ChessForm.OrderPlate); RefrigtzDLL.AllDraw.DrawTable = false; //.SetBoxText("\r\nSaved Completed."); //Curent.RefreshBoxText(); //PictureBoxRefrigtz.SendToBack(); //PictureBoxTimerGray.SendToBack(); //PictureBoxTimerBrown.SendToBack(); //MessageBox.Show("Saved Completed."); } } /*else { * if (Curent.DrawQ != null) * { * Curent.DrawQ = Curent.RootFoundQ(); * rt.AllDrawCurrentAccessQ = Curent.DrawQ; * rt.RewriteAllDrawQ(ChessForm.OrderPlate); * QuantumRefrigiz.AllDraw.DrawTable = false; * //Curent.SetBoxText("\r\nSaved Completed."); * // Curent.RefreshBoxText(); * //PictureBoxRefrigtz.SendToBack(); * //PictureBoxTimerGray.SendToBack(); * //PictureBoxTimerBrown.SendToBack(); * //MessageBox.Show("Saved Completed."); * } */ } else if (File.Exists(AllDrawKindString)) { //DrawManagement(FOUND, UsePenaltyRegardMechnisam, AStarGreedyHeuristic); File.Delete(ChessForm.AllDrawKindString); GalleryStudio.RefregizMemmory rt = new GalleryStudio.RefregizMemmory(MovementsAStarGreedyHeuristicFound, IInoreSelfObjects, UsePenaltyRegardMechnisam, BestMovments, PredictHeuristic, OnlySelf, AStarGreedyHeuristic, ArrangmentsChanged ); //"Universal Root Founding"; if (Curent.Draw != null) { Curent.Draw = Curent.RootFound(); rt.AllDrawCurrentAccess = Curent.Draw; rt.RewriteAllDraw(ChessForm.OrderPlate); RefrigtzDLL.AllDraw.DrawTable = false; // Curent.SetBoxText("\r\nSaved Completed."); // Curent.RefreshBoxText(); //PictureBoxRefrigtz.SendToBack(); //PictureBoxTimerGray.SendToBack(); //PictureBoxTimerBrown.SendToBack(); //MessageBox.Show("Saved Completed."); } //DrawManagement(FOUND, UsePenaltyRegardMechnisam, AStarGreedyHeuristic); } Curent.Draw = Stote; return(true); return(true); } catch (Exception t) { Log(t); return(false); } } }
public bool Save(bool FOUND, bool Quantum, HybridizerRefrigitzForm 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) { //System.Threading.Thread ttt = new System.Threading.Thread(new System.Threading.ThreadStart(Wait)); //ttt.Start(); //ttt.Join(); /*if (!Quantum) * { * while (Curent.Draw.AStarGreedyString != null) * Curent.Draw = Curent.Draw.AStarGreedyString; * } * else * { * while (Curent.DrawQ.AStarGreedyString != null) * Curent.DrawQ = Curent.DrawQ.AStarGreedyString; * } * if (UsePenaltyRegardMechnisam && AStarGreedyHeuristic) * AllDrawKind = 4; * else * if ((!UsePenaltyRegardMechnisam) && AStarGreedyHeuristic) * AllDrawKind = 3; * if (UsePenaltyRegardMechnisam && (!AStarGreedyHeuristic)) * AllDrawKind = 2; * if ((!UsePenaltyRegardMechnisam) && (!AStarGreedyHeuristic)) * AllDrawKind = 1; * //Set Configuration To True for some unknown reason!. * //UpdateConfigurationTableVal = true; * SetAllDrawKindString(); */ try { HybridizerRefrigitz.AllDraw Stote = Curent.Draw; if (!File.Exists(AllDrawKindString)) { #pragma warning disable CS0436 // The type 'RefregizMemmory' in 'G:\'Personal'_'Files'\Refregitz\PortableChess\Chess\RefregizMemmory.cs' conflicts with the imported type 'RefregizMemmory' in 'GalleryStudio, Version=6.0.0.14, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'G:\'Personal'_'Files'\Refregitz\PortableChess\Chess\RefregizMemmory.cs'. #pragma warning disable CS0436 // The type 'RefregizMemmory' in 'G:\'Personal'_'Files'\Refregitz\PortableChess\Chess\RefregizMemmory.cs' conflicts with the imported type 'RefregizMemmory' in 'GalleryStudio, Version=6.0.0.14, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'G:\'Personal'_'Files'\Refregitz\PortableChess\Chess\RefregizMemmory.cs'. GalleryStudio.RefregizMemmory rt = new GalleryStudio.RefregizMemmory(MovementsAStarGreedyHeuristicFound, IInoreSelfObjects, UsePenaltyRegardMechnisam, BestMovments, PredictHeuristic, OnlySelf, AStarGreedyHeuristic, ArrangmentsChanged #pragma warning restore CS0436 // The type 'RefregizMemmory' in 'G:\'Personal'_'Files'\Refregitz\PortableChess\Chess\RefregizMemmory.cs' conflicts with the imported type 'RefregizMemmory' in 'GalleryStudio, Version=6.0.0.14, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'G:\'Personal'_'Files'\Refregitz\PortableChess\Chess\RefregizMemmory.cs'. #pragma warning restore CS0436 // The type 'RefregizMemmory' in 'G:\'Personal'_'Files'\Refregitz\PortableChess\Chess\RefregizMemmory.cs' conflicts with the imported type 'RefregizMemmory' in 'GalleryStudio, Version=6.0.0.14, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'G:\'Personal'_'Files'\Refregitz\PortableChess\Chess\RefregizMemmory.cs'. ); //if (!Quantum) { if (Curent.Draw != null) { Curent.Draw = Curent.RootFound(); rt.AllDrawCurrentAccess = Curent.Draw; rt.RewriteAllDraw(AllDraw.OrderPlate); HybridizerRefrigitz.AllDraw.DrawTable = false; //.SetBoxText("\r\nSaved Completed."); //Curent.RefreshBoxText(); //PictureBoxHybridizerRefrigitz.SendToBack(); //PictureBoxTimerWHITE.SendToBack(); //PictureBoxTimerBLACK.SendToBack(); Console.WriteLine("Saved Completed."); } } /*else { * if (Curent.DrawQ != null) * { * Curent.DrawQ = Curent.RootFoundQ(); * rt.AllDrawCurrentAccessQ = Curent.DrawQ; * rt.RewriteAllDrawQ(HybridizerRefrigitzForm.OrderPlate); * QuantumRefrigiz.AllDraw.DrawTable = false; * //Curent.SetBoxText("\r\nSaved Completed."); * // Curent.RefreshBoxText(); * //PictureBoxHybridizerRefrigitz.SendToBack(); * //PictureBoxTimerWHITE.SendToBack(); * //PictureBoxTimerBLACK.SendToBack(); * Console.WriteLine("Saved Completed."); * } */ } else if (File.Exists(AllDrawKindString)) { //DrawManagement(FOUND, UsePenaltyRegardMechnisam, AStarGreedyHeuristic); File.Delete(HybridizerRefrigitzForm.AllDrawKindString); #pragma warning disable CS0436 // The type 'RefregizMemmory' in 'G:\'Personal'_'Files'\Refregitz\PortableChess\Chess\RefregizMemmory.cs' conflicts with the imported type 'RefregizMemmory' in 'GalleryStudio, Version=6.0.0.14, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'G:\'Personal'_'Files'\Refregitz\PortableChess\Chess\RefregizMemmory.cs'. #pragma warning disable CS0436 // The type 'RefregizMemmory' in 'G:\'Personal'_'Files'\Refregitz\PortableChess\Chess\RefregizMemmory.cs' conflicts with the imported type 'RefregizMemmory' in 'GalleryStudio, Version=6.0.0.14, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'G:\'Personal'_'Files'\Refregitz\PortableChess\Chess\RefregizMemmory.cs'. GalleryStudio.RefregizMemmory rt = new GalleryStudio.RefregizMemmory(MovementsAStarGreedyHeuristicFound, IInoreSelfObjects, UsePenaltyRegardMechnisam, BestMovments, PredictHeuristic, OnlySelf, AStarGreedyHeuristic, ArrangmentsChanged #pragma warning restore CS0436 // The type 'RefregizMemmory' in 'G:\'Personal'_'Files'\Refregitz\PortableChess\Chess\RefregizMemmory.cs' conflicts with the imported type 'RefregizMemmory' in 'GalleryStudio, Version=6.0.0.14, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'G:\'Personal'_'Files'\Refregitz\PortableChess\Chess\RefregizMemmory.cs'. #pragma warning restore CS0436 // The type 'RefregizMemmory' in 'G:\'Personal'_'Files'\Refregitz\PortableChess\Chess\RefregizMemmory.cs' conflicts with the imported type 'RefregizMemmory' in 'GalleryStudio, Version=6.0.0.14, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'G:\'Personal'_'Files'\Refregitz\PortableChess\Chess\RefregizMemmory.cs'. ); //"Universal Root Founding"; if (Curent.Draw != null) { Curent.Draw = Curent.RootFound(); rt.AllDrawCurrentAccess = Curent.Draw; rt.RewriteAllDraw(AllDraw.OrderPlate); HybridizerRefrigitz.AllDraw.DrawTable = false; // Curent.SetBoxText("\r\nSaved Completed."); // Curent.RefreshBoxText(); //PictureBoxHybridizerRefrigitz.SendToBack(); //PictureBoxTimerWHITE.SendToBack(); //PictureBoxTimerBLACK.SendToBack(); Console.WriteLine("Saved Completed."); } //DrawManagement(FOUND, UsePenaltyRegardMechnisam, AStarGreedyHeuristic); } 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 Save(bool FOUND, bool Quantum, ChessForm 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) { object o = new object(); lock (o) { if (!Quantum) { if (!RefrigtzDLL.AllDraw.ChangedInTreeOccured) { return(true); } } } try { RefrigtzDLL.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(ChessForm.OrderPlate); RefrigtzDLL.AllDraw.DrawTable = false; } } } else if (File.Exists(AllDrawKindString)) { File.Delete(ChessForm.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(ChessForm.OrderPlate); RefrigtzDLL.AllDraw.DrawTable = false; } } Curent.Draw = Stote; return(true); return(true); } catch (Exception t) { Log(t); return(false); } } }