Exemplo n.º 1
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
            if (this.SceneEnabled)
            {
                SceneUsageAttribute sceneControlAttr = TypeDescriptor.GetAttributes(this.Page)[typeof(SceneUsageAttribute)] as SceneUsageAttribute;

                if (sceneControlAttr == null)
                {
                    throw new HttpException("Page必须使用SceneControlAttribute特性进行标注,才可以使用SceneControl");
                }

                var scenes = ActHelper.GetActs(sceneControlAttr.SceneFileVirtualPath)[sceneControlAttr.ResolveActName(this.Page)].Scenes;

                if (scenes.Count > 0)
                {
                    bool   isCurrentTime = TimePointContext.Current.UseCurrentTime;
                    string sceneName     = sceneControlAttr.ResolveSceneName(Page, isCurrentTime);

                    scenes[sceneName].RenderToControl(this.Page);

                    if (isCurrentTime && this.Page is INormalSceneDescriptor)
                    {
                        ((INormalSceneDescriptor)this.Page).AfterNormalSceneApplied();
                    }
                }
            }
        }
Exemplo n.º 2
0
 partial void oClock_Action(object sender, ElapsedEventArgs e)
 {
     ActData.AllCharactor = ActHelper.GetCombatantList();
     if (ActData.AllCharactor.Count > 0)
     {
     }
 }
Exemplo n.º 3
0
        protected override void OnPreRender(EventArgs e)
        {
            Act act = ActHelper.GetActs("~/App_Data/PropertyEditScene.xml")["propertyEdit"];

            Scene currentScene = act.Scenes[TimePointContext.Current.UseCurrentTime ? "Normal" : "ReadOnly"];

            this.RenderAllTabs(this.Data, currentScene);

            Page.Response.Cache.SetCacheability(HttpCacheability.NoCache);

            currentScene.RenderToControl(this);

            base.OnPreRender(e);
        }
Exemplo n.º 4
0
        public static List <CombertBean> createCombartList()
        {
            dynamic list = ActHelper.GetCombatantList();

            List <CombertBean> CombertBeanList = new List <CombertBean>();

            foreach (dynamic item in list.ToArray())
            {
                if (item == null)
                {
                    continue;
                }

                var combatant = new Combatant();
                combatant.Name      = (string)item.Name;
                combatant.ID        = (uint)item.ID;
                combatant.Job       = (int)item.Job;
                combatant.IsCasting = (bool)item.IsCasting;
                combatant.OwnerID   = (uint)item.OwnerID;
                combatant.type      = (byte)item.type;
                combatant.Level     = (int)item.Level;
                combatant.CurrentHP = (int)item.CurrentHP;
                combatant.MaxHP     = (int)item.MaxHP;
                combatant.PosX      = (float)item.PosX;
                combatant.PosY      = (float)item.PosY;
                combatant.PosZ      = (float)item.PosZ;

                CombertBean combertBean = new CombertBean();
                combertBean.Name      = combatant.Name.ToString();
                combertBean.ID        = combatant.ID;
                combertBean.MaxHp     = combatant.MaxMP;
                combertBean.CurrentHP = combatant.CurrentHP;
                combertBean.Job       = combatant.Job;
                combertBean.IsCasting = combatant.IsCasting;
                combertBean.OwnerID   = combatant.OwnerID;
                combertBean.type      = combatant.type;
                combertBean.Level     = combatant.Level;
                combertBean.X         = combatant.PosX.ToString();
                combertBean.Y         = combatant.PosY.ToString();
                combertBean.Z         = combatant.PosZ.ToString();

                CombertBeanList.Add(combertBean);
            }
            return(CombertBeanList);
        }
Exemplo n.º 5
0
        public int Soma(int y)
        {
            X += (int)ActHelper.Execute("Retorna", null);

            return(X + y);
        }
Exemplo n.º 6
0
 public RadarSettingControl()
 {
     InitializeComponent();
     ActHelper.Initialize();
     clock = new ClockTimer();
 }