Overview
The program is based on resources put together with Microsoft Visual
C++, using standard MFC. The project is really a hierarchy of dialogs,
the topmost one being UdicusDlg, the main channel list view dialog.
There was no central design theme applied to the assembly of the dialog
boxes, here is how they are structured by their class name:
- UdicusDlg:
- FileImport
- FileExport
- AlignChannelsDlg
- AlignToDateDlg
- GenerateDialog
The names of the dialogs are descriptive in nature.
Progress Dialog
The progress dialog can and should be used for any operation that can
take any more than a second or for any operation whose length is dependant
on a variable size of input. To use it, #include "ProgressDialog.h",
and use these four functions:
pd_show();
pd_set_text(string& text);
pd_set_percent(int percent);
pd_hide();
pd_show() will create a new instance of the ProgressDialog,
and make it visible. It will fail if there is already an instance of
Progress Dialog created.
pd_hide() will destroy the instance of the current Progress
Dialog, and thereby hide it.
pd_set_text(...) and pd_set_percent(...) can
be used only while an instance of ProgressDialog is created, so you
can only use them between pd_show() and pd_hide() .
Error Dialog
To use the error dialog, #include "ErrorDIalog.h", then use
these lines of code:
set_error(string("oops")); // set the error message
ErrorDlg wd; // create an instance of the ErrorDlg class
int result = wd.DoModal(); // display the dialog.
Once DoModal() returns, the user will either have chosen OK or Quit,
in which case the method returns either IDOK or IDCANCEL respectively.
If the user has chosen Quit (therefore result == IDCANCEL) you should
just call exit(1), otherwise, you can interpret the OK as aborting the
operation and going back to the top dialog, or retrying the last operation.
|