Exemplo n.º 1
0
        public DataEditor(umbraco.interfaces.IData Data, Options Configuration)
        {
            //load the prevalues
            savedOptions = Configuration;

            //ini the savedData object
            savedData = Data;
        }
Exemplo n.º 2
0
 public PrevalueEditor(umbraco.cms.businesslogic.datatype.BaseDataType DataType)
 {
     _datatype = DataType;
     jsonSerializer = new JavaScriptSerializer();
     savedOptions = Configuration;
 }
Exemplo n.º 3
0
        private void buildControls()
        {
            //test for postback, decide to use db or saveBox for rendering
            if (Page.IsPostBack)
            {
                //test for saveBox having a value, default if not
                if (saveBox.Text != "")
                {
                    renderingOptions = jsonSerializer.Deserialize<Options>(saveBox.Text);
                }
                else
                {
                    renderingOptions = new Options();
                }
            }
            else
            {
                renderingOptions = savedOptions;
            }

            BuildSettingsTable();
        }