Haraka na Easy: Hoja ya Mstatili Kutumia C # Katika Windows Hifadhi App

Blog yangu falsafa ya jumla ni kwamba ni kikamilifu faini ya blog juu ya zamani, makazi masomo ambayo wamekuwa kufunikwa kwa kifo mahali pengine.  Mimi kudhani mada hii ni mmoja wa wale, lakini nina mabalozi ni anyway.

Nimekuwa kazi juu ya programu ya kuhifadhi dirisha na mimi nina katika sehemu ambapo mimi haja ya kufanya baadhi changamfu.  Hadi mwisho huu, I’ve been figuring out bits and pieces of windows store app animation which, as it turns out, is quite close to, but not exactly like, XAML based animations in .NET (I’m still coming to grips with the fact that WinRT <> .NET 🙂 ).

This morning I wanted to get a handle on drag and drop operations.  En route to that, I got bogged down moving a rectangle instead :).  Here’s the code that moves a rectangle when the user clicks a button:

   1:   
   2:              MatrixTransform ct = (MatrixTransform)rectBig.RenderTransform;
   3:              Matrix m = ct.Matrix;
   4:              m.OffsetX  = 10;
   5:              m.OffsetY  = 10;
   6:              ct.Matrix = m;
   7:              rectBig.RenderTransform = ct;

The trick here is that I can’t directly change OffsetX or OffsetY.  There may be a more clever way of doing this (and if you know and feel like, please post in the comments). 

In order to do this, I need to:

1. Get the MatrixTransform of the rectangle (by casting RenderTransform).

2. Get the Matrix of that guy.

3. Change the Matrix’s offsets.

4. Reassign the Matrix back to the MatrixTransform.

5. Reassign the MatrixTransform back to the Rectangle.

To test it, I put a rectangle and button the screen. When I click the button, the above logic executes and moves the rectangle immediately.

Katika hatua nyingine, I’d like to animate this but I have no idea how to get a DoubleAnimation to work on it (Storyboard.SetTargetProperty() is a mystery to me on this for the time being).

</mwisho>

undefinedKujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Kuweka Urefu wa ListboxItems Katika listbox programmatically kwa Windows Hifadhi App

I’m working on a windows store application and one of the things I want to do in the app is display a log that shows status messages and other informational tidbits as the user works things. Hadi mwisho huu, Mimi aliongeza listbox kama ifuatavyo:

<Listbox x:Jina ="GameStateLog" HorizontalAlignment ="Kituo cha" Urefu ="221" VerticalAlignment ="Juu" Width ="499" Padding ="0" FontSize ="10">

 

C # kanuni na idadi ya listbox katika Runtime alikuwa pamoja na mistari ya:

GameStateLog.Items.Insert(0, GameStateCounter     + ": Mpya mchezo hali: kusubiri kwa mchezaji 1 jina");

This worked out fine enough but the UI showed a crazy amount of padding around the individual messages as they were added. Kwamba inafanya hisia kama nataka watumiaji wa mwisho na kuwa na uwezo wa kuchagua vitu hivi lakini haina mantiki wakati mimi nataka tu kuonyesha mfululizo mbio ya ujumbe logi - watumiaji si kuchagua hizi, just view them. Ilikuwa ni ajabu vigumu kupata njia rahisi ya kufanya hivyo na arguably, the way I found it isn’t necessarily “easy” but I got it working OK. ufahamu muhimu alikuja kutoka hii posting hapa (http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/c4a6f694-bd46-4779-ab83-b1c2fcb2397c) from Bob Relyea. Badala ya kuongeza masharti ya ukusanyaji Vitu kwenye listbox, add ListBoxItems. Kwa kuongeza string, the ListBox was creating its own ListBoxItem on its own. I wasn’t able to affect anything about that ListBoxItem after the fact. kanuni mpya ni:

        binafsi utupu AddGameStateLogMessage(string theMessage)
        {
            ListBoxItem kwamba = mpya ListBoxItem();
            li.Content = theMessage;
            li.MaxHeight = 25;

            Unene thisPadding = mpya Unene(5, 0, 5, 0);
            li.Padding = thisPadding;

            GameStateLog.Items.Insert(0,li);
        }

 

Here I’m creating ListBoxItem’s and inserting them. Mimi kuondolewa padding ziada kwa kuweka unene wake.

Hii ni pretty rahisi kama mimi na nia ya kufanya baadhi ya rangi coding kuonyesha aina fulani ya ujumbe na na moja kwa moja na kuongeza ListBoxItems mimi kupata style yao kwa njia yoyote nataka.

Matumaini hii husaidia mtu!

</mwisho>

undefinedKujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Haraka na Easy – Salama Azure Foleni Majina

Silly lakini rahisi baada ya.

As a follow-up to yesterday’s posting on “StorageException was unhandled” I thought I’d show the wee snippet of code I use to generate queue names:

 

        umma tuli string GetRandomQueueName()
        {
            Guid g;
            g = System.Guid.NewGuid();
            kurudi g.ToString();

        } 

Kind of silly in its simplicity but works well for me and has generated 100’s of safe queue names in the last couple of weeks.

</mwisho>

undefinedKujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Kufanya kazi na Foleni Azure – "StorageException ilikuwa unhandled”

Nimekuwa kucheza karibu na foleni Azure kwa wiki ya mwisho au mbili na imekuwa ni kwenda smashingly.  Ambapo walikuwa mambo haya wakati mimi zinahitajika kuwarejesha katika 1990?

Makala hii, hasa, ni intro bora ya foleni kwa programmers NET.: http://www.windowsazure.com/en-us/develop/net/how-to-guides/queue-service/.  Kutumia kwamba makala, I’ve been able to pull together a really nice bit of client-server logic that is so far reliable and just works with no grief.  Really – where was this stuff in 1990?

I did hit a small stumbling block right out of the gate, hata hivyo.   As soon as I strayed from the specifics of the walk-through, I got hit with a StorageException and a “The remote server server returned an error (400) Bad Request.

image

It turned out that my queue name was off:

image

When I changed “OneQueueToRuleThemAll” to “onequeuetorulethemall” the StorageException went away.  I haven’t noticed any of the documentation calling this out but it may well do that.

Hope that helps someone.

</mwisho>

undefinedKujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Mapema Impressions juu ya Pro Surface

[Mwisho 3/26: I got tweet kutoka kwa watu @ Surface kuuliza kama wangeweza kunisaidia na kitu, hivyo mimi alifanya kuziba kwa Swype, ambayo wao alikubali na kuvutia "- Asante kwa maoni, Paulo!"  Kwa kweli mimi nadhani kwamba Swype bila kufanya kifaa hii ni rahisi kutumia kwa ajili ya uzalishaji wa kawaida.  (Pia, fixed a typo pointed out to me by an old friend – thanks, Mike!)]

My office won a contest earlier this year with a small cash award attached to it.  I used the money to subsidize the purchase of a Surface Pro (128GB with the 2-year insurance plan) and I’ve been using a good deal since then.  I bought it from the Microsoft Store at the mall by Columbus Circle in Manhattan.  Total price was about $1300 USD with the better keyboard and the sucker’s insurance 🙂

I only got it 4 days ago and already I can hardly imagine not having it.  I brought to bed to read the so-far excellent Programming Windows 8 Apps with HTML, CSS, and JavaScript and it was the first thing I reached for when I woke up.

Here are some impressions, in no particular order:

How touching: I want to touch every screen I see now.

Windows 8 is for touch devices: I have a much stronger appreciation for Windows 8.  This O/S translates much better to a touch device than it does a keyboard.  At first, I didn’t know how to barely get started but it quickly became second nature for me. And it’s very fast and responsive, so you don’t feel like you’re lagging around or paying a penalty for a mistake.  I’m not an expert with the UI (mystery things still happen) but I’m flying all around the place with a good deal of confidence after a relatively small handful of hours on it

Wakati huo huo, now that I’ve been using touch, I have a much better understanding of the O/S from a Dell laptop perspective.  The mouse pad on my E6430 doesn’t compete with the Surface’s multiple points of contact, nk, but it does do a good job with some of the gestures.  But regardless of the mouse pad, having worked with the surface now, I know what’s happening when I move my mouse cursor around and various little cues pop up in the corners and such.

I also want to point out a line from this blog post na Brandon Carson:

Along comes Microsoft with a different perspective of how an operating system should support its users. Instead of two OS’s and a fragmentation between devices, Microsoft builds a new OS to blend the lean-back experience with the desktop experience and give the user control over how to interact with their device."

That line crystallized for me the whole point of Win8 as an O/S.  It’s an iPad and it’s laptop.  I like that.  I like that a lot.  I don’t bring my laptop to bed very often and when I do, it’s a novelty and a pain.  This thing can go everywhere with me, including work.

The windows store is awesome!  I just assumed, when I bought the Surface, that the windows app store would be a complete waste of time, a barren waste land of half-hearted apps clinging to the rocky soil, sad and pathetic.  I think that the various anti-Microsoft peoples are winning the hearts and minds argument here.  Although it’s empirically true that Apple and Google have bazillions more apps in their stores, dwarfing MSFT, MSFT still has a goodly selection and it’s growing.   My point isn’t that MSFT’s store is “better” than those, but that it’s not as bad as the intertubes will make you think.  Give it a look. There are many interesting apps out there.

Pen is awesome!: I have wanted the ability to write and sketch architecture diagrams FOREVER.  All the 3rd party things always felt kludgy unless you bought one that was expensive and I just didn’t feel like it.  With the surface, it’s totally natural and quick, plus lots of interesting apps available.  These include paint.net, something interesting from Evernote (Skitch), Onenote (which has first class support for the pen), PowerPoint (allows annotating and drawing during presentations).  I have barely scratched the surface here and I am loving it.  Check out this blog post for a more professional opinion on how Surface can be used for more industrial strength art.  I can’t wait for my next PPT demo.

It plays Civ5! (with a little help from some friends):  Civ with touch is really neat 🙂

Some annoyances:

  • Battery is not great.  No better than my laptop.  I have this vague notion that batteries need to be “conditioned” (but that’s probably nonsense) so if that’s the case, it may get better.
  • Keyboard is tiny.  Lakini, I have been getting used to it.
  • Si Swype! I just started using Swype a few months ago on my Galaxy S3 running Android and I can’t believe how productive it made me.  Not having that on Win8 is really frustrating and it seems like it will be a long time, if ever, before Swype is available.  Some other 3rd parties are working on it but my 30 seconds worth of research implies that the O/S jsut doesn’t support it.  (If you aren’t using Swype or one of its cousins you should stop reading this blog post and give it a try; this post will almost certainly still be here once you get back).
  • Overall form factor – still getting used to it.  It’s a beautiful screen and Netflix is great on it.  Web browsing is great on it. Lakini, MS Word – kind of hard and not very touch friendly (kwangu, hadi sasa).  I’ve seen screen shots of people using visual studio on it – that seems like a stretch.  But I’m going to give it a try at some point.

Hivyo, there you go!  Hope this helps someone thinking about about it.  It’s too early for me to say “buy it!".  Mimi itabidi kupitia upya baada ya hii katika wiki au hivyo na kufuatilia.

</mwisho>

Kujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Bila kutarajia kushangaza Timu ya Ujenzi Zoezi

Mimi aliitisha mkutano timu hapa kwa ajili ya timu ya New York SharePoint na katika dakika ya mwisho, hakuna sababu hasa, aliongeza mpya ajenda ya bidhaa:

Maoni ya kibinafsi kubadilishana: Mimi nina kwenda kuvuta up google duniani na kila mmoja wetu atakuambia timu ambapo sisi kuzaliwa na ambapo sisi kuishi leo. Mimi itabidi ramani ni muda halisi. Tutaweza pia kufanya mnyonge ya haraka ya familia zetu husika. Kujisikia huru na kujenga familia Ndoto hapa lakini kukumbuka kwamba mara moja kuanza amelazwa juu ya familia, una kujenga uongo mfululizo kufafanua na wewe uwezekano safari hadi wakati fulani, hivyo kuwa tayari kwa ajili ya kuwa.

Nilidhani hii bila kuchukua 20 dakika au hivyo na kufanya na watu tisa.  Badala yake, ilichukua 90 dakika Smile, hasa kwa sababu watu wanatumia kiasi kikubwa cha muda katika maeneo mbalimbali duniani kote.  Ilikuwa ni zoezi kuvutia na sisi hakika kujifunza mengi kuhusu kila mmoja.  Mimi kujifunza, hatimaye, nini watu maana ya "kaskazini" na "kusini" India.

Kama unaweza kupata muda katika siku hii busy na hectic kufanya kitu kama ni, Mimi moyo wote kupendekeza.

</mwisho>

Kujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Kufuatilia Mazoezi Shughuli – Sehemu 1

Kuhusu mwaka mmoja uliopita, Nilijiunga Slalom Consulting hapa katika mpya York kama kile tunachokiita Area Mazoezi Kiongozi.  (Kama madogo kando kwa uhakika wa hii blog post, kuwa mabadiliko katika akaunti ya ajira kwa taarifa yangu tone-off katika mabalozi.  Ilikuwa ni mabadiliko makubwa katika majukumu na mabadiliko makubwa katika siku ya "mambo" siku lakini nimepata aina ya acclimated mwenyewe kwa hayo na kuangalia mbele kwa kuandika tena Smile ).

Katika jukumu hili PAL, Mimi nina wajibu wa kuokoa kampuni na mazingira ya haraka ya 21 Magharibi ya 21 mitaani kutoka maafa ya mara kwa mara.  Ni mengi ya shinikizo (zaidi ya wewe kufikiri - tu kufikiri ya watoto wote!). 

Katika huduma muhimu kwamba, Nahitaji msaada kutoka nje na kabla ya mauzo, kujenga na update sadaka go-na-soko, kuajiri folks mzuri, mafunzo juu folks kuwafanya bora (lakini kwa kweli, kufanya kazi yangu rahisi) na mara kwa mara kufanya kitu billable saa mteja.  Mimi kupata mengi ya "pembejeo" - maswali kutoka kwa wateja, mauzo fursa, addled mawazo yangu mwenyewe na kadhalika.  Baadhi ya kweli ni nzuri (kama oppty moto mauzo) wakati mwingi ni chini nzuri.  muhimu ni awali kufuatilia, kipaumbele na kusimamia kila moja ya mawazo haya (kubwa na ndogo) katika hitimisho lenye mafanikio. 

Aina hii ya usimamizi wa kazi si mpya, haki?  Na sisi kuwa na kura ya zana kazi ya kutusaidia kwa hili.  Mtazamo ana kazi.  Unaweza kofi spreadsheet pamoja nzuri na ya haraka.  Kazi yangu ya kwanza kabisa usimamizi wa chombo alikuwa kisheria notepad nyuma katika siku yangu katika GAF kama developer katika idara ya IT.  (Kuuliza mimi kuhusu siku hizo nzuri ya zamani wakati ujao wewe kuona mimi kama wewe ni nia ya, au labda si...).

Kuwa guy SharePoint (husemwa, angalau), Nimekuwa daima walidhani kutumia SharePoint.  Lakini kwa sababu fulani, generic Task orodha kamwe kabisa alifanya hivyo kwa ajili yangu.  rundo la iliyopita, Niliamua kujiponya na kujenga tu SharePoint makao ufumbuzi.  Ilikuwa hivyo embarrassingly rahisi kujenga kwamba nilifikiri kuandika kuhusu hilo hapa.

Hivyo, malengo yangu hapa walikuwa rahisi sana:

  • Super rahisi na ya haraka data entry
  • Kipaumbele shughuli za
  • Panga shughuli
  • "Hatua ya pili" inayotokana - shughuli hizi mara nyingi span wiki (labda hata miezi).  Wao kamwe karibu "ya mwisho" baada ya update moja maalum.

Haya bits mikopo wenyewe vizuri mno na aina maudhui, hivyo kwamba ni nini mimi umba:

image

Unaweza kweli kuona kwamba sikuwa na upendeleo mauzo na hii kwa mara ya kwanza, tangu nina kwamba "Mteja" shamba.  mengi ya shughuli mazoezi yangu ni msingi kote wateja (ama halisi au wanaotazamiwa).  Lakini wengi wao ni pia ndani umakini.  Mimi kofi "Slalom" katika kuna wakati mimi kujenga yao, lakini daima anahisi tad weird.  Mimi lazima jina lake ni kitu zaidi ya kurefusha maisha.  Labda "inayolengwa Shirika" au kitu.

Hapa ni wachache maelezo miscellaneous juu ya aina maudhui:

  • Shughuli Athari ina devolved katika kipimo ya kipaumbele.  Mimi nina uhakika kwa nini mimi nikaenda na "Athari" na sio "Kipaumbele" siku sifuri, lakini hiyo ni nini mimi. 
  • Hatua inayofuata na Next Hatua Tarehe - Nina dashibodi kwamba inaendeshwa na tarehe ya pili ya shughuli.  Dashibodi hii ina aina ya kuwa kuandamana yangu amri kwa ajili ya siku ya wiki /.  Mimi tu kwenda dashibodi na kuzingatia mambo ya juu kipaumbele cha kwanza na kwenda kutoka huko.  (Kuna dhana ya "untagged"
  • Mmiliki msingi - kitu tu kumbuka ni - si ni ajabu kwamba unaweza aina na kuchuja juu ya nguzo mbalimbali kuchagua katika SP 2010! Mimi kwa kweli hakuwa kikamilifu kununua katika dhana hii kwa mara ya kwanza.
  • Shughuli Status - kweli tu "Open" au "Closed." 
  • Msingi Mazoezi - Baada ya mimi alianza kutumia hii, mwingine PAL katika kundi yangu alitaka kujaribu hii nje, hivyo mimi umeteleza hii katika mchanganyiko wa kutofautisha kati ya mambo yangu (Portaler & Kushirikiana) na mambo yake (Azure).

Hapa ni dashibodi yangu:

image

(pole kwa bits wote blurred nje - sikuweza kuhisi kama kujenga rundo la data mtihani na mimi sitaki kutoa mtu yeyote mashambulizi ya moyo juu ya maelezo ya kugawana muhimu [kuona kidogo katika re intro: kuokoa dunia, nk, nk, nk]).

Nina maoni mengine kadhaa katika orodha hii, ikiwa ni pamoja na mtazamo datasheet ambayo inaruhusu mimi kufanya updates habari.  Mimi kufanya hili mara nyingi wakati rundo la vitu chini kipaumbele nilipanga kufanya kamwe kabisa got kufanyika na haja ya kuwa kusukuma nje wiki.

Kila siku, Mimi kuvuta up shughuli zangu logi na kuanza tu kufanya kazi mbali juu ya orodha.

Katika sehemu ya 2, Mimi itabidi kueleza jinsi mimi alifanya hii hata muhimu zaidi na kuongeza ya nzuri email-enabled doc maktaba na SPD workflow.

</mwisho>

Kujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Slalom Consulting–Boston SharePoint Uongozi Inahitajika

Nilijiunga slalom ushauri miezi sita iliyopita kwa siku na ni kuwa safari ya ajabu.  Mimi mpango wa blogu baadhi ya zaidi kuhusu kwamba sasa mimi naanza kuhisi haki imara.  Kufanya kazi hapa ni kama kuishi katika hadithi Fairy zaidi ya muda.  Smart watu, kuvutia wateja, imara msaada kutoka kwa usimamizi wa ndani na ushirika ... sadaka ya kinyweo mara kwa mara ... nzuri mambo.

Yetu Boston ofisi ina tu wazi juu na wao ni kutafuta kiongozi kuzindua SharePoint yao mazoezi.  Ni ngumu sana, kamili kazi na mengi ya changamoto ya kujifurahisha.  Unaweza kufafanua sadaka ya maslahi ya soko la ndani, wewe zikunja sleeves yako na kufanya kazi halisi na wewe kuajiri folks wa kujenga timu bora unaweza kusimamia.  Siwezi kupendekeza sana kutosha.

Kama wewe ni nia katika nafasi hii au kama unajua mtu yeyote kwamba ili kuwa nia, tafadhali moto off barua pepe yangu: paul.galvin @ slalom.com.

Nafurahi kushiriki uzoefu wangu candid (nzuri na mbaya) hapa mjini New York.

</mwisho>

Kujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Kitabu yangu Workflow ni Available ya Ununuzi

Mimi kwanza kuanza kuzungumza na awali yangu ushirikiano waandishi zaidi ya miaka miwili iliyopita.  Hatimaye kutelekezwa mradi, lakini marehemu huu majira ya joto, kwa msaada wa mpya kadhaa ushirikiano waandishi, Mimi hatimaye kuweza kuleta hii katika mstari wa kumalizia. 

Mtaalamu Workflow katika SharePoint 2010: Real World Business Solutions hit Amazon na Barnes na tovuti Tukufu mtandao baadhi ya wakati katika mwisho 10 siku.  Ni inapatikana katika Paperback na washa / Nook na wote ya kwamba, tu kwa wakati wa sasa kubwa ya Krismasi. Smile

Kitabu hii ni kuhusu mambo mawili: 1) kuwawezesha watumiaji wa mwisho ili waweze kutatua matatizo yao wenyewe biashara kwa kutumia SP 2010 workflow uwezo na 2) kusaidia IT wafanyakazi (watengenezaji hasa) kufanya hivyo.  Kuhusu theluthi mbili ya kitabu ni walengwa katika kile kuwaita "Mwanaharakati Watumiaji" (wenye ujuzi lakini yasiyo ya kiufundi na motisha watumiaji wa mwisho).  Ni anajaribu kueleza jinsi ya hila ufumbuzi katika SharePoint 2010 kutumia SharePoint Designer workflow na idadi ya sifa za ziada SharePoint.

tatu ya mwisho ni lengo la squarely katika developer.  Hata hivyo, tofauti na baadhi ya vitabu rena kiufundi juu ya soko, hizi sura kueleza jinsi SharePoint watengenezaji unaweza kujenga utendaji kwamba zaidi kuwawezesha watumiaji wale mwanaharakati kwa njia ya desturi shughuli Designer SharePoint na nyingine bits kiufundi.  Na kuwawezesha watumiaji mwanaharakati katika shirika lako, wewe bure juu ya maendeleo ya timu yako (au tu wewe mwenyewe) kufanya bidii kweli (na kawaida zaidi kitaalam kuvutia) mambo ambayo watumiaji wa mwisho kamwe hawezi kufanya na kamwe lazima kujaribu wao wenyewe.

Zaidi ya wiki ijayo, Nitaandika juu zaidi kuhusu kitabu, ikiwa ni pamoja na mambo fluffy kama "ni jinsi gani kama kuandika kitabu" kuwa mimi najua mengi ya watu ni nia ya kujua kuhusu.  Kwanza hadi - I ll kuanzisha yangu ushirikiano waandishi bila ambao kitabu hiki kamwe kuwa alinusurika kuona mwanga wa siku.

Soma zaidi kuhusu kitabu juu ya Amazon mtandao.

</mwisho>

Kujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

SharePoint Mtandao Sehemu ya UI Design Pattern Kutumia XSL

Nimekuwa akitoa hotuba ya mwaka huu juu ya kubuni muundo kwa sehemu ya mtandao SharePoint ambapo UI ni kabisa imeweza kupitia XSL. 

Mimi mpango wa kuandika hii hadi kwa undani zaidi juu ya kipindi cha pili cha muda.  Katika maana wakati, hapa ni PowerPoint.

kanuni ya chanzo kwa ajili ya mradi huu ni juu ya CodePlex hapa: http://webpartsxsl.codeplex.com/.

</mwisho>

Kujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin