private void initUIdata()
        {
            int         len    = 0;
            TypeChanger tc     = new TypeChanger();
            DrawNumType dnType = DrawNumType.Alphabet;

            len = tc.tcColor.Length;
            for (int i = 0; i < len; i++)
            {
                this.cmbColor.Items.Add(tc.tcColor[i]);
            }
            this.cmbColor.Text = tc.ColorChange(this.Option.fontColor);

            len = tc.DrawNumTypeLength;
            for (int j = 0; j < len; j++)
            {
                this.cmbType.Items.Add((dnType + j).ToString());
            }
            this.cmbType.Text = this.Option.drawNumType.ToString();

            picPreview.Image = this.Option.puzzleImage.image;
            txtDesc_Draw(Option.puzzleImage.name, Option.puzzleImage.boardType, Option.puzzleImage.desc);
            chkNumEnable.Checked = Option.drawNum;
            chkNumEnable_Check();
            cmbType.SelectedIndex = (int)Option.drawNumType;
            cmbColor.Text         = tc.ColorChange(Option.fontColor);

            chkImageHint.Checked = Option.previewHint;
            chkTypeIgnore_Change();
        }
 public BoardOption(PuzzleImage puzzleImage, bool previewHint, bool drawNum, DrawNumType drawNumType, Color fontColor, bool ignoreBoardType)
 {
     this.puzzleImage     = puzzleImage;
     this.previewHint     = previewHint;
     this.drawNum         = drawNum;
     this.drawNumType     = drawNumType;
     this.fontColor       = fontColor;
     this.ignoreBoardType = ignoreBoardType;
 }
 /*
  * public BoardOption()
  * {
  *  this.puzzleImage.boardType = BoardType.Type5x5;
  *  this.puzzleImage.file = "img/Default/#PuzzleTitle#.jpg";
  *  this.puzzleImage.image = Image.FromFile(this.puzzleImage.file);
  *  this.puzzleImage.name = "Project Image";
  *  this.puzzleImage.desc = "한 껨 하셔야죠? ^-^)/";
  *  this.previewHint = true;
  *  this.drawNum = true;
  *  this.drawNumType = DrawNumType.Numeric;
  *  this.fontColor = Color.Black;
  *  this.ignoreBoardType = false;
  * }
  */
 public BoardOption(PuzzleImage puzzleImage)
 {
     this.puzzleImage     = puzzleImage;
     this.previewHint     = true;
     this.drawNum         = true;
     this.drawNumType     = DrawNumType.Numeric;
     this.fontColor       = Color.Black;
     this.ignoreBoardType = false;
 }
        /// <summary>
        /// 열거형 DrawNumType의 요소가 몇개인지 알아보는 메서드 입니다.
        /// </summary>
        /// <returns>int</returns>
        private int DrawNumTypeCount()
        {
            int         n      = 0;
            DrawNumType dnType = DrawNumType.Alphabet;

            do
            {
            } while (!Char.IsNumber((dnType + (n++)).ToString(), 0));
            return(--n);
        }
        /// <summary>
        /// DrawNumType 형태와 연관된 문자열을 DrawNumType 열거형으로 변환 합니다.
        /// </summary>
        /// <param name="str">변환 시킬 문자열</param>
        /// <returns>DrawNumType</returns>
        public DrawNumType DrawNumTypeChange(string str)
        {
            DrawNumType dnt = DrawNumType.Alphabet;

            for (int i = 0; i < DrawNumTypeLength; i++)
            {
                if (str == (dnt + i).ToString())
                {
                    return(dnt + i);
                }
            }
            //MessageBox.Show("하악");
            return(DrawNumType.Numeric);
        }
Example #6
0
        private void option_ini_Creator(string name, string desc, BoardType type,
                                        string file, bool prev, bool draw,
                                        DrawNumType dnTy, string font, bool ibTy)
        {
            StreamWriter sw  = new StreamWriter("option.ini");
            string       str = "//////////////////////////////////////////////////////////////////////////////////\r\n" +
                               "//                               오호라~! Puzzle -_-?                           //\r\n" +
                               "//                                    설정 파일                                 //\r\n" +
                               "//////////////////////////////////////////////////////////////////////////////////\r\n" +
                               "//                                                                              //\r\n" +
                               "//          :::: 경고 ::::                                                      //\r\n" +
                               "//   ※함부로 수정하면 에러날 가능성 99.999999.. (하악)% 씩이나 된답니다 ^-^)b  //\r\n" +
                               "//     잘 못 건드려서 맛이가면 새로 설치해 주시는 Sense~!!                      //\r\n" +
                               "//                                                                              //\r\n" +
                               "//////////////////////////////////////////////////////////////////////////////////\r\n" +
                               "//\r\n" +
                               "//\r\n" +
                               "PuzzleImage\r\n" +
                               "{\r\n" +
                               "   name=" + name + "\r\n" +
                               "   desc=" + desc + "\r\n" +
                               "   Type=" + type + "\r\n" +
                               "   file=" + file + "\r\n" +
                               "}\r\n" +
                               "BoardOption\r\n" +
                               "{\r\n" +
                               "   prev=" + prev + "\r\n" +
                               "   draw=" + draw + "\r\n" +
                               "   dTyp=" + dnTy + "\r\n" +
                               "   font=" + font + "\r\n" +
                               "   igno=" + ibTy + "\r\n" +
                               "}";

            sw.Write(str);
            sw.Close();
        }