static string[] Save(string[] Parameters) { List <string> Output = new List <string>(); if (VirtualRSSFile1 != null) { string FilePathInput = ArrayToString(Parameters, 1); if (FilePathInput == "") { if (FilePath == "") { Output.Add("Error"); Output.Add("There must be a file path!"); } else { VirtualRSSFile1.WriteToFile(FilePath); Output.Add(""); Output.Add("Succesfull write to file: " + FilePath); } } else { VirtualRSSFile1.WriteToFile(FilePathInput); Output.Add(""); Output.Add("Succesfull write to file: " + FilePathInput); } } else { Output.Add("Error"); Output.Add("No projekt open!"); } return(Output.ToArray()); }
private void SaveProjectWithNewFilename(bool SaveModeNewFileName) { SynchronizeToVirtualRSSXmlFile(); if (VirtualFile.Title == "" | VirtualFile.Title == null) { FeedInformation(); } if (SaveModeNewFileName | FilePath == null) { System.Windows.Forms.SaveFileDialog SaveDialog = new SaveFileDialog(); DialogResult ResultSaveDialog = SaveDialog.ShowDialog(); if (ResultSaveDialog == System.Windows.Forms.DialogResult.OK) { FilePath = new System.IO.FileInfo(SaveDialog.FileName); } else { return; } } VirtualFile.LastBuildDate = DateTime.Now.ToUniversalTime().ToString("r"); VirtualFile.WriteToFile(FilePath.ToString()); }
private void SaveProject(object sender, EventArgs EventArguments) { SynchronizeToVirtualRSSXmlFile(sender, EventArguments); VirtualFile.WriteToFile(FilePath); }