Quantcast
Channel: MSDN Blogs
Viewing all 35736 articles
Browse latest View live

Windows 8 앱을 위한 사용자 경험 통합 테스트

$
0
0

Windows 스토어 앱을 테스트하는 방법에 대한 글을 통해 다양한 런타임 상태에서 앱을 테스트하는 방법을 소개한 바 있습니다. 또한 Windows 8 사용자 경험의 일부 측면과 그것이 앱의 실행 환경에 미치는 영향에 대해서도 논의하였습니다. 그럼 이번에는 새로운 사용자 경험에 대해 보다 심도 있게 살펴보고, 기존 앱의 테스트를 기반으로 앱을 실행할 수 있는 몇 가지 흥미로운 조작 방식과 시나리오에 대해 알아보고, 앱이 올바르게 작동하는지를 확인하는 방법을 소개하겠습니다.

일반 레이아웃 및 동작 테마

Windows 8은 새롭고 풍부한 기능을 제공하므로 개발자들은 몰입도가 뛰어나 푹 빠져들 수 있는 앱을 개발할 수 있습니다. 앱이 초기화되면 사용자가 앱에 대한 첫인상을 얻게 되는 시작 화면이 나타납니다. 앱이 표시되고 실행되면 사용자는 언제든지 이를 회전하고, 크기를 조정하고, 동시 보기 또는 전체 보기로 전환할 수 있습니다. 더 중요한 사실은 이러한 이벤트를 조합하거나 연속적으로 구현할 수 있다는 점입니다. 예를 들어 시작 화면이 표시되는 동안 앱이 방향 전환을 수신하거나 크기를 조정할 수 있는 프로젝터에 장치를 연결하여 동시에 볼 수 있습니다. 그럼 지금부터 각각의 이벤트가 발생하는 동안 어떤 부분에 특히 주목해야 하는지 보다 구체적으로 살펴보겠습니다.

시작 화면

시작 화면기능은 시스템이 앱을 처음 사용하기 위해 초기화하는 동안이나 백 스택에서 일시 중지된 앱을 가져올 때 앱의 작동 상태를 보여 줍니다. 시작 화면이 올바르게 표시되도록 하려면 세로 모드나 가로 모드에서 전체 화면으로 앱을 시작하고 시작 화면이 적절한 위치(일반적으로 중앙 위치)에 있는지, 애니메이션이나 시각적 요소의 영향을 받지 않는지 등을 확인해야 합니다. 또한 들쭉날쭉한 가장자리나 픽셀화된 이미지가 없는지 확인하여 시작 화면에 표시된 그래픽의 해상도 품질을 주의 깊게 살펴봐야 합니다.

개발자의 앱이 확장 시작 화면을 지원하는 경우에는 시작 화면에서 확장 시작 화면으로의 전환이 일관적이고 부드럽게 구현되는지 확인합니다. 이때 아이콘 위치의 변화나 화면 깜박임 등 ��경을 거슬리게 하는 것들에 특히 주의해야 합니다.

회전

회전은 앱이 실행되는 동안에, 심지어 앱이 일시 중지 상태에 있는 동안에도 언제든지 작동할 수 있습니다. 다양한 상태의 UI를 구동하는 동안에 앱이 방향 전환에 응답하는지 확인해야 합니다. 특히 사용자의 경험을 저하시킬 수 있는 레이아웃 문제나 클리핑 문제에 세심한 주의가 필요합니다. 또한 방향 전환 시 콘텐츠의 점프나 깜박임이 없도록 해야 합니다.

앱에서 자동 회전 설정을 사용 중인 경우에는 사용자가 앱을 시작하거나 앱으로 전환할 때 시스템 방향이 앱의 회전 설정에 따라 변경되는지 확인합니다. 또한 밀어서 회전하는 설정에서도 앱을 사용할 수 있는지 확인합니다. 예를 들어 자동 회전 설정이 가로인 경우 가로 모드 및 가로로 밀기 모드에서도 앱이 올바르게 보이고 기능이 제대로 작동하는지 확인합니다.

앱을 테스트할 수 있는 적절한 하드웨어가 없는 경우에는 Visual Studio 시뮬레이터를 사용하여 회전을 시뮬레이션해 볼 수 있습니다. 테스트 시 시뮬레이터를 사용하는 방법에 대한 자세한 내용은 Visual Studio 2012를 통한 Windows 8 앱 테스트를 참조하세요.

크기 조정

Windows 8은 앱의 크기 조정을 통해 다양한 지원 픽셀 밀도하드웨어의 터치와 편의성을 유지합니다. 100%, 140%, 180%의 확장 플래토에서 앱의 사용자 경험을 확인합니다. 다양한 상태의 UI에서 구동되는 동안 모든 크기 조정 플래토에서 앱이 올바르게 표시되는지 확인합니다.

Visual Studio 시뮬레이터에서 다음의 설정을 사용하여 지원되는 플래토에서 앱을 테스트할 수 있습니다.

  • 100% 플래토 - 10.6인치, 1366 X 768 사용
  • 140% 플래토 - 10.6인치, 1920 X 1080 사용
  • 180% 플래토 - 10.6인치, 2560 X 1440 사용

앱이 듀얼 모니터 시스템 또는 프로젝터에 표시되는 장치의 모니터에서 다른 모니터로 이동하는 경우 앱이 실행되는 동안 크기 조정 변경이 동적으로 발생할 수 있습니다. 특히 사용자가 느끼는 경험을 저하시킬 수 있는 레이아웃 문제나 클리핑 문제에 주의하세요. 또한 들쭉날쭉한 가장자리나 픽셀화된 이미지가 없는지 확인하여 아이콘, 타일, 이미지, 앱 내부 콘텐츠의 해상도 품질을 주의 깊게 살펴봐야 합니다.

동시 보기와 전체 보기

앱이 실행되는 동안에는 언제든지 동시 보기 또는 전체 보기 상태를 변경할 수 있으며 심지어 앱이 일시 중지 상태에 있는 동안에도 가능합니다. 앱이 다양한 상태의 UI에서 구동되는 동안 표시 방법 변경에 올바르게 응답하는지 확인해야 합니다. 또한 사용자의 경험을 저하시킬 수 있는 레이아웃 문제나 클리핑 문제에 주의하시기 바랍니다.

동시 보기에서 화면에 2개의 앱 표시를 지원하기 위해 필요한 화면 크기는 최소 1366 X 768입니다. 개발자의 앱을 동시 보기로 보려면 백 스택에 다른 앱을 함께 실행해야 합니다. 두 번째 앱을 화면의 왼쪽부터 살짝 밀어 스크롤 막대가 보이는 위치까지 이동하여 동시 보기 상태로 만듭니다.

계약 및 선택적 동작

Windows 8은 앱에서 데이터와 파일을 조작하고 공유할 수 있는 풍부하고 유연한 방식을 도입했습니다. 앱에서 파일 선택기를 사용하여 파일을 열고 저장할 수 있습니다. 파일 선택기 계약을 구현하여 앱에서 다른 앱에 파일이나 저장 위치를 제공할 수도 있습니다. 검색 계약은 사용자가 찾고 있는 정보를 앱에 표시하는 데 필수적인 방법을 제공합니다. 공유 계약은 사용자가 하나의 앱에서 다른 앱으로 사진이나 웹 링크와 같은 콘텐츠를 편리하게 공유할 수 있는 방법을 제공합니다.

앱이 더 많은 옵션을 갖게 되고 파일과 데이터를 통해 사용자 경험을 정의하는 핵심적인 역할을 하게 되면서 사용자가 이를 직관적으로 경험할 수 있도록 하기 위해 앱에 더 많은 책임이 부여되고 있습니다. 이어서 파일 및 데이터로 작업하기 위한 몇 가지 옵션과 흥미로운 시나리오들을 살펴보겠습니다.

파일 열기 선택기 계약

Windows 8에서는 파일 선택기를 사용하여 앱에서 파일을 열고 저장할 수 있습니다. 파일 선택기 계약을 구현하여 앱에서 다른 앱에 파일이나 저장 위치를 제공할 수도 있습니다.

앱이 지원하는 파일 유형의 선택기를 다른 앱이 호출하도록 허용하는 경우 앱에서 선택기의 바스켓에 추가한 항목이 미리 보기로 올바르게 표시되는지 확인하고, 사용자가 선택한 파일(콘텐츠 포함)이 선택기를 호출한 앱으로 다시 올바르게 제공되는지 확인해야 합니다.

앱이 각 파일들에 대한 보기 기능을 제공하는 경우 파일이 선택기의 바스켓에서 올바르게 추가되고 제거되는지 확인해야 합니다.

사용자가 선택기의 앱에서 다른 곳을 탐색하면 선택기 내에서 호스팅된 앱이 종종 일시 중지될 수 있으나 종료되지는 않습니다. 이 때문에 앱이 이벤트를 일시 중지 또는 다시 시작으로 처리하지 않도록 해야 사용자가 다시 앱으로 돌아왔을 때 앱의 성능에 대해 안 좋은 인상을 받지 않습니다. 그 대신 앱이 종료되는 시기를 결정할 수 있는 선택기의 종료 이벤트를 등록하고 앱이 그 시간 동안 필요한 정리를 수행하는지 확인합니다.

검색 계약

검색 계약은 사용자가 찾고 있는 정보를 앱에 나타내는 데 필수적인 방법을 제공합니다. 앱이 검색을 지원하는 경우 이를 확인하는 가장 기본적인 동작은 사용자가 검색창을 열고 검색어를 입력할 때 앱이 검색을 처리하고 연관성 있는 결과를 보여 주는지 여부입니다. 검색 계약이 올바르게 구현되지 않는 경우 "해당 앱을 검색할 수 없습니다"라는 메시지가 나타나고 사용자가 수행한 모든 검색이 앱에서 초기화됩니다.

앱이 검색 제안을 제공하는 경우 이 기능이 올바르게 표시되는지, 아이콘이 보이는지, 아이콘의 너비와 높이가 올바른지 확인해야 합니다. 앱이 검색 입력을 지원하는 경우 앱을 열 때 검색창이 열리고 검색을 시작하는지 확인하고 예상되는 결과가 반환되는지 확인하세요.

검색 계약은 사용자가 검색창을 열 때 검색 상자에 검색 텍스트 예시를 회색으로 보여주는 암시 텍스트 설정을 지원합니다. 앱이 검색 상자에 암시 텍스트를 설정하는 경우 이 기능이 사용자에게 편리하고 앱에서 검색창을 열 때 예상했던 대로 보이는지 확인하세요.

앱이 검색창 텍스트를 프로그래밍 방식으로 설정하는 것을 지원하는 경우 이 기능이 제대로 작동하는지 확인합니다. 검색창이 닫혀 있는 상태로, 검색창 텍스트가 설정되도록 하는 작업을 앱에서 수행하고 검색창을 열어 텍스트가 올바르게 설정되었는지 확인합니다.

회전은 검색을 수행하는 동안과 같이 앱이 실행되는 중에 언제든지 작동할 수 있습니다. 앞에서 다룬 회전 섹션을 참조하여 장치가 회전되는 동안에도 앱에서 검색 작업이 제대로 이루어지는지 확인하세요.

공유 계약

공유 계약은 사용자가 하나의 앱에서 다른 앱으로 사진이나 웹 링크와 같은 콘텐츠를 간편하게 공유할 수 있는 방법을 제공합니다. 대상 공유 앱이 콘텐츠를 사용하는 반면 소스 공유 앱은 콘텐츠를 제공합니다. 개발자의 앱은 둘 중 하나 또는 둘 다 가능합니다.

앱이 소스 공유인 경우 다른 대상 공유 앱이 자체 시나리오에 따라 다르게 공유된 데이터를 처리한다는 점을 유의하세요. 일부 콘텐츠를 다른 콘텐츠보다 우선적으로 처리하는 경우도 있습니다. 예를 들어 링크와 HTML 조각을 모두 공유하는 경우 일부 대상 앱은 링크에 우선 순위를 두고 HTML을 무시하는 선택을 할 수도 있으며 그 반대의 경우도 가능합니다. 사용자가 앱에서 공유할 때 놀라운 경험을 할 수 있도록 데이터 패키지의 콘텐츠가 모두 동일한 데이터를 다르게 표현한 것인지 확인하고, 앱을 설계 및 테스트할 때 일부 다른 대상 앱(대상 공유 샘플, 메일, 그 외에 개발자가 설치한 대상 공유 앱 등)을 공유하도록 해야 합니다.

사용자는 공유한 콘텐츠가 시각적이고 현재 페이지와 연결되어 있으며 자신이 선택한 것이고 앱이 있는 컨텍스트에서 분명히 나타나기를 바랍니다. 앱을 탐색하고, 다양한 위치에서 공유하고, 선택한 콘텐츠를 선택하고 공유하며, 사용자의 기대에 맞게 해당 콘텐츠가 앱에서 공유되었는지 확인합니다.

앱이 대상 공유인 경우 공유 창에 호스팅됩니다. 이 공유 창은 전체 화면보다 좁은 보기 화면으로, 사용자는 창 바깥 부분을 탭하여 앱이 포함된 창을 쉽게 해제할 수 있으며, 대상 공유 앱을 통해 가볍고 빠른 경험을 제공하기 위해 설계되었습니다. 이 환경에서 앱이 예상대로 작동하는지 확인하세요. 사용자가 느끼기에 공유를 완료하는 작업이 너무 부담되거나 복잡할수록 바깥 부분을 실수로 탭하여 그 동안 했던 모든 작업을 날려 버릴 가능성이 높아집니다. 왼편의 스크롤 막대처럼 이와 같은 문제를 발생시킬 수 있는 컨트롤을 살펴보세요. 또한 사용자가 앱을 처음 사용할 때 대상 공유로 앱을 시작할 가능성이 있습니다. 인증 또는 초기 설정이 필요한 앱의 경우 사용자가 이를 공유 창에서 완료할 수 있게 하거나 사용자가 앱에서 공유하기 전에 먼저 무엇을 해야 할지를 알려주는 유용한 메시지를 앱이 제공할 수 있도록 합니다.

앱이 소스 공유와 대상 공유 모두에 해당하는 경우 앱에서 앱으로 공유할 수 있는 옵션이 있습니다. 이것이 여러분의 시나리오에 타당한지 확인해 보시기 바랍니다.

결론

Windows 8은 앱이 중요한 역할을 하도록 풍부하고 몰입도가 뛰어난 경험을 제공합니다. 앱 내의 사용자 경험 이외에도 앱이 지원하는 기능이나 앱이 실행되는 동안 사용자가 수행하는 동작에 따라 회전, 크기 조정, 다양한 보기 상태, 계약을 통해 조작할 수도 있습니다. 이 글에서 앱에 문제가 될 수 있는 일부 조작 방식에 대해 살펴보았고 이 문제를 방지하기 위해 앱을 테스트하는 방법을 설명했습니다. 이 글이 앱의 사용자 경험에 부정적인 영향을 줄 수 있는 문제를 발견하는 데 도움이 되기를 바랍니다. 이 주제에 대한 의견이 있거나 공유할 만한 흥미로운 문제점이 있으면 알려 주시기 바랍니다.

- Windows SDET, Rick Muszynski

- Windows SDET, Patrik Lundberg

특별히 이 블로그 글을 작성하는 데 도움을 준 Tom White와 Jake Sabulsky에게 진심으로 감사드립니다.


Тестирование интеграции пользовательского интерфейса приложений для Windows 8

$
0
0

В записи блога, посвященной тестированию приложений для Магазина Windows, мы обсудили, какие аспекты работы приложения в ��азных состояниях выполнения необходимо проверить. Мы также обсудили некоторые особенности интерфейса Windows 8 и их влияние на среду, в которой работает ваше приложение. А сейчас мы подробнее рассмотрим пользовательский интерфейс и опишем некоторые интересные взаимодействия и сценарии (отмеченные нами в процессе тестирования существующих приложений), в которых может участвовать ваше приложение, и расскажем, что необходимо сделать, чтобы обеспечить его правильную работу.

Общая структура и поведение

В Windows 8 появились новые мощные функциональные возможности, благодаря которым вы можете сделать свое приложение иммерсивным и привлекательным. Во время инициализации приложения появляется экран-заставка, формирующий у пользователя первое впечатление о вашем приложении. Когда ваше приложение работает, пользователь в любой момент может повернуть его, изменить его масштаб, прикрепить его с помощью функции Snap или развернуть на весь экран. А что еще более важно, любые из этих событий могут происходить одновременно или подряд. Например, ваше приложение может получить команду изменить ориентацию во время отображения экрана-заставки или может быть переведено в прикрепленное состояние при подключении вашего устройства к проектору, что вызывает изменение масштаба. Давайте поподробнее обсудим, на что следует обратить внимание во время каждого из этих событий.

Экран-заставка

Экран-заставкапозволяет вашему приложению отображать информацию, пока система выполняет его инициализацию для первого использования или переводит его из приостановленного состояния (из обратного стека). Чтобы убедиться в правильном отображении экрана-заставки, запустите свое приложение в полноэкранном режиме с книжной и альбомной ориентацией и проверьте, что экран-заставка расположен правильно (обычно в центре экрана) и что в нем нет проблем с анимацией или отображением визуальных элементов. Кроме того, обратите внимание на качество (разрешение) графики, отображаемой на экране-заставке: нет ли зубчатых краев или мозаичных изображений.

Если ваше приложение поддерживает отображение расширенного экрана-заставки, проверьте, что переход от обычного экрана-заставки к расширенному выполняется плавно, без скачков. Обратите особое внимание на такие неприятные эффекты, как изменение положения значков, мигание экрана и т. п.

Поворот

Поворотможет произойти в любой момент работы вашего приложения, даже когда оно находится в приостановленном состоянии. Проверьте, что ваше приложение реагирует на изменения ориентации при тестировании различных состояний пользовательского интерфейса. Обратите особое внимание на проблемы, связанные с расположением и обрезанием элементов, которые могут отрицательно повлиять на впечатления пользователя от работы с вашим приложением. Убедитесь также, что контент не "скачет" и не мигает при изменении ориентации.

Если ваше приложение использует настройки автоматического поворота, проверьте, что при запуске вашего приложения или переходе к нему ориентация системы меняется в соответствии с настройками поворота вашего приложения. Убедитесь также, что ваше приложение может использоваться с настройкой поворота в перевернутом режиме. Например, если настройкой автоматического поворота является альбомная ориентация, проверьте, что ваше приложение правильно отображается и работает как при обычной альбомной ориентации, так и при перевернутой.

Если у вас нет соответствующего оборудования для тестирования приложения в условиях поворота, вы можете воспользоваться имитатором Visual Studio для моделирования поворота. Подробнее об использовании имитатора для тестирования можно прочитать в статье Тестирование приложений для Windows 8 с использованием Visual Studio.

Масштабирование

Windows 8 масштабируетваше приложение для удобства использования сенсорного управления на устройствах с разным разрешением экрана. Проверьте интерфейс вашего приложения при масштабе 100 %, 140 % и 180 %. Убедитесь, что ваше приложение правильно отображается при всех вариантах масштаба в разных состояниях пользовательского интерфейса.

Для проверки работы приложения при поддерживаемых вариантах масштаба можно воспользоваться имитатором Visual Studio со следующими параметрами настройки:

  • 100 % — 10,6 дюйма, 1366 X 768
  • 140 % — 10,6 дюйма, 1920 X 1080
  • 180 % — 10,6 дюйма, 2560 X 1440

Изменения масштаба могут происходить динамически во время работы вашего приложения, если приложение перемещается с одного монитора на другой в системе с двумя мониторами или работает на устройстве, подключенном к проектору. Обратите особое внимание на проблемы, связанные с расположением и обрезанием элементов, которые могут отрицательно повлиять на впечатления пользователя от работы с вашим приложением. Внимательно проверьте качество отображения (разрешение) значков, плиток, изображений и контента, обратите внимание на зубчатые края и мозаичные изображения.

Просмотр в представлениях прикрепления и заполнения

Изменения отображения при переходе между представлениями прикрепления и заполнениямогут произойти в любой момент работы вашего приложения; даже когда оно находится в приостановленном состоянии. Проверьте, что ваше приложение правильно реагирует на такие изменения представления при тестировании различных состояний пользовательского интерфейса. Кроме того, обратите внимание на проблемы, связанные с расположением и обрезанием элементов, которые могут отрицательно повлиять на впечатления пользователя от работы с вашим приложением.

Для использования прикрепленного представления для отображения двух приложений на экране требуется разрешение экрана не менее 1366 X 768. Для прикрепления приложения с помощью функции Snap необходимо, чтобы оно работало, а другое приложение находилось в обратном стеке. Чтобы создать прикрепленное представление, проведите пальцем от левого края экрана и располагайте второе приложение, пока не увидите вертикальный переплет.

Контракты и опциональное поведение

В Windows 8 введены многообразные и гибкие способы взаимодействия приложений и обмена данными и файлами. Приложения могут использовать средство выбора файлов для открытия и сохранения файлов. Кроме того, благодаря реализации контрактов выбора файлов приложения могут предоставлять другим приложениям файлы или расположение сохранения. С помощью контракта "Поиск" приложения могут предоставлять пользователю информацию, которую он ищет. А контракт общего доступа обеспечивает пользователю удобный способ передачи контента, например фотографий и веб-ссылок, из одного приложения в другое для совместного использования.

В условиях, когда приложения имеют больше возможностей и играют ключевую роль во взаимодействии пользователя с файлами и данными, необходимо обеспечить, чтобы эти взаимодействия были интуитивно понятны пользователю. Далее мы обсудим некоторые возможности работы с файлами и данными и некоторые интересные сценарии.

Контракт выбора файлов в окне открытия

В Windows 8 приложения могут использовать средство выбора файлов для открытия и сохранения файлов. Кроме того, благодаря реализации контрактов выбора файловприложения могут предоставлять другим приложениям файлы или расположение сохранения.

Если вы разрешаете другому приложению вызывать средство выбора файлов для типов файлов, поддерживаемых вашим приложением, проверьте правильность отображения эскизов элементов, добавляемых вашим приложением в подборку средства выбора файлов. Убедитесь также, что файлы (включая контент), выбранные пользователем, правильно возвращаются в приложение, вызвавшее средство выбора файлов.

Если ваше приложение обеспечивает уникальное представление файлов, убедитесь, что файлы правильно добавляются в подборку средства выбора файлов и удаляются из нее.

Когда пользователь переходит от вашего приложения в средстве выбора файлов к другим элементам, то приложение, отображаемое в средстве выбора файлов, зачастую может переводиться в приостановленное состояние, но не может быть завершено. Поэтому вашему приложению не нужно обрабатывать события приостановки и возобновления работы, поскольку это приведет к заметному снижению быстродействия при возвращении пользователя к нему. Вместо эт��го зарегистрируйте свое приложение для события закрытия средства выбора файлов, чтобы определять, когда ваше приложение закрывается, и обеспечить выполнение всех необходимых операций очистки памяти и места на диске.

Контракт "Поиск"

Контракт "Поиск"обеспечивает приложениям важную возможность предоставлять пользователям информацию, которую они ищут. Если ваше приложение поддерживает поиск, необходимо в первую очередь проверить, что, когда пользователь открывает панель поиска и вводит запрос, ваше приложение обрабатывает этот запрос и отображает результаты. Если вы неправильно реализовали контракт "Поиск", вы увидите сообщение "Поиск в этом приложении невозможен" и любой поиск, выполняемый пользователем, будет по умолчанию приводить в "Приложения".

Если ваше приложение предоставляет поисковые предложения, проверьте, что они правильно отображаются и что отображается значок правильной ширины и высоты. Если ваше приложение поддерживает функцию ввода запроса для поиска, проверьте, что, когда вы открываете приложение и начинаете вводить запрос для поиска, открывается панель поиска и возвращаются ожидаемые результаты.

Контракт "Поиск" поддерживает настройку "подсказки", которая представляет собой пример текста для поиска серого цвета, отображаемый в поле поиска, когда пользователь открывает панель поиска. Если ваше приложение задает "подсказку" в поле поиска, проверьте, что она понятна пользователю и отображается ожидаемым образом, когда вы открываете панель поиска в своем приложении.

Если ваше приложение поддерживает программную настройку текста на панели поиска, проверьте корректность работы этой функции. При закрытой панели поиска выполните в своем приложении действие, приводящее к настройке текста на панели поиска, откройте панель поиска и проверьте, что текст настроен правильно.

Поворот может произойти в любой момент работы вашего приложения, в том числе во время поиска. Обратитесь к разделу "Поворот" (выше) и проверьте, что поиск правильно выполняется при повороте устройства.

Контракт общего доступа

Контракт общего доступапредоставляет пользователям удобный способ передачи контента, например фотографий и веб-ссылок, из одного приложения в другое для совместного использования. Приложения, являющиеся источниками данных, предоставляют контент, а приложения, являющиеся получателями данных, используют его. Ваше приложение может выступать в любой из этих ролей (или в обеих).

Если ваше приложение является источником данных, обратите внимание на то, что разные приложения-получатели по-разному обрабатывают предоставленные им данные в зависимости от своих сценариев. Некоторые из них могут считать определенный контент приоритетным. Например, если вы предоставляете для общего доступа и ссылку, и HTML-фрагмент, некоторые приложения-получатели могут игнорировать HTML и обрабатывать только ссылку или наоборот. Чтобы предоставить пользователю удобные возможности передачи данных для общего доступа из вашего приложения, убедитесь, что контент вашего пакета данных представляет собой различные представления одних и тех же данных, и попробуйте передать его в несколько разных приложений-получателей (в пример приложения-получателя данных, в приложение "Почта", а также в другие приложения-получатели данных, установленные на вашем компьютере) при создании и тестировании вашего приложения.

Пользователи ожидают, что предоставляемый для общего доступа контент является видимым, привязан к текущей странице, представляет собой что-то, что они выделили, или очевиден из контекста приложения. Перемещайтесь по своему приложению, передавайте данные для общего доступа из разных расположений, выделите что-то и предоставьте для общего доступа выделенный контент и убедитесь, что контент, предоставляемый для общего доступа из вашего приложения, соответствует ожиданиям пользователей.

Если ваше приложение является получателем данных, оно будет указано на панели общего доступа. Это более узкое представление, чем весь экран, и пользователь может легко закрыть эту панель (включая ваше приложение), коснувшись точки за ее пределами. Она была создана для предоставления удобного и быстрого доступа к приложениям, являющимся получателями данных. Убедитесь, что ваше приложение работает в этой среде ожидаемым образом. Чем сложнее процедура, которую нужно выполнить пользователю для обмена данными, тем выше риск, что он или она случайно коснется точки за пределами этой панели и потеряет всю выполненную работу. Обратите внимание на элементы управления, например полосы прокрутки слева. Они могут вызвать те же проблемы. Возможно также, что пользователь запустит ваше приложение как получатель данных при первом его использовании. Если ваше приложение требует проверки подлинности или настройки при первом запуске, обеспечьте, чтобы пользователь мог выполнить необходимые операции на панели общего доступа или чтобы ваше приложение выводило понятные сообщения о том, что необходимо сделать перед тем, как предоставить данные вашему приложению.

Если ваше приложение является и источником, и получателем данных, пользователь может предоставлять данные для общего доступа из вашего приложения ему же. Убедитесь, что это имеет смысл для сценариев использования вашего приложения.

Заключение

Windows 8 обеспечивает многообразный, иммерсивный опыт работы, в котором ваши приложения играют главную роль. Кроме взаимодействия с пользователем в своем приложении, вы можете также взаимодействовать с состояниями поворота, масштабирования, различными состояниями просмотра, а также использовать контракты в зависимости от того, какие функции поддерживает ваше приложение и что делает пользователь во время работы вашего приложения. В этой записи блога мы рассмотрели некоторые из таких взаимодействий, которые могут вызывать трудности, и объяснили, как протестировать ваше приложение, чтобы избежать проблем. Надеемся, этот блог поможет вам найти неполадки, отрицательно влияющие на пользовательский интерфейс вашего приложения. Поделитесь с нами своими отзывами по этой теме или расскажите об интересных проблемах, с которыми вы столкнулись.

-- Рик Мужинский (Rick Muszynski), инженер-программист по тестированию, Windows

-- Патрик Ландберг (Patrik Lundberg), инженер-программист по тестированию, Windows

Выражаем отдельную благодарность Тому Уайту (Tom White) и Джейку Сабульски (Jake Sabulsky) за их помощь при создании этой записи.

Windows Store app development for iOS developers

$
0
0

 

On December 13 and 14th,  Microsoft and the Big Nerd Ranch team are having a two day training on building Windows Store apps. WindowsStore_tile_green_large_120x20

The event will be in Microsoft’s Mountain View (CA) campus.
To attend in person, register at http://aka.ms/iostoWindowscamp
Both days will also be streamed live at http://channel9.msdn.com

You can find a detailed agenda in the registration site.

My no-fluff description for the event follows:

  • The training is aimed at iOS developers who want to start building Windows Store apps.  
  • It starts from the beginning with intros to the programming languages, the platform and the tools. 
  • We will try to build a bridge from iOS concepts to Windows concepts so that you can reuse your existing iOS knowledge as much as possible.  
  • Event will focus on building apps with XAML/C#, but devs looking to build on apps with HTML or DirectX will also get a useful overview of the platform.   


If you are an iOS developer, we hope you can join us, it will be a beginning of a fun journey.. Bring your Mac Book (with enough space to install Windows using parallels or any other virtualization technology).  

To learn more about Windows Store app development, check out the resources for iOS developers page on the Windows Dev Center and check out Aaron’s Hillegass’ Build 2012 session: “Top 10 things iOS developers need to know about Windows Store apps”.

Happy Windows coding!

Preliminary Microsoft Dynamics AX 2012 R2 content now on TechNet and MSDN!

$
0
0

We've posted preliminary Microsoft Dynamics AX 2012R2 content on TechNet and MSDN.

The New, Changed, and Deprecated Features guide has been updated to include R2 features. The guide contains new features for 2012, the 2012 Feature Pack, and 2012 R2, so to find the latest information, you need to search for R2.

At general availability of R2, we will post additional content to TechNet and MSDN, and will also make installable help updates with translated Help content available.

The following list provides links to a description of each group of topics that we have added for R2.

Audience

For more information about documentation for all versions of the product, see the following resources:

System Administrator topics

The Installation and Upgrade content on TechNet has been updated to apply to Microsoft Dynamics AX 2012 R2.

Topics that support the following 2012 R2 features have been published on TechNet.

Data partitioning

Virtual company scenarios: Project management and accounting

The following topics have also been published or updated, but are not specific to R2.

 <Back to top>

Developer topics

The reference topics for X++ and .NET have been updated for Microsoft Dynamics AX 2012 R2. This update includes changes to thousands of topics. In particular, the .NET Framework Classes for Microsoft Dynamics AX Retail section has changed. In this section, we added the Microsoft.Dynamics.Commerce.Runtime Namespace, and significantly updated the Microsoft.Dynamics.Retail.Pos.Contracts Namespace.

Documentation for over 1900 Data upgrade scripts has also been updated for R2.

<Back to top>

Application User topics

Topics that support the following feature areas, regions and countries have been published or updated on TechNet.

Budgeting

Manage KPIs

Brazil

China

Czech Republic

Eastern Europe

Estonia

Hungary

India

Japan

Latvia

Lithuania

Poland

Russia

US Payroll

 

<Back to top>

White Papers and Guides

The following white papers and guides have been published or updated to support R2.

 

The following white papers and guides have been published or updated, but are not specific to R2.

 

<Back to top>

Top 10 Microsoft Developer Links for Friday, November 9th

$
0
0

WOWZAPP 2012 | Data Binding with XAML Controls Session Files

Initial entry for SharePoint 2013 Enterprise Search

[Sample of Nov 9th] Binding DataGrid with Two way mode and MVVM pattern

$
0
0

 

Homepageimage
RSS Feed

Sample Download :

CS Version: http://code.msdn.microsoft.com/CSSL4DataGridBindingInMVVM-a5ad2cc5

VB Version: http://code.msdn.microsoft.com/VBSL4DataGridBindingInMVVM-3ffdfd5b


The project illustrates how to bind data source with using two way mode with frequent changed data, the clients can be notified when properties has been changed. The sample designed by MVVM pattern, the lightly pattern provides a flexible way for improving code re-use, simply maintenance and testing.

imageYou can find more code samples that demonstrate the most typical programming scenarios by using Microsoft All-In-One Code Framework Sample Browser or Sample Browser Visual Studio extension. They give you the flexibility to search samples, download samples on demand, manage the downloaded samples in a centralized place, and automatically be notified about sample updates. If it is the first time that you hear about Microsoft All-In-One Code Framework, please watch the introduction video on Microsoft Showcase, or read the introduction on our homepage http://1code.codeplex.com/.


FAQ: Remote Teams and Managers … a feasible scenario?

$
0
0

We had an interesting brownbag discussion at the Vancouver Development Centre yesterday. Here are three of the slides and the nuggets that emerged from the discussions.

We are in essence bridge builders, connecting the product groups, marketing and leadership, with up to 200 ALM Rangers scattered across the globe, time zones and infrastructure topologies.

Our recommended ALM Rangers project team consists of:

  1. One product owner (PO)  from the product group, who owns the backlog and who makes the tough decisions on scope and engages other stakeholders as needed.
  2. One project lead who enables the team, loves transparency, dislikes information hiding and is focused on tine tuning the team and collaboration.
  3. Up to five team contributors.
  4. One Ruck Master who guides, mentors and coaches the project leads and teams as needed. Continuous ALM Ranger process improvement is a primary objective of the Ruck Masters.

The PO is typically located on the left-hand side of the bridge and the rest on the right hand-side. Remote team and managers are therefore part of every ALM Ranger team ecosystem, even before the team engages reviewers and early adopters.

Slide3
Isolation is a problem and while some thrive in isolation, others need constant buzz and activity around them. If the latter applies, ensure that you engage with your colleagues using video conferencing technologies, such as Lync, and limit “working from home” :) Personally I work best sitting in the middle of Semiahmoo Bay at low tide, but I need to collaborate with my teams and I value the precious face to face time in Redmond, or sitting with phenomenal colleagues like Charles Sterling “Chuck” over a “real” beer and burger.

Eye to eye collaboration is definitely the best, because you can perceive not just audio, but facial expressions and feedback … not to mention being able to walk up to a whiteboard, scribble and discuss. Plan regular team visits, meet face to face and get to know the humanoid behind the virtual online names.

For those travelling between the Redmond and Vancouver development centre (FAQ – How can I travel from the Vancouver Development Centre to the Redmond Campus?) it is worth talking to your manager and HR to organize an intermediate L1 visa. Border crossings are easier and you are actually allowed to be productive while you are in the US and do work :) Be careful with visa waivers and B* visas, which have restrictions in terms of “doing work”, often forcing you to sit on your hands while visiting the Redmond teams.

Going to the US be ready to answer question related to “why are you entering the US” and going to Canada “what are you bringing with you”. If you travel to the US every second week, as I do, you get used to explaining why you have an intermediate L1 yet live in Canada, why you take the bus instead of driving yourself, why you need to visit your remote teams and why you would work through the night instead of booking a hotel.
Slide4

When collaborating / communicating with remote teams around the world it is important to remember the different cultures, characters and time zones. While some people take to online meetings like a Duck to water, others battle with the virtual world.

  • Make sure you engage everyone on the online call, draw in the more conservative attendees and throttle the more enthusiastic and tenacious attendees where needed.
  • Be aware that some attendees may be attending at odd hours due to their time zone, respect their time.
  • Rangers like to start on time and finish ahead of time :)
  • Use video! It is amazing how the interaction changes when you can see your virtual attendees and vice versa. In the past it was often the case that the team in Redmond would literally walk out of the meeting, forgetting that they had a remote team member wondering what happened. With video this unintentional gremlin has disappeared from the virtual room … if they see you, they remember you!

Discuss the challenges and options of online meetings with your remote colleagues. If they understand the challenges and see the value of video, for example, they will make every effort to bring a laptop to their meetings and talk to you vFace to vFace :)

Slide5

To summarize, three points of advice:

  1. Make video conferencing tools, i.e. Lync, your friend, using all the available technology, such as video, to bring you closer to the remote team.
  2. Remember and respect different cultures and times zones.
  3. Make an effort to visit your remote teams and to meet the humanoid behind the virtual avatars face to face.

Do we believe it is a feasible scenario? We, the ALM Rangers, have and are living in this scenario every day of our exciting days … our response is therefore a definite yes!

SharePoint 2013 Search Query Tool Released on codeplex

$
0
0

The Search Query Tool is a project I have been working on for a while now. And finally, I have reached the phase where it goes out to the world.

 

This tool helps you understand and learn how the available parameters on the Search REST service should be formatted.

 

What does this tool offer:

  • Issue HTTP GET or POST search queries.
  • See how the different Query parameters are formatted.
  • Authenticate using different users to debug security trimming issues.
  • Use against your tenant on SharePoint Online and authenticate using your SPO User ID.

 

 

Go get it from:

http://sp2013searchtool.codeplex.com/

 

 

 

 

Big thanks go to my colleagues Dan Gøran Lunde and Murad Sæter for all the cool ideas and support.

As always, Enjoy! 

今日から 2 日間は 2012 MVP Open Day !

$
0
0
情けないことに、先日風邪を引いてしまい、げほげほ咳き込んでいる井上です。。。orz さて、今日 2012 年 11 月 10 日から 2 日間、マイクロソフト品川オフィスのセミナールームで 2012 MVP Open Day が開催されます。年に一度、日本の MVP のみなさんが集結するクローズドなイベントです。 MVP とは、正確には Microsoft Most Valuable Professional と呼ばれる、マイクロソフトがエンジニアのみなさんの個々の活動に感謝の意を込めて表彰させていただく、ワールドワイドなプログラムです。 詳細はこちら↓ マイクロソフト MVP アワード プログラム マイクロソフトの製品やテクノロジーに関して、個人としてオンラインやオフライン、メディアなどを通じて情報発信を積極的に行っていただいている方は世界中にたくさんいます。我々エバンジェリストをはじめとしたマイクロソフト社員が発信するさまざまな製品・テクノロジー情報だけでは、なかなか行き届かない部分もたくさんあることは事実で、それらを補ってマイクロソフトに対して積極的に貢献いただいている方を表彰させていただき...(read more)

AX 2012 – Cómo asignar diferentes Series (Folios) para el mismo Número de Aprobación en la facturación electrónica de México

$
0
0

Con relación al uso de la factura electrónica en México, si el SAT ha otorgado al cliente rangos de Folios Fiscales iguales para series diferentes pero con el mismo Número de Aprobación, al intentar configurar los Números de autorización en AX 2012, se obtiene el siguiente mensaje de error:

“No se puede crear un registro en Números de Autorización (SATAuthorizationNumber_MX). Number sequence code: XXX, X.
El registro ya existe.”


En ese caso, se puede utilizar la siguiente recomendación en Microsoft Dynamics AX 2012.



Modificar los índices de la tabla SATAuthorizationNumber_MX de acuerdo al siguiente procedimiento:

1. AOT > Data dictionary > Tables > SATAuthorizationNumber_MX.
a. Nota: Abrir dos ventanas de AOT para modificar el índice.

2. En la ventana del lado izquierdo expandir el nodo de los campos.


3. En la ventana del lado derecho expandir el nodo del índice NumSeqSeriesYearNumberIdx.
a. Nota. En esta ventana, marcar el campo NumberSeqTable en el índice para que el campo AuthorizationCode quede abajo del NumberSeqTable al momento de arrastrarlo entre ventanas.

4. Arrastrar el campo AuthorizationCode al índice NumSeqSeriesYearNumberIdx. (Figura 1).




Figura 1


5. Borrar el campo AuthorizationCode del índice AuthorizationCode (usa el botón derecho > “Eliminar”) (Figura 2).



Figura 2

6. Guardar los cambios (Ctrl+S).
Nota. Sincronizar si es solicitado por AX.


Como resultado se podrá configurar diferentes Series para el mismo Número de Autorización. (Figura 3).




Figura 3




DISCLAIMER:
"Esto es una recomendación, la cual no ha sido publicada a través del sitio Web de Microsoft ya que no ha sido sometida a un ciclo de pruebas de regresión. Por favor tenga en cuenta que esto tiene que ser probado en un ambiente de prueba por usted como si se tratara de una personalización. Microsoft no puede garantizar este código".


Para P

AX 2012 - Contenido Oficial de Microsoft Dynamics AX 2012 — ¿Dónde está y cómo puedo conocer las actualizaciones?

$
0
0

Encontré un artículo en el blog del equipo de producto de Microsoft Dynamics AX que me llamó la atención. En este blog la jefe del equipo de documentación de Microsoft Dynamics AX, Margo Crandall, nos presenta tanto las fuentes oficiales para obtener información de Microsoft Dynamics AX, así como los diferentes tipos de documentación que se genera para Microsoft Dynamics AX 2012. 

Espero que lo disfruten tanto como yo lo hice.

http://blogs.msdn.com/b/dax/archive/2012/03/15/official-dynamics-ax-2012-content-where-is-it-and-how-can-you-find-out-about-updates.aspx



Recomendación:

En caso de necesitar traducción, se sugiere utilizar la herramienta de traducción en la parte superior derecha de la página:




Para T

Principales hotfixes recomendados para el cierre de inventarios en AX 2009

$
0
0

Hola a todos, les dejo aquí una lista de los principales hotfixes relativos al cierre de inventarios y que deben contemplar para evitar cualquier contratiempo. Cada uno de ellos corrige distintos comportamientos, algunos de performance y otros del cálculo mismo, los   que considero más importantes por el impacto que tienen están marcados en amarillo. Mi recomendación es que los instalen desde ya y muy importante, verificar que los objetos que actualiza no se encuentren personalizados pues los hotfixes perderían el efecto para el cual fueron diseñados:

Comportamiento corregido

KB - AX2009

KB - AX 4.0 (backport)

Cambio de lógica de costeo de AX 4.0 a AX 2009

 

KB967565

Error message when you cancel an inventory closing periodic activity in Microsoft Dynamics AX 2009 Service Pack (SP1): "Could not delete a weighted average inventory closing transaction on item on [date]".

KB 973239 (AXSE 8566)

5.0.1500.973 (RU3)

KB 975521

(AXSE 9819)

4.0.2503.836

Error message when you run the inventory closing process in Microsoft Dynamics AX 2009: "[Quantity] cannot be picked because only 0,00 is/are available from the inventory"  ("Se debe especificar la dimensión número de serie"

KB 971536

(RU2)

KB 972769

(AXSE 7565)

"1,00 cannot be picked because only 0,00 is/are available from the inventory" error message when you try to close an inventory (“xxxx.xx no se puede seleccionar ya que solamente xxx.xx están disponibles en el inventario”)

KB 969754

(RU2)

KB 972769

(AXSE 7565)

Performance-The features for the inventory value report, the potential conflicts-inventory and general ledger report and the closed non-financial transfer are available for Microsoft Dynamics AX 2009 SP1.

KB 982712

5.0.1500.2985

(RU5)

 

The cost price of an item is incorrect after you end a quarantine order with decreased quantity in Microsoft Dynamics AX 2009

KB 974788

(RU8)

 

Mensaje al finalizar el cierre: “Transaction: Weighted average inventory closing, lot ID Lot ID number Unit cost price Unit cost price can be wrong as the transaction cannot be fully settled.”

KB 979328 (AXSE 14274)

5.0.1500.2240 (RU5)

 

Additional transactions are adjusted when you run a Close for a specified month in Microsoft Dynamics AX 2009 Service Pack 1 (SP1)

KB 2479622

(AXSE 24032)

5.0.1500.4659 (RU8)

 

Microsoft Dynamics AX 2009 Service Pack 1 creates the "Weighted average inventory closing" transactions that have a warehouse specified even though the weighted average amount is calculated based on company

KB 2384625

(RU6)

 

Microsoft Dynamics AX 2009 SP1 uses an on-hand average cost amount to cost a transaction of the transits warehouse and cannot adjust the incorrect cost amount in the incorrect transaction

KB 2265528

(AXSE 19175)

5.0.1500.4145 (RU7)

 

AX settled more quantity then Quantity in transaction for Weighted average valuation method during Inventory closing

KB 979328

(RU5)

 

Wrong adjustments are generated in a wrong period after you perform an inventory closing

KB 977250

(AXSE 9968)

Build: 5.0.1500.1557 (RU4)

 

The value in the "Warehouse" column is not null as expected in a created "Weighted average inventory closing"

KB 2271928

(AXSE 19045)

5.0.1500.3411  (RU6)

 

You experience a slow performance on Inventory closing when you use many-to-many Marking for the inventory transactions

KB 2572943

(AXSE 1960)

5.0.1500.5294 (RU8)

 

The inventCostHelp.calcAndPostVariances method costs lots of time on the calcAndPostVariances function

 

Objets affected:

This hotfix affects the following objects:

• \Classes\InventCostHelp 

• \Classes\InventModelType 

KB 2565929

(AXSE 25087)

5.0.1500.5623

(RU8)

 

Learn about what's New with Information Rights Management in SharePoint and SharePoint Online in Vegas and online

$
0
0

next week I will be speaking at the SharePoint conference in Las Vegas (http://www.mssharepointconference.com/Pages/default.aspx).

I will be talking about the work my team has done to reimagine IRM services in SharePoint and SharePoint online. We did a lot of re-plumbing to ensure this unique service is available in the Office 365 cloud and also made some significant progress in improving the management of the feature, adding new capabilities (such as group protection), adding PDF to the list of file types we can protect and finally made the whole thing programmable. Read about this more at he official blog post: http://sharepoint.microsoft.com/blog/Pages/BlogPost.aspx?pID=1048 and let me know what you think. Obviously, you are welcome to attend my session in the conference to learn more: Deep Dive on Information Rights Management and SharePoint (Breakout Session 12: Wed 3:15pm – 4:30pm , SPC073)

 


Reportes de conciliación entre el modulo de Inventarios y GL

$
0
0

Como much@s de ustedes saben, en ocasiones conciliar los módulos de Inventarios y Contabilidad suele ser una tarea que puede llegar a requerir un buen tiempo de análisis de cifras y saldos contables. En AX 2012 se incluye ya una serie de reportes que ayudan a mitigar esta tarea y ofrecen la flexibilidad de crear los propios con base en la misma lógica. Estos reportes identifican las causas más comunes de "descuadre" entre ambos módulos: diarios contables del tipo inventario que se registraron directamente en GL, parámetros de contablización no activados en Inventarios, modificación de las cuentas de un gurpo de artículos o posting profile cuando uno o varios artículos ya contaban con transacciones, etc. Estos reportes los encuentran disponibles en AX 2012 en la ruta Inventory management >Reports >Status>Inventory value >Potential conflict - inventory and general ledger. En Ax 2009 estos mismos reportes también están disponibles a partir del RU5 en la misma ruta.

Espero les sea útil.

Saludos

 

How to Set Up Visual Voicemail on AT&T Nokia Lumia 920

$
0
0

Nokia Lumia 920 available through AT&T only comes with Visual Voicemail, a feature that allows you to view, play, and or delete voicemail messages on your device. In order to use the visual voicemail feature, you must create a voicemail password and turn the security on. Visual voicemail uses the same password as the one for voicemail.

If you have a password but the security is turned off, the visual voicemail feature will not work: it is not visible to you; you will not see a list of messages as you would with phone call history, and you’ll not be prompted for password.

image

You can set or reset your voicemail password by calling 611, and follow the instructions. you will get text message with a four-digit pin. Or, you can call your voicemail and use the administrative option to reset password and turn on the password setting. With this option, you will get a 7-dig pin, which by default is your phone number without the area code. You should change the temporary pin/password to something you remember.

For more information, read AT&T Visual Voicemail: An introduction

 

法语学习小手册(Microsoft Windows 商店 应用程序)隐私策略声明

$
0
0

法语学习小手册(Microsoft Windows 商店 应用程序)隐私策略声明

法语学习小手册为法语初学者提供了一些必备的知识点和技巧总结。按照知识点的内容和类别,本手册一共分为:音标基础,发音技巧,动词变位,基本语法,时间数字,在线资源这六大模块。用户可以根据具体需要自行选择所需要查看的内容。

本隐私策略声明函盖了用户对于法语学习小手册应用程序中所有内容的使用。

法语学习小手册不会收集、存储、分享用户的任何个人信息;也不会收集、存储、分享用户用于安装本应用的设备相关的信息。我们不会通过法语学习小手册应用程序收集任何统计数据和分析数据,也不会跟踪用户的行为。本应用程序中所显示的所有文档内容都已经随程序静态安装,绝不会动态地使用用户的网络连接去下载获取任何额外的内容或资源。

法语学习小手册(Microsoft Windows 商店 应用程序)隐私策略声明的修改及更新权均属于本应用的开发者所有。

Des cours en anglais sur Windows Server 2012

Doppler One

$
0
0

Professor Chris Bishop is well known round here for giving entertaining science talks aimed at young people - a few years ago he presented the Royal Institution Christmas Lectures. Every so often Chris pops into my office to talk about a bit of software for a particular demo he wants to show - these are normally very simple bits of software, intended to illustrate some particular idea in a very clean and clear way, and one such application is the "doppler demonstrator" I'll describe here.

The basic idea is to have a small blob traverse the screen, emitting circular growing "waves" as it goes. When the blob is stationary, the screen looks a bit like ripples spreading from a stone dropped in a pond; when the blob moves, the wavefronts in the direction in which it's travelling are compressed and the wavefronts behind are spaced out further, indicating how, for example, sound frequency of an approaching car is higher than when it's moving away. (As the blob gets faster, it catches up with the leading wavefronts and breaks the "sound barrier.") Below is a picture of the program in action:

(Actually, the version used in the talk had no title bar nor visible slider, but this'll do for the time being.)

There are many ways this could have been written but, being fairly lazy, I chose WPF. The main window Xaml definition is very short:

<Window x:Class="Doppler.MainWindow"        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"        xmlns:local="clr-namespace:Waves"        WindowState="Normal"        Title="Doppler" Width="1024" Height="768">    <Grid Background="Black" KeyUp="Grid_KeyUp">        <Viewbox Stretch="UniformToFill" VerticalAlignment="Center" HorizontalAlignment="Center">            <Canvas x:Name="Surface" Height="600" Width="800">                <Path Fill="Red">                    <Path.Data>                        <EllipseGeometry x:Name="Source" Center="400,300" RadiusX="10" RadiusY="10" />                    </Path.Data>                </Path>            </Canvas>        </Viewbox>        <Slider x:Name="SliderSpeed" Grid.Row="0" VerticalAlignment="Bottom" Margin="10" Orientation="Horizontal"                Minimum="0" Maximum="3" LargeChange="1" SmallChange="0.5"                IsMoveToPointEnabled="True" Opacity="0.5" />    </Grid></Window>

The blob (the ellipse called "Source") moves across the containing canvas, which is squeezed into a view box such that it easily scales to any size of screen, and the slider at the bottom controls the speed. Movement is triggered by a timer, which executes the following every 100th of a second:

        private void Tick(object sender, EventArgs e)        {            var x = this.Source.Center.X;            x += this.SliderSpeed.Value;            if (x > this.Surface.Width)                x = 0;            else if (x < 0)                x = this.Surface.Width - 1;            this.Source.Center = new Point(x, this.Source.Center.Y);            if (++period > 12)            {                period = 0;                CreateWave(this.Source.Center);                CreateWave(new Point((this.Source.Center.X - this.Surface.Width), this.Source.Center.Y));            }        }

Move the blob right some amount taken from the slider, wrapping at the right edge. Every so often, emit a new ripple via CreateWave. Why two waves? I want the display to look as if everything's wrapped, not just the red blob, so I pretend there's another wave emitting source a screen width behind this one; as wavefronts expand off the right, wavefronts from this extra phantom blob come is at exactly the right place on the left.

CreateWave is fairly straightforward, but a bit fiddly. I set up some WPF animations to take care of the wavefront expanding without me having to control them step by step. (I did wonder if I could do the same for the blob motion, but couldn't come up with a clean solution in the few hours I gave myself to write this app.)

        private void CreateWave(Point c)        {            var wave = new Path            {                Stroke = Brushes.White,                Data = new EllipseGeometry { Center = c }            };            this.Surface.Children.Insert(0, wave);            waves.Add(wave);            var d = new Duration(TimeSpan.FromSeconds(2));            var sb = new Storyboard { Duration = d };            const double max = 200;            var sizeAnimX = new DoubleAnimation(11, max, d);            sb.Children.Add(sizeAnimX);            Storyboard.SetTarget(sizeAnimX, wave);            Storyboard.SetTargetProperty(sizeAnimX, new PropertyPath("(Path.Data).(EllipseGeometry.RadiusX)"));            var sizeAnimY = new DoubleAnimation(11, max, d);            sb.Children.Add(sizeAnimY);            Storyboard.SetTarget(sizeAnimY, wave);            Storyboard.SetTargetProperty(sizeAnimY, new PropertyPath("(Path.Data).(EllipseGeometry.RadiusY)"));            var strokeAnim = new DoubleAnimation(5, 9, d);            sb.Children.Add(strokeAnim);            Storyboard.SetTarget(strokeAnim, wave);            Storyboard.SetTargetProperty(strokeAnim, new PropertyPath("StrokeThickness"));            var opacityAnim = new DoubleAnimationUsingKeyFrames();            opacityAnim.KeyFrames.Add(new LinearDoubleKeyFrame(0.7, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(0))));            opacityAnim.KeyFrames.Add(new LinearDoubleKeyFrame(0.6, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(1.8))));            opacityAnim.KeyFrames.Add(new LinearDoubleKeyFrame(0.0, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(2))));            sb.Children.Add(opacityAnim);            Storyboard.SetTarget(opacityAnim, wave);            Storyboard.SetTargetProperty(opacityAnim, new PropertyPath("Opacity"));            sb.Completed += (sender, e) =>            {                var w = this.waves[0];                this.waves.RemoveAt(0);                this.Surface.Children.Remove(w);            };            sb.Begin();        }

The important features here are the first couple of animations, growing the wave horizontally and vertically. The other critical parts of the routine are adding the wave to the canvas (note, inserted at the beginning, so that the red blob stays on top) and the storyboard completion handler to remove the no longer required wave. I couldn't figure out an easy way to identify the wave from the event arguments, so have a separate list of waves - I know that the expiring one is the first on this list, since they're appended in the order in which they're created.

The rest of the animations here (wave thickness, opacity and, in earlier versions, colour) are the result of Chris and I trying various ideas to see what looked good on a projector screen. The result of the application is shown below.

If you look carefully, you'll notice that this is quite different to the first picture: the lines are all much sharper. We did want something smoother, and adding a blur effect to the canvas almost did the right thing. However, we also really wanted to exaggerate the sound barrier breaking brightness, so I wrote a custom effect which did a little blurring and then increased the contrast a lot. The canvas Xaml fragment was modified to:

            <Canvas x:Name="Surface" Height="600" Width="800">                <Path Fill="Red">                    <Path.Data>                        <EllipseGeometry x:Name="Source" Center="400,300" RadiusX="10" RadiusY="10" />                    </Path.Data>                </Path>                <Canvas.Effect>
                    <local:ContrastEffect />
                </Canvas.Effect>
            </Canvas>

The new bit (in bold) refers to the custom effect. There are numerous shader tutorials on the internet, such as this particularly good one so I won't waste time talking about how to define a customshader to use in WPF. However, below is the short fragment of HLSL which I used:

sampler2D implicitInput : register(s0);float4 main(float2 uv : TEXCOORD) : COLOR 
{float2 sampleOffsets[9] =
	{   0,0, -1,0, 1,0, 0,-1, 0,1, -1,-1, -1,1, 1,-1, 1, 1
	};float scales[9] =
	{  1, 0.8, 0.8, 0.8, 0.8, 0.7, 0.7, 0.7, 0.7
	};// Very crude and simplistic blurfloat4 c = 0;for(int i = 0; i < 9; ++i)
		c += scales[i] * tex2D(implicitInput, uv + 0.001 * sampleOffsets[i]);
	c /= 7;
	c = saturate(c);// Increase the contrast greatlyfloat4 c0 = c * c * c;
	c0.a = c.a;return c0;
}

The first part is a simple blur: add fractions of pixels neighbouring the target one, and average - smooths the texture a little. The last few lines really boost the contrast, such that bright colours (as with overlapping waves) really stand out, as you can see in the top image.

And that's it. Now, one question is: why am I bothering to describe this quite old and really very simple application? Well, it's been a month since I last posed and I needed to show that I was still alive! Nonono - the reason is that I'm starting to write some modern Windows apps, and thought that something like this would be interesting to port, to be covered in the next post or two...

Viewing all 35736 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>