public override void Execute() { string fileName; if (!DialogUtils.OpenFile(mainForm, out fileName)) { return; } var data = ReadData(fileName); if (data == null) { return; } var designer = new FormDesign(); designer.MdiParent = mainForm; designer.SetCircuitData(data); mainForm.AddOpenedDesigner(designer); designer.Closed += (sender, args) => mainForm.RemoveOpenedDesigner(designer); designer.IsModified = false; designer.FilePath = fileName; designer.IsFileNameSet = true; designer.Show(); }