windows-8

How to read a file shipped with the app in Windows 8 Metro

我的未来我决定 提交于 2019-12-12 04:57:59
问题 I've got a text file that ships with my app and I want to display its contents on the screen. Anyone know how to do that? The usual file IO doesn't seem to work for Metro. Thanks 回答1: In my app I am reading a XML file that comes with the app, you can tweak it to read any type of file public class LocalStorage { private const string SyndicationFeedCategoriesFileName = "FeedCategories.xml"; private StorageFile _storageFile; private StorageFolder _storageFolder; public async Task<XmlDocument>

Creating a Byte array from an Image

天大地大妈咪最大 提交于 2019-12-12 04:43:54
问题 What is the best way to create a byte array from an Image? I have seen many methods but in WinRT none of them worked. 回答1: static class ByteArrayConverter { public static async Task<byte[]> ToByteArrayAsync(StorageFile file) { using (IRandomAccessStream stream = await file.OpenReadAsync()) { using (DataReader reader = new DataReader(stream.GetInputStreamAt(0))) { await reader.LoadAsync((uint)stream.Size); byte[] Bytes = new byte[stream.Size]; reader.ReadBytes(Bytes); return Bytes; } } } } 回答2

How can I use SQLite query parameters in a WinRT app?

不羁岁月 提交于 2019-12-12 04:36:29
问题 I want to use query parameters in my update sql, and had this code: internal static int UpdatePhotosetName(string oldPhotosetName, string newPhotosetName) { String qryUpdateBaseTable = "UPDATE PhotraxBaseData SET photosetName = @newName WHERE photosetName = @oldName"; int rowsUpdated; using (var db = new SQLite.SQLiteConnection(App.DBPath)) { SQLiteCommand cmd = new SQLiteCommand(db); cmd.CommandText = qryUpdateBaseTable; cmd.Parameters.Add(new SQLiteParameter("@newName")); cmd.Parameters.Add

JSON Parse Error (Windows 8) [duplicate]

风流意气都作罢 提交于 2019-12-12 04:22:27
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: JsonArray.Parse(…) error I am developing a manga information app for Windows 8 (in C#, XAML). I'm receiving information from a public web API (http://www.mangaeden.com/api/list/0/) which I'll use in my app accordingly. I can receive the JSON string effectively but I cannot parse it correctly and I don't know what exactly is wrong with it. The error that comes up is "Invalid JSON string" but when I check on http:

tap visual white circle indicator windows 8

╄→гoц情女王★ 提交于 2019-12-12 03:57:02
问题 In most windows 8 apps when you tap anywhere inside the app you see a white-circle tap notification. For some reason, the notification doesn't occur in my app. How is the indication enabled or disabled? i tried IsHitTestVisible , but don't see anything change in my grouped item page. 回答1: IsHitTestVisible has nothing to do with the white-gray tap short-animation, which is a shell feature. All apps are showing it when a touch event occurs in the context of the OS. 回答2: This question is kinda

Checking processor is 32 bit or 64 bit [duplicate]

折月煮酒 提交于 2019-12-12 03:49:11
问题 This question already has answers here : check OS and processor is 32 bit or 64 bit? (5 answers) Closed 6 years ago . When a processor is considered 32 bit or 64 bit? I want to check whether a PC is having 32 bit or 64 bit processor. So how can i check it in a vb6 code? While i was researching about it i got that i should check wProcessorArchitecture in SYSTEM_INFO. When i check according to it my windows 8 pc is returned as 32 bit.But when i check in computer properties it shows x64 based

WPF: Windows 8 Tabtip close?

回眸只為那壹抹淺笑 提交于 2019-12-12 03:49:09
问题 I've been searching and still can't find answers about this problem. i had managed to open the process of the tab tip by this code: Private Sub TextBox1_GotFocus(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles TextBox1.GotFocus Process.Start("C:\Program Files\Common Files\Microsoft Shared\ink\TabTip.exe") End Sub ive been trying to kill the process but still it won't work. But returning it to dock or closed. still can't find any answers.Is this possible? hope

Open extern SQLite-Database in a Windows 8 Metro-App?

大城市里の小女人 提交于 2019-12-12 03:43:22
问题 I use the "Sqlite for Windows Runtime" and sqlite-net (just as described at http://timheuer.com/blog/archive/2012/08/07/updated-how-to-using-sqlite-from-windows-store-apps.aspx) to develop a Windows 8 Metro-App, just . If I want to open a Database at the Program-Directory is no problem: var dbPath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "db.sqlite"); using (var db = new SQLite.SQLiteConnection(dbPath)) { ... } But when I want to use an extern Path like this:

Error TF249051 using TFS 2008, VS 2012 and Windows 8

穿精又带淫゛_ 提交于 2019-12-12 03:41:34
问题 I have a Addin for Visual Studio, that connect to TFS 2008 server. I use VS 2012 in Windows 7 and Windows 8 (and 8.1). No problem using my Addin, VS 2012 and Windows 7. All is OK. But there is authentication issue using My Addin, VS 2012 and Windows 8. Anyway, if I use Team Explorer and Source Control in VS 2012, there's no problem. I get the following error: TF249051: No URL can be found that corresponds to the following server name: myTFS_server. Verify that the server name is correct. Full

How to populate list in windows8 with javascript

谁都会走 提交于 2019-12-12 03:33:56
问题 Im trying to build an windows8 app, i use the SplitApp as basic. Just trying to add data from AJAX but it fails. In the file data.js i have: (function () { var list = new WinJS.Binding.List(); $.each(data(), function (key, item) { list.push(item); }); } })(); In the file app.js i have (This works and populates the list in the app) function data() { var testGroupMeeting = []; var testMeeting = []; testGroupMeeting.push(new Group({ id: "1", title: "Group1" })); testMeeting.push(new Meeting({