void saveMenu_Click(object sender, EventArgs e) { Layer layer = (Layer)layerTree.SelectedNode.Tag; SaveFileDialog saveDialog = new SaveFileDialog(); saveDialog.Filter = Language.GetLocalizedText(993, "WorldWide Telescope Layer File(*.wwtl)") + "|*.wwtl"; saveDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); saveDialog.AddExtension = true; saveDialog.DefaultExt = ".wwtl"; saveDialog.FileName = layer.Name + ".wwtl"; if (saveDialog.ShowDialog() == DialogResult.OK) { // Todo add dialog for dynamic content options. LayerContainer layers = new LayerContainer(); layers.SoloGuid = layer.ID; layers.SaveToFile(saveDialog.FileName); layers.Dispose(); GC.SuppressFinalize(layers); } }
void publishMenu_Click(object sender, EventArgs e) { if (Earth3d.IsLoggedIn) { Layer target = (Layer)layerTree.SelectedNode.Tag; string name = target.Name + ".wwtl"; string filename = Path.GetTempFileName(); LayerContainer layers = new LayerContainer(); layers.SoloGuid = target.ID; layers.SaveToFile(filename); layers.Dispose(); GC.SuppressFinalize(layers); EOCalls.InvokePublishFile(filename, name); File.Delete(filename); Earth3d.RefreshCommunity(); } }
void publishLayers_Click(object sender, EventArgs e) { if (Earth3d.IsLoggedIn) { var target = (LayerMap)layerTree.SelectedNode.Tag; var name = target.Name + ".wwtl"; var filename = Path.GetTempFileName(); var layers = new LayerContainer(); layers.TopLevel = target.Name; layers.SaveToFile(filename); layers.Dispose(); GC.SuppressFinalize(layers); EOCalls.InvokePublishFile(filename, name); File.Delete(filename); Earth3d.RefreshCommunity(); } }
void SaveLayers_Click(object sender, EventArgs e) { var target = (LayerMap)layerTree.SelectedNode.Tag; var saveDialog = new SaveFileDialog(); saveDialog.Filter = Language.GetLocalizedText(992, "WorldWide Telescope Layer File") + "(*.wwtl)|*.wwtl"; saveDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); saveDialog.AddExtension = true; saveDialog.DefaultExt = ".wwtl"; saveDialog.FileName = target.Name + ".wwtl"; if (saveDialog.ShowDialog() == DialogResult.OK) { // Todo add dialog for dynamic content options. var layers = new LayerContainer(); layers.TopLevel = target.Name; layers.SaveToFile(saveDialog.FileName); layers.Dispose(); GC.SuppressFinalize(layers); } }
private static void SaveLayerSyncFile() { LayerContainer layers = new LayerContainer(); layers.SaveToFile(Properties.Settings.Default.CahceDirectory + "\\layerSync.layers"); layers.Dispose(); GC.SuppressFinalize(layers); }