Beispiel #1
0
        public override void WireScriptsAndValidate()
        {
            Expect.IsNotNullOrEmpty(this.jsonId, "JsonId must be explicitly set: " + this.ToString());
            this.DomId = this.JsonId;
            DatabaseAgent agent = GetAgent();

            this.tree = Doodad.GetDoodad(this.JsonId, agent);

            this.OnFolderOptionClicked = "JSUI." + this.JsonId + ".folderAction"; // in datatree.util.js
            this.OnFileOptionClicked   = "JSUI." + this.JsonId + ".fileAction";
            base.WireScriptsAndValidate();
        }
Beispiel #2
0
        public DataControl()
            : base()
        {
            string applicationName = LogManager.Current.ApplicationName;

            this.UserDatabase = UserDb.Current;
            this.UserDatabase.EnsureSchema <Doodad>();
            this.ApplicationDatabase = AppDb.Current;//new SQLiteAgent(@"Data Source=.\StateData\" + applicationName + ".db3;Version=3;");
            this.ApplicationDatabase.EnsureSchema <Doodad>();
            this.CrossSessionMode = CrossSessionMode.Application;
            JavascriptServer.RegisterProvider(this);
            this.DoodadInit = (d) =>
            {
                return(Doodad.GetDoodad(this.jsonId, GetAgent()));
            };
        }
Beispiel #3
0
        public override string GetHtml(string jsonId)
        {
            Doodad doodad = Doodad.GetDoodad(jsonId, this.GetAgent());

            return(ControlHelper.GetRenderedString(GetHtmlTreeFrom(doodad, jsonId)));
        }