[GME-commit] GMESRC/GME/Gme ParadigmPropertiesDlg.cpp,NONE,1.1 ParadigmPropertiesDlg.h,NONE,1.1 GME.rc,1.121,1.122 GUIObject.cpp,1.45,1.46 GUIObject.h,1.22,1.23 ProjectPropertiesDlg.cpp,1.5,1.6 ProjectPropertiesDlg.h,1.2,1.3 resource.h,1.55,1.56

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Mon Jul 19 11:23:01 CDT 2004


Update of /var/lib/gme/GMESRC/GME/Gme
In directory braindrain:/tmp/cvs-serv3811/GME/Gme

Modified Files:
	GME.rc GUIObject.cpp GUIObject.h ProjectPropertiesDlg.cpp 
	ProjectPropertiesDlg.h resource.h 
Added Files:
	ParadigmPropertiesDlg.cpp ParadigmPropertiesDlg.h 
Log Message:
Enhanced handling of project properties

CVS User: volgy

--- NEW FILE: ParadigmPropertiesDlg.cpp ---
// ParadigmPropertiesDlg.cpp : implementation file
//

#include "stdafx.h"
#include "gme.h"
#include "GMEApp.h"
#include "GMEstd.h"
#include "ParadigmPropertiesDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CParadigmPropertiesDlg dialog


CParadigmPropertiesDlg::CParadigmPropertiesDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CParadigmPropertiesDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CParadigmPropertiesDlg)
	//}}AFX_DATA_INIT
}


void CParadigmPropertiesDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CParadigmPropertiesDlg)
	DDX_Control(pDX, IDC_PARADIGM_VERSION, version);
	DDX_Control(pDX, IDC_PARADIGM_NAME, name);
	DDX_Control(pDX, IDC_PARADIGM_GUID, guid);
	DDX_Control(pDX, IDC_PARADIGM_MODIFIED, modified);
	DDX_Control(pDX, IDC_PARADIGM_CREATED, created);
	DDX_Control(pDX, IDC_PARADIGM_COMMENT, comment);
	DDX_Control(pDX, IDC_PARADIGM_AUTHOR, author);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CParadigmPropertiesDlg, CDialog)
	//{{AFX_MSG_MAP(CParadigmPropertiesDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CParadigmPropertiesDlg message handlers

BOOL CParadigmPropertiesDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	CComObjPtr<IMgaTerritory> terry;
	COMTHROW( theApp.mgaProject->CreateTerritory(NULL, PutOut(terry)) );
	try {
		theApp.mgaProject->BeginTransaction(terry,TRANSACTION_READ_ONLY);
		CComPtr<IMgaMetaProject> metaProject;
		COMTHROW(theApp.mgaProject->get_RootMeta(&metaProject));

		{
			CComBSTR bstr;
			COMTHROW(metaProject->get_Name(&bstr));
			CString str;
			CopyTo(bstr,str);
			name.SetWindowText(str);
		}
		{
			CComBSTR bstr;
			COMTHROW(metaProject->get_Author(&bstr));
			CString str;
			CopyTo(bstr,str);
			author.SetWindowText(str);
		}
		{
			CComBSTR bstr;
			COMTHROW(metaProject->get_Version(&bstr));
			CString str;
			CopyTo(bstr,str);
			version.SetWindowText(str);
		}
		{
			CComBSTR bstr;
			COMTHROW(metaProject->get_CreatedAt(&bstr));
			CString str;
			CopyTo(bstr,str);
			created.SetWindowText(str);
		}
		{
			CComBSTR bstr;
			COMTHROW(metaProject->get_ModifiedAt(&bstr));
			CString str;
			CopyTo(bstr,str);
			modified.SetWindowText(str);
		}
		{
			CComBSTR bstr;
			COMTHROW(metaProject->get_Comment(&bstr));
			CString str;
			CopyTo(bstr,str);
			comment.SetWindowText(str);
		}
		{
			CComVariant vguid;
			COMTHROW(metaProject->get_GUID(&vguid));
			GUID guid1;
			CopyTo(vguid, guid1);
			CComBstrObj bstro;
 			CopyTo(guid1, bstro);
			CString str;
			CopyTo(bstro, str);

			guid.SetWindowText(str);
		}
	
		theApp.mgaProject->CommitTransaction();
	}
	catch(hresult_exception e) {
		theApp.mgaProject->AbortTransaction();
		AfxMessageBox("Error reading paradigm properties");
	}
		
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

--- NEW FILE: ParadigmPropertiesDlg.h ---
#if !defined(AFX_PARADIGMPROPERTIESDLG_H__12D6E035_2A61_47DF_AC05_8BE55A9282FD__INCLUDED_)
#define AFX_PARADIGMPROPERTIESDLG_H__12D6E035_2A61_47DF_AC05_8BE55A9282FD__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ParadigmPropertiesDlg.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CParadigmPropertiesDlg dialog

class CParadigmPropertiesDlg : public CDialog
{
// Construction
public:
	CParadigmPropertiesDlg(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CParadigmPropertiesDlg)
	enum { IDD = IDD_PARADIGMPROPERTIES_DIALOG };
	CEdit	version;
	CEdit	name;
	CEdit	guid;
	CEdit	modified;
	CEdit	created;
	CEdit	comment;
	CEdit	author;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CParadigmPropertiesDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CParadigmPropertiesDlg)
	virtual BOOL OnInitDialog();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_PARADIGMPROPERTIESDLG_H__12D6E035_2A61_47DF_AC05_8BE55A9282FD__INCLUDED_)

Index: GME.rc
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/GME.rc,v
retrieving revision 1.121
retrieving revision 1.122
diff -C2 -d -r1.121 -r1.122
*** GME.rc	2 Jun 2004 22:32:38 -0000	1.121
--- GME.rc	19 Jul 2004 15:22:58 -0000	1.122
***************
*** 545,549 ****
  FONT 10, "MS Sans Serif"
  BEGIN
!     CTEXT           GME_VERSION_STR,IDC_STATIC,11,65,152,8,SS_NOPREFIX
      CTEXT           "Copyright © 2000-2004 Vanderbilt University",IDC_STATIC,
                      10,75,152,8
--- 545,549 ----
  FONT 10, "MS Sans Serif"
  BEGIN
!     CTEXT           "4.5.18",IDC_STATIC,11,65,152,8,SS_NOPREFIX
      CTEXT           "Copyright © 2000-2004 Vanderbilt University",IDC_STATIC,
                      10,75,152,8
***************
*** 624,653 ****
  END
  
! IDD_PROJECTPROPERTIES_DIALOG DIALOG DISCARDABLE  0, 0, 165, 204
  STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  CAPTION "Project Properties"
  FONT 8, "MS Sans Serif"
  BEGIN
!     DEFPUSHBUTTON   "OK",IDOK,15,183,50,14
!     PUSHBUTTON      "Cancel",IDCANCEL,98,183,50,14
!     EDITTEXT        IDC_PROJECT_NAME,50,7,108,14,ES_AUTOHSCROLL
      LTEXT           "Name:",IDC_STATIC,9,10,21,8
!     EDITTEXT        IDC_PROJECT_AUTHOR,50,25,108,14,ES_AUTOHSCROLL
!     LTEXT           "Author",IDC_STATIC,9,28,20,8
!     EDITTEXT        IDC_PROJECT_CREATED,50,43,108,14,ES_AUTOHSCROLL | 
                      ES_READONLY
!     LTEXT           "Created:",IDC_STATIC,9,46,27,8
!     EDITTEXT        IDC_PROJECT_MODIFIED,50,61,108,14,ES_AUTOHSCROLL | 
                      ES_READONLY
!     LTEXT           "Modified:",IDC_STATIC,9,64,29,8
!     EDITTEXT        IDC_PROJECT_COMMENT,50,79,108,52,ES_MULTILINE | 
!                     ES_AUTOHSCROLL
!     LTEXT           "Comment:",IDC_STATIC,9,82,31,8
!     EDITTEXT        IDC_PROJECT_PARADIGM,50,138,108,14,ES_AUTOHSCROLL | 
                      ES_READONLY
!     LTEXT           "Paradigm:",IDC_STATIC,9,141,36,8
!     EDITTEXT        IDC_PROJECT_PARGUID,50,156,108,14,ES_AUTOHSCROLL | 
                      ES_READONLY
!     LTEXT           "Par.GUID:",IDC_STATIC,9,159,37,8
  END
  
--- 624,662 ----
  END
  
! IDD_PROJECTPROPERTIES_DIALOG DIALOG DISCARDABLE  0, 0, 193, 271
  STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  CAPTION "Project Properties"
  FONT 8, "MS Sans Serif"
  BEGIN
!     DEFPUSHBUTTON   "OK",IDOK,25,251,50,14
!     PUSHBUTTON      "Cancel",IDCANCEL,108,251,50,14
!     EDITTEXT        IDC_PROJECT_NAME,50,7,136,14,ES_AUTOHSCROLL
      LTEXT           "Name:",IDC_STATIC,9,10,21,8
!     EDITTEXT        IDC_PROJECT_AUTHOR,50,25,136,14,ES_AUTOHSCROLL
!     LTEXT           "Author:",IDC_STATIC,9,28,29,8
!     EDITTEXT        IDC_PROJECT_CREATED,50,62,136,14,ES_AUTOHSCROLL | 
                      ES_READONLY
!     LTEXT           "Created:",IDC_STATIC,9,65,27,8
!     EDITTEXT        IDC_PROJECT_MODIFIED,50,80,136,14,ES_AUTOHSCROLL | 
                      ES_READONLY
!     LTEXT           "Modified:",IDC_STATIC,9,83,29,8
!     EDITTEXT        IDC_PROJECT_COMMENT,50,98,136,52,ES_MULTILINE | 
!                     ES_AUTOHSCROLL | ES_WANTRETURN
!     LTEXT           "Comment:",IDC_STATIC,9,101,31,8
!     EDITTEXT        IDC_PROJECT_PARADIGM,51,175,136,14,ES_AUTOHSCROLL | 
                      ES_READONLY
!     LTEXT           "Paradigm:",IDC_STATIC,10,178,36,8
!     EDITTEXT        IDC_PROJECT_PARVERSION,51,193,136,14,ES_AUTOHSCROLL | 
                      ES_READONLY
!     LTEXT           "Par.Version:",IDC_STATIC,10,196,37,8
!     EDITTEXT        IDC_PROJECT_PARGUID,51,212,136,14,ES_AUTOHSCROLL | 
!                     ES_READONLY
!     LTEXT           "Par.GUID:",IDC_STATIC,10,214,37,8
!     EDITTEXT        IDC_PROJECT_VERSION,50,44,136,14,ES_AUTOHSCROLL
!     LTEXT           "Version:",IDC_STATIC,9,47,26,8
!     PUSHBUTTON      "Paradigm...",IDC_BUTTON_PARADIGM,135,230,50,14
!     EDITTEXT        IDC_PROJECT_GUID,51,155,136,14,ES_AUTOHSCROLL | 
!                     ES_READONLY
!     LTEXT           "GUID:",IDC_STATIC,10,158,36,8
  END
  
***************
*** 851,854 ****
--- 860,892 ----
  END
  
+ IDD_PARADIGMPROPERTIES_DIALOG DIALOG DISCARDABLE  0, 0, 193, 201
+ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+ CAPTION "Paradigm Properties"
+ FONT 8, "MS Sans Serif"
+ BEGIN
+     DEFPUSHBUTTON   "Close",IDOK,136,180,50,14
+     EDITTEXT        IDC_PARADIGM_NAME,50,7,136,14,ES_AUTOHSCROLL | 
+                     ES_READONLY
+     LTEXT           "Name:",-1,9,10,21,8
+     EDITTEXT        IDC_PARADIGM_AUTHOR,50,25,136,14,ES_AUTOHSCROLL | 
+                     ES_READONLY
+     LTEXT           "Author:",-1,9,28,29,8
+     EDITTEXT        IDC_PARADIGM_CREATED,50,62,136,14,ES_AUTOHSCROLL | 
+                     ES_READONLY
+     LTEXT           "Created:",-1,9,65,27,8
+     EDITTEXT        IDC_PARADIGM_MODIFIED,50,80,136,14,ES_AUTOHSCROLL | 
+                     ES_READONLY
+     LTEXT           "Modified:",-1,9,83,29,8
+     EDITTEXT        IDC_PARADIGM_COMMENT,50,98,136,52,ES_MULTILINE | 
+                     ES_AUTOHSCROLL | ES_READONLY
+     LTEXT           "Comment:",-1,9,101,31,8
+     EDITTEXT        IDC_PARADIGM_GUID,51,155,136,14,ES_AUTOHSCROLL | 
+                     ES_READONLY
+     LTEXT           "GUID:",-1,10,158,37,8
+     EDITTEXT        IDC_PARADIGM_VERSION,50,44,136,14,ES_AUTOHSCROLL | 
+                     ES_READONLY
+     LTEXT           "Version:",-1,9,47,26,8
+ END
+ 
  
  #ifndef _MAC
***************
*** 965,971 ****
      BEGIN
          LEFTMARGIN, 7
!         RIGHTMARGIN, 158
          TOPMARGIN, 7
!         BOTTOMMARGIN, 197
      END
  
--- 1003,1009 ----
      BEGIN
          LEFTMARGIN, 7
!         RIGHTMARGIN, 186
          TOPMARGIN, 7
!         BOTTOMMARGIN, 264
      END
  
***************
*** 1038,1041 ****
--- 1076,1087 ----
          BOTTOMMARGIN, 105
      END
+ 
+     IDD_PARADIGMPROPERTIES_DIALOG, DIALOG
+     BEGIN
+         LEFTMARGIN, 7
+         RIGHTMARGIN, 186
+         TOPMARGIN, 7
+         BOTTOMMARGIN, 194
+     END
  END
  #endif    // APSTUDIO_INVOKED
***************
*** 1317,1322 ****
      ID_FILE_PRINTALL        "Print all models in the document\nPrint All"
      IDC_PRINT_METAFILE      "Print the active document to a Metafile\nPrint to Metafile"
-     ID_EDIT_COPYCLOSURE     "Copy a closure of the selected objects to the Clipboard"
      ID_BUTTON32959          "Toggle Panning Window\nPanning Window"
  END
  
--- 1363,1372 ----
      ID_FILE_PRINTALL        "Print all models in the document\nPrint All"
      IDC_PRINT_METAFILE      "Print the active document to a Metafile\nPrint to Metafile"
      ID_BUTTON32959          "Toggle Panning Window\nPanning Window"
+ END
+ 
+ STRINGTABLE DISCARDABLE 
+ BEGIN
+     ID_EDIT_COPYCLOSURE     "Copy a closure of the selected objects to the Clipboard"
  END
  

Index: GUIObject.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/GUIObject.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** GUIObject.cpp	5 Mar 2004 22:11:54 -0000	1.45
--- GUIObject.cpp	19 Jul 2004 15:22:58 -0000	1.46
***************
*** 99,103 ****
  // Non-virtual methods of CGuiAspect
  ////////////////////////////////////
! CGuiAspect::CGuiAspect(CGuiMetaAspect *meta,CGuiObject *p,int ind,int pind, const CComPtr<IMgaDecorator>& decor) : guiMeta(meta), parent(p), index(ind), parentIndex(pind), decorator(decor)
  {
  	try {
--- 99,103 ----
  // Non-virtual methods of CGuiAspect
  ////////////////////////////////////
! CGuiAspect::CGuiAspect(CGuiMetaAspect *meta,CGuiObject *p,int ind,int pind, const CComPtr<IMgaDecorator>& decor) : guiMeta(meta), parent(p), index(ind), parentIndex(pind), decorator(decor), routerBox(0), routerNameBox(0)
  {
  	try {
***************
*** 144,147 ****
--- 144,166 ----
  
  }
+ 
+ void CGuiAspect::SetLocation(const CRect& location)
+ {
+ 	loc = location; 
+ 	
+ 	try {
+ 		COMTHROW(decorator->SetLocation(location.left, location.top, location.right, location.bottom));
+ 		long sx, sy, ex, ey;
+ 		COMTHROW(decorator->GetLabelLocation(&sx, &sy, &ex, &ey));
+ 		
+ 		sx = min(sx, location.right-1);
+ 		ex = max(ex, location.left+1);
+ 		sy = min(sy, location.bottom-1);
+ 		ey = max(ey, location.top+1);
+ 		nameLoc.SetRect(sx, sy, ex, ey);
+ 	} catch (hresult_exception &) {
+ 			ASSERT(false);
+ 	}
+ }
  ////////////////////////////////////
  // Static methods of CGuiAspect
***************
*** 1499,1511 ****
  	VERIFY(GetCurrentAspect());
  
- 
  	try {
- 
  		COMTHROW(GetCurrentAspect()->GetDecorator()->Draw(pDC->m_hDC));
- 
  	}
  	catch (hresult_exception &) {
  		AfxMessageBox("Error in decorator [method Draw()]");
  	}
  }
  
--- 1518,1544 ----
  	VERIFY(GetCurrentAspect());
  
  	try {
  		COMTHROW(GetCurrentAspect()->GetDecorator()->Draw(pDC->m_hDC));
  	}
  	catch (hresult_exception &) {
  		AfxMessageBox("Error in decorator [method Draw()]");
  	}
+ 
+ #define _ARDEBUG
+ #ifdef _ARDEBUG
+ 	CPen arPen(PS_DOT, 1, 0x000000ff);
+ 	CPen *oldPen = pDC->SelectObject(&arPen);
+ 	pDC->SelectStockObject(HOLLOW_BRUSH);
+ 	//pDC->Rectangle(GetCurrentAspect()->GetLocation());
+ 	//pDC->Rectangle(GetCurrentAspect()->GetNameLocation());
+ 	if (GetRouterBox()) {
+ 		pDC->Rectangle(GetRouterBox()->GetRect());
+ 	}
+ 	if (GetRouterNameBox()) {
+ 		pDC->Rectangle(GetRouterNameBox()->GetRect());
+ 	}
+ 	pDC->SelectObject(oldPen);
+ #endif
+ 
  }
  

Index: GUIObject.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/GUIObject.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** GUIObject.h	7 Feb 2003 15:11:24 -0000	1.22
--- GUIObject.h	19 Jul 2004 15:22:58 -0000	1.23
***************
*** 40,45 ****
  	CArBox *GetRouterBox()							{ return routerBox; }
  	void SetRouterBox(CArBox *rbox)					{ routerBox = rbox; }
  	const CRect& GetLocation()						{ return loc; }
! 	void SetLocation(const CRect& location)			{ loc = location; COMTHROW(decorator->SetLocation(location.left, location.top, location.right, location.bottom));}
  	CComPtr<IMgaDecorator> GetDecorator()			{ return decorator; }
  	int	GetIndex()									{ return index; }
--- 40,49 ----
  	CArBox *GetRouterBox()							{ return routerBox; }
  	void SetRouterBox(CArBox *rbox)					{ routerBox = rbox; }
+ 	CArBox *GetRouterNameBox()						{ return routerNameBox; }
+ 	void SetRouterNameBox(CArBox *rnbox)			{ routerNameBox = rnbox; }
+ 
  	const CRect& GetLocation()						{ return loc; }
! 	const CRect& GetNameLocation()					{ return nameLoc; }
! 	void SetLocation(const CRect& location);
  	CComPtr<IMgaDecorator> GetDecorator()			{ return decorator; }
  	int	GetIndex()									{ return index; }
***************
*** 58,62 ****
--- 62,68 ----
  	unsigned long	features;
  	CRect	loc;
+ 	CRect	nameLoc;
  	CArBox *routerBox;
+ 	CArBox *routerNameBox;
  };
  
***************
*** 196,199 ****
--- 202,206 ----
  	void GetDecoratorStr(CString &str);
  	const CRect& GetLocation(int aspect = -1)			{ aspect = (aspect < 0) ? parentAspect : aspect;  return guiAspects[aspect]->GetLocation(); }
+ 	const CRect& GetNameLocation(int aspect = -1)		{ aspect = (aspect < 0) ? parentAspect : aspect;  return guiAspects[aspect]->GetNameLocation(); }
  	CSize GetSize(int aspect = -1)						{ return GetLocation(aspect).Size(); }
  	CPoint GetCenter()									{ CRect rect = GetLocation(); return rect.CenterPoint();}
***************
*** 210,214 ****
--- 217,223 ----
  	CGuiPort *FindPort(CComPtr<IMgaFCO> mgaFco);
  	CArBox *GetRouterBox()								{ return GetCurrentAspect()->GetRouterBox(); }
+ 	CArBox *GetRouterNameBox()							{ return GetCurrentAspect()->GetRouterNameBox(); }
  	void SetRouterBox(CArBox *rbox)						{ GetCurrentAspect()->SetRouterBox(rbox) ; }
+ 	void SetRouterNameBox(CArBox *rnbox)				{ GetCurrentAspect()->SetRouterNameBox(rnbox) ; }
  	void ReadAllLocations();
  	void WriteLocation(int aspect = -1);

Index: ProjectPropertiesDlg.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/ProjectPropertiesDlg.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ProjectPropertiesDlg.cpp	7 Feb 2003 15:22:47 -0000	1.5
--- ProjectPropertiesDlg.cpp	19 Jul 2004 15:22:58 -0000	1.6
***************
*** 6,9 ****
--- 6,10 ----
  #include "GMEstd.h"
  #include "ProjectPropertiesDlg.h"
+ #include "ParadigmPropertiesDlg.h"
  
  #ifdef _DEBUG
***************
*** 29,32 ****
--- 30,36 ----
  	CDialog::DoDataExchange(pDX);
  	//{{AFX_DATA_MAP(CProjectPropertiesDlg)
+ 	DDX_Control(pDX, IDC_PROJECT_GUID, guid);
+ 	DDX_Control(pDX, IDC_PROJECT_VERSION, version);
+ 	DDX_Control(pDX, IDC_PROJECT_PARVERSION, m_parversion);
  	DDX_Control(pDX, IDC_PROJECT_PARGUID, m_parguid);
  	DDX_Control(pDX, IDC_PROJECT_PARADIGM, m_parname);
***************
*** 42,45 ****
--- 46,50 ----
  BEGIN_MESSAGE_MAP(CProjectPropertiesDlg, CDialog)
  	//{{AFX_MSG_MAP(CProjectPropertiesDlg)
+ 	ON_BN_CLICKED(IDC_BUTTON_PARADIGM, OnButtonParadigm)
  	//}}AFX_MSG_MAP
  END_MESSAGE_MAP()
***************
*** 76,82 ****
--- 81,95 ----
  			CString str;
  			comment.GetWindowText(str);
+ 			str.Replace("\r\n","\n");
  			CopyTo(str,bstr);
  			COMTHROW(theApp.mgaProject->put_Comment(bstr));
  		}
+ 		{
+ 			CComBSTR bstr;
+ 			CString str;
+ 			version.GetWindowText(str);
+ 			CopyTo(str,bstr);
+ 			COMTHROW(theApp.mgaProject->put_Version(bstr));
+ 		}
  		COMTHROW(theApp.mgaProject->CommitTransaction());
  	}
***************
*** 112,115 ****
--- 125,135 ----
  		{
  			CComBSTR bstr;
+ 			COMTHROW(theApp.mgaProject->get_Version(&bstr));
+ 			CString str;
+ 			CopyTo(bstr,str);
+ 			version.SetWindowText(str);
+ 		}
+ 		{
+ 			CComBSTR bstr;
  			COMTHROW(theApp.mgaProject->get_CreateTime(&bstr));
  			CString str;
***************
*** 129,153 ****
  			CString str;
  			CopyTo(bstr,str);
  			comment.SetWindowText(str);
  		}
  		{
! 			CComPtr<IMgaMetaProject> mp;
! 			COMTHROW(theApp.mgaProject->get_RootMeta(&mp));
  			CComBSTR bstr;
! 			COMTHROW(mp->get_Name(&bstr));
  			CString str;
  			CopyTo(bstr,str);
  			m_parname.SetWindowText(str);
! 
  			CComVariant guid;
! 			COMTHROW(mp->get_GUID(&guid));
  			GUID guid1;
  			CopyTo(guid, guid1);
  			CComBstrObj bstro;
   			CopyTo(guid1, bstro);
  			CopyTo(bstro, str);
  
  			m_parguid.SetWindowText(str);
  		}
  		theApp.mgaProject->CommitTransaction();
  	}
--- 149,195 ----
  			CString str;
  			CopyTo(bstr,str);
+ 			str.Replace("\n", "\r\n");
  			comment.SetWindowText(str);
  		}
  		{
! 			CComVariant vguid;
! 			COMTHROW(theApp.mgaProject->get_GUID(&vguid));
! 			GUID guid1;
! 			CopyTo(vguid, guid1);
! 			CComBstrObj bstro;
!  			CopyTo(guid1, bstro);
! 			CString str;
! 			CopyTo(bstro, str);
! 
! 			guid.SetWindowText(str);
! 		}
! 		{
  			CComBSTR bstr;
! 			COMTHROW(theApp.mgaProject->get_MetaName(&bstr));
  			CString str;
  			CopyTo(bstr,str);
  			m_parname.SetWindowText(str);
! 		}
! 		{
! 			CComBSTR bstr;
! 			COMTHROW(theApp.mgaProject->get_MetaVersion(&bstr));
! 			CString str;
! 			CopyTo(bstr,str);
! 			m_parversion.SetWindowText(str);
! 		}
! 		{
  			CComVariant guid;
! 			COMTHROW(theApp.mgaProject->get_MetaGUID(&guid));
  			GUID guid1;
  			CopyTo(guid, guid1);
  			CComBstrObj bstro;
   			CopyTo(guid1, bstro);
+ 			CString str;
  			CopyTo(bstro, str);
  
  			m_parguid.SetWindowText(str);
  		}
+ 
+ 
  		theApp.mgaProject->CommitTransaction();
  	}
***************
*** 159,161 ****
--- 201,209 ----
  	return TRUE;  // return TRUE unless you set the focus to a control
  	              // EXCEPTION: OCX Property Pages should return FALSE
+ }
+ 
+ void CProjectPropertiesDlg::OnButtonParadigm() 
+ {
+ 	CParadigmPropertiesDlg dlg;
+ 	dlg.DoModal();
  }

Index: ProjectPropertiesDlg.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/ProjectPropertiesDlg.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ProjectPropertiesDlg.h	7 Dec 2001 07:26:00 -0000	1.2
--- ProjectPropertiesDlg.h	19 Jul 2004 15:22:58 -0000	1.3
***************
*** 20,23 ****
--- 20,26 ----
  	//{{AFX_DATA(CProjectPropertiesDlg)
  	enum { IDD = IDD_PROJECTPROPERTIES_DIALOG };
+ 	CEdit	guid;
+ 	CEdit	version;
+ 	CEdit	m_parversion;
  	CEdit	m_parguid;
  	CEdit	m_parname;
***************
*** 43,46 ****
--- 46,50 ----
  	virtual void OnOK();
  	virtual BOOL OnInitDialog();
+ 	afx_msg void OnButtonParadigm();
  	//}}AFX_MSG
  	DECLARE_MESSAGE_MAP()

Index: resource.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/resource.h,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** resource.h	2 Jun 2004 22:32:38 -0000	1.55
--- resource.h	19 Jul 2004 15:22:58 -0000	1.56
***************
*** 119,123 ****
--- 119,126 ----
  #define IDC_SELOBJS_LIST                1051
  #define IDC_PROJECT_PARGUID             1051
+ #define IDC_PROJECT_PARVERSION          1052
+ #define IDC_PROJECT_VERSION             1053
  #define IDC_DSTASPECT_LIST              1054
+ #define IDC_PROJECT_GUID                1054
  #define IDC_CURASP1056                  1056
  #define ID_DLLINFO                      1056
***************
*** 140,143 ****
--- 143,155 ----
  #define IDC_COMBO1                      1088
  #define IDC_EDIT1                       1089
+ #define IDC_BUTTON_PARADIGM             1091
+ #define IDC_PARADIGM_NAME               1092
+ #define IDC_PARADIGM_AUTHOR             1093
+ #define IDC_PARADIGM_VERSION            1094
+ #define IDC_PARADIGM_CREATED            1095
+ #define IDC_PARADIGM_MODIFIED           1096
+ #define IDC_PARADIGM_COMMENT            1097
+ #define IDC_PARADIGM_GUID               1098
+ #define IDD_PARADIGMPROPERTIES_DIALOG   1540
  #define ID_CANCEL_EDIT_CNTR             32768
  #define ID_MODE_EDIT                    32769
***************
*** 319,323 ****
  #define _APS_NEXT_RESOURCE_VALUE        208
  #define _APS_NEXT_COMMAND_VALUE         32963
! #define _APS_NEXT_CONTROL_VALUE         1091
  #define _APS_NEXT_SYMED_VALUE           114
  #endif
--- 331,335 ----
  #define _APS_NEXT_RESOURCE_VALUE        208
  #define _APS_NEXT_COMMAND_VALUE         32963
! #define _APS_NEXT_CONTROL_VALUE         1100
  #define _APS_NEXT_SYMED_VALUE           114
  #endif



More information about the GME-commit mailing list