예제 #1
0
        /** オブジェクトのコピー.
         * @param com コピー先コマンドセットオブジェクト
         */
        public void CopyTo(PinSet pin)
        {
            pin.PinName = this.PinName;
            pin.PinNum  = this.PinNum;

            pin.PinID   = this.PinID;
            pin.PinInit = this.PinInit;
            pin.PinC    = this.PinC;
            pin.PinD    = this.PinD;
            pin.PinE    = this.PinE;
            pin.PinF    = this.PinF;
        }
예제 #2
0
파일: Misc.cs 프로젝트: hirakuni45/test
        //ツリー再構築
        private void DevListREG()
        {
            int i = 0, j = 0, k = 0, n = 0;
            int br = 0;
            //            int cnt = 0;

            CommandSet[, ,] CommandListTemp;
            CommandINF[,] ComListTemp;
            PinSet[,] PinListTemp;

            CommandListTemp = new CommandSet[(int)ConstGui.MAX_DEV_ITEMLIST, (int)ConstGui.MAX_COM_ITEMLIST, (int)ConstGui.MAX_NR_ITEM_IN_COMMANDLIST];
            for (i = 0; i < (int)ConstGui.MAX_DEV_ITEMLIST; i++)
            {
                for (j = 0; j < (int)ConstGui.MAX_COM_ITEMLIST; j++)
                {
                    for (k = 0; k < (int)ConstGui.MAX_NR_ITEM_IN_COMMANDLIST; k++)
                    {
                        CommandListTemp[i, j, k] = new CommandSet();
                    }
                }
            }

            PinListTemp = new PinSet[(int)ConstGui.MAX_DEV_ITEMLIST, (int)ConstGui.MAX_PIN_ITEMLIST];
            for (i = 0; i < (int)ConstGui.MAX_DEV_ITEMLIST; i++)
            {
                for (j = 0; j < (int)ConstGui.MAX_PIN_ITEMLIST; j++)
                {
                    PinListTemp[i, j] = new PinSet();
                }
            }

            ComListTemp = new CommandINF[(int)ConstGui.MAX_DEV_ITEMLIST, (int)ConstGui.MAX_COMINF_ITEMLIST];
            for (i = 0; i < (int)ConstGui.MAX_DEV_ITEMLIST; i++)
            {
                for (j = 0; j < (int)ConstGui.MAX_COMINF_ITEMLIST; j++)
                {
                    ComListTemp[i, j] = new CommandINF();
                }
            }

            if (Common.DEVICE_COUNT == 0) goto nn;

            //DevList 登録時のツリー構造再構築
            for (i = 0; i < lv_DevList.Items.Count; i++)
            {
                for (j = 0, br = 0; j < Common.DEVICE_COUNT; j++)
                {
                    for (k = 0; k < DevListOrg[j].PIN_COUNT; k++)
                    {
                        if ((DevList[i].DEV_NAME == DevListOrg[j].DEV_NAME) || (DevList[i].OLD_NAME == DevListOrg[j].DEV_NAME))
                        {
                            br = 1;
                            PinList[j, k].CopyTo(PinListTemp[i, k]);
                        }
                    }
                    if (br == 1)
                    {
                        DevList[i].PIN_COUNT = DevListOrg[j].PIN_COUNT;
                        break;
                    }
                    else DevList[i].PIN_COUNT = 0;
                }
            }
            for (i = 0; i < lv_DevList.Items.Count; i++)
            {
                for (j = 0, br = 0; j < Common.DEVICE_COUNT; j++)
                {
                    for (k = 0; k < DevListOrg[j].COM_COUNT; k++)
                    {
                        if ((DevList[i].DEV_NAME == DevListOrg[j].DEV_NAME) || (DevList[i].OLD_NAME == DevListOrg[j].DEV_NAME))
                        {
                            br = 1;
                            ComListOrg[j, k].CopyTo(ComListTemp[i, k]);
                        }
                    }
                    if (br == 1)
                    {
                        DevList[i].COM_COUNT = DevListOrg[j].COM_COUNT;
                        DevList[i].COM_NUM = DevListOrg[j].COM_NUM;
                        break;
                    }
                    else
                    {
                        DevList[i].COM_COUNT = 0;
                        DevList[i].COM_NUM = "0";
                    }
                }
            }

            for (i = 0; i < lv_DevList.Items.Count; i++)
            {
                for (j = 0, br = 0; j < Common.DEVICE_COUNT; j++)
                {
                    for (k = 0; k < DevListOrg[j].COM_COUNT; k++)
                    {
                        for (n = 0; n < ComListOrg[j, k].COMMAND_COUNT; n++)
                        {
                            if ((DevList[i].DEV_NAME == DevListOrg[j].DEV_NAME) || (DevList[i].OLD_NAME == DevListOrg[j].DEV_NAME))
                            {
                                br = 1;
                                CommandList[j, k, n].CopyTo(CommandListTemp[i, k, n]);
                            }
                        }
                    }
                    if (br == 1) break;
                }
            }
            nn:
            //Temp→Org
            for (i = 0; i < (int)ConstGui.MAX_DEV_ITEMLIST; i++)
            {
                for (k = 0; k < (int)ConstGui.MAX_PIN_ITEMLIST; k++)
                {
                    PinListTemp[i, k].CopyTo(PinList[i, k]);
                }
                for (k = 0; k < (int)ConstGui.MAX_COM_ITEMLIST; k++)
                {
                    ComListTemp[i, k].CopyTo(ComListOrg[i, k]);
                    for (n = 0; n < (int)ConstGui.MAX_NR_ITEM_IN_COMMANDLIST; n++)
                    {
                        CommandListTemp[i, k, n].CopyTo(CommandList[i, k, n]);
                    }
                }
            }
        }
예제 #3
0
        /** �I�u�W�F�N�g�̃R�s�[.
         * @param com �R�s�[��R�}���h�Z�b�g�I�u�W�F�N�g
         */
        public void CopyTo(PinSet pin)
        {
            pin.PinName = this.PinName;
            pin.PinNum = this.PinNum;

            pin.PinID = this.PinID;
            pin.PinInit = this.PinInit;
            pin.PinC = this.PinC;
            pin.PinD = this.PinD;
            pin.PinE = this.PinE;
            pin.PinF = this.PinF;
        }