Example #1
0
 public int IndexOf(IntTripple intTripple)
 {
     for (int i = 0; i < List.Count; i++)
         if (this[i] == intTripple)    // Found it
             return i;
     return -1;
 }
Example #2
0
 // TODO: If desired, change parameters to Find method to search based on a property of IntTripple.
 public IntTripple Find(IntTripple intTripple)
 {
     foreach (IntTripple intTrippleItem in this)
         if (intTrippleItem == intTripple)    // Found it
             return intTrippleItem;
     return null;    // Not found
 }
Example #3
0
 // TODO: If desired, change parameters to Find method to search based on a property of IntTripple.
 public IntTripple Find(IntTripple intTripple)
 {
     foreach (IntTripple intTrippleItem in this)
     {
         if (intTrippleItem == intTripple)    // Found it
         {
             return(intTrippleItem);
         }
     }
     return(null);    // Not found
 }
Example #4
0
 public int IndexOf(IntTripple intTripple)
 {
     for (int i = 0; i < List.Count; i++)
     {
         if (this[i] == intTripple)    // Found it
         {
             return(i);
         }
     }
     return(-1);
 }
Example #5
0
 // public methods...
 #region Add
 public int Add(IntTripple intTripple)
 {
     return(List.Add(intTripple));
 }
Example #6
0
 // TODO: If you changed the parameters to Find (above), change them here as well.
 public bool Contains(IntTripple intTripple)
 {
     return(Find(intTripple) != null);
 }
Example #7
0
 public void Remove(IntTripple intTripple)
 {
     List.Remove(intTripple);
 }
Example #8
0
 public void Insert(int index, IntTripple intTripple)
 {
     List.Insert(index, intTripple);
 }
Example #9
0
        private void RunContinuationForTripple(IntTripple tripple)
        {
            try
            {
                if (SBML == null || SBML.Length == 0)
                    return;

                string fort8 = AutoResult.NewFort8; //.Replace(" 7 ", " 12 ");
                //string fort7 = AutoResult.NewFort7;

                ResetAuto();

                setupControl1.RunContinuation = true;
                setupControl1.Label = tripple.Value1;

                string originalConfig = setupControl1.CurrentConfig.ToInputString();

                //setupControl1.CurrentConfig.IPS = 2;
                setupControl1.CurrentConfig.IRS = tripple.Value1;
                //setupControl1.CurrentConfig.ILP = 1;

                setupControl1.CurrentConfig.NICP = 2;
                setupControl1.CurrentConfig.ICP.Clear();
                setupControl1.CurrentConfig.ICP.Add(0);
                setupControl1.CurrentConfig.ICP.Add(10);

                //setupControl1.CurrentConfig.NCOL = 4;
                //setupControl1.CurrentConfig.IAD = 3;
                //setupControl1.CurrentConfig.ISP = 1;
                //setupControl1.CurrentConfig.ISW = 1;

                setupControl1.CurrentConfig.MXBF = 10;

                setupControl1.CurrentConfig.NTHL = 1;
                setupControl1.CurrentConfig.THL.Add(new IntDoublePair(10, 0));

                txtConfig.Text = setupControl1.Configuration;

                SetupAuto();

                AutoInterface.setFort2File(txtConfig.Text, txtConfig.Text.Length);

                AutoInterface.setFort3File(fort8, fort8.Length);

                if (setupControl1.CurrentConfig.IPS != 1)
                {
                    if (
                        MessageBox.Show(
                            "Currently only IPS = 1 is supported, any other value will make the library unstable. It is recommendet that you Quit (yes).",
                            "Unsupported Values", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                    {
                        return;
                    }
                }

                AutoInterface.CallAuto();
                string lastMessage = AutoInterface.GetLastMessage();

                //fort7 = fort7 + AutoResult.NewFort7;
                //AutoInterface.setFort7File(fort7, fort7.Length);

                fort8 = fort8 + AutoResult.NewFort8;
                AutoInterface.setFort8File(fort8, fort8.Length);

                CurrentResult = new AutoResult();
                txtResult.Text = CurrentResult.Fort7;

                RemoveWartermark();
                if (CurrentResult.ErrorOccured && CurrentResult.NumPoints < 10)
                {
                    AddWaterMark("Auto\ndid not\nreturn\nresults.");
                }
                else if (CurrentResult.NumPoints < 10)
                {
                    AddWaterMark("Not\nenough\npoints\nreturned.");
                }

                setupControl1.CurrentConfig = AutoInputConstants.FromContent(originalConfig);

                if (!string.IsNullOrEmpty(lastMessage))
                {
                    RemoveWartermark();
                    AddWaterMark(lastMessage);
                    return;
                }

                PlotResults(CurrentResult);

                if (setupControl1.ReloadAfterRun)
                {
                    try
                    {
                        //Simulator.loadSBML(SBML);
                        cmdSendToAuto_Click(this, EventArgs.Empty);
                    }
                    catch (Exception)
                    {
                        //
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "An Error occured while running Auto", MessageBoxButtons.OK,
                                MessageBoxIcon.Error);
            }
        }
Example #10
0
 public void Remove(IntTripple intTripple)
 {
     List.Remove(intTripple);
 }
Example #11
0
 public void Insert(int index, IntTripple intTripple)
 {
     List.Insert(index, intTripple);
 }
Example #12
0
 // TODO: If you changed the parameters to Find (above), change them here as well.
 public bool Contains(IntTripple intTripple)
 {
     return (Find(intTripple) != null);
 }
Example #13
0
 public int Add(IntTripple intTripple)
 {
     return List.Add(intTripple);
 }