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); } } } }
public bool CompareDebugObj(DebugObjModel first, DebugObjModel second) { if (first.ID == second.ID) { if (first.Index == second.Index) { return(true); } } return(false); }
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"); } }
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"); } }
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); } } } }