Exemplo n.º 1
0
        public bool Save(bool FOUND, bool Quantum, FormRefrigtz Curent, ref bool LoadTree, bool MovementsAStarGreedyHuristicFound, bool IInoreSelfObjects, bool UsePenaltyRegardMechnisam, bool BestMovments, bool PredictHuristic, bool OnlySelf, bool AStarGreedyHuristic, bool ArrangmentsChanged)
        {
            /*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 && AStarGreedyHuristic)
             *  AllDrawKind = 4;
             * else
             *                                   if ((!UsePenaltyRegardMechnisam) && AStarGreedyHuristic)
             *  AllDrawKind = 3;
             * if (UsePenaltyRegardMechnisam && (!AStarGreedyHuristic))
             *  AllDrawKind = 2;
             * if ((!UsePenaltyRegardMechnisam) && (!AStarGreedyHuristic))
             *  AllDrawKind = 1;
             * //Set Configuration To True for some unknown reason!.
             * //UpdateConfigurationTableVal = true;
             * SetAllDrawKindString();
             */
            try
            {
                if (!File.Exists(AllDrawKindString))
                {
                    GalleryStudio.RefregizMemmory rt = new GalleryStudio.RefregizMemmory(MovementsAStarGreedyHuristicFound, IInoreSelfObjects, UsePenaltyRegardMechnisam, BestMovments, PredictHuristic, OnlySelf, AStarGreedyHuristic, ArrangmentsChanged
                                                                                         );
                    if (!Quantum)
                    {
                        if (Curent.Draw != null)
                        {
                            Curent.Draw             = Curent.RootFound();
                            rt.AllDrawCurrentAccess = Curent.Draw;
                            rt.RewriteAllDraw(FormRefrigtz.OrderPlate);
                            RefrigtzDLL.AllDraw.DrawTable = false;
                            Curent.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(FormRefrigtz.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, AStarGreedyHuristic);

                    File.Delete(FormRefrigtz.AllDrawKindString);
                    GalleryStudio.RefregizMemmory rt = new GalleryStudio.RefregizMemmory(MovementsAStarGreedyHuristicFound, IInoreSelfObjects, UsePenaltyRegardMechnisam, BestMovments, PredictHuristic, OnlySelf, AStarGreedyHuristic, ArrangmentsChanged
                                                                                         );
                    //"Universal Root Founding";
                    if (Curent.Draw != null)
                    {
                        Curent.Draw             = Curent.RootFound();
                        rt.AllDrawCurrentAccess = Curent.Draw;
                        rt.RewriteAllDraw(FormRefrigtz.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, AStarGreedyHuristic);
                }
                return(true);
            }
            catch (Exception t)
            {
                Log(t);
                return(false);
            }
        }