Exemplo n.º 1
0
 public void unloadModule(ModuleID moduleID)
 {
     if (ModuleID.LOGINMN == moduleID)
     {
         if (Ctx.m_instance.m_loginSys != null)
         {
             Ctx.m_instance.m_loginSys.unload();
         }
     }
     else if (ModuleID.AUTOUPDATEMN == moduleID)
     {
         if (Ctx.m_instance.m_autoUpdate != null)
         {
             Ctx.m_instance.m_autoUpdate.unload();
         }
     }
     if (Ctx.m_instance.m_layerMgr.m_path2Go.ContainsKey(m_type2ItemDic[moduleID].m_moduleLayerPath))
     {
         UtilApi.Destroy(Ctx.m_instance.m_layerMgr.m_path2Go[m_type2ItemDic[moduleID].m_moduleLayerPath]);
     }
     else
     {
         Ctx.m_instance.m_logSys.log("没有找到卸载的模块的 object");
     }
     Ctx.m_instance.m_layerMgr.m_path2Go.Remove(m_type2ItemDic[moduleID].m_moduleLayerPath);
     UtilApi.UnloadUnusedAssets();
 }
Exemplo n.º 2
0
 public void unloadModule(ModuleID moduleID)
 {
     if (ModuleID.LOGINMN == moduleID)
     {
         if (Ctx.m_instance.m_loginSys != null)
         {
             Ctx.m_instance.m_loginSys.unload();
         }
     }
     else if (ModuleID.AUTOUPDATEMN == moduleID)
     {
         if (Ctx.m_instance.m_autoUpdate!= null)
         {
             Ctx.m_instance.m_autoUpdate.unload();
         }
     }
     if (Ctx.m_instance.m_layerMgr.m_path2Go.ContainsKey(m_type2ItemDic[moduleID].m_moduleLayerPath))
     {
         UtilApi.Destroy(Ctx.m_instance.m_layerMgr.m_path2Go[m_type2ItemDic[moduleID].m_moduleLayerPath]);
     }
     else
     {
         Ctx.m_instance.m_logSys.log("没有找到卸载的模块的 object");
     }
     Ctx.m_instance.m_layerMgr.m_path2Go.Remove(m_type2ItemDic[moduleID].m_moduleLayerPath);
     UtilApi.UnloadUnusedAssets();
 }
Exemplo n.º 3
0
 private void ShowData(DataGroup group)
 {
     formView = (Repeater)FindControl("Repeater" + ModuleID.ToString("N"));
     if (formView == null)
     {
         LabelMsg.Text = "Geen repeater gevonden.<br />";
     }
     if (group != null)
     {
         string pageLanguage = this.GetLanguageCodeFromMasterPage();
         if (pageLanguage != "" && pageLanguage != null)
         {
             group.Translate(pageLanguage);
         }
         //voor tag: {DirectUrl}
         group.RewriteUrl = group.GetRewriteUrl(Request.Url.LocalPath);
         //formview moet aan list worden gekoppeld, vreemd genoeg
         var list = new List <DataGroup> {
             group
         };
         formView.DataSource = list;
         formView.DataBind();
         overridePageTitleAndMetaTags(group);
         formView.Visible = true;
     }
     else
     {
         if (base.getSetting <bool>("HideWhenNoData"))
         {
             formView.Visible = false;
         }
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// 在 OnInit 事件里面设置各个自定义控件的属性和关联
        /// </summary>
        /// <param name="e"></param>
        protected override void OnInit(EventArgs e)
        {
            //父类里面验证参数是否正确
            base.OnInit(e);

            var cssLink = new HtmlLink();

            cssLink.Href = "/aspnet_client/css/cssList.css";
            cssLink.Attributes.Add("rel", "stylesheet");
            cssLink.Attributes.Add("type", "text/css");
            //Page.Header.Controls.Add(cssLink);

            //验证是否有权限访问。
            MyUser.UserPermission.CheckModuleID(ModuleID.ToString(CultureInfo.InvariantCulture));

            //设置分页控件的属性和事件
            SetQuickPagerInfo();

            //设置数据表格的属性
            SetGridInfo();

            //设置查询控件的属性
            SetFindControlInfo();

            //设置操作按钮的属性
            SetButtonBarInfo();
        }
Exemplo n.º 5
0
 public ModuleConfigHelper(ModuleID module,
     ModuleFeatureID feature)
 {
     _domainID = SP.SessionContext.DomainID;
     _module = module;
     _feature = feature;
 }
Exemplo n.º 6
0
 /// <summary>
 /// 构造器
 /// </summary>
 /// <param name="asm">模块的程序集</param>
 /// <param name="id">模块编号</param>
 /// <param name="name">模块名称</param>
 /// <param name="file">模块文件</param>
 public ModuleInfo(Assembly asm, ModuleID id, string name, string file)
 {
     _ModuleAssembly = asm;
     _ModuleFile     = file;
     _ModuleID       = id;
     _ModuleName     = name;
 }
Exemplo n.º 7
0
        public void DataBind(BaseCollection <DataGroup> groups)
        {
            SetRewriteUrls(groups);

            //if (groups.Count > 0 && this.ParentGroup == null)
            //{
            //    this.ParentGroup = groups[0].ParentGroup;
            //}
            //if (groups.Count > 0 && this.ParentParentGroup == null)
            //{
            //    if (groups[0].ParentGroup != null)
            //    {
            //        this.ParentParentGroup = groups[0].ParentGroup.ParentGroup;
            //    }
            //}
            ////Null waarde kan niet (NullRefenceException)
            //if (this.ParentGroup == null) this.ParentGroup = new DataGroup();
            //if (this.ParentParentGroup == null) this.ParentParentGroup = new DataGroup();

            repeater = (Repeater)FindControl("Repeater" + ModuleID.ToString("N"));
            if (repeater != null)
            {
                repeater.DataSource     = groups;
                repeater.ItemDataBound += repeater_ItemDataBound; //Trigger list repeater.
                repeater.DataBind();
            }
            else
            {
                LabelMsg.Text = "Geen repeater gevonden.<br />";
            }
        }
Exemplo n.º 8
0
        public void CloseModule(ModuleID id, params object[] args)
        {
            if (!_dictAllModule.ContainsKey(id))
            {
                Logger.LogError("[GameUIMgr.CloseModule() => open module:" + id + ", but this module unregisted!!!]");
                return;
            }
            ModuleBase module = _dictAllModule[id];

            if (_dictShowModules.ContainsKey(module.mLayer))
            {
                _dictShowModules.Remove(module.mLayer);
            }
            module.Hide();
            if (module.mBlStack)
            {
                if (_dictHideStackModules.ContainsKey(module.mLayer))
                {
                    List <ModuleID> stacks = _dictHideStackModules[module.mLayer];
                    if (stacks.Count > 0)
                    {
                        id = stacks[0];
                        stacks.RemoveAt(0);
                        OpenModule(id);
                    }
                }
            }
        }
Exemplo n.º 9
0
 public ModuleConfigHelper(long domainID, ModuleID module,
     ModuleFeatureID feature)
 {
     _domainID = domainID;
     _module = module;
     _feature = feature;
 }
Exemplo n.º 10
0
        /// <summary>给出用户权限,返回 bool 值</summary>
        /// <param name="modelid">当前需要判断模块的模块标识</param>
        /// <param name="authValue">当前模块ModelID中需要判断的权限码</param>
        /// <returns>bool值</returns>
        public bool GetPermission(long authValue)
        {
            bool havePermission = true;

            //超级管理员(一切权限)
            if (User.RoleID == 1 || User.UserID == ApplicationConfig.SUPER_ADMINISTRATOR_ID)
            {
                return(havePermission);
            }
            long privValue = 0;

            //如果存在需要判断权限的模块标识的权限值
            if (UserPermission.TryGetValue(ModuleID.ToString().Trim(), out privValue))
            {
                if ((privValue & authValue) > 0)
                {
                    return(havePermission);
                }
                else
                {
                    havePermission = false;
                }
            }
            else
            {
                havePermission = false;
            }
            return(havePermission);
        }
        /// <summary>
        /// Handles FlushCache event at Page level<br/>
        /// Performs FlushCache actions that are common to all Pages<br/>
        /// Can be overridden
        /// </summary>
        protected virtual void OnFlushCache()
        {
            if (FlushCache != null)
            {
                FlushCache(this, new EventArgs());   //Invokes the delegates
            }
            // remove module output from cache, if it's there
            StringBuilder sb = new StringBuilder();

            sb.Append("rb_");
            sb.Append(portalSettings.PortalAlias.ToLower());
            sb.Append("_mid");
            sb.Append(ModuleID.ToString());
            sb.Append("[");
            sb.Append(portalSettings.PortalContentLanguage);
            sb.Append("+");
            sb.Append(portalSettings.PortalUILanguage);
            sb.Append("+");
            sb.Append(portalSettings.PortalDataFormattingCulture);
            sb.Append("]");

            if (Context.Cache[sb.ToString()] != null)
            {
                Context.Cache.Remove(sb.ToString());
                Debug.WriteLine("************* Remove " + sb.ToString());
            }

            // any other code goes here
        }
Exemplo n.º 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!HideList && cmsHelper.AdminModules.Any())
                {
                    GeneralUtilities.BindRepeater(rpModuleList, cmsHelper.AdminModules);
                }
                else
                {
                    rpModuleList.Visible = false;
                }
            }

            pnlNav.Visible = !HideList;

            if (ModuleID != Guid.Empty)
            {
                pnlSetter.Visible = true;
                int x = 0;
                foreach (var row in cmsHelper.AdminModules)
                {
                    if (ModuleID.ToString().ToLower() == row.PluginID.ToString().ToLower())
                    {
                        SelMenu = x.ToString();
                        break;
                    }
                    x++;
                }
            }
        }
Exemplo n.º 13
0
        /// <summary>
        /// Overriden from PortalModuleControl, this override deletes unnecessary picture files from the system
        /// </summary>
        protected override void Publish()
        {
            string pathToDelete = Server.MapPath(((SettingItem)Settings["AlbumPath"]).FullPath) + "\\";

            DirectoryInfo albumDirectory = new DirectoryInfo(pathToDelete);

            foreach (FileInfo fi in albumDirectory.GetFiles(ModuleID.ToString() + "m*.Production.jpg"))
            {
                try
                {
                    System.IO.File.Delete(fi.FullName);
                }
                catch {}
            }

            foreach (FileInfo fi in albumDirectory.GetFiles(ModuleID.ToString() + "m*"))
            {
                try
                {
                    System.IO.File.Copy(fi.FullName, fi.FullName.Replace(".jpg", ".Production.jpg"), true);
                }
                catch {}
            }

            base.Publish();
        }
Exemplo n.º 14
0
        public BaseController GetController(ModuleID moduleId)
        {
            InitModule(moduleId);

            ModuleDefine moduleDefine = allModuleDic[moduleId];

            return(moduleDefine.baseController);
        }
Exemplo n.º 15
0
        public BaseModelData GetModelData(ModuleID moduleId)
        {
            InitModule(moduleId);

            ModuleDefine moduleDefine = allModuleDic[moduleId];

            return(moduleDefine.baseModelData);
        }
Exemplo n.º 16
0
        /// <summary>
        /// オブジェクト比較
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public int CompareTo(object?obj)
        {
            if (!(obj is Module tgt))
            {
                return(1);
            }

            return(ModuleID.CompareTo(tgt.ModuleID));
        }
 protected override void HandleMessageInternal(ModuleID from, BaseMessage msg, byte[] payload)
 {
     switch (msg.Cast <DiscordMessage>().DiscordType)
     {
     case Messages.MessageType.MessageReceived:
         messageReceived.Invoke(this, msg.Cast <MessageReceivedMessage>());
         break;
     }
 }
Exemplo n.º 18
0
        void PagerLinkButton_Click(object sender, EventArgs e)
        {
            LinkButton lnk = sender as LinkButton;

            currentPage = int.Parse(lnk.Text) - 1;

            SelectAndShowData(Guid.Empty, where);

            CreatePager(currentPage, Convert.ToInt32(ViewState["TotalResults" + ModuleID.ToString("N")]));
        }
Exemplo n.º 19
0
        public void OpenModule(ModuleID moduleId)
        {
            InitModule(moduleId);

            Bind(moduleId);

            ModuleDefine moduleDefine = allModuleDic[moduleId];

            moduleDefine.baseController.Open();
        }
Exemplo n.º 20
0
        /// <summary>
        /// Public constructor. Sets base settings for module.
        /// </summary>
        public UserDefinedTable()
        {
            SettingItem setSortField = new SettingItem(new StringDataType());

            setSortField.Required = false;
            setSortField.Value    = string.Empty;
            setSortField.Order    = 1;
            this._baseSettings.Add("SortField", setSortField);

            SettingItem setSortOrder = new SettingItem(new ListDataType("ASC;DESC"));

            setSortOrder.Required = true;
            setSortOrder.Value    = "ASC";
            setSortOrder.Order    = 2;
            this._baseSettings.Add("SortOrder", setSortOrder);

            SettingItem DocumentPath = new SettingItem(new PortalUrlDataType());

            DocumentPath.Required = true;
            DocumentPath.Value    = "Documents";
            DocumentPath.Order    = 3;
            this._baseSettings.Add("DocumentPath", DocumentPath);

            SettingItem ImagePath = new SettingItem(new PortalUrlDataType());

            ImagePath.Required = true;
            ImagePath.Value    = "Images\\Default";
            ImagePath.Order    = 4;
            this._baseSettings.Add("ImagePath", ImagePath);

            SettingItem XSLsrc = new SettingItem(new PortalUrlDataType());

            XSLsrc.Required = false;
            XSLsrc.Order    = 5;
            this._baseSettings.Add("XSLsrc", XSLsrc);

            //Rob Siera - 04 nov 2004 - Adding possibility to use data of other UDT
            SettingItem UDTsrc = new SettingItem(new IntegerDataType());

            UDTsrc.Required    = false;
            UDTsrc.Value       = ModuleID.ToString();
            UDTsrc.EnglishName = "XSL data";
            UDTsrc.Description = "Specify ModuleID of a UserDefinedTable to be used as data source for XSL (see 'mID' parameter in edit URL). Specify 0 to reset to current module data.";
            UDTsrc.Order       = 6;
            this._baseSettings.Add("UDTsrc", UDTsrc);

            //Rob Siera - 04 nov 2004 - Adding possibility to view data as raw XML
            SettingItem DisplayAsXML = new SettingItem(new BooleanDataType());

            DisplayAsXML.Required    = false;
            DisplayAsXML.EnglishName = "Display XML";
            DisplayAsXML.Description = "Toggle to display data as XML. Helpfull to develop XSL file.";
            DisplayAsXML.Order       = 7;
            this._baseSettings.Add("DisplayAsXML", DisplayAsXML);
        }
Exemplo n.º 21
0
        public void Bind(ModuleID moduleId)
        {
            ModuleDefine moduleDefine = allModuleDic[moduleId];

            moduleDefine.baseView = WindowManager.Get().OpenWindow <BaseView>(string.Format("Modules/{0}/{0}", moduleId.ToString(), moduleId.ToString()));

            moduleDefine.baseView.baseViewData = moduleDefine.baseViewData;

            moduleDefine.baseModel.Bind();
            moduleDefine.baseView.Bind();
        }
Exemplo n.º 22
0
 protected string MarkSelected(string sID, string sParm)
 {
     if (sID == ModuleID.ToString().ToLower() && sParm == pf)
     {
         return(" class=\"selectedModule\" ");
     }
     else
     {
         return(" ");
     }
 }
Exemplo n.º 23
0
        public BaseModel GetModel(ModuleID moduleId)
        {
            BaseModel model = null;

            if (allModule.TryGetValue(moduleId, out model) == false)
            {
                model = Activator.CreateInstance(Type.GetType(moduleId.ToString() + "Model"), moduleId) as BaseModel;
                allModule.Add(moduleId, model);
            }

            return(model);
        }
Exemplo n.º 24
0
        public BaseViewData GetBaseViewData(ModuleID moduleId)
        {
            BaseViewData value = null;

            if (allBaseViewData.TryGetValue(moduleId, out value) == false)
            {
                value = Activator.CreateInstance(Type.GetType(moduleId.ToString() + "ViewData")) as BaseViewData;
                allBaseViewData.Add(moduleId, value);
            }

            return(value);
        }
        /// <summary>
        /// Updates the content with tokens.
        /// </summary>
        /// <param name="content">The content.</param>
        /// <returns></returns>
        private string UpdateContentWithTokens(string content)
        {
            int startIndex = 0;

            while ((startIndex = content.IndexOf("_WPQ_", startIndex)) != -1)
            {
                content = content.Substring(0, startIndex) +
                          ModuleID.ToString() + content.Substring(startIndex + 5);
                startIndex += 5;
            }
            return(content);
        }
        protected void EditBtn_Click(object sender, ImageClickEventArgs e)
        {
            // Redirect to edit page of currently selected tab
            if (tabList.SelectedIndex > -1)
            {
                // Redirect to module settings page
                PageItem t = ( PageItem )portalPages[tabList.SelectedIndex];

                // added mID by Mario Endara <*****@*****.**> to support security check (2004/11/09)
                Response.Redirect(
                    HttpUrlBuilder.BuildUrl("~/DesktopModules/CoreModules/Pages/PageLayout.aspx", t.ID,
                                            "mID=" + ModuleID.ToString() + "&returntabid=" + Page.PageID));
            }
        }
Exemplo n.º 27
0
        /// <summary>
        /// 根据父节点信息设置子节点的基本信息
        /// </summary>
        /// <param name="dal">数据访问函数库的实例 </param>
        /// <param name="parentID">父节点ID</param>
        /// <param name="moduleID">用户输入的模块ID </param>
        public void SetSonNote(DataAccessLibrary dal, int parentID, string moduleID)
        {
            #region 获取数据库里的最大的ModuleID
            //因为是功能节点管理,可以限制单人操作,所以这里不考虑并发的问题。
            if (moduleID.Length == 0)
            {
                string tmpModuleID =
                    dal.ExecuteString("select top 1 ModuleID from Manage_Module order by ModuleID desc ");
                ModuleID = int.Parse(tmpModuleID);
                ModuleID = ModuleID + 1;
            }
            //this.PowerMark = this.ModuleID;
            #endregion

            #region 设置其他信息
            //提取父节点信息
            //                       0           1           2          3       4     5
            string   sql        = "select ParentID, ParentIDAll, ModuleLevel, DisOrder, URL, Target FROM Manage_Module WHERE (ModuleID = {0})";
            string[] moduleInfo = dal.ExecuteStringsBySingleRow(string.Format(sql, parentID));
            if (moduleInfo != null)
            {
                ParentID    = parentID;                         //父节点
                ParentIDAll = moduleInfo[1] + "," + parentID;   //父节点路径
                ModuleLevel = int.Parse(moduleInfo[2]) + 1;     //节点级数
                URL         = moduleInfo[4];                    //网址
                Target      = moduleInfo[5];                    //目标

                GridPageViewID = int.Parse(ModuleID.ToString(CultureInfo.InvariantCulture) + "01");
                FindPageViewID = int.Parse(ModuleID.ToString(CultureInfo.InvariantCulture) + "02");

                #region 设置序号,子节点的情况
                //获取指定的节点的所有子节点的最大序号序号。如果有则+10设置,等真正保存的时候再修改后面的序号。
                //如果没有则本序号 + 10。

                sql = "select top 1 DisOrder from Manage_Module where ParentIDAll + ',' like '{0},{1},%' and DisOrder > {2} order by DisOrder desc";
                string tmpDisOrder = dal.ExecuteString(string.Format(sql, moduleInfo[1], parentID, moduleInfo[3]));
                if (tmpDisOrder != null)
                {
                    //有子节点,设置序号
                    DisOrder = Int32.Parse(tmpDisOrder) + 10;
                }
                else
                {
                    //选中的节点没有子节点
                    DisOrder = Int32.Parse(moduleInfo[3]) + 10;
                }
                #endregion
            }
            #endregion
        }
Exemplo n.º 28
0
        public override string ToString()
        {
            string sOutput;

            if (IsHeader)
            {
                sOutput = "======== Header Word ========\r\n Mod ID: " + ModuleID.ToString() + "\t2 bit Res: " + TwoBitResolution.ToString();
                if (IsLeadingEdge)
                {
                    sOutput = sOutput + "\tEdge Rec: L";
                }
                else
                {
                    sOutput = sOutput + "\tEdge Rec: B";
                }
                sOutput = sOutput + "\tEvent Serial: " + EventSerial.ToString();
                if (IsDoubleWord)
                {
                    sOutput = sOutput + "\tPrec: D";
                }
                else
                {
                    sOutput = sOutput + "\tPrec: S";
                }
            }
            else
            {
                sOutput = "Data Word --->";
                if (IsLSB)
                {
                    sOutput = sOutput + "\tBit: LS";
                }
                else
                {
                    sOutput = sOutput + "\tBit: MS";
                }
                if (IsLeadingEdge)
                {
                    sOutput = sOutput + "\tEdge: L";
                }
                else
                {
                    sOutput = sOutput + "\tEdge: T";
                }
                sOutput = sOutput + "\tC: " + Channel.ToString() + "\tT: " + Time.ToString();
            }
            return(sOutput);
        }
Exemplo n.º 29
0
 // 加载游戏模块
 public void loadModule(ModuleID moduleID)
 {
     if (!m_type2ItemDic[moduleID].m_isLoaded)
     {
         // 初始化完成,开始加载自己的游戏场景
         LoadParam param = Ctx.m_instance.m_poolSys.newObject <LoadParam>();
         LocalFileSys.modifyLoadParam(m_type2ItemDic[moduleID].m_path, param);
         param.m_loadEventHandle = m_type2ItemDic[moduleID].m_loadEventHandle;
         Ctx.m_instance.m_resLoadMgr.loadResources(param);
         Ctx.m_instance.m_poolSys.deleteObj(param);
     }
     else
     {
         Ctx.m_instance.m_logSys.log("模块重复加载");
     }
 }
Exemplo n.º 30
0
 // 加载游戏模块
 public void loadModule(ModuleID moduleID)
 {
     if (!m_type2ItemDic[moduleID].m_isLoaded)
     {
         // 初始化完成,开始加载自己的游戏场景
         LoadParam param = Ctx.m_instance.m_poolSys.newObject<LoadParam>();
         LocalFileSys.modifyLoadParam(m_type2ItemDic[moduleID].m_path, param);
         param.m_loadEventHandle = m_type2ItemDic[moduleID].m_loadEventHandle;
         Ctx.m_instance.m_resLoadMgr.loadResources(param);
         Ctx.m_instance.m_poolSys.deleteObj(param);
     }
     else
     {
         Ctx.m_instance.m_logSys.log("模块重复加载");
     }
 }
Exemplo n.º 31
0
    public override void RenderPage()
    {
        if (ModuleID.IsNoNull())
        {
            List <string> objModuleIDPathList = objModuleRule.Sys_Module.Where(s => s.ModuleID == ModuleID).Select(s => s.ModuleIDPath).ToList <string>();

            if (objModuleIDPathList.Count > 0)
            {
                tvwModule.ExpandPath = objModuleIDPathList.First();
            }
        }
        XmlDataSource.Data = objModuleRule.GetModeuleManageTreeXmlText();

        tvwModule.DataSource = XmlDataSource;
        tvwModule.DataBind();
    }
Exemplo n.º 32
0
        private void repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            RepeaterItem item = e.Item;

            if ((item.ItemType == ListItemType.Item) || (item.ItemType == ListItemType.AlternatingItem))
            {
                string controlId = "RepeaterImageList1" + ModuleID.ToString("N");
                listRepeater = (Repeater)item.FindControl(controlId);
                if (listRepeater != null)
                {
                    DataItem dg = (DataItem)item.DataItem;
                    listRepeater.DataSource = dg.ImageList1;
                    listRepeater.DataBind();
                }
            }
        }
 /// <summary>
 /// WriteXml converts the object to Xml (serializes it) and writes it using the XmlWriter passed
 /// </summary>
 /// <remarks></remarks>
 /// <param name="writer">The XmlWriter that contains the xml for the object</param>
 public void WriteXml(XmlWriter writer)
 {
     writer.WriteStartElement("Announcement");
     writer.WriteElementString("ItemID", ItemID.ToString(CultureInfo.InvariantCulture));
     writer.WriteElementString("ModuleID", ModuleID.ToString(CultureInfo.InvariantCulture));
     writer.WriteElementString("Title", Title);
     writer.WriteElementString("URL", URL);
     writer.WriteElementString("ViewOrder", ViewOrder.ToString(CultureInfo.InvariantCulture));
     writer.WriteElementString("Description", Description);
     writer.WriteElementString("ImageSource", ImageSource);
     writer.WriteElementString("TrackClicks", TrackClicks.ToString());
     writer.WriteElementString("NewWindow", NewWindow.ToString());
     writer.WriteElementString("PublishDate", PublishDate.ToString());
     writer.WriteElementString("ExpireDate", ExpireDate.ToString());
     writer.WriteEndElement();
 }
Exemplo n.º 34
0
        public void InitModule(ModuleID moduleId)
        {
            ModuleDefine moduleDefine = allModuleDic[moduleId];

            if (moduleDefine.isInit)
            {
                return;
            }

            moduleDefine.baseViewData   = Activator.CreateInstance(moduleDefine.baseViewDataType) as BaseViewData;
            moduleDefine.baseModelData  = Activator.CreateInstance(moduleDefine.baseModelDataType) as BaseModelData;
            moduleDefine.baseModel      = Activator.CreateInstance(moduleDefine.baseModelType, moduleDefine.baseViewData, moduleDefine.baseModelData) as BaseModel;
            moduleDefine.baseController = Activator.CreateInstance(moduleDefine.baseControllerType, moduleDefine.baseModel) as BaseController;

            moduleDefine.isInit = true;
        }
Exemplo n.º 35
0
 public bool IsFeatureEnabled(long domainID, ModuleID moduleID, ModuleFeatureID moduleFeatureID)
 {
     Util.Check.Require(DomainModuleFeature[domainID][moduleID].ContainsKey(moduleFeatureID),
                        string.Format(
                            "The following keys combination wasn't found in DomainModuleFeature dictionary: {0},{1},{2}",
                            domainID, moduleID, moduleFeatureID));
     return IsModuleEnabled(domainID, moduleID) &&
            DomainModuleFeature[domainID][moduleID][moduleFeatureID].IsEnabled;
 }
Exemplo n.º 36
0
 public bool IsModuleEnabled(ModuleID moduleID)
 {
     return IsModuleEnabled(SP.SessionContext.DomainID, moduleID);
 }
Exemplo n.º 37
0
 /// <summary>
 /// 构造器
 /// </summary>
 /// <param name="asm">模块的程序集</param>
 /// <param name="id">模块编号</param>
 /// <param name="name">模块名称</param>
 /// <param name="file">模块文件</param>
 public ModuleInfo(Assembly asm, ModuleID id, string name, string file)
 {
     _ModuleAssembly = asm;
     _ModuleFile = file;
     _ModuleID = id;
     _ModuleName = name;
 }
Exemplo n.º 38
0
 public bool IsModuleEnabled(long domainID, ModuleID moduleID)
 {
     return SP.ModuleConfigProvider.IsModuleEnabled(
         domainID, moduleID);
 }
Exemplo n.º 39
0
 /// <summary>
 /// 构造器
 /// </summary>
 /// <param name="moduleID">模块编号</param>
 /// <param name="moduleName">模块名称</param>
 /// <param name="moduleEntryNameSpace">模块名字空间</param>
 public AssemblyModuleEntry(ModuleID moduleID, string moduleName, string moduleEntryNameSpace)
 {
     _moduleID = moduleID;
     _moduleName = moduleName;
     _moduleEntryNameSpace = moduleEntryNameSpace;
 }
Exemplo n.º 40
0
 public int FeatureParameterIntValue(long domainID, ModuleID moduleID,
     ModuleFeatureID moduleFeatureID, string paramName)
 {
     return int.Parse(SP.ModuleConfigProvider.FeatureParameterValue(
         domainID, moduleID, moduleFeatureID, paramName));
 }
Exemplo n.º 41
0
 public bool IsModuleEnabled(long domainID, ModuleID moduleID)
 {
     return DomainModule[domainID][moduleID].IsEnabled;
 }
Exemplo n.º 42
0
 public bool FeatureParameterIsEnabled(long domainID, ModuleID moduleID,
     ModuleFeatureID moduleFeatureID, string paramName)
 {
     return SP.ModuleConfigProvider.FeatureParameterIsEnabled(
         domainID, moduleID, moduleFeatureID, paramName);
 }
Exemplo n.º 43
0
 public string FeatureParameterStrValue(long domainID, ModuleID moduleID,
     ModuleFeatureID moduleFeatureID, string paramName)
 {
     return SP.ModuleConfigProvider.FeatureParameterValue(
         domainID, moduleID, moduleFeatureID, paramName);
 }
Exemplo n.º 44
0
 public bool FeatureParameterIsEnabled(long domainID, ModuleID moduleID, ModuleFeatureID moduleFeatureID, string paramName)
 {
     return IsFeatureEnabled(domainID, moduleID, moduleFeatureID) && FeatureParameterValue(domainID, moduleID, moduleFeatureID, paramName) == SP.Const.MOD_Yes;
 }
Exemplo n.º 45
0
 public string FeatureParameterValue(long domainID, ModuleID moduleID, ModuleFeatureID moduleFeatureID, string paramName)
 {
     Util.Check.Require(IsModuleEnabled(domainID, moduleID), string.Format("Module is not enabled {0}", moduleID));
     Util.Check.Require(IsFeatureEnabled(domainID, moduleID, moduleFeatureID), string.Format("Module feature is not enabled {0}", moduleFeatureID));
     return DomainModuleFeatureConfig[domainID][moduleID][moduleFeatureID][paramName];
 }
Exemplo n.º 46
0
 public string FeatureParameterStrValue(ModuleID moduleID,
     ModuleFeatureID moduleFeatureID, string paramName)
 {
     return FeatureParameterStrValue(SP.SessionContext.DomainID, moduleID, moduleFeatureID, paramName);
 }
Exemplo n.º 47
0
 public bool FeatureParameterIsEnabled(ModuleID moduleID,
     ModuleFeatureID moduleFeatureID, string paramName)
 {
     return FeatureParameterIsEnabled(SP.SessionContext.DomainID, moduleID, moduleFeatureID, paramName);
 }