/* BeejBlog */

What’s this? A pretty decent “Time Machine” built into Win8!?

image
http://lifehacker.com/5958865/how-to-use-windows-8s-new-file-history-backup-aka-time-machine-for-windows
i've always considered the Vista/Win7 "previous versions" facility to be pretty similar to Time Machine just lacking Apple's meticulous care to making it drop dead easy to use.
i hadn't yet noticed the MS boys had taken yet another swipe at simplifying the UI in Win8... i'm assuming there's still a usability gap that the Mac boys can laugh at us, but gee, first impression is "not bad Balmer you ol’ dog”
  1. search for "file history" in win8 home screen
  2. fire up the ui
  3. select my backup drive
  4. click the "turn on" button
  5. in normal explorer window right mouse all my favorite folders and add them to the documents "library" - since that's included in what gets backed up (libraries are those fancy pants folder buckets that came along probably with Vista)
  6. click the "run now" link
  7. click "restore personal files" link and yep sure enough all the stuff is piling up out there
defaults to hourly file versions, just like time machine, but can be readily bumped down to minutes in obvious "advanced settings" UI if you want, just like time machine.
the restore UI is clean simple and has exactly what I'd want/expect out of the box... a standard folder explorer big current time stamped version at the top and previous, next and a big restore button (see attached)
not bad i say, not bad at all... 'bout f'ing time.




Light Custom Configuration Section

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace WebServiceClient
{
    /*URLElement class below represents a bundle of properties (URL, password, etc) for each endpoint we need to send to... 
  
    And the following custom app.configuration section allows us to maintain a list of these URLElements. 
    copied from here: http://www.abhisheksur.com/2011/09/writing-custom-configurationsection-to.html 
    and here: http://stackoverflow.com/questions/1755421/c-sharp-appsettings-is-there-a-easy-way-to-put-a-collection-into-appsetting 
    The basic gist is 3 fairly light implementation classes -- 
    URLElement = individual elements, URLCollection = collection of elements, and URLSection = new custom app.config section. 
    */
    public class URLSection : ConfigurationSection
    {
        //nugget: it seems that the [ConfigurationProperty()] attribute does not work on a static property (maybe that's true for all attributes??), 
        //so the _URLs *instance* propery satisfies this attribute requirement, but made it private since don't plan on using it directly. 
        //then exposing the URLs collection as a public *static* property. 
        //this rigamarole merely allows for the slighty more succint "URLSection.URLs" from the calling code rather than "URLSection.urlSection.URLs" 
        public static URLCollection URLs { get { return _urlSection._URLs; } }

        [ConfigurationProperty("URLs")]
        private URLCollection _URLs { get { return this["URLs"] as URLCollection; } }
        private static readonly URLSection _urlSection = ConfigurationManager.GetSection("URLSection") as URLSection;
    }

    //nugget: the xml tag name of the element level nodes must be "" by default 
    //to change to something else, it looks like one must implement a few more overrides like the ElementName & ConfigurationElementCollectionType properties. 
    //leaving it as the default seems just fine for current needs. 
    public class URLCollection : ConfigurationElementCollection
    {
        public URLElement this[int index] { get { return (URLElement)BaseGet(index); } }
        protected override ConfigurationElement CreateNewElement() { return new URLElement(); }
        protected override object GetElementKey(ConfigurationElement element) { return ((URLElement)(element)).Name; }
    }

    public class URLElement : ConfigurationElement
    {
        [ConfigurationProperty("Name", IsKey = true, IsRequired = true)]
        public string Name
        {
            get { return (string)this["Name"]; }
            set { this["Name"] = value; }
        }

        [ConfigurationProperty("Url", IsRequired = true)]
        public string Url
        {
            get { return (string)this["Url"]; }
            set { this["Url"] = value; }
        }

        [ConfigurationProperty("ContextID", IsRequired = true)]
        public string ContextID
        {
            get { return (string)this["ContextID"]; }
            set { this["ContextID"] = value; }
        }

        [ConfigurationProperty("Password", IsRequired = true)]
        public string Password
        {
            get { return (string)this["Password"]; }
            set { this["Password"] = value; }
        }

        [ConfigurationProperty("IgnoreWebServiceException", DefaultValue = false)]
        public bool IgnoreWebServiceException
        {
            get { return (bool)this["IgnoreWebServiceException"]; }
            set { this["IgnoreWebServiceException"] = value; }
        }

    }

}