Beispiel #1
0
        /// <summary>
        /// List 에 아이템을 추가하는 함수
        /// </summary>
        /// <param name="box"> Item을 가져올 textbox</param>
        /// <param name="List">List 박스</param>
        /// <param name="RealList">실제 리스트</param>
        private void HandleAddItemToList(TextBox box, ListBox List, List <Spot> RealList)
        {
            if (box.Text == null)
            {
                return;
            }
            string StringItem = box.Text;

            Spot NewSpot = new RobotControllerUI.Spot(StringItem);

            RealList.Add(NewSpot);

            List.DataSource = null;
            List.DataSource = RealList;
            box.Text        = null;
        }
        /// <summary>
        /// List 에 아이템을 추가하는 함수
        /// </summary>
        /// <param name="box"> Item을 가져올 textbox</param>
        /// <param name="List">List 박스</param>
        /// <param name="RealList">실제 리스트</param>
        private void HandleAddItemToList(TextBox box, ListBox List, List<Spot> RealList)
        {
            if (box.Text == null) return;
            string StringItem = box.Text;

            Spot NewSpot = new RobotControllerUI.Spot(StringItem);

            RealList.Add(NewSpot);

            List.DataSource = null;
            List.DataSource = RealList;
            box.Text = null;
        }