Пример #1
0
 public bool TryClose()
 {
     if (!string.IsNullOrEmpty(m_layoutfile))
     {
         layoutSerializer.SaveToFile(m_layoutfile, dockSite);
     }
     return(true);
 }
Пример #2
0
 private void method_2(object sender, RoutedEventArgs e)
 {
     System.Windows.Forms.SaveFileDialog saveFileDialog = new System.Windows.Forms.SaveFileDialog();
     saveFileDialog.Title            = "Save Tool Window Layout";
     saveFileDialog.DefaultExt       = "site";
     saveFileDialog.Filter           = "Dock Site (*.site)|*.site";
     saveFileDialog.RestoreDirectory = true;
     if (saveFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         DockSiteLayoutSerializer dockSiteLayoutSerializer = new DockSiteLayoutSerializer();
         dockSiteLayoutSerializer.SaveToFile(saveFileDialog.FileName, this.dockSite_0);
     }
 }
Пример #3
0
		private void method2(object sender, RoutedEventArgs e)
		{
			System.Windows.Forms.SaveFileDialog saveFileDialog = new System.Windows.Forms.SaveFileDialog();
			saveFileDialog.Title = "Save Tool Window Layout";
			saveFileDialog.DefaultExt = "site";
			saveFileDialog.Filter = "Dock Site (*.site)|*.site";
			saveFileDialog.RestoreDirectory = true;

			if (saveFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
			{
				DockSiteLayoutSerializer dockSiteLayoutSerializer = new DockSiteLayoutSerializer();
				dockSiteLayoutSerializer.SaveToFile(saveFileDialog.FileName, dockSite);
			}
		}