public void AddCmd(ViewportCmd c) { mutex.WaitOne(); if (form == null) { return; } try { form.AddCmd(c); } finally { mutex.ReleaseMutex(); } }