erpump.blogg.se

File renamer windows 10
File renamer windows 10





(The undo / redo refers to all the „apply changes“ actions.)įor the undo / redo functionality to work, we need a sort-of double-sided stack structure (something where we can push and pull elements from each side of the list). The app also supports undo / redo functionality. MessageBoxButtons.OK, MessageBoxIcon.Error) MessageBox.Show( " Expected number of filenames is " +į(), " Invalid number of filenames", Private void checkBox1_CheckedChanged( object sender, EventArgs e) To achieve this, I introduced a Dictionary type variable called selections: Highlighted text gets edited, but in order to programatically loop through these highlighted selections, the code must be able to recognize which text exactly is highlighted.

file renamer windows 10

If ( this.DialogResult = DialogResult.OK)įorm.StartPosition = FormStartPosition.Manual Private void Tbx_KeyUp( object sender, KeyEventArgs e) This.FormBorderStyle = FormBorderStyle.None The entered string is confirmed ( OK) by pressing ENTER, and it is rejected ( Cancel) by pressing ESCAPE. It is always shown on current mouse position. The MyInputBox is shown by calling the static method ShowDialog, similar to MessageBox. Selections.Add( new Tuple(startIndex, 0)) įor( int i = 0 i (selections.Item1 +įor the purpose of entering the replacement/insertion string, I have designed a special input box (separate class), which basically consists of only an empty textbox (no surrounding form).

file renamer windows 10

If (selections.Where(x => x.Value.Count > 0).Count() = 0) check if selections are clear - allowed for insert int startIndex Private void ReplaceInsert( string newString, bool replace)







File renamer windows 10