コード例 #1
0
        /// <summary>
        /// 更新配置文件
        /// </summary>
        public void UpdateConfig()
        {
            CodeInfo defaultInfo = new CodeInfo();

            defaultInfo.ClearCode();
            defaultInfo.Url              = "";
            defaultInfo.ImageTemp        = null;
            defaultInfo.CodeCount        = 0;
            defaultInfo.PixelMin         = Convert.ToInt32(textBox3.Text);
            defaultInfo.PixelMax         = Convert.ToInt32(textBox4.Text);
            defaultInfo.IsAutoSelectRect = true;
            defaultInfo.CodeRectangles.Clear();
            defaultInfo.BinaryValues = Enumerable.Repeat((byte)Convert.ToInt32(textBox2.Text), 1).ToArray();

            GlobalCH.LoadCodeInfo(defaultInfo);
        }
コード例 #2
0
        public MainForm()
        {
            InitializeComponent();

            CodeInfo defaultInfo = new CodeInfo();

            defaultInfo.ClearCode();
            defaultInfo.Url              = "";
            defaultInfo.ImageTemp        = null;
            defaultInfo.CodeCount        = 0;
            defaultInfo.RectangleCut     = new Rectangle(0, 0, 100, 100);
            defaultInfo.PixelMin         = 8;
            defaultInfo.PixelMax         = 120;
            defaultInfo.IsAutoSelectRect = true;
            defaultInfo.CodeRectangles.Clear();
            defaultInfo.BinaryValues = Enumerable.Repeat((byte)127, 1).ToArray();

            GlobalCH.LoadCodeInfo(defaultInfo);
        }