Exemple #1
0
        /// <summary>
        /// Build a string that represents the current model
        /// </summary>
        /// <param name="model">The model to build the HTML string representation of</param>
        /// <returns>The string that is built</returns>
        public static string BuildModelString(SimpleWebModel model)
        {
            string result = "";

            result += "<html>\n";
            result += "<body onload=\"parent.Presenter.Network.RecvFunc()\">\n";

            // Create the main div
            result += "<div id=\"S0\">\n";

            result += "\t<div id=\"S0_PName\">" + model.Name + "</div>\n";
            result += "\t<div id=\"S0_IDeck\">" + model.CurrentDeck + "</div>\n";
            result += "\t<div id=\"S0_ISlide\">" + (model.CurrentSlide - 1) + "</div>\n";
            result += "\t<div id=\"S0_Linked\">" + false + "</div>\n";
            result += "\t<div id=\"S0_AllowSS\">" + true + "</div>\n";
            result += "\t<div id=\"S0_Decks\">\n";
            for (int i = 0; i < model.Decks.Count; i++)
            {
                result += BuildDeckString("S0_Decks", i, (SimpleWebDeck)model.Decks[i]);
            }
            result += "\t</div>\n";

            result += "</div>\n";

            result += "</body>\n";
            result += "</html>\n";

            return(result);
        }
Exemple #2
0
 public string BuildModelDiffString(SimpleWebModel oldModel, SimpleWebModel newModel)
 {
     // Go recursive, only add if there is a change within
     return("");
 }