private CircleWindow OpenNewCircleWindow(string fileName, string circleId, Circle circle) { CircleWindow cw = new CircleWindow(circleId, circle, fileName, true); circleWindows.Add(circleId, cw); cw.MdiParent = mainWindow; cw.Show(); cw.Closing += (sender, closingEvent) => { if (OnCircleWindowClose(cw.Id)) { closingEvent.Cancel = true; } }; return(cw); }
private CircleWindow CreateNewCircleWindow() { string circleId = string.Format("Circle_{0}", (circleWindows.Count + 1)); CircleWindow cw = new CircleWindow(circleId); circleWindows.Add(circleId, cw); cw.MdiParent = mainWindow; cw.Show(); cw.Closing += (sender, closingEvent) => { if (OnCircleWindowClose(cw.Id)) { closingEvent.Cancel = true; } }; return(cw); }