Example #1
0
        /// <summary>
        /// Set all the properties of the OxiteViewModel to the properties of the given OxiteViewModel instance.
        /// </summary>
        /// <param name="viewModel">OxiteViewModel to use for setting all the properties of the current OxiteViewModel.</param>
        protected void SyncViewModel(OxiteViewModel viewModel)
        {
            if (viewModel == null)
            {
                return;
            }

            Container = viewModel.Container;
            Site      = viewModel.Site;

            modelItems.Clear();
            viewModel.getModelItemTypes().ToList().ForEach(mit => AddModelItem(viewModel.GetModelItem(mit)));
        }
Example #2
0
        protected void SyncViewModel(OxiteViewModel viewModel)
        {
            if (viewModel == null)
            {
                return;
            }

            Container       = viewModel.Container;
            Site            = viewModel.Site;
            User            = viewModel.User;
            PluginTemplates = viewModel.PluginTemplates;
            SignInUrl       = viewModel.SignInUrl;
            SignOutUrl      = viewModel.SignOutUrl;
            modelItems.Clear();
            viewModel.GetModelItemTypes().ToList().ForEach(mit => AddModelItem(viewModel.GetModelItem(mit)));
        }