Example #1
0
        public object Clone()
        {
            SinglepassYataoFactoryParam temp = new SinglepassYataoFactoryParam(null);

            temp.EncoderResX = this.encoderResX;
            temp.FlashFreq   = this.flashFreq;
            temp.MbId        = this.boardId;
            temp.ColorBits   = this.colorBits;
            temp.LineGroup   = this.nLineGroup;
            temp.PrintDir    = this.printDir;
            return(temp);
        }
Example #2
0
        private void buttonSetMbId_Click(object sender, System.EventArgs e)
        {
            SinglepassYataoFactoryParam para = new SinglepassYataoFactoryParam(null);

            para.MbId = (int)this.numericUpDown1.Value;
            int ret = this.SetSinglePassYaTaoFactoryParam(para);

            if (ret == 0)
            {
                MessageBox.Show("Failed to set mainboard ID");
            }
            else
            {
                MessageBox.Show("Set the mainboard ID success");
            }
        }
Example #3
0
        private List <int> GetEnumMbID()
        {
            List <int> ret = new List <int>();

            byte[] val     = new byte[Marshal.SizeOf(typeof(SinglepassYataoFactoryParam)) + 2];
            uint   bufsize = (uint)val.Length;

            if (CoreInterface.GetEpsonEP0Cmd(0x7b, val, ref bufsize, 0, 1) != 0)
            {
                byte[] structData = new byte[Marshal.SizeOf(typeof(SinglepassYataoFactoryParam))];
                Buffer.BlockCopy(val, 2, structData, 0, structData.Length);
                SinglepassYataoFactoryParam obj = (SinglepassYataoFactoryParam)PubFunc.BytesToStruct(structData, typeof(SinglepassYataoFactoryParam));

                ret.Add(obj.MbId);
            }

            return(ret);
        }
Example #4
0
        private int SetSinglePassYaTaoFactoryParam(SinglepassYataoFactoryParam param)
        {
            byte[] buf     = PubFunc.StructToBytes(param);
            uint   bufsize = (uint)buf.Length;
            int    ret     = 0;

            //modify by ljp 2014-5-20
            if (listBox1.SelectedIndex < 0)
            {
                ret = CoreInterface.SetEpsonEP0Cmd(0x7b, buf, ref bufsize, 0, 1);
            }
            else
            {
                int mbid = (int)listBox1.Items[listBox1.SelectedIndex];
                ret = CoreInterface.SetEpsonEP0Cmd(0x7b, buf, ref bufsize, 0, 1, mbid);
            }
            return(ret);
        }