private void radDock_DockWindowClosing(object sender, DockWindowCancelEventArgs e) { lstSavedLogs.SelectedIndex = -1; if (e.NewWindow.Text.Contains("*")) { RadPageControl pageControl = e.NewWindow.Controls["RadPageControl"] as RadPageControl; if (pageControl != null) { frmSavePath frm = new frmSavePath(pageControl.FilePath) { Text = e.NewWindow.Text }; frm.ShowDialog(); frm.Dispose(); } } }
private void btnSave_Click(object sender, EventArgs e) { if (radDock.ActiveWindow.Text.Contains("*")) { RadPageControl page = radDock.ActiveWindow.Controls["RadPageControl"] as RadPageControl; if (page != null) { frmSavePath frm = new frmSavePath(page.FilePath) { Text = radDock.ActiveWindow.Text }; var result = frm.ShowDialog(); if (result == DialogResult.OK) { radDock.ActiveWindow.Text = frm.Key; radDock.ActiveWindow.Name = frm.Key; lstSavedLogs.Items.Add(new RadListDataItem(frm.Key, SavedLogsLoader.SavedLogsDic[frm.Key])); } frm.Dispose(); } } }