예제 #1
0
        private void removeDebugOperationCmd()
        {
            if (udID.Data != "" && udIndex.Data != "")
            {
                var data1 = new DebugObjModel
                {
                    ID       = udID.Data,
                    Index    = udIndex.Data,
                    IntFloat = DebugIntFloat,
                    ProgrammerTextBox_Get = new UC_ProgrammerTextBoxViewModel()
                    {
                        IsReadOnly = true
                    },
                    ProgrammerTextBox_Set = new UC_ProgrammerTextBoxViewModel()
                    {
                        IsReadOnly = false
                    },
                };

                for (int i = 0; i < Commands.GetInstance.GenericCommandsGroup["Debug List"].Count; i++)
                {
                    if (CompareDebugObj(data1, Commands.GetInstance.GenericCommandsGroup["Debug List"].ElementAt(i) as DebugObjModel))
                    {
                        Commands.GetInstance.GenericCommandsGroup["Debug List"].RemoveAt(i);
                    }
                }
            }
        }
예제 #2
0
 public bool CompareDebugObj(DebugObjModel first, DebugObjModel second)
 {
     if (first.ID == second.ID)
     {
         if (first.Index == second.Index)
         {
             return(true);
         }
     }
     return(false);
 }
예제 #3
0
 private void addDebugOperationCmd()
 {
     if (udID.Data != "" && udIndex.Data != "")
     {
         var data = new DebugObjModel
         {
             ID       = udID.Data,
             Index    = udIndex.Data,
             IntFloat = DebugIntFloat,
             GetData  = "",
             SetData  = "",
         };
         Commands.GetInstance.addData(typeof(DebugObjModel), data, "Debug List");
     }
 }
예제 #4
0
 private void addDebugOperationCmd()
 {
     if (udID.Data != "" && udIndex.Data != "")
     {
         var data = new DebugObjModel
         {
             ID       = udID.Data,
             Index    = udIndex.Data,
             IntFloat = DebugIntFloat,
             ProgrammerTextBox_Get = new UC_ProgrammerTextBoxViewModel()
             {
                 IsReadOnly = true
             },
             ProgrammerTextBox_Set = new UC_ProgrammerTextBoxViewModel()
             {
                 IsReadOnly = false
             },
         };
         Commands.GetInstance.addData(typeof(DebugObjModel), data, "Debug List");
     }
 }
예제 #5
0
        private void removeDebugOperationCmd()
        {
            if (udID.Data != "" && udIndex.Data != "")
            {
                var data1 = new DebugObjModel
                {
                    ID       = udID.Data,
                    Index    = udIndex.Data,
                    IntFloat = DebugIntFloat,
                    GetData  = "",
                    SetData  = "",
                };

                for (int i = 0; i < Commands.GetInstance.GenericCommandsGroup["Debug List"].Count; i++)
                {
                    if (CompareDebugObj(data1, Commands.GetInstance.GenericCommandsGroup["Debug List"].ElementAt(i) as DebugObjModel))
                    {
                        Commands.GetInstance.GenericCommandsGroup["Debug List"].RemoveAt(i);
                    }
                }
            }
        }