private void button20_Click(object sender, EventArgs e) { using (SaveFileDialog dlg = new SaveFileDialog()) { dlg.Filter = "Smart Layout Document(*.gxd)|*.gxd"; if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { _host.SaveAsDocument(dlg.FileName); } } }
public override void Execute() { ILayoutViewer viewer = _smartSession.SmartWindowManager.ActiveViewer as ILayoutViewer; if (viewer == null) { return; } ILayoutHost host = viewer.LayoutHost; if (host == null) { return; } using (SaveFileDialog dlg = new SaveFileDialog()) { dlg.Filter = "Smart Theme Document(*.gxd)|*.gxd"; if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { host.SaveAsDocument(dlg.FileName); } } }