public NameFormater(FilesystemUtils filesystemUtils) { InitializeComponent(); FormatBefore = Format = textBox1.Text = "%user% - %title% %quality%"; Init(); }
public void RenameFiles() { FilesystemUtils.RenameFilesFromDirectory(this.Directory); this.GetFilenamesFromDirectory(); }
/// <summary> /// Assume Replace illegal characters to make it a nice preview. No need to make it based on the current option /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void textBox1_TextChanged(object sender, EventArgs e) { textBox2.Text = FilesystemUtils.BuildName(textBox1.Text, track_sample, true); }
private string GetStateFilePath(string dataFlowName) { var stateDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location) ?? throw new InvalidOperationException(); return(Path.Combine(stateDirectory, "State", FilesystemUtils.CoerceValidFileName(dataFlowName + ".state"))); }