Пример #1
0
 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);
         }
     }
 }
Пример #2
0
        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);
                }
            }
        }