This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "pch.h" | |
#include "NativeCameraInterface.h" | |
using namespace Microsoft::WRL; | |
using namespace Windows::Foundation; | |
using namespace Windows::Foundation::Collections; | |
using namespace Windows::Phone::Media::Capture; | |
// Called each time a preview frame is available | |
void NativeCameraInterface::Native::CameraCapturePreviewSink::OnFrameAvailable( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Phone.Controls; | |
using System; | |
using System.Windows.Controls.Primitives; | |
/// <summary> | |
/// This class detects the pull gesture on a LongListSelector. How does it work? | |
/// | |
/// This class listens to the change of manipulation state of the LLS, to the MouseMove event | |
/// (in WP, this event is triggered when the user moves the finger through the screen) | |
/// and to the ItemRealized/Unrealized events. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// (c) Copyright Microsoft Corporation. | |
// This source is subject to the Microsoft Public License (Ms-PL). | |
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details. | |
// All other rights reserved. | |
using System.Diagnostics.CodeAnalysis; | |
using System.Windows; | |
using System.Windows.Media; | |
namespace Microsoft.Phone.Controls.Primitives |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Media; | |
namespace HamGuyToolkit.Controls | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import encodings.utf_8 | |
import math | |
import urllib, urllib2 | |
import random | |
import re | |
from xml.dom import minidom | |
from LevenshteinDistance import LevenshteinDistance | |
from grabber import LyricProviderBase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e) | |
{ | |
if (MessageBox.Show("Are you sure?", "Exit?", MessageBoxButton.OKCancel) == MessageBoxResult.OK) | |
{ | |
while (NavigationService.BackStack != null & NavigationService.BackStack.Count() > 0) | |
NavigationService.RemoveBackEntry(); | |
} | |
else | |
e.Cancel = true; | |
base.OnBackKeyPress(e); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.Add the font file to the project. | |
2.Set the build action to "Content". | |
3.Set the copy option to "Copy if Newer". | |
Useage: | |
XAML: | |
FontFamily="Fonts/pendule_ornamental.ttf#pendule ornamental" | |
Code-Behind: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void textBox1_TextInput(object sender, TextCompositionEventArgs e) | |
{ | |
System.Diagnostics.Debug.WriteLine(textBox1.Text); | |
this.Focus(); | |
//转移焦点到整个页面,TextBox失去焦点后,就会隐藏软键盘 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
需要添加一张启动图片,大小:640*1136,添加后默认命名为[email protected]。 | |
图片适配,对于高清的1136图片,命名同样使用@2x,只是改名图片名称,如image-1-os5.png,[email protected], | |
在代码中判断iphone5?(image-1):(image-1-os5),没有@22x这种。 | |
#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO) | |
view.frame = CGRectMake(0, 0, 320, 416+(iphone5?88:0)) | |
AViewController *aViewContrller = [[AViewController alloc] initWithNibName:(iPhone5?@"AViewController-5":@"AViewController") bundle:nil]; | |
UIViewAutoresizingFlexibleTopMargin:与superView上边界保持动态距离(按比例) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <windows.h> | |
#include <process.h> | |
int g_Count; | |
const int THREAD_NUM =10; | |
CRITICAL_SECTION g_csSubThread; | |
HANDLE g_Event; | |
unsigned int __stdcall ThreadFunc(PVOID pM) |
OlderNewer