Vlad"s Software Development Toolbox

Thursday, 20 December 2007

Save changes on Cancel? - V1.3

Free Download

EnvMan-1.3.zip EnvMan-source-1.3.zip

Summary

  • BT1828033 Escape to Close
    • Added Ctrl+X Shortcut on Main Form Exit File Menu
  • BT843838 Program does not check for changes on Cancel in Edit Form
    • Added checking for user changes and prompt to save it on Cancel.
  • Added Release version display in Main Form Title bar
  • Added colour change for rows with invalid value paths in Main Form
  • Minor GUI Improvements

Functionality Changes

Main Form in this release is checking if any of the variables have invalid file or directory values. Variables with invalid paths are displayed in red. The current release number of the program is displayed in the title bar and "Ctrl+X" shortcut is added to quickly close application from File menu. In Edit Form if Cancel button is clicked after any changes made to a variable. Message asking to save changes is displayed.

Sunday, 14 October 2007

Input Validation - V1.2.1 - V1.2.2

Free Download

EnvMan-1.2.2.zip EnvMan-source-1.2.2.zip

Summary

Release 1.2.2
  • Fixed problem with Delete button on Edit Form.
  • Removed Setup project. It will be replaced by WiX setup.
Release 1.2.1
  • BT1767453 On value edit Undo Redo not recording. Fixed problems when user does not enter text into value cell.
  • BT1792173 Incorrectly detected Value type. Checking that path string is starts with ":\".
  • BT1806716 ERROR: Grid Cell accepts semi colon. Added validation DataGridView in Edit form.

Functionality Changes

I am providing Release 1.2.2 here as V1.2.1 has a bug with delete button I did not catch before posting. Release V1.2.1 has input validation added to a grid. If Variable Value contains ";" then grid will display and error mark.

Thursday, 11 October 2007

Tip: Running Windows Environment Variables Manager on Vista

To use EnvMan under Vista it should be run with an Administrator privileges. To make it run as Administrator by default open properties of the EnvMan.exe or a shortcut to it.

Select compatibility tab and check "Run this program as an Administrator" check box.

If you want to apply this setting to all users click on "Show settings for all users button" and check "Run this program as an Administrator" check box.

Click OK on every dialog. Now EnvMan.exe will have all the rights to save environment variables. This applies to all versions of the EnvMan.

Wednesday, 3 October 2007

Variable Import/Export - V1.2

Free Download

EnvMan-1.2.zip EnvMan-source-1.2.zip

Summary

  • Implementation of Import/Export variable values functionality (BT1709867)
  • Implementation of Locate/Open in Windows Explorer Edit Form Grid context menu (BT1729869 - Implemented by PRANKENST!EN)
  • Upgraded licence to GPL Version 3

Functionality Changes

Variable Import/Export

There are two new buttons on the top right of the Edit Form. Variable values can now be exported to an *.env XML file and imported on the different computer or user. The only restriction is that you cannot import values from the different variable. If variable name does not match it will not import and will display a message. It is also possible to create new variables using import. Open new variable by clicking "New" on the Main Form and use import button to import values from selected ENV file. Name of the variable will be loaded as well.

All imported values will have a "+" sign on their type icons.

Open in Explorer context menu

New context menu added to a grid in Edit Form. If right click on the path value of the variable and select "Open in Windows Explorer" it will launch Windows Explorer with first valid folder or file selected. If command used on the non-path value then message will be displayed that no valid paths can be selected.

Tuesday, 26 June 2007

Tip: Working with generic SortedList in revers order

It was very interesting, but I could not find any information on how to work with lists like Generic SortedList<> in revers order. In the end all turned out very simple. You need to get a IList<> of keys and use for loop in descending order through that list. Below is a code snippet.

SortedList<int,DgvRowInfo> rowInfoList = null;
...
DgvRowInfo rowInfo;
// walk through the list in revers order
IList<int> keyList = rowInfoList.Keys;
for (int i = keyList.Count - 1; i >= 0; i--)
{
rowInfo = rowInfoList[keyList[i]];
dgvHandler.MoveRow(rowInfo.CurrentRowIndex, rowInfo.NewRowIndex);
}