コード例 #1
0
        private void moveProductTitle(MoveLabel move)
        {
            switch (move)
            {
            case MoveLabel.Right:
                lblProductName.Location = new Point(47, 11);
                lblProductDesc.Location = new Point(176, 13);
                break;

            case MoveLabel.Left:
                lblProductName.Location = new Point(12, 11);
                lblProductDesc.Location = new Point(139, 13);
                break;
            }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: KimWoongwon/2A_TOTAL
        //public void GameLogicEvent(object sender, EventArgs e)
        //{
        //    int val = m_CreateLabelTimer.Interval - 300;
        //    if(val <= 500)
        //    {
        //        val = 500;
        //    }
        //    m_CreateLabelTimer.Stop();
        //    m_CreateLabelTimer.Interval = val;

        //    m_CreateLabelTimer.Start();
        //}
        public void CreateLabelEvent(object sender, EventArgs e)
        {
            MoveLabel temp      = new MoveLabel(2);
            string    templabel = RandomString.GetI.GetRandomString(E_LEVEL.Nomal);
            int       widthPos  = rand.Next(0, Size.Width - (templabel.Length * 15));

            temp.label          = new Label();
            temp.label.AutoSize = true;
            temp.label.Location = new Point(widthPos, 0);
            temp.label.Name     = templabel;
            temp.label.Size     = new Size(38, 12);
            temp.label.TabIndex = 0;
            temp.label.Text     = templabel;
            Controls.Add(temp.label);
            LabelList.Add(temp);
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: KimWoongwon/2A_TOTAL
        private void textBox1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                string temp = textBox1.Text;
                textBox1.Text = "";

                MoveLabel ll = LabelList.Find((obj) => { return(obj.label.Text == temp); });
                if (ll != null)
                {
                    RemoveLavel(ll);
                    //ll.label.Dispose();
                    //LabelList.Remove(ll);
                }

                // < 2 >

                /*int removeidx = -1;
                 * for (int i = 0; i < LabelList.Count; i++)
                 * {
                 *  if (LabelList[i].label.Text.Contains(temp))
                 *  {
                 *      removeidx = i;
                 *      break;
                 *  }
                 * }
                 * if(removeidx >0)
                 * {
                 *  LabelList[removeidx].label.Dispose();
                 *  LabelList.RemoveAt(removeidx);
                 * }*/

                // < 1 >

                /*for (int i = LabelList.Count - 1; i >= 0; i--)
                 * {
                 *  if (LabelList[i].label.Text.Contains(temp))
                 *  {
                 *      LabelList[i].label.Dispose();
                 *      LabelList.RemoveAt(i);
                 *  }
                 * }*/
            }
        }
コード例 #4
0
 void Write(MoveLabel exp)
 {
     Out.Write('\t');
     Out.WriteLine("la " + GetColor(exp.Dst) + ", " + exp.Src.Lab);
 }
コード例 #5
0
 void print(MoveLabel exp)
 {
     Out.WriteLine("MoveLabel " + exp.Dst + ' ' + exp.Src.Lab);
 }
コード例 #6
0
ファイル: Form1.cs プロジェクト: KimWoongwon/2A_TOTAL
 public void RemoveLavel(MoveLabel p_label)
 {
     p_label.label.Dispose();
     LabelList.Remove(p_label);
 }