示例#1
0
 void Logs(string text)
 {
     SolutionPanel.PrintTextInLogs(text);
     if (isLogsNeed)
     {
         SolutionPanel.PrintTextInFile(text);
     }
 }
示例#2
0
 //解析事件
 private static void solution_MouseClick(string s, string solutionPath)
 {
     MessageBox.Show(s);
     if (solutionPath != "")
     {
         SolutionPanel f = new SolutionPanel(solutionPath);
         f.Show();
     }
 }
示例#3
0
 void SetupReset()
 {
     SolutionPanel.GraphicButtonHandler = resetdelegate;
     void resetdelegate()
     {
         ResetBools();
         DihtomiaPanel.ToDefault();
         ModMetPanel.ToDefault();
         FunctionPanel.ToDefault();
         SolutionPanel.ToDefault();
     }
 }
 public void showSolution()
 {
     if (solutionPaletteSet == null)
     {
         solutionPaletteSet = new PaletteSet("解决方法", new System.Guid("D61D0875-A507-4b73-8B5F-9233FF399585"));
     }
     while (solutionPaletteSet.Count > 0)
     {
         solutionPaletteSet.Remove(0);
     }
     solutionPanel = new SolutionPanel();
     //solutionPaletteSet.Location = new System.Drawing.Point(20, 20);
     solutionPaletteSet.AddVisual("SolutionPanel", solutionPanel);
     solutionPaletteSet.DockEnabled = DockSides.Bottom;
     solutionPanel.Height           = 41;
     solutionPaletteSet.Visible     = true;
 }
示例#5
0
 void SetupFunctionParams()
 {
     FunctionPanel.FunctionGetParams += FunctionPanel_FunctionGetParams;
     void FunctionPanel_FunctionGetParams(OptimizingFunction func, LipzitsFunction lipz, List <double> lowerBound, List <double> upperBound)
     {
         if (isWorkNotStarted)
         {
             isWorkNotStarted = false;
             if (isDihtomiaCurrentMethod)
             {
                 SolutionPanel.PrintTextInLogs("Метод неравномерных покрытий использующий принцип дихтомии");
                 ModMetPanel.Enabled = false;
             }
             else
             {
                 SolutionPanel.PrintTextInLogs("Метод неравномерных покрытий модификация Н.К.Арутюновой");
                 DihtomiaPanel.Enabled = false;
             }
         }
         if (currentMethodSettings == null)
         {
             if (isDihtomiaCurrentMethod)
             {
                 currentMethodSettings = new DihtomiaParams();
             }
             else
             {
                 currentMethodSettings = new ModificatedParams();
             }
         }
         currentMethodSettings.Function   = func;
         currentMethodSettings.Lipzits    = lipz;
         currentMethodSettings.LowerPoint = lowerBound;
         currentMethodSettings.UpperPoint = upperBound;
         Logs($"Первая точка начальной области-[{string.Join(", ",lowerBound)}] \nВторая-[{string.Join(", ", upperBound)}]");
         this.isFuncParams = true;
         AllReady();
     }
 }