From e833a9bf2751f16d8614af9aa20f5b9bec3d81a8 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 23 Apr 2017 14:53:10 -0400 Subject: FUCKTONS OF SHIFTORIUM WORK --- ShiftOS_TheReturn/ShiftnetSite.cs | 46 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 ShiftOS_TheReturn/ShiftnetSite.cs (limited to 'ShiftOS_TheReturn/ShiftnetSite.cs') diff --git a/ShiftOS_TheReturn/ShiftnetSite.cs b/ShiftOS_TheReturn/ShiftnetSite.cs new file mode 100644 index 0000000..5460171 --- /dev/null +++ b/ShiftOS_TheReturn/ShiftnetSite.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ShiftOS.Engine +{ + public interface IShiftnetSite + { + void Setup(); + void OnSkinLoad(); + void OnUpgrade(); + + event Action GoToUrl; + event Action GoBack; + } + + /// + /// Marks a shiftnet site as a fundamental, and will make it display on the homepage. + /// + public class ShiftnetFundamentalAttribute : Attribute + { + + } + + public interface IShiftnetClient + { + void NavigateToUrl(string url); + void RefreshSite(); + } + + public class ShiftnetSiteAttribute : Attribute + { + public ShiftnetSiteAttribute(string url, string name, string description) + { + Url = url; + Name = name; + Description = description; + } + + public string Url { get; private set; } + public string Name { get; private set; } + public string Description { get; private set; } + } +} -- cgit v1.2.3 From dfcb07b68ef45ca73e8c266da8c8014f8ff2421f Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 20 May 2017 08:45:22 -0400 Subject: document shiftnet site --- ShiftOS_TheReturn/ShiftnetSite.cs | 53 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'ShiftOS_TheReturn/ShiftnetSite.cs') diff --git a/ShiftOS_TheReturn/ShiftnetSite.cs b/ShiftOS_TheReturn/ShiftnetSite.cs index 5460171..07b4698 100644 --- a/ShiftOS_TheReturn/ShiftnetSite.cs +++ b/ShiftOS_TheReturn/ShiftnetSite.cs @@ -6,13 +6,34 @@ using System.Threading.Tasks; namespace ShiftOS.Engine { + /// + /// Interface for creating a Shiftnet website. + /// public interface IShiftnetSite { + /// + /// Called when the page is loaded. Perform data population here. + /// void Setup(); + + /// + /// Occurs when a ShiftOS skin is loaded. + /// void OnSkinLoad(); + + /// + /// Occurs when a Shiftorium upgrade is installed. + /// void OnUpgrade(); + /// + /// Invoke this to navigate the parent browser to a specified Shiftnet URL. + /// event Action GoToUrl; + + /// + /// Invoke this to tell the parent browser to navigate to the previous page. + /// event Action GoBack; } @@ -24,14 +45,35 @@ namespace ShiftOS.Engine } + /// + /// Interface for creating a Shiftnet client. + /// public interface IShiftnetClient { + /// + /// Navigates the client to a specified Shiftnet URL. + /// + /// The URL to navigate to. void NavigateToUrl(string url); + + /// + /// Refreshes the current page. + /// void RefreshSite(); } + /// + /// Marks this class as a Shiftnet website. + /// + [AttributeUsage(AttributeTargets.Class, AllowMultiple =false)] public class ShiftnetSiteAttribute : Attribute { + /// + /// Creates a new instance of the class. + /// + /// The URL that links to this site + /// The name of this site + /// The description of this site public ShiftnetSiteAttribute(string url, string name, string description) { Url = url; @@ -39,8 +81,19 @@ namespace ShiftOS.Engine Description = description; } + /// + /// Gets the Shiftnet URL for this site. + /// public string Url { get; private set; } + + /// + /// Gets the name of this website. + /// public string Name { get; private set; } + + /// + /// Gets the description of this website. + /// public string Description { get; private set; } } } -- cgit v1.2.3