/// <summary> /// Initializes a new instance of the DomainDetailsViewModel class. /// </summary> public DomainDetailsViewModel() { if (IsInDesignMode) { // Code runs in Blend --> create design time data. SelectedDomain = new Result() { Availability = "available", Subdomain = "ferr.et", Domain = "ferr.et", Path = "/land", RegisterUrl = "http://register.com" }; SelectedDomainInfo = new DomainrInfo { Domain = "ferr.et", WhoisUrl = "http://domai.nr/ferr.et/whois", Tld = new Tld { Domain = "et", WikipediaUrl = "http://wikipedia.org/wiki/.et", IanaUrl = "http://www.iana.org/domains/root/db/et.html" }, Availability = Constants.AvailabilityAvailable }; List <Registrar> registrars = new List <Registrar>(); registrars.Add(new Registrar { RegistrarDomain = "101domain.com", Name = "101domain.com", RegisterUrl = "http://domai.nr/liveside.net/register/101domain.com" }); registrars.Add(new Registrar { RegistrarDomain = "dotster.com", Name = "Dotster", RegisterUrl = "http://domai.nr/liveside.net/register/dotster.com" }); SelectedDomainInfo.Registrars = registrars; } else { // Code runs "for real": Connect to service, etc... domainr = new DomainrSharpService(Constants.DomainrAppId); WireMessages(); WireCommands(); } }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel() { SearchResults = new ObservableCollection <Result>(); if (IsInDesignMode) { // Code runs in Blend --> create design time data. SearchResults.Add(new Result() { Availability = "available", Subdomain = "ferr.et", Domain = "ferr.et", Path = "/land" }); } else { domainr = new DomainrSharpService(Constants.DomainrAppId); WireMessages(); WireCommands(); } }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel() { SearchResults = new ObservableCollection<Result>(); if (IsInDesignMode) { // Code runs in Blend --> create design time data. SearchResults.Add(new Result() { Availability = "available", Subdomain = "ferr.et", Domain = "ferr.et", Path = "/land" }); } else { domainr = new DomainrSharpService(Constants.DomainrAppId); WireMessages(); WireCommands(); } }
/// <summary> /// Initializes a new instance of the DomainDetailsViewModel class. /// </summary> public DomainDetailsViewModel() { if (IsInDesignMode) { // Code runs in Blend --> create design time data. SelectedDomain = new Result() { Availability = "available", Subdomain = "ferr.et", Domain = "ferr.et", Path = "/land", RegisterUrl= "http://register.com" }; SelectedDomainInfo = new DomainrInfo { Domain = "ferr.et", WhoisUrl = "https://domainr.com/ferr.et/whois", Tld = new Tld { Domain = "et", WikipediaUrl = "http://wikipedia.org/wiki/.et", IanaUrl = "http://www.iana.org/domains/root/db/et.html" }, Availability = Constants.AvailabilityAvailable }; List<Registrar> registrars = new List<Registrar>(); registrars.Add(new Registrar { RegistrarDomain = "101domain.com", Name = "101domain.com", RegisterUrl = "https://domainr.com/liveside.net/register/101domain.com" }); registrars.Add(new Registrar { RegistrarDomain = "dotster.com", Name = "Dotster", RegisterUrl = "https://domainr.com/liveside.net/register/dotster.com" }); SelectedDomainInfo.Registrars = registrars; } else { // Code runs "for real": Connect to service, etc... domainr = new DomainrSharpService(Constants.DomainrAppId); WireMessages(); WireCommands(); } }