Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristiano Bozza committed Nov 13, 2020
0 parents commit caa9764
Show file tree
Hide file tree
Showing 8,862 changed files with 1,731,713 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file added AxEmuDisplay.ocx
Binary file not shown.
143 changes: 143 additions & 0 deletions BetaBrain/AssistedManualScanning.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
// AssistedManualScanning.cpp : implementation file
//

#include "stdafx.h"
#include "resource.h"
#include "AssistedManualScanning.h"
#include <afxdlgs.h>

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

/////////////////////////////////////////////////////////////////////////////
// CAssistedManualScanning dialog


CAssistedManualScanning::CAssistedManualScanning(ISySalDataIO *iio, ISheetMap *is1,
HWND *phwnd, HSySalHANDLE hstatuschangeevent, CWnd* pParent /*=NULL*/)
: CDialog(CAssistedManualScanning::IDD, pParent), phWnd(phwnd), iIO(iio), iS1(is1),
HStatusChangeEvent(hstatuschangeevent)
{
//{{AFX_DATA_INIT(CAssistedManualScanning)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}


void CAssistedManualScanning::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAssistedManualScanning)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CAssistedManualScanning, CDialog)
//{{AFX_MSG_MAP(CAssistedManualScanning)
ON_BN_CLICKED(IDC_AM_CONVERTEXT, OnConvertExt)
ON_BN_CLICKED(IDC_AM_CONVERTSTG, OnConvertStage)
ON_BN_CLICKED(IDC_AM_GOTOEXT, OnGotoExt)
ON_BN_CLICKED(IDC_AM_GOTOSTG, OnGotoStage)
ON_BN_CLICKED(IDC_AM_INITMAP, OnInitMap)
ON_BN_CLICKED(IDC_AM_LOADCURRENT, OnLoadCurrent)
ON_BN_CLICKED(IDC_AM_STOPSTG, OnStopStage)
//}}AFX_MSG_MAP
ON_MESSAGE(UM_CHANGE_STATUS, OnStatusChange)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CAssistedManualScanning message handlers

void CAssistedManualScanning::OnConvertExt()
{
// TODO: Add your control notification handler code here

}

void CAssistedManualScanning::OnConvertStage()
{
// TODO: Add your control notification handler code here

}

void CAssistedManualScanning::OnGotoExt()
{
// TODO: Add your control notification handler code here

}

void CAssistedManualScanning::OnGotoStage()
{
// TODO: Add your control notification handler code here

}

void CAssistedManualScanning::OnInitMap()
{
// TODO: Add your control notification handler code here
CString MapFile;
GetDlgItem(IDC_AM_INITFILE)->GetWindowText(MapFile);
CFileDialog MyDlg(TRUE, "MAP", MapFile, OFN_EXPLORER | OFN_FILEMUSTEXIST, "Map initialization files|*.MAP|All files|*.*|||", this);
if (MyDlg.DoModal() == IDOK) MapFile = MyDlg.GetPathName();
else MapFile = "";
GetDlgItem(IDC_AM_INITFILE)->SetWindowText(MapFile);
// BYTE *pMapData = 0;
UINT ExtErrInfo;
HRESULT hRes;
/* if (MapFile != "")
{
hRes = iIO->Read((HSySalHANDLE)m_hWnd, (BYTE *)&pMapData, &ExtErrInfo, (UCHAR *)MapFile.GetBuffer(1));
MapFile.ReleaseBuffer();
if (hRes != S_OK)
{
CString MsgString;
MsgString.Format("Can't load map initialization data!\nError code: %08X", ExtErrInfo);
MessageBox(MsgString, "I/O Error");
if (pMapData) CoTaskMemFree(pMapData);
return;
};
};*/
hRes = iS1->Init((BYTE *)MapFile.GetBuffer(1)/*pMapData*/, (HSySalHWND)m_hWnd, HStatusChangeEvent);
MapFile.ReleaseBuffer();
if (hRes != S_OK)
{
// Disable Stage Group
};
// if (pMapData) CoTaskMemFree(pMapData);
}

void CAssistedManualScanning::OnLoadCurrent()
{
// TODO: Add your control notification handler code here

}

void CAssistedManualScanning::OnStopStage()
{
// TODO: Add your control notification handler code here

}

BOOL CAssistedManualScanning::OnInitDialog()
{
CDialog::OnInitDialog();

// TODO: Add extra initialization here
*phWnd = m_hWnd;
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}

LRESULT CAssistedManualScanning::OnStatusChange(WPARAM wParam, LPARAM lParam)
{
if (wParam == SYSAL_ASYNC_STATUS_IDLE)
{
// *phWnd = 0;
EndDialog(UM_CHANGE_STATUS + SYSAL_ASYNC_STATUS_IDLE);
};
return 0;
}
63 changes: 63 additions & 0 deletions BetaBrain/AssistedManualScanning.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#if !defined(AFX_ASSISTEDMANUALSCANNING_H__8758BA8F_A503_4C6C_BD34_F58A2BD54079__INCLUDED_)
#define AFX_ASSISTEDMANUALSCANNING_H__8758BA8F_A503_4C6C_BD34_F58A2BD54079__INCLUDED_

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

#include "..\Common\Connection.h"
#include "..\Common\IO.h"
#include "..\Common\SheetMap.h"
#include "ums.h"

/////////////////////////////////////////////////////////////////////////////
// CAssistedManualScanning dialog

class CAssistedManualScanning : public CDialog
{
// Construction
public:
afx_msg LRESULT OnStatusChange(WPARAM wParam, LPARAM lParam);

CAssistedManualScanning(ISySalDataIO *iio, ISheetMap *is1, HWND *phwnd, HSySalHANDLE hstatuschangeevent, CWnd* pParent = NULL); // standard constructor

// Dialog Data
//{{AFX_DATA(CAssistedManualScanning)
enum { IDD = IDD_ASSISTED_MANUAL_SCANNING };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA


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

// Implementation
protected:
ISySalDataIO *iIO;
ISheetMap *iS1;
HWND * phWnd;
HSySalHANDLE HStatusChangeEvent;
// Generated message map functions
//{{AFX_MSG(CAssistedManualScanning)
afx_msg void OnConvertExt();
afx_msg void OnConvertStage();
afx_msg void OnGotoExt();
afx_msg void OnGotoStage();
afx_msg void OnInitMap();
afx_msg void OnLoadCurrent();
afx_msg void OnStopStage();
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_ASSISTEDMANUALSCANNING_H__8758BA8F_A503_4C6C_BD34_F58A2BD54079__INCLUDED_)
Loading

0 comments on commit caa9764

Please sign in to comment.