Exemplo n.º 1
0
        private void ComListREG()
        {
            int i, j, k, n;
            int br = 0;

            CommandSet[, ,] CommandListTemp;

            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();
                    }
                }
            }

            //ComList 登録時のツリー構造再構築
            for (i = 0; i < lv_ComNameList.Items.Count; i++)//LIST側
            {
                for (n = 0, br = 0; n < DevListOrg[Common.SelectDev].COM_COUNT; n++)
                {
                    if ((ComList[Common.SelectDev, i].COM_NAME == ComListOrg[Common.SelectDev, n].COM_NAME) || (ComList[Common.SelectDev, i].OLD_NAME == ComListOrg[Common.SelectDev, n].COM_NAME))
                    {
                        for (k = 0; k < ComListOrg[Common.SelectDev, n].COMMAND_COUNT; k++)
                        {
                            CommandList[Common.SelectDev, n, k].CopyTo(CommandListTemp[Common.SelectDev, i, k]);
                            br = 1;
                        }
                        ComList[Common.SelectDev, i].COMMAND_COUNT = ComListOrg[Common.SelectDev, n].COMMAND_COUNT;
                    }
                    if (br == 1) break;
                }
            }
            //

            for (i = 0; i < (int)ConstGui.MAX_COM_ITEMLIST; i++)
            {
                for (n = 0; n < (int)ConstGui.MAX_NR_ITEM_IN_COMMANDLIST; n++)
                {
                    CommandListTemp[Common.SelectDev, i, n].CopyTo(CommandList[Common.SelectDev, i, n]);
                }
            }
        }
Exemplo n.º 2
0
        /** オブジェクトのコピー.
         * @param com コピー先コマンドセットオブジェクト
         */
        public void CopyTo(CommandSet com)
        {
//            com.ARG1 = this.ARG1;
//            com.ARG2 = this.ARG2;
//            com.ARG3 = this.ARG3;
            com.CommandID    = this.CommandID;
            com.REPEAT_CNT   = this.REPEAT_CNT;
            com.PROPERTY     = this.PROPERTY;
            com.AUX_DATA     = this.AUX_DATA;
            com.CONSTANT     = this.CONSTANT;
            com.OUT_CNT      = this.OUT_CNT;
            com.ARG_BASE     = this.ARG_BASE;
            com.ARG_NUM      = this.ARG_NUM;
            com.ARG_DIV      = this.ARG_DIV;
            com.ARG_ADD      = this.ARG_ADD;
            com.ARG_UPPERBIT = this.ARG_UPPERBIT;
            com.ARG_LOWERBIT = this.ARG_LOWERBIT;
            com.ARG_HW       = this.ARG_HW;
            com.ARG_DELAY    = this.ARG_DELAY;
            com.COMMENT      = this.COMMENT;
        }
Exemplo n.º 3
0
        //ツリー再構築
        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]);
                    }
                }
            }
        }
Exemplo n.º 4
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(CommandSet com)
 {
     //            com.ARG1 = this.ARG1;
     //            com.ARG2 = this.ARG2;
     //            com.ARG3 = this.ARG3;
     com.CommandID = this.CommandID;
     com.REPEAT_CNT = this.REPEAT_CNT;
     com.PROPERTY=this.PROPERTY;
     com.AUX_DATA=this.AUX_DATA;
     com.CONSTANT = this.CONSTANT;
     com.OUT_CNT=this.OUT_CNT;
     com.ARG_BASE=this.ARG_BASE;
     com.ARG_NUM=this.ARG_NUM;
     com.ARG_DIV=this.ARG_DIV;
     com.ARG_ADD=this.ARG_ADD;
     com.ARG_UPPERBIT=this.ARG_UPPERBIT;
     com.ARG_LOWERBIT=this.ARG_LOWERBIT;
     com.ARG_HW=this.ARG_HW;
     com.ARG_DELAY=this.ARG_DELAY;
     com.COMMENT = this.COMMENT;
 }