public void WhenCallingSortWillReturnAnEnumerable()
        {
            var bubbler   = new Bubbler();
            var testArray = new int[] { 5, 6, 7 };

            var result = bubbler.Sort(testArray);

            result.ShouldNotBeNull();
        }
        public void WhenCallingSortWithThreeStringsReturnsInCorrectOrder()
        {
            var bubbler       = new Bubbler();
            var expectedArray = new[] { "AAA", "BBB", "CCC" };

            var result = bubbler.Sort("CCC", "AAA", "BBB");

            result.ShouldBe(expectedArray);
        }
        public void WhenCallingSortWithTwoLettersReturnsInCorrectOrder()
        {
            var bubbler       = new Bubbler();
            var expectedArray = new [] { 'A', 'a' };

            var result = bubbler.Sort('a', 'A');

            result.ShouldBe(expectedArray);
        }
        public void WhenCallingSortWithEightNumbersReturnsInCorrectOrder()
        {
            var bubbler       = new Bubbler();
            var expectedArray = new int[] { 1, 2, 3, 4, 5, 6, 7, 8 };

            var result = bubbler.Sort(4, 3, 5, 8, 1, 2, 7, 6);

            result.ShouldBe(expectedArray);
        }
        public void WhenCallingSortWithFourNumbersReturnsInCorrectOrder()
        {
            var bubbler       = new Bubbler();
            var expectedArray = new int[] { 1, 2, 3, 4 };

            var result = bubbler.Sort(4, 3, 1, 2);

            result.ShouldBe(expectedArray);
        }
        public void WhenCallingSortWithThreeNumbersReturnsInCorrectOrder()
        {
            var bubbler       = new Bubbler();
            var expectedArray = new int[] { 5, 7, 8 };

            var result = bubbler.Sort(7, 5, 8);

            result.ShouldBe(expectedArray);
        }
Exemplo n.º 7
0
        private void dGV2_CellEndEdit(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex != 6)
            {
                return;
            }
            string  sName = dGV2.Rows[e.RowIndex].Cells[1].Value.ToString();
            Bubbler nbub  = null;

            for (int i = 0; i < frmMain.staComm.nBubbler.BubblerList.Count; i++)
            {
                if (frmMain.staComm.nBubbler.BubblerList[i].Name == sName)
                {
                    nbub = frmMain.staComm.nBubbler.BubblerList[i];
                    break;
                }
            }
            if (nbub == null)
            {
                return;
            }
            try
            {
                int index = Convert.ToInt32(dGV2.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString());
                foreach (CStation nSta in frmMain.staComm.ListStation)
                {
                    if (nSta.Driver == "恒温槽")
                    {
                        if (nSta.Address64 == index)
                        {
                            nbub.RE215 = nSta.Name;
                            dGV2.Rows[e.RowIndex].Cells[6].Value = nbub.RE215;
                            return;
                        }
                    }
                }
                dGV2.Rows[e.RowIndex].Cells[6].Value = nbub.RE215;
            }
            catch (Exception ex)
            {
                dGV2.Rows[e.RowIndex].Cells[6].Value = nbub.RE215;
            }
        }
Exemplo n.º 8
0
 private void FillGrid2()//源瓶
 {
     dGV2.RowCount = frmMain.staComm.nBubbler.BubblerList.Count;
     for (int i = 0; i < frmMain.staComm.nBubbler.BubblerList.Count; i++)
     {
         Bubbler nbub = frmMain.staComm.nBubbler.BubblerList[i];
         dGV2.Rows[i].Cells[0].Value  = nbub.ID;          //	源瓶编号
         dGV2.Rows[i].Cells[1].Value  = nbub.Name;        //	源瓶名称
         dGV2.Rows[i].Cells[2].Value  = nbub.Type;        //	种类
         dGV2.Rows[i].Cells[3].Value  = nbub.PC;          //	PC(torr)
         dGV2.Rows[i].Cells[4].Value  = nbub.Ramp;        //	改变速率(s)
         dGV2.Rows[i].Cells[5].Value  = nbub.MinVentTime; //	最小Vent时间
         dGV2.Rows[i].Cells[6].Value  = nbub.RE215;       //	恒温槽
         dGV2.Rows[i].Cells[7].Value  = nbub.DesiredTemp; //	设定温度(℃)
         dGV2.Rows[i].Cells[8].Value  = nbub.BathTemp;    //	恒温槽温度(℃)
         dGV2.Rows[i].Cells[9].Value  = nbub.sWeight;     //	源瓶重量
         dGV2.Rows[i].Cells[10].Value = nbub.sUseWeight;  //	源瓶重量
         dGV2.Rows[i].Cells[11].Value = nbub.sPMO;        //	PMO
     }
 }
Exemplo n.º 9
0
 private static void Postfix(LogEntry entry) => Bubbler.Add(entry, true);
Exemplo n.º 10
0
 private void btnHighscores_Click(object sender, RoutedEventArgs e)
 {
     Bubbler.ShowHighscores();
 }
Exemplo n.º 11
0
 private void btnUndo_Click(object sender, RoutedEventArgs e)
 {
     Bubbler.Undo();
 }
Exemplo n.º 12
0
 private void btnNew_Click(object sender, RoutedEventArgs e)
 {
     Bubbler.NewGame();
 }
 private static void Postfix() => Bubbler.Draw();
Exemplo n.º 14
0
 private static void Prefix() => Bubbler.Clear();