|
From: <got...@us...> - 2010-02-22 22:48:05
|
Revision: 615
http://scstudio.svn.sourceforge.net/scstudio/?rev=615&view=rev
Author: gotthardp
Date: 2010-02-22 22:47:55 +0000 (Mon, 22 Feb 2010)
Log Message:
-----------
Enhanced Checker configuration to set ChannelMappers.
Implemented Simulator configuration. (Not used yet. To be further integrated.)
Modified Paths:
--------------
trunk/src/view/visio/addon/addon.cpp
trunk/src/view/visio/addon/addon.h
trunk/src/view/visio/addon/dllmodule.rc
trunk/src/view/visio/addon/document.cpp
trunk/src/view/visio/addon/document.h
trunk/src/view/visio/addon/document_check.cpp
trunk/src/view/visio/addon/optionsdlg.cpp
trunk/src/view/visio/addon/optionsdlg.h
trunk/src/view/visio/addon/resource.h
trunk/src/view/visio/addon/scstudio.vcproj
trunk/src/view/visio/scstudio.nsi
Added Paths:
-----------
trunk/src/view/visio/addon/simulatordlg.cpp
trunk/src/view/visio/addon/simulatordlg.h
Modified: trunk/src/view/visio/addon/addon.cpp
===================================================================
--- trunk/src/view/visio/addon/addon.cpp 2010-02-22 16:38:15 UTC (rev 614)
+++ trunk/src/view/visio/addon/addon.cpp 2010-02-22 22:47:55 UTC (rev 615)
@@ -20,6 +20,7 @@
#include "dllmodule.h"
#include "addon.h"
#include "aboutdlg.h"
+#include "SimulatorDlg.h"
#include "optionsdlg.h"
#include "document.h"
#include "extract.h"
@@ -284,12 +285,15 @@
case CDocumentMonitor::MENU_SIMULATION_STOP:
TRACE("CStudioAddon::Run() menu item 'Check--Stop Simulation'");
return pDocumentMonitor->OnMenuSimulationStop(vsoApp);
+ case CDocumentMonitor::MENU_SIMULATOR_OPTIONS:
+ TRACE("CStudioAddon::Run() menu item 'Check--Simulator Options'");
+ return DisplaySimulatorOptions();
case CDocumentMonitor::MENU_VERIFY:
TRACE("CStudioAddon::Run() menu item 'Check--Verify'");
return pDocumentMonitor->OnMenuVerify(vsoApp);
- case CDocumentMonitor::MENU_OPTIONS:
+ case CDocumentMonitor::MENU_CHECK_OPTIONS:
TRACE("CStudioAddon::Run() menu item 'Check--Options'");
- return DisplayOptions();
+ return DisplayCheckOptions();
case CDocumentMonitor::MENU_SELECT_ALL_INSTANCES:
TRACE("CStudioAddon::Run() menu item 'Check--Drawing--Select--All Instances'");
return pDocumentMonitor->OnMenuSelectAllInstances(vsoApp);
@@ -342,9 +346,18 @@
return VAddon::Unload(wParam, p);
}
-VAORC CStudioAddon::DisplayOptions()
+VAORC CStudioAddon::DisplaySimulatorOptions()
{
- TRACE("CStudioAddon::DisplayOptions() called");
+ TRACE("CStudioAddon::DisplaySimulatorOptions() called");
+ CSimulatorDlg dlg;
+
+ dlg.DoModal();
+ return VAORC_SUCCESS;
+}
+
+VAORC CStudioAddon::DisplayCheckOptions()
+{
+ TRACE("CStudioAddon::DisplayCheckOptions() called");
COptionsDlg dlg;
dlg.DoModal();
Modified: trunk/src/view/visio/addon/addon.h
===================================================================
--- trunk/src/view/visio/addon/addon.h 2010-02-22 16:38:15 UTC (rev 614)
+++ trunk/src/view/visio/addon/addon.h 2010-02-22 22:47:55 UTC (rev 615)
@@ -34,7 +34,8 @@
virtual VAORC Run(LPVAOV2LSTRUCT pV2L);
virtual VAORC Unload(WORD wParam, LPVOID p);
- VAORC DisplayOptions();
+ VAORC DisplaySimulatorOptions();
+ VAORC DisplayCheckOptions();
virtual HRESULT HandleVisioEvent(
IUnknown *ipSink, // [in] ipSink [assert]
Modified: trunk/src/view/visio/addon/dllmodule.rc
===================================================================
--- trunk/src/view/visio/addon/dllmodule.rc 2010-02-22 16:38:15 UTC (rev 614)
+++ trunk/src/view/visio/addon/dllmodule.rc 2010-02-22 22:47:55 UTC (rev 615)
@@ -37,26 +37,46 @@
DEFPUSHBUTTON "&OK",IDOK,184,60,50,14
END
-IDD_OPTIONS DIALOGEX 0, 0, 200, 135
+IDD_CHECK_OPTIONS DIALOGEX 0, 0, 200, 159
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Options"
+CAPTION "Verification Options"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,145,14,50,14
PUSHBUTTON "Cancel",IDCANCEL,145,33,50,14
LTEXT "Properties to check",IDC_STATIC,5,5,130,8
CONTROL "",IDC_CHECKLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,5,14,130,90
- LTEXT "Display",IDC_STATIC,5,108,130,8
- COMBOBOX IDC_OUTPUTLEVEL,5,118,130,61,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Use channel for each",IDC_STATIC,5,107,130,8
+ COMBOBOX IDC_CHANNELTYPE,5,116,130,61,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Display",IDC_STATIC,5,133,130,8
+ COMBOBOX IDC_OUTPUTLEVEL,5,142,130,61,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
END
+IDD_SIMULATOR_OPTIONS DIALOGEX 0, 0, 191, 79
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Simulator Options"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ LTEXT "Repetitions",IDC_STATIC,5,16,37,8
+ EDITTEXT IDC_SIM_REPETITIONS,5,25,40,14,ES_AUTOHSCROLL | ES_NUMBER
+ GROUPBOX "Upper limits",IDC_STATIC,52,5,75,69
+ LTEXT "Message delay",IDC_STATIC,61,16,48,8
+ EDITTEXT IDC_SIM_MESSAGE_DELAY,60,25,40,14,ES_AUTOHSCROLL | ES_NUMBER
+ LTEXT "[sec]",IDC_STATIC,102,27,17,8
+ LTEXT "Event step",IDC_STATIC,61,43,36,8
+ EDITTEXT IDC_SIM_EVENT_STEP,60,52,40,14,ES_AUTOHSCROLL | ES_NUMBER
+ LTEXT "[sec]",IDC_STATIC,102,54,17,8
+ DEFPUSHBUTTON "OK",IDOK,136,9,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,136,28,50,14
+END
+
IDD_FIND_FLOW DIALOGEX 0, 0, 275, 111
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Find"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- DEFPUSHBUTTON "Start",IDOK,220,72,50,14
- PUSHBUTTON "Cancel",IDCANCEL,220,92,50,14
+ DEFPUSHBUTTON "Start",IDOK,220,14,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,220,34,50,14
LTEXT "Find flow",IDC_STATIC,5,5,100,8
CONTROL "",IDC_DRAWING1,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_SHOWSELALWAYS | WS_BORDER | WS_HSCROLL | WS_TABSTOP,5,14,100,92
LTEXT "In drawing",IDC_STATIC,110,5,100,8
@@ -145,14 +165,22 @@
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
- IDD_OPTIONS, DIALOG
+ IDD_CHECK_OPTIONS, DIALOG
BEGIN
LEFTMARGIN, 5
RIGHTMARGIN, 195
TOPMARGIN, 5
- BOTTOMMARGIN, 130
+ BOTTOMMARGIN, 154
END
+ IDD_SIMULATOR_OPTIONS, DIALOG
+ BEGIN
+ LEFTMARGIN, 5
+ RIGHTMARGIN, 186
+ TOPMARGIN, 5
+ BOTTOMMARGIN, 74
+ END
+
IDD_FIND_FLOW, DIALOG
BEGIN
LEFTMARGIN, 5
@@ -169,8 +197,10 @@
// Dialog Info
//
-IDD_OPTIONS DLGINIT
+IDD_CHECK_OPTIONS DLGINIT
BEGIN
+ IDC_CHANNELTYPE, 0x403, 3, 0
+0x6464, "\000"
IDC_OUTPUTLEVEL, 0x403, 3, 0
0x6464, "\000"
0
Modified: trunk/src/view/visio/addon/document.cpp
===================================================================
--- trunk/src/view/visio/addon/document.cpp 2010-02-22 16:38:15 UTC (rev 614)
+++ trunk/src/view/visio/addon/document.cpp 2010-02-22 22:47:55 UTC (rev 615)
@@ -24,7 +24,6 @@
#include "extract.h"
#include "visualize.h"
#include "finddlg.h"
-#include "optionsdlg.h"
#include <fstream>
#include "data/msc.h"
@@ -440,6 +439,11 @@
vslIconFile = vslFileName+_T(",5");
m_simulationStopMenuItem->IconFileName(vslIconFile.c_str());
+ Visio::IVMenuItemPtr itemSimulationOptions = menu->MenuItems->Add();
+ itemSimulationOptions->Caption = "Simulator O&ptions...";
+ itemSimulationOptions->AddOnName = ADDON_NAME;
+ itemSimulationOptions->AddOnArgs = stringize() << L"/event=" << MENU_SIMULATOR_OPTIONS;
+
Visio::IVMenuItemPtr itemVerify = menu->MenuItems->Add();
itemVerify->Caption = "&Verify";
itemVerify->AddOnName = ADDON_NAME;
@@ -448,10 +452,10 @@
vslIconFile = vslFileName+_T(",0");
itemVerify->IconFileName(vslIconFile.c_str());
- Visio::IVMenuItemPtr itemOptions = menu->MenuItems->Add();
- itemOptions->Caption = "&Options...";
- itemOptions->AddOnName = ADDON_NAME;
- itemOptions->AddOnArgs = stringize() << L"/event=" << MENU_OPTIONS;
+ Visio::IVMenuItemPtr itemCheckOptions = menu->MenuItems->Add();
+ itemCheckOptions->Caption = "&Options...";
+ itemCheckOptions->AddOnName = ADDON_NAME;
+ itemCheckOptions->AddOnArgs = stringize() << L"/event=" << MENU_CHECK_OPTIONS;
// step 2: create accelerators
// note: the accelerators must be created in this custom menu set
Modified: trunk/src/view/visio/addon/document.h
===================================================================
--- trunk/src/view/visio/addon/document.h 2010-02-22 16:38:15 UTC (rev 614)
+++ trunk/src/view/visio/addon/document.h 2010-02-22 22:47:55 UTC (rev 615)
@@ -55,8 +55,9 @@
MENU_FIND_FLOW,
MENU_SIMULATION_START,
MENU_SIMULATION_STOP,
+ MENU_SIMULATOR_OPTIONS,
MENU_VERIFY,
- MENU_OPTIONS,
+ MENU_CHECK_OPTIONS,
MENU_SELECT_ALL_INSTANCES,
MENU_SELECT_ALL_MESSAGES,
MENU_SELECT_ADD_ALL_INSTANCES,
Modified: trunk/src/view/visio/addon/document_check.cpp
===================================================================
--- trunk/src/view/visio/addon/document_check.cpp 2010-02-22 16:38:15 UTC (rev 614)
+++ trunk/src/view/visio/addon/document_check.cpp 2010-02-22 22:47:55 UTC (rev 615)
@@ -231,6 +231,18 @@
return VAORC_FAILURE;
}
+ DWORD channel_type = GetRegistryDWORD(SCSTUDIO_REGISTRY_ROOT, NULL, _T("ChannelType"), DEFAULT_CHANNEL);
+ switch(channel_type)
+ {
+ case 0:
+ default:
+ m_reportView->Print(RS_REPORT, _T("Use channel for each Sender-Receiver pair."));
+ break;
+ case 1:
+ m_reportView->Print(RS_REPORT, _T("Use channel for each Sender-Receiver-Message pair."));
+ break;
+ }
+
enum OutputLevel
{
OL_ERROR,
@@ -283,7 +295,17 @@
}
}
- SRChannelMapperPtr srm(new SRChannelMapper());
+ ChannelMapperPtr channel_mapper;
+ switch(channel_type)
+ {
+ case 0:
+ default:
+ channel_mapper = SRChannelMapperPtr(new SRChannelMapper());
+ break;
+ case 1:
+ channel_mapper = SRMChannelMapperPtr(new SRMChannelMapper());
+ break;
+ }
std::list<MscPtr> result;
bool result_set = false;
@@ -305,7 +327,7 @@
try
{
- std::list<BMscPtr> bresult = bmsc_checker->check(bmsc, srm);
+ std::list<BMscPtr> bresult = bmsc_checker->check(bmsc, channel_mapper);
for(std::list<BMscPtr>::const_iterator bpos = bresult.begin();
bpos != bresult.end(); bpos++)
@@ -339,7 +361,7 @@
try
{
- std::list<HMscPtr> hresult = hmsc_checker->check(hmsc, srm);
+ std::list<HMscPtr> hresult = hmsc_checker->check(hmsc, channel_mapper);
for(std::list<HMscPtr>::const_iterator hpos = hresult.begin();
hpos != hresult.end(); hpos++)
Modified: trunk/src/view/visio/addon/optionsdlg.cpp
===================================================================
--- trunk/src/view/visio/addon/optionsdlg.cpp 2010-02-22 16:38:15 UTC (rev 614)
+++ trunk/src/view/visio/addon/optionsdlg.cpp 2010-02-22 22:47:55 UTC (rev 615)
@@ -24,7 +24,14 @@
int COptionsDlg::LoadRegistryData()
{
- // (1) load the output level
+ // (1) configuration options
+ // load the channel mapper
+ m_channel_type.InsertString(0, _T("Sender-Receiver pair"));
+ m_channel_type.InsertString(1, _T("Sender-Receiver-Message pair"));
+ DWORD channel_type = GetRegistryDWORD(SCSTUDIO_REGISTRY_ROOT, NULL, _T("ChannelType"), DEFAULT_CHANNEL);
+ m_channel_type.SetCurSel(channel_type);
+
+ // load the output level
m_ouputtype.InsertString(0, _T("Errors only"));
m_ouputtype.InsertString(1, _T("Errors and warnings"));
m_ouputtype.InsertString(2, _T("All results"));
@@ -97,7 +104,9 @@
int COptionsDlg::SaveRegistryData()
{
- // (1) store the output level
+ // (1) store the configuration options
+ DWORD channel_type = m_channel_type.GetCurSel();
+ SetRegistryDWORD(HKEY_CURRENT_USER, SCSTUDIO_REGISTRY_ROOT, _T("ChannelType"), channel_type);
DWORD output_level = m_ouputtype.GetCurSel();
SetRegistryDWORD(HKEY_CURRENT_USER, SCSTUDIO_REGISTRY_ROOT, _T("OutputLevel"), output_level);
Modified: trunk/src/view/visio/addon/optionsdlg.h
===================================================================
--- trunk/src/view/visio/addon/optionsdlg.h 2010-02-22 16:38:15 UTC (rev 614)
+++ trunk/src/view/visio/addon/optionsdlg.h 2010-02-22 22:47:55 UTC (rev 615)
@@ -28,14 +28,16 @@
: public ATL::CDialogImpl<COptionsDlg>, public CWinDataExchange<COptionsDlg>
{
public:
- enum { IDD = IDD_OPTIONS };
+ enum { IDD = IDD_CHECK_OPTIONS };
CListViewCtrl m_checklist;
- CComboBox m_ouputtype;
+ CComboBox m_channel_type;
+ CComboBox m_ouputtype;
protected:
BEGIN_DDX_MAP(COptionsDlg)
- DDX_CONTROL_HANDLE(IDC_CHECKLIST, m_checklist)
- DDX_CONTROL_HANDLE(IDC_OUTPUTLEVEL, m_ouputtype)
+ DDX_CONTROL_HANDLE(IDC_CHECKLIST, m_checklist)
+ DDX_CONTROL_HANDLE(IDC_CHANNELTYPE, m_channel_type)
+ DDX_CONTROL_HANDLE(IDC_OUTPUTLEVEL, m_ouputtype)
END_DDX_MAP()
BEGIN_MSG_MAP(COptionsDlg)
@@ -73,6 +75,7 @@
};
static const DWORD DEFAULT_CHECKER_PRIORITY = 0;
+static const DWORD DEFAULT_CHANNEL = 0;
static const DWORD DEFAULT_OUTPUT_LEVEL = 2;
// $Id$
Modified: trunk/src/view/visio/addon/resource.h
===================================================================
--- trunk/src/view/visio/addon/resource.h 2010-02-22 16:38:15 UTC (rev 614)
+++ trunk/src/view/visio/addon/resource.h 2010-02-22 22:47:55 UTC (rev 615)
@@ -8,14 +8,14 @@
#define IDS_VSL_NAME 102
#define IDS_REPORT_VIEW 103
#define IDD_ABOUTBOX 203
-#define IDD_OPTIONS 204
+#define IDD_FIND_FLOW 204
+#define IDD_CHECK_OPTIONS 205
#define IDC_ABOUT_VERSION 205
#define IDC_CHECKLIST 206
-#define IDD_SEARCH 206
-#define IDD_SEARCH_FLOW 206
-#define IDD_FIND_FLOW 206
+#define IDD_SIMULATOR_OPTIONS 206
#define IDC_OUTPUTLEVEL 207
#define IDC_DRAWING1 208
+#define IDC_CHANNELTYPE 208
#define IDC_DRAWING2 209
#define IDI_ICON_CHECK 209
#define IDI_ICON_FIND_FLOW 210
@@ -23,16 +23,19 @@
#define IDI_ICON_SELECT_MESSAGES 212
#define IDI_ICON_SIMULATION_START 213
#define IDI_ICON_SIMULATION_STOP 214
-#define IDI_ICON_SELECT_ADD_INSTANCES 216
-#define IDI_ICON_SELECT_ADD_MESSAGES 217
+#define IDI_ICON_SELECT_ADD_INSTANCES 215
+#define IDI_ICON_SELECT_ADD_MESSAGES 216
+#define IDC_SIM_MESSAGE_DELAY 218
+#define IDC_SIM_EVENT_STEP 219
+#define IDC_SIM_REPETITIONS 220
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 216
+#define _APS_NEXT_RESOURCE_VALUE 217
#define _APS_NEXT_COMMAND_VALUE 32768
-#define _APS_NEXT_CONTROL_VALUE 209
+#define _APS_NEXT_CONTROL_VALUE 221
#define _APS_NEXT_SYMED_VALUE 105
#endif
#endif
Modified: trunk/src/view/visio/addon/scstudio.vcproj
===================================================================
--- trunk/src/view/visio/addon/scstudio.vcproj 2010-02-22 16:38:15 UTC (rev 614)
+++ trunk/src/view/visio/addon/scstudio.vcproj 2010-02-22 22:47:55 UTC (rev 615)
@@ -344,6 +344,14 @@
>
</File>
<File
+ RelativePath=".\simulatordlg.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\simulatordlg.h"
+ >
+ </File>
+ <File
RelativePath=".\stdafx.cpp"
>
<FileConfiguration
Added: trunk/src/view/visio/addon/simulatordlg.cpp
===================================================================
--- trunk/src/view/visio/addon/simulatordlg.cpp (rev 0)
+++ trunk/src/view/visio/addon/simulatordlg.cpp 2010-02-22 22:47:55 UTC (rev 615)
@@ -0,0 +1,69 @@
+/*
+ * scstudio - Sequence Chart Studio
+ * http://scstudio.sourceforge.net
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * Copyright (c) 2007-2010 Petr Gotthard <pet...@ce...>
+ *
+ * $Id$
+ */
+
+#include "stdafx.h"
+#include "dllmodule.h"
+#include "simulatordlg.h"
+
+LRESULT CSimulatorDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
+{
+ CenterWindow(GetParent());
+
+ LoadRegistryData();
+ DoDataExchange();
+
+ return bHandled = FALSE;
+}
+
+LRESULT CSimulatorDlg::OnCloseCmd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
+{
+ if(wID == IDOK)
+ {
+ DoDataExchange(TRUE);
+ SaveRegistryData();
+ }
+
+ EndDialog(wID);
+ return 0;
+}
+
+int CSimulatorDlg::LoadRegistryData()
+{
+ m_repetitions = GetRegistryDWORD(SCSTUDIO_REGISTRY_ROOT _T("\\Simulator"), NULL,
+ _T("Repetitions"), DEFAULT_SIM_REPETITIONS);
+ m_max_message_delay = GetRegistryDWORD(SCSTUDIO_REGISTRY_ROOT _T("\\Simulator"), NULL,
+ _T("MaxMessageDelay"), DEFAULT_SIM_MESSAGE_DELAY);
+ m_max_event_step = GetRegistryDWORD(SCSTUDIO_REGISTRY_ROOT _T("\\Simulator"), NULL,
+ _T("MaxEventStep"), DEFAULT_SIM_EVENT_STEP);
+
+ return 0;
+}
+
+int CSimulatorDlg::SaveRegistryData()
+{
+ SetRegistryDWORD(HKEY_CURRENT_USER, SCSTUDIO_REGISTRY_ROOT _T("\\Simulator"),
+ _T("Repetitions"), m_repetitions);
+ SetRegistryDWORD(HKEY_CURRENT_USER, SCSTUDIO_REGISTRY_ROOT _T("\\Simulator"),
+ _T("MaxMessageDelay"), m_max_message_delay);
+ SetRegistryDWORD(HKEY_CURRENT_USER, SCSTUDIO_REGISTRY_ROOT _T("\\Simulator"),
+ _T("MaxEventStep"), m_max_event_step);
+
+ return 0;
+}
+
+// $Id$
Property changes on: trunk/src/view/visio/addon/simulatordlg.cpp
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/src/view/visio/addon/simulatordlg.h
===================================================================
--- trunk/src/view/visio/addon/simulatordlg.h (rev 0)
+++ trunk/src/view/visio/addon/simulatordlg.h 2010-02-22 22:47:55 UTC (rev 615)
@@ -0,0 +1,65 @@
+/*
+ * scstudio - Sequence Chart Studio
+ * http://scstudio.sourceforge.net
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * Copyright (c) 2007-2010 Petr Gotthard <pet...@ce...>
+ *
+ * $Id$
+ */
+
+#pragma once
+
+// Include libraries from the Windows Template Library (WTL).
+// http://wtl.sourceforge.net
+#include <atldlgs.h>
+#include <atlctrls.h>
+#include <atlddx.h>
+
+class CSimulatorDlg
+ : public ATL::CDialogImpl<CSimulatorDlg>, public CWinDataExchange<CSimulatorDlg>
+{
+public:
+ enum { IDD = IDD_SIMULATOR_OPTIONS };
+ int m_repetitions;
+ int m_max_message_delay;
+ int m_max_event_step;
+
+protected:
+BEGIN_DDX_MAP(CSimulatorDlg)
+ DDX_INT(IDC_SIM_REPETITIONS, m_repetitions)
+ DDX_INT(IDC_SIM_MESSAGE_DELAY, m_max_message_delay)
+ DDX_INT(IDC_SIM_EVENT_STEP, m_max_event_step)
+END_DDX_MAP()
+
+BEGIN_MSG_MAP(CSimulatorDlg)
+ MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
+ COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
+ COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
+END_MSG_MAP()
+
+// Handler prototypes:
+// LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
+// LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
+// LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled)
+
+ LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
+ LRESULT OnCloseCmd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
+
+ int LoadRegistryData();
+ int SaveRegistryData();
+};
+
+static const DWORD DEFAULT_SIM_REPETITIONS = 1;
+static const DWORD DEFAULT_SIM_MESSAGE_DELAY = 10; // [sec]
+static const DWORD DEFAULT_SIM_EVENT_STEP = 0; // [sec]
+
+// $Id$
Property changes on: trunk/src/view/visio/addon/simulatordlg.h
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Modified: trunk/src/view/visio/scstudio.nsi
===================================================================
--- trunk/src/view/visio/scstudio.nsi 2010-02-22 16:38:15 UTC (rev 614)
+++ trunk/src/view/visio/scstudio.nsi 2010-02-22 22:47:55 UTC (rev 615)
@@ -30,6 +30,7 @@
!define RegMainPath "Software\Sequence Chart Studio"
!define RegModulesPath "Software\Sequence Chart Studio\Modules"
+!define RegSimulatorPath "Software\Sequence Chart Studio\Simulator"
!define RegStencilsPath "Software\Sequence Chart Studio\Stencils"
!define RegChecksPath "Software\Sequence Chart Studio\Checks"
@@ -160,6 +161,7 @@
DeleteRegKey HKCU "${RegMainPath}"
; register modules
WriteRegStr HKCU '${RegMainPath}' 'ModulesPath' '$INSTDIR\bin'
+ WriteRegDWORD HKCU '${RegMainPath}' 'ChannelType' '0'
WriteRegDWORD HKCU '${RegMainPath}' 'OutputLevel' '2'
WriteRegStr HKCU '${RegModulesPath}' 'sc_boundedness' 'scboundedness.dll'
WriteRegStr HKCU '${RegModulesPath}' 'sc_liveness' 'scliveness.dll'
@@ -195,6 +197,10 @@
WriteRegDWORD HKCU '${RegChecksPath}\Beautify' 'InstanceHeadDistance' '5'
WriteRegDWORD HKCU '${RegChecksPath}\Beautify' 'SuccessorDistance' '5'
WriteRegDWORD HKCU '${RegChecksPath}\Beautify' 'SendReceiveDistance' '0'
+ ; configure simulator
+ WriteRegDWORD HKCU '${RegSimulatorPath}' 'Repetitions' '0'
+ WriteRegDWORD HKCU '${RegSimulatorPath}' 'MaxMessageDelay' '10'
+ WriteRegDWORD HKCU '${RegSimulatorPath}' 'MaxEventStep' '1'
; Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|