private void btnNew_Click(object sender, EventArgs e) { string name = Microsoft.VisualBasic.Interaction.InputBox("Name:"); Frame tmpFrame = new Frame() { BasePath = name }; Directory.CreateDirectory("data/frames/" + name); File.WriteAllText("data/frames/" + name + "/data.xml", tmpFrame.ToXml()); RefreshItems(); }
private void btnCopy_Click(object sender, EventArgs e) { if (lboFrames.SelectedItem == null) { MessageBox.Show("Select an item!"); return; } string name = Microsoft.VisualBasic.Interaction.InputBox("Name:"); string baseName = lboFrames.SelectedItem.ToString(); Frame newFrame = new Frame(baseName) { BasePath = name }; //SqDev.DirectoryCopy("data/frames/" + lboFrames.SelectedItem.ToString(), "data/frames/" + name, true); Directory.CreateDirectory("data/frames/" + newFrame.BasePath); File.WriteAllText("data/frames/" + newFrame.BasePath + "/data.xml", newFrame.ToXml()); RefreshItems(); }
public FrameEditor(string path) { frame = new Frame(path); InitializeComponent(); }