예제 #1
0
void FCrashUpload::PostReportComplete()
{
	if (PauseState == EUploadState::PostingReportComplete)
	{
		// Wait for confirmation
		SetCurrentState(EUploadState::WaitingToPostReportComplete);
		return;
	}

	AssignReportIdToPostDataBuffer();

	
	auto Request = CreateHttpRequest();
	Request->SetVerb( TEXT( "POST" ) );
	Request->SetURL(UrlPrefix / TEXT("UploadComplete"));
	Request->SetHeader( TEXT( "Content-Type" ), TEXT( "text/plain; charset=us-ascii" ) );
	Request->SetContent(PostData);
	UE_LOG( CrashReportClientLog, Log, TEXT( "Sending HTTP request: %s" ), *Request->GetURL() );

	if (Request->ProcessRequest())
	{
		SetCurrentState(EUploadState::PostingReportComplete);
	}
	else
	{
		CheckPendingReportsForFilesToUpload();
	}
}
예제 #2
0
///////////////////////////////////////////////////////////////////////////////
//
// TCDLib : copie constructeur
//
///////////////////////////////////////////////////////////////////////////////
TCDLib::TCDLib(TCDLib *aCDLib, TCD*aCD):TCD(aCDLib->mStateManager)
{
    _IN=aCDLib->GetIN();
    strcpy(itsTag,aCDLib->GetTag());
    strcpy(itsSubfield,aCDLib->GetSubfield());
    itsTagContainsWildcard = aCDLib->TagContainsWildcard();
    itsTagIsWildcard = aCDLib->TagIsWildcard();
    itsSubfieldContainsWildcard = aCDLib->SubfieldContainsWildcard();

    itsOccurrenceNumber=aCDLib->GetOccurrenceNumber();
    itsTagOccurrenceNumber=aCDLib->GetTagOccurrenceNumber();
    itsSubOccurrenceNumber=aCDLib->GetSubOccurrenceNumber();
    SetBeginning(aCDLib->GetBeginning());
    SetEnd(aCDLib->GetEnd());
    if (aCDLib->GetNext())
    {
        itsNext = (TCD *)new TCDLib((TCDLib*)aCDLib->GetNext());
        itsNext->SetPrevious((TCD*)this);
    }
    else
        itsNext = NULL;
    itsPrevious = NULL;
    SetContent(aCDLib->GetContent(), aCD);
    mStateManager=aCDLib->mStateManager;
}
예제 #3
0
파일: Table.cpp 프로젝트: Zhalfyr/Box
void Table::AlignFields()
{
	RemoveSpaces();
	int l_Columns = GetColumns();
	Content l_Content = GetContent();
	Content l_ResultContent = l_Content;

	for (int l_Itr = 0; l_Itr < l_Columns; ++l_Itr)
	{
		int l_FieldSize = 0;
		for (Row l_Row : l_ResultContent)
			l_FieldSize = l_Row[l_Itr].size() > l_FieldSize ? l_Row[l_Itr].size() : l_FieldSize;

		l_FieldSize += 3;

		for (Row& l_Row : l_ResultContent)
		{
			int l_WhitespaceNumber = l_FieldSize - l_Row[l_Itr].size();
			for (int l_ThirdItr = 0; l_ThirdItr < l_WhitespaceNumber; ++l_ThirdItr)
			{
				if (!l_Itr && GetStructure(true) && !(l_ThirdItr < 2))
					l_Row[l_Itr] = " " + l_Row[l_Itr];
				else
					l_Row[l_Itr] += " ";
			}
		}
	}
	SetContent(l_ResultContent);
}
void SVirtualWindow::Construct(const FArguments& InArgs)
{
	bIsPopupWindow = true;
	SetCachedSize(InArgs._Size);
	SetNativeWindow(MakeShareable(new FGenericWindow()));
	SetContent(SNullWidget::NullWidget);
}
예제 #5
0
bool FCrashUpload::SendCheckReportRequest()
{
	FString XMLString;

	UE_LOG(CrashReportClientLog, Log, TEXT("Sending HTTP request (checking report)"));
	auto Request = CreateHttpRequest();
	if (State == EUploadState::CheckingReport)
	{
		AssignReportIdToPostDataBuffer();
		Request->SetURL(UrlPrefix / TEXT("CheckReport"));
		Request->SetHeader(TEXT("Content-Type"), TEXT("text/plain; charset=us-ascii"));
	}
	else
	{
		// This part is Windows-specific on the server
		ErrorReport.LoadWindowsReportXmlFile( XMLString );

		// Convert the XMLString into the UTF-8.
		FTCHARToUTF8 Converter( (const TCHAR*)*XMLString, XMLString.Len() );
		const int32 Length = Converter.Length();
		PostData.Reset( Length );
		PostData.AddUninitialized( Length );
		CopyAssignItems( (ANSICHAR*)PostData.GetData(), Converter.Get(), Length );

		Request->SetURL(UrlPrefix / TEXT("CheckReportDetail"));
		Request->SetHeader(TEXT("Content-Type"), TEXT("text/plain; charset=utf-8"));
	}

	UE_LOG( CrashReportClientLog, Log, TEXT( "PostData Num: %i" ), PostData.Num() );
	Request->SetVerb(TEXT("POST"));
	Request->SetContent(PostData);

	return Request->ProcessRequest();
}
예제 #6
0
HRESULT CSaveTaskDlg::OnTimer(_In_ long lTime)
{
	static UINT sizeUnits[]		= { IDS_SIZE_UNIT_K,	IDS_SIZE_UNIT_M,	IDS_SIZE_UNIT_G };
	static UINT speedUnits[]	= { IDS_SPEED_UNIT_K,	IDS_SPEED_UNIT_M,	IDS_SPEED_UNIT_G };

	if (pGB && pMS) {
		CString str;
		REFERENCE_TIME pos = 0, dur = 0;
		pMS->GetCurrentPosition(&pos);
		pMS->GetDuration(&dur);
		REFERENCE_TIME time = 0;
		CComQIPtr<IMediaSeeking>(pGB)->GetCurrentPosition(&time);
		REFERENCE_TIME speed = time > 0 ? pos*10000000/time : 0;

		double dPos = pos / 1024.;
		unsigned int unitPos = AdaptUnit(dPos, _countof(sizeUnits));
		double dDur = dur / 1024.;
		unsigned int unitDur = AdaptUnit(dDur, _countof(sizeUnits));
		double dSpeed = speed / 1024.;
		unsigned int unitSpeed = AdaptUnit(dSpeed, _countof(speedUnits));

		str.Format(_T("%.2lf %s / %.2lf %s , %.2lf %s"),
				   dPos, ResStr(sizeUnits[unitPos]), dDur, ResStr(sizeUnits[unitDur]),
				   dSpeed, ResStr(speedUnits[unitSpeed]));

		if (speed > 0) {
			str.Append(_T(","));
			REFERENCE_TIME sec = (dur-pos) / speed;

			DVD_HMSF_TIMECODE tcDur = {
				(BYTE)(sec / 3600),
				(BYTE)(sec / 60 % 60),
				(BYTE)(sec % 60),
				0
			};

			if (tcDur.bHours > 0) {
				str.AppendFormat(_T(" %0.2dh"), tcDur.bHours);
			}
			if (tcDur.bMinutes > 0) {
				str.AppendFormat(_T(" %0.2dm"), tcDur.bMinutes);
			}
			if (tcDur.bSeconds > 0) {
				str.AppendFormat(_T(" %0.2ds"), tcDur.bSeconds);
			}
		}

		SetContent(str);

		SetProgressBarPosition(dur > 0 ? (int)(100*pos/dur) : 0);

		if (dur && pos >= dur) {
			::SendMessage(m_TaskDlgHwnd, TDM_CLICK_BUTTON, static_cast<WPARAM>(TDCBF_CANCEL_BUTTON), 0);

			return S_FALSE;
		}
	}

	return S_OK;
}
// -----------------------------------------------------------------------------
// CNpdItem::Set
// -----------------------------------------------------------------------------
//
void CNpdItem::Set(TInt aKey, const TTime& aLastModified, HBufC *aContent)
	{
	_NOTEPAD_DBG_FILE("CNpdItem::Set(): begin");
	iKey = aKey;
	iLastModified = aLastModified;
    SetContent(aContent);
    _NOTEPAD_DBG_FILE("CNpdItem::Set(): end");
	}
예제 #8
0
void CJX_Field::defaultValue(CFXJSE_Value* pValue,
                             bool bSetting,
                             XFA_Attribute eAttribute) {
  CXFA_Node* xfaNode = GetXFANode();
  if (!xfaNode->IsWidgetReady())
    return;

  if (bSetting) {
    if (pValue) {
      xfaNode->SetPreNull(xfaNode->IsNull());
      xfaNode->SetIsNull(pValue->IsNull());
    }

    WideString wsNewText;
    if (pValue && !(pValue->IsNull() || pValue->IsUndefined()))
      wsNewText = pValue->ToWideString();
    if (xfaNode->GetUIChildNode()->GetElementType() == XFA_Element::NumericEdit)
      wsNewText = xfaNode->NumericLimit(wsNewText);

    CXFA_Node* pContainerNode = xfaNode->GetContainerNode();
    WideString wsFormatText(wsNewText);
    if (pContainerNode)
      wsFormatText = pContainerNode->GetFormatDataValue(wsNewText);

    SetContent(wsNewText, wsFormatText, true, true, true);
    return;
  }

  WideString content = GetContent(true);
  if (content.IsEmpty()) {
    pValue->SetNull();
    return;
  }

  CXFA_Node* formValue = xfaNode->GetFormValueIfExists();
  CXFA_Node* pNode = formValue ? formValue->GetFirstChild() : nullptr;
  if (pNode && pNode->GetElementType() == XFA_Element::Decimal) {
    if (xfaNode->GetUIChildNode()->GetElementType() ==
            XFA_Element::NumericEdit &&
        (pNode->JSObject()->GetInteger(XFA_Attribute::FracDigits) == -1)) {
      pValue->SetString(content.ToUTF8().AsStringView());
    } else {
      CFX_Decimal decimal(content.AsStringView());
      pValue->SetFloat((float)(double)decimal);
    }
  } else if (pNode && pNode->GetElementType() == XFA_Element::Integer) {
    pValue->SetInteger(FXSYS_wtoi(content.c_str()));
  } else if (pNode && pNode->GetElementType() == XFA_Element::Boolean) {
    pValue->SetBoolean(FXSYS_wtoi(content.c_str()) == 0 ? false : true);
  } else if (pNode && pNode->GetElementType() == XFA_Element::Float) {
    CFX_Decimal decimal(content.AsStringView());
    pValue->SetFloat((float)(double)decimal);
  } else {
    pValue->SetString(content.ToUTF8().AsStringView());
  }
}
예제 #9
0
DwellingsBar::DwellingsBar(Castle & cstl, const Size & sz, const RGBA & fill) : castle(cstl)
{
    for(u32 dw = DWELLING_MONSTER1; dw <= DWELLING_MONSTER6; dw <<= 1)
        content.push_back(DwellingItem(castle, dw));

    SetContent(content);
    backsf.Set(sz.w, sz.h, false);
    backsf.DrawBorder(RGBA(0xd0, 0xc0, 0x48));
    SetItemSize(sz.w, sz.h);
}
예제 #10
0
void SPropertyTableCell::OnCellValueChanged( UObject* Object, FPropertyChangedEvent& PropertyChangedEvent )
{
	if ( Cell->GetObject().Get() == Object )
	{
		if ( !Cell->InEditMode() )
		{
			SetContent( ConstructCellContents() );
		}
	}
}
예제 #11
0
  bool Update(ScreenBase const & screen) override
  {
    std::string content;
    bool const isVisible = m_onUpdateFn(screen, content);

    SetIsVisible(isVisible);
    SetContent(content);

    return TBase::Update(screen);
  }
예제 #12
0
ALOperator::ALOperator(const std::vector<std::vector<int> > & vars,
      const Teuchos::RCP<Epetra_Operator> & content,
      double gamma, const std::string & label) :
      Teko::Epetra::BlockedEpetraOperator(vars, content, label),
      pressureMassMatrix_(Teuchos::null), gamma_(gamma)
{
   checkDim(vars);
   SetContent(vars, content);
   BuildALOperator();
}
예제 #13
0
void FCrashUpload::UploadNextFile()
{
	UE_LOG(CrashReportClientLog, Log, TEXT("UploadNextFile: have %d pending files"), PendingFiles.Num());

	// Loop to keep trying files until a send succeeds or we run out of files
	while (PendingFiles.Num() != 0)
	{
		FString PathOfFileToUpload = PendingFiles.Pop();
		// Remember if there was already a diagnostics file in the report, so we don't send it twice
		if (PathOfFileToUpload.EndsWith(GDiagnosticsFilename))
		{
			bDiagnosticsFileSent = true;
		}
		
		if (FPlatformFileManager::Get().GetPlatformFile().FileSize(*PathOfFileToUpload) > MaxFileSizeToUpload)
		{
			UE_LOG(CrashReportClientLog, Warning, TEXT("Skipping large crash report file"));
			continue;
		}

		if (!FFileHelper::LoadFileToArray(PostData, *PathOfFileToUpload))
		{
			UE_LOG(CrashReportClientLog, Warning, TEXT("Failed to load crash report file"));
			continue;
		}

		UE_LOG(CrashReportClientLog, Log, TEXT("UploadNextFile: uploading %d bytes ('%s')"), PostData.Num(), *PathOfFileToUpload);
		FString Filename = FPaths::GetCleanFilename(PathOfFileToUpload);
		if (Filename == "diagnostics.txt")
		{
			// Ensure diagnostics file is capitalized for server
			Filename[0] = 'D';
		}

		// Set up request for upload
		UE_LOG(CrashReportClientLog, Log, TEXT("Sending HTTP request (posting file)"));
		auto Request = CreateHttpRequest();
		Request->SetVerb(TEXT("POST"));
		Request->SetHeader(TEXT("Content-Type"), TEXT("application/octet-stream"));
		Request->SetURL(UrlPrefix / TEXT("UploadReportFile"));
		Request->SetContent(PostData);
		Request->SetHeader(TEXT("DirectoryName"), *ErrorReport.GetReportDirectoryLeafName());
		Request->SetHeader(TEXT("FileName"), Filename);
		Request->SetHeader(TEXT("FileLength"), FString::FromInt(PostData.Num()));

		if (Request->ProcessRequest())
		{
			return;
		}

		UE_LOG(CrashReportClientLog, Warning, TEXT("Failed to send file upload request"));
	}
	PostReportComplete();
}
예제 #14
0
	void CStringID::SetContentWithExpectedCRC(const char* content, bool noCase, bool resolve, IDType crc)
	{
		SetContent(content, noCase, resolve);
		IDType computedCrc = GetUniqueID();

		if (crc != computedCrc)
		{
			BEHAVIAC_ASSERT(false, "C%sStringID(0x%08X, \"%s\") has wrong CRC (should be 0x%08X!)  RETAIL BUILDS WILL USE THE WRONG VALUE, THIS MUST BE FIXED P0!",
				noCase ? "NoCase" : "", crc, content, GetUniqueID());
		}
	}
예제 #15
0
파일: MsgBox.cpp 프로젝트: fffonion/V8
BOOL CMsgBox::OnInitDialog()
{
	CDialog::OnInitDialog();

	if (m_Style == NewMsgBox::MSGBOX_OK_CANCEL_ONE_STRING_WITH_CHECKBOX || m_Style == NewMsgBox::MSGBOX_OK_CANCEL_TWO_STRING_WITH_CHECKBOX || NewMsgBox::MSGBOX_OK_CANCEL_THREE_STRING_WITH_CHECKBOX)
	{
		((CButton*)GetDlgItem(IDC_CHECK_NO_PROMPT))->SetCheck(FALSE);
		GetDlgItem(IDC_CHECK_NO_PROMPT)->SetWindowText(m_strCheckBox);
	}
	SetContent();
	return TRUE;  // return TRUE unless you set the focus to a control
}
예제 #16
0
void BWindow_AliceCommand::MySetup(){
	WINDOWAREA		frameArea(
		BWND_ALICECOMMAND_X, BWND_ALICECOMMAND_Y,
		BWND_ALICECOMMAND_W, BWND_ALICECOMMAND_H);
	WINDOWFONT	font(
		g_font.hInfo, FONTSIZE_INFO, FONTSIZE_INFO+4, ALIGN_LEFT);
	Window_Selectable_Content content;
	SetContent(_T("戦う"), 0, true);
	SetContent(_T("人形チェンジ"), 1, true);
	SetContent(_T("アリスの特技"), 2, true);
	SetContent(_T("逃げる"), 3, true);
	SetRowByContentSize(1);
	Window_Selectable::Setup_FixContentWidth_Auto(
		&g_wndSkins.skin[WNDSKIN_SIMPLE],
		frameArea, 16, font);
	SetVisible(true);

	// 現状コマンドは使用できない
	select.isActive[1] = false;
	select.isActive[2] = false;
}
예제 #17
0
/** Set the value of the attachment.
For a CCalContent::EDispositionUrl attachment, this is the URI.
For a CCalContent::EDispositionInline attachment, this is the binary data.
*/
EXPORT_C void CAgnAttachment::SetValue(TDesC8* aContent)
	{
	SetContent(aContent);
	if (aContent)
		{
		iSize = aContent->Length();
		}
	else
		{
		iSize = 0;	
		}
	}
예제 #18
0
void SPropertyTableCell::ExitedEditMode()
{
	if ( Presenter.IsValid() )
	{
		SetContent( Presenter->ConstructDisplayWidget() );

		if ( DropDownAnchor.IsValid() )
		{
			FSlateApplication::Get().DismissAllMenus();
			DropDownAnchor = NULL;
		}
	}
}
예제 #19
0
OP_STATUS SpeedDialThumbnail::SetEntry(const DesktopSpeedDial* entry)
{
	if (m_entry != NULL)
		m_entry->RemoveListener(*this);

	m_entry = entry;
	if (m_entry == NULL)
		return SetContent(NULL);

	GetBorderSkin()->SetImage(m_entry->IsEmpty()?"Speed Dial Thumbnail Plus Widget Skin":"Speed Dial Thumbnail Widget Skin");

	m_entry->AddListener(*this);

	if (m_entry->IsEmpty())
	{
		OpAutoPtr<SpeedDialPlusContent> content(OP_NEW(SpeedDialPlusContent, (*m_entry)));
		RETURN_OOM_IF_NULL(content.get());
		RETURN_IF_ERROR(content->Init());
		RETURN_IF_ERROR(SetContent(content.release()));
	}
	else if (m_entry->GetExtensionWUID().IsEmpty())
	{
		OpAutoPtr<SpeedDialPageContent> content(OP_NEW(SpeedDialPageContent, (*m_entry)));
		RETURN_OOM_IF_NULL(content.get());
		RETURN_IF_ERROR(content->Init());
		RETURN_IF_ERROR(SetContent(content.release()));
	}
	else
	{
		OpAutoPtr<SpeedDialExtensionContent> content(OP_NEW(SpeedDialExtensionContent, (*m_entry)));
		RETURN_OOM_IF_NULL(content.get());
		RETURN_IF_ERROR(content->Init());
		RETURN_IF_ERROR(SetContent(content.release()));
	}

	GetContent()->GetButton()->SetTabStop(true);

	return OpStatus::OK;
}
예제 #20
0
void PaneDisplay::SetFromGameState()
{
	m_CurMode = GetMode();
	if( PaneMode[m_CurPane] != m_CurMode )
		SetFocus( GetNext( m_PreferredPaneForMode[m_CurMode], 0 ) );

	/* Don't update text that doesn't apply to the current mode.  It's still tweening off. */
	for( unsigned i = 0; i < NUM_PANE_CONTENTS; ++i )
	{
		if( g_Contents[i].type != m_CurPane )
			continue;
		SetContent( (PaneContents) i );
	}
}
예제 #21
0
void Http::TCommonProtocol::SetContent(const ArrayBridge<char>& Data,const std::string& MimeFormat)
{
	if ( MimeFormat.empty() )
	{
		SetContent( Data, SoyMediaFormat::Text );
		return;
	}
	Soy::Assert( mContent.IsEmpty(), "Content already set" );
	Soy::Assert( mWriteContent==nullptr, "Content has a write-content function set");
	
	mContent.Copy( Data );
	mContentMimeType = MimeFormat;
	mContentLength = mContent.GetDataSize();
}
예제 #22
0
void XdataNODE::SetAttr(pwide_t attr,pwide_t value)
  {
    if ( attr && wcscmp(attr,L"$/content") == 0 )
        SetContent( value );
    else
      {
        if ( pwide_t myattr = root_->literal_->GetLiteral(StringT<wchar_t,64>(attr).ToLower().Str()) )
          {
            XdataATTR* attrval = FindAttr_(myattr); 
            if ( !attrval )
              attr_ = new XdataATTR(myattr,attr_,value);
            else
              attrval->SetValue(value);
          }
      }
  }
예제 #23
0
CXTPChartControl::~CXTPChartControl()
{
	SAFE_RELEASE(m_pContentView);

	// End the monitoring thread.
	if (m_pDrawThread)
	{
		m_pDrawThread->StopNotifications();
		m_pDrawThread = NULL;
	}

	SAFE_RELEASE(m_pCommand);

	CMDTARGET_RELEASE(m_pToolTipContext);

	SetContent(NULL);
}
예제 #24
0
void DialogObjProp::ChangeCurrentObject(char * objName, OBJECT_TYPE type)
{
	switch (type)
	{
	case OBJ:
		m_pObject = m_pSystem->GetProject().GetScene().GetGameobject(objName);
		break;
	case CMR:
		m_pObject = m_pSystem->GetProject().GetScene().GetCamera(objName);
		break;
	case LGT:
		m_pObject = m_pSystem->GetProject().GetScene().GetLight(objName);
		break;
	default:
		return;
	}
	SetContent();
}
예제 #25
0
CSimpleTaskDialog::CSimpleTaskDialog(LPCTSTR instruction, LPCTSTR content, LPCTSTR title, MLTASKDIALOG_COMMON_BUTTON_FLAGS buttons, LPCTSTR icon)
{
	::ZeroMemory(&m_config, sizeof(TASKDIALOGCONFIG));
	m_config.cbSize = sizeof(TASKDIALOGCONFIG);
	m_config.hInstance = ::AfxGetResourceHandle();
	m_config.dwFlags = TDF_POSITION_RELATIVE_TO_WINDOW;
	//m_config.dwCommonButtons = buttons == 0 ? MLCBF_OK_BUTTON : buttons;
	m_config.dwCommonButtons = buttons;

	if (title == NULL || title[0] == 0)
		SetWindowTitle(_T("HexEdit"));
	else
		SetWindowTitle(title);
	SetMainInstruction(instruction);
	SetContent(content);

	SetIcon(icon);
}
예제 #26
0
void CXTPMarkupPage::SetContentObject(CXTPMarkupBuilder* pBuilder, CXTPMarkupObject* pContent)
{
	if (!pContent->IsKindOf(MARKUP_TYPE(CXTPMarkupUIElement)))
	{
		pBuilder->ThrowBuilderException(CXTPMarkupBuilder::FormatString(_T("'%ls' object cannot be added to '%ls'. Object cannot be converted to type 'CXTPMarkupUIElement'"),
			(LPCTSTR)pContent->GetType()->m_lpszClassName, (LPCTSTR)GetType()->m_lpszClassName));
	}

	if (m_pContent != NULL)
	{
		pBuilder->ThrowBuilderException(CXTPMarkupBuilder::FormatString(_T("'%ls' already has a child and cannot add ")
			_T("'%ls'. '%ls' can accept only one child."),
			(LPCTSTR)GetType()->m_lpszClassName, (LPCTSTR)pContent->GetType()->m_lpszClassName, (LPCTSTR)GetType()->m_lpszClassName));
	}


	SetContent((CXTPMarkupUIElement*)pContent);
}
예제 #27
0
void FEpicSurvey::OpenEpicSurveyWindow()
{
	if ( SurveyWindow.IsValid() )
	{
		SurveyWindow.Pin()->BringToFront();
	}
	else
	{
		auto Window = SNew(SWindow)
			.Title(LOCTEXT( "WindowTitle", "Epic Survey" ))
			.ClientSize(FVector2D(1000.0f, 600.0f))
			.SupportsMaximize(true)
			.SupportsMinimize(false);

		Window->SetOnWindowClosed( FOnWindowClosed::CreateRaw(this, &FEpicSurvey::OnEpicSurveyWindowClosed ) );

		if ( ActiveSurvey->GetInitializationState() == EContentInitializationState::NotStarted )
		{
			ActiveSurvey->Initialize();

			auto* Settings = GetMutableDefault<UEditorSettings>();
			if ( !Settings->InProgressSurveys.Contains( ActiveSurvey->GetIdentifier() ) )
			{
				Settings->InProgressSurveys.Add( ActiveSurvey->GetIdentifier() );
				Settings->PostEditChange();

				if ( FEngineAnalytics::IsAvailable() )
				{
					TArray< FAnalyticsEventAttribute > EventAttributes;

					EventAttributes.Add( FAnalyticsEventAttribute( TEXT("SurveyID"), ActiveSurvey->GetIdentifier().ToString() ) );

					FEngineAnalytics::GetProvider().RecordEvent( TEXT("OpenedSurvey"), EventAttributes);
				}
			}
		}

		Window->SetContent( SNew( SSurvey, SharedThis( this ), ActiveSurvey.ToSharedRef() ) );

		SurveyWindow = Window;

		FSlateApplication::Get().AddWindowAsNativeChild(Window, RootWindow.Pin().ToSharedRef());
	}
}
예제 #28
0
XMLNode *JobXML::deepCopyElement( XMLNode **copy, const XMLNode *original )
{
   // add the element to the copy
   char *nodeName = XMLString::transcode( original->getNodeName() );
   XMLNode *newElement = AddElement( (*copy), nodeName );
   XMLString::release( &nodeName );

   // add its attributes
   if ( original->hasAttributes() )
   {
      DOMNamedNodeMap *attributes = original->getAttributes();
      for( unsigned int i=0; i<attributes->getLength(); i++ )
      {
         DOMAttr *attr = (DOMAttr*)attributes->item( i );
         char *key = XMLString::transcode( attr->getName() );
         char *val = XMLString::transcode( attr->getValue() );
         SetAttribute( newElement, key, val );
         XMLString::release( &key );
         XMLString::release( &val );
      }
   }

   // recursively copy all child elements
   int childElementCount=0;
   XMLNode *itr = original->getFirstChild();
   for ( ; itr != NULL; itr = itr->getNextSibling() )
   {      
      if ( itr->getNodeType() == XMLNode::ELEMENT_NODE )
      {
         deepCopyElement( &newElement, itr );
         childElementCount++;
      }
   }

   // if no child elements, copy this element's text content and we are done
   if ( childElementCount == 0 )
   {
      char *content = XMLString::transcode( original->getTextContent() );
      SetContent( newElement, content );
      XMLString::release( &content );
   }

   return newElement;
}
예제 #29
0
CPathID::CPathID(const char* path, bool doNotFromat)
{
    BEHAVIAC_ASSERT(path);

    if (doNotFromat)
    {
        behaviac::string strPath(path);
        strPath = make_lower(strPath);
        SetContentPrivate(strPath.c_str());
#ifdef BEHAVIAC_ENABLE_ASSERTS
        CPathID pathId(path);
        BEHAVIAC_ASSERT(GetUniqueID() == pathId.GetUniqueID());
#endif // #ifdef BEHAVIAC_ENABLE_ASSERTS
    }
    else
    {
        SetContent(path);
    }
}
예제 #30
0
void SPropertyTableCell::Construct( const FArguments& InArgs, const TSharedRef< class IPropertyTableCell >& InCell )
{
	Cell = InCell;
	Presenter = InArgs._Presenter;
	Style = InArgs._Style;

	CellBackground = FEditorStyle::GetBrush( Style, ".ColumnBorder" );

	SetContent( ConstructCellContents() );

	Cell->OnEnteredEditMode().AddSP( this, &SPropertyTableCell::EnteredEditMode );
	Cell->OnExitedEditMode().AddSP( this, &SPropertyTableCell::ExitedEditMode );

	FCoreUObjectDelegates::OnObjectPropertyChanged.AddSP(this, &SPropertyTableCell::OnCellValueChanged);

	static const FName InvertedForegroundName("InvertedForeground");

	SetForegroundColor( FEditorStyle::GetSlateColor(InvertedForegroundName) );
}