public void CloseProblemForm(FPSItem fpsItem) { if (ProblemFormDic.ContainsKey(fpsItem) && !ProblemFormDic[fpsItem].IsDisposed) { ProblemFormDic[fpsItem].Close(); } }
public void CreatePorblemForm(FPSItem fpsItem) { if (!ProblemFormDic.ContainsKey(fpsItem) || ProblemFormDic[fpsItem].IsDisposed) { ProblemFormDic[fpsItem] = new ProblemForm(fpsItem); ProblemFormDic[fpsItem].Show(); } else { ProblemFormDic[fpsItem].Focus(); } }