Example #1
0
bool GenericHID::CheckDataChanged()
{
    if ( ui.tabWidget == NULL || m_pScene == NULL )
        return true;

    ui.tabWidget->setCurrentIndex(TAB_DESIGN);

    QString s = m_pScene->makeXML();
    if ( s != m_sLastFileContents )
    {
        QMessageBox::StandardButton nRet = QMessageBox::warning( this, "Save Changes?", "Do you wish to save changes first?", QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel );
        if ( nRet == QMessageBox::No )
            return true;
        else if ( nRet == QMessageBox::Cancel )
            return false;
        else
        {
            if ( m_sLastFile.isEmpty() )
                return DoSaveAs();
            else
                return DoSave();
        }
    }
    return true;
}
Example #2
0
void GenericHID::onFileSave()
{
    RetrieveProperties();

    if ( m_sLastFile.isEmpty() )
        DoSaveAs();
    else
        DoSave();
}
Example #3
0
void Document::DoSave( ImportExport::Base* exporter )
{
	// We don't have a previous filename.. do save as
	if ( m_strFilename == "" )
	{
		return DoSaveAs( exporter );
	}

	exporter->Export( m_pCanvas, m_strFilename );
}
Example #4
0
INT_PTR CALLBACK
GeneralDlgProc(HWND hDlg,
               UINT message,
               WPARAM wParam,
               LPARAM lParam)
{
    PINFO pInfo = (PINFO)GetWindowLongPtrW(hDlg,
                                           GWLP_USERDATA);

    switch (message)
    {
        case WM_INITDIALOG:
            GeneralOnInit(hDlg, (PINFO)lParam);
            return TRUE;

        case WM_COMMAND:
        {
            switch(LOWORD(wParam))
            {
                case IDC_SERVERCOMBO:
                    if (HIWORD(wParam) == CBN_SELCHANGE)
                    {
                        INT last, cur;

                        cur = SendDlgItemMessageW(hDlg,
                                                  IDC_SERVERCOMBO,
                                                  CB_GETCURSEL,
                                                  0,
                                                  0);

                        last = SendDlgItemMessageW(hDlg,
                                                   IDC_SERVERCOMBO,
                                                   CB_GETCOUNT,
                                                   0,
                                                   0);
                        if ((cur + 1) == last)
                            MessageBoxW(hDlg, L"SMB is not yet supported", L"RDP error", MB_ICONERROR);
                        else
                        {
                            LoadUsernameHint(hDlg, cur);
                        }
                    }
                    break;

                case IDC_SAVE:
                    SaveAllSettings(pInfo);
                    SaveRdpSettingsToFile(NULL, pInfo->pRdpSettings);
                break;

                case IDC_SAVEAS:
                    DoSaveAs(pInfo);
                break;

                case IDC_OPEN:
                    DoOpenFile(pInfo);
                break;
            }

            break;
        }

        case WM_CLOSE:
        {
            if (pInfo->hLogon)
                DestroyIcon(pInfo->hLogon);

            if (pInfo->hConn)
                DestroyIcon(pInfo->hConn);

            break;
        }
    }

    return 0;
}
void CEtsEodManagerDoc::OnFileSave()
{
	DoSaveAs();
}
Example #6
0
void GenericHID::onFileSaveAs()
{
    RetrieveProperties();

    DoSaveAs();
}