Пример #1
0
 /// <summary>
 /// 开启UI的显示
 /// </summary>
 /// <param name="HouseName">小区名字,全小写</param>
 void ShowUI(string HouseName, ShowType showType)
 {
     if (LoadAllData.Instance.houseList.ContainsKey(HouseName))
     {
         HandleUI.Instance.showUI(LoadAllData.Instance.houseList[HouseName], showType);
     }
 }
Пример #2
0
        private void ShowBulletinListByType(ShowType type)
        {
            this._showType = type;
            this._showList = (type != ShowType.ShowEvent) ? Singleton <BulletinModule> .Instance.SystemBulletinList : Singleton <BulletinModule> .Instance.EventBulletinList;
            base.view.transform.Find("Dialog/Content/TitleBtnList/ScrollView").GetComponent <MonoGridScroller>().Init(new MonoGridScroller.OnChange(this.OnScrollerChange), this._showList.Count, null);
            if (this._showList.Count > 0)
            {
                base.view.transform.Find("Dialog/Content/OneNotice/ScrollView").gameObject.SetActive(true);
                base.view.transform.Find("Dialog/Content/TitleBtnList/ScrollView").gameObject.SetActive(true);
                this.ShowBulletinById((this._selectIdDict[this._showType] != 0) ? this._selectIdDict[this._showType] : this._showList[0].get_id());
            }
            else
            {
                base.view.transform.Find("Dialog/Content/OneNotice/ScrollView").gameObject.SetActive(false);
                base.view.transform.Find("Dialog/Content/TitleBtnList/ScrollView").gameObject.SetActive(false);
            }
            this.SetActiveTabBtn(type == ShowType.ShowEvent, base.view.transform.Find("Dialog/TabBtns/EventBtn").GetComponent <Button>());
            this.SetActiveTabBtn(type == ShowType.ShowSystem, base.view.transform.Find("Dialog/TabBtns/SysBtn").GetComponent <Button>());
            if (Singleton <BulletinModule> .Instance.HasNewBulletinsByType((uint)this._showType))
            {
                Singleton <BulletinModule> .Instance.SetBulletinsOldByShowType((uint)this._showType);

                Singleton <NotifyManager> .Instance.FireNotify(new Notify(NotifyTypes.BulletinPopUpUpdate, null));
            }
            this.SetupPopUp();
        }
Пример #3
0
        public static byte GetState(ShowType show, PresenceType type)
        {
            switch (show)
            {
            case ShowType.NONE:
                switch (type)
                {
                case PresenceType.unavailable:
                    return(USER_OFFLINE);

                default:
                    return(USER_ONLINE);
                }

            case ShowType.chat:
                return(USER_ONLINE);

            case ShowType.away:
                return(USER_AWAY);

            case ShowType.dnd:
            case ShowType.xa:
                return(USER_NOT_AVAILVABLE);

            default:
                return(NO_STATE);
            }
        }
Пример #4
0
    public DataItem data;                //数据


    static public Item CreateEntityByID(int id, ShowType type = ShowType.bag)//根据ID生成一个实例数据
    {
        Item item = new Item();

        item.CreateByID(id, type);
        return(item);//返回数据实例
    }
Пример #5
0
        private void ShowsTypeComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            ShowType selectedShowType = (ShowType)showsTypeComboBox.SelectedItem;

            CurrentEndpointSlug = selectedShowType.Endpoint;
            GetShowsByType(CurrentEndpointSlug);
        }
Пример #6
0
    /// <summary>
    /// 移除Buff
    /// </summary>
    /// <param name="buf"></param>
    public void RemoveBuff(BaseBuff buf)
    {
        ShowType curType = buf.BuffShowType;

        if (!m_mountDict.ContainsKey(curType))
        {
            Debug.Log("Dict缺少key=" + curType);
            return;
        }

        if (!m_mountDict[curType].ContainsKey(buf.OnlyID))
        {
            Debug.Log("Buff->" + buf.OnlyID + "不存在");
            return;
        }
        m_mountDict[curType].Remove(buf.OnlyID);
        if (buf.Check(1))
        {
            OnPreAttackFunc -= buf.OnPreAttack;
        }
        if (buf.Check(2))
        {
            OnNextAttackFunc -= buf.OnNextAttack;
        }
        if (buf.Check(3))
        {
            OnPreHurtFunc -= buf.OnPreHurted;
        }
        if (buf.Check(4))
        {
            OnNextHurtFunc -= buf.OnNextHurted;
        }
        buf.Remove();
    }
Пример #7
0
        /// <summary>
        /// 获取组下的链接
        /// </summary>
        /// <returns></returns>
        public List <string> GetGroupLinks(List <string> urls, ShowType type)
        {
            List <string> links = new List <string>();

            this.Links.ForEach(l =>
            {
                if (l.IsVisible(urls))
                {
                    links.Add(l.ToString(this.Target));
                }
            });
            if (links.Count > 0)
            {
                switch (type)
                {
                case ShowType.Hr:
                    links.Insert(0, "<hr />");
                    break;

                case ShowType.GroupName:
                    links.Insert(0, string.Format("<b>{0}</b>", this.Name));
                    break;
                }
            }
            return(links);
        }
        private void DrawMenuPanel()
        {
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField("Group by",
                                       GUILayout.MaxWidth(60));
            groupBy = (GroupByType)EditorGUILayout.EnumPopup(groupBy,
                                                             GUILayout.MaxWidth(150));

            GUILayout.FlexibleSpace();

            showType = (ShowType)EditorGUILayout.EnumPopup(showType,
                                                           GUILayout.MaxWidth(100));

            EditorGUILayout.LabelField("Filter by",
                                       GUILayout.MaxWidth(50));
            filterType = (FilterType)EditorGUILayout.EnumPopup(filterType,
                                                               GUILayout.MaxWidth(100));
            filterText = EditorGUILayout.TextField(filterText,
                                                   GUILayout.MaxWidth(100));
            if (GUILayout.Button("clear",
                                 GUILayout.ExpandWidth(false)))
            {
                filterText = "";
            }
            EditorGUILayout.EndHorizontal();
        }
Пример #9
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="showType"></param>
        /// <returns>返回两张图片的数组</returns>
        private List <String> randImages(ShowType showType)
        {
            List <String> imagesPath = new List <String>(2);

            switch (showType)
            {
            case ShowType.PERSON_AND_PERSON:
                imagesPath.Add(randSelectImage(group1Images));
                imagesPath.Add(randSelectImage(group1Images));
                break;

            case ShowType.PERSON_AND_THING:
                imagesPath.Add(randSelectImage(group1Images));
                imagesPath.Add(randSelectImage(group2Images));
                break;

            case ShowType.THING_AND_PERSON:
                imagesPath.Add(randSelectImage(group2Images));
                imagesPath.Add(randSelectImage(group1Images));
                break;

            case ShowType.THING_AND_THING:
                imagesPath.Add(randSelectImage(group2Images));
                imagesPath.Add(randSelectImage(group2Images));
                break;

            default:
                break;
            }
            return(imagesPath);
        }
Пример #10
0
        public void Initialize(Camera camera, FDCreature creature, ShowType showType, Action <int> callback)
        {
            this.gameObject.name = "CreatureDialog";

            canvas.worldCamera = camera;
            this.camera        = camera;

            this.creature   = creature;
            this.showType   = showType;
            this.onCallback = callback;

            containerBase = this.transform.Find("Canvas/ContainerBase");
            Clickable clickable = containerBase.GetComponent <Clickable>();

            clickable.Initialize(() => { this.OnClicked(); });

            creatureDetailBase = this.transform.Find("Canvas/CreatureDetail");
            clickable          = creatureDetailBase.gameObject.GetComponent <Clickable>();
            clickable.Initialize(() => { this.OnCancelled(); });
            datoBase    = this.transform.Find("Canvas/DatoBase");
            datoControl = GameObjectExtension.CreateFromPrefab <DatoControl>("Prefabs/DatoControl");
            datoControl.Initialize(datoBase, creature.Definition.AnimationId, new Vector2(0, 0));
            //// datoControl.transform.localPosition = new Vector3(0, 0, 0);

            RenderDetails();

            if (IsItemDialog)
            {
                RenderItemsContainer();
            }
            else
            {
                RenderMagicsContainer();
            }
        }
Пример #11
0
 // Token: 0x060002D5 RID: 725 RVA: 0x0000C4E4 File Offset: 0x0000A8E4
 public void OpenPanel(int index, ShowType showType)
 {
     base.gameObject.SetActive(true);
     base.GetComponentInParent <UIMaster>().freezeObject(true);
     base.GetComponentInParent <UIMaster>().blockUI(true, new Color(0f, 0f, 0f, 0.3f));
     if (showType != ShowType.Collect)
     {
         if (showType == ShowType.Specialty)
         {
             SpecialtyDataFormat specialtyDataFormat = SuperGameMaster.sDataBase.get_SpecialtyDB(index);
             ItemDataFormat      itemDataFormat      = SuperGameMaster.sDataBase.get_ItemDB_forId(specialtyDataFormat.itemId);
             this.DetailNameText.GetComponent <Text>().text  = itemDataFormat.name;
             this.DetailImage.GetComponent <Image>().sprite  = itemDataFormat.img;
             this.DetailPlaceText.GetComponent <Text>().text = specialtyDataFormat.place;
             this.DetailInfoText.GetComponent <Text>().text  = itemDataFormat.info;
         }
     }
     else
     {
         CollectionDataFormat collectionDataFormat = SuperGameMaster.sDataBase.get_CollectDB(index);
         this.DetailNameText.GetComponent <Text>().text  = collectionDataFormat.name;
         this.DetailImage.GetComponent <Image>().sprite  = collectionDataFormat.img;
         this.DetailPlaceText.GetComponent <Text>().text = collectionDataFormat.place;
         this.DetailInfoText.GetComponent <Text>().text  = collectionDataFormat.info;
     }
     SuperGameMaster.audioMgr.PlaySE(Define.SEDict["SE_Enter"]);
     this.BackFunc();
 }
Пример #12
0
    private void SetParentByShowtype(GameObject go, ShowType showType)
    {
        Transform parent = null;

        switch (showType)
        {
        case ShowType.DOWN:
            parent = uiCanvas.Find("downLayer");
            break;

        case ShowType.MIDDLE:
            parent = uiCanvas.Find("middleLayer");
            break;

        case ShowType.TOP:
            parent = uiCanvas.Find("topLayer");
            break;

        case ShowType.LOADING:
            parent = uiCanvas.Find("loadingLayer");
            break;
        }
        if (parent != null)
        {
            go.transform.SetParent(parent);
        }
    }
Пример #13
0
 public LeagueStatus(string status, ShowType show) {
   var doc = new XmlDocument();
   doc.LoadXml(status);
   Raw = status;
   foreach (XmlNode node in doc.SelectNodes("body/*")) {
     switch (node.Name) {
       case "profileIcon":
         ProfileIcon = int.Parse(node.InnerText);
         break;
       case "statusMsg":
         Message = node.InnerText;
         break;
       case "gameStatus":
         GameStatus = ChatStatus.Values[node.InnerText];
         break;
       case "timeStamp":
         TimeStamp = long.Parse(node.InnerText);
         break;
       case "skinname":
         Champion = node.InnerText;
         break;
     }
   }
   Show = show;
 }
Пример #14
0
 public static void ShowEquipTooltip(GameItem equip, ShowType type, ItemSlotLogic slot = null)
 {
     m_curItem     = equip;
     m_curType     = type;
     m_curItemSlot = slot;
     UIManager.ShowUI(UIInfo.EquipTooltipsRoot, EquipTooltipsLogic.OnShowEquipTip);
 }
Пример #15
0
        private void ShowConnectPanel()
        {
            GUILayout.BeginHorizontal();
            {
                GUILayout.Label("IP:", GUILayout.Width(40));
                m_szIPAddr = GUILayout.TextField(m_szIPAddr, GUILayout.Width(100));
                m_szPort   = GUILayout.TextField(m_szPort, GUILayout.Width(40));

                if (GUILayout.Button("Connect", GUILayout.Width(100)))
                {
                    net_client.Connect(m_szIPAddr, int.Parse(m_szPort));
                    PlayerPrefs.SetString("RemoteDebuggerIP", m_szIPAddr);
                }

                if (net_client.IsConnected)
                {
                    if (GUILayout.Button("Query", GUILayout.Width(100)))
                    {
                        m_eShowType = ShowType.enum_SceneObjs;
                        ShowPanelDataSet.InitDataSet();

                        Cmd cmd = new Cmd();
                        cmd.WriteNetCmd(NetCmd.C2S_CmdQueryAllObjs);
                        net_client.SendCmd(cmd);
                    }
                }
            }
            GUILayout.EndHorizontal();
        }
Пример #16
0
        public LeagueStatus(string status, ShowType show)
        {
            var doc = new XmlDocument();

            doc.LoadXml(status);
            Raw = status;
            foreach (XmlNode node in doc.SelectNodes("body/*"))
            {
                switch (node.Name)
                {
                case "profileIcon":
                    ProfileIcon = int.Parse(node.InnerText);
                    break;

                case "statusMsg":
                    Message = node.InnerText;
                    break;

                case "gameStatus":
                    GameStatus = ChatStatus.Values[node.InnerText];
                    break;

                case "timeStamp":
                    TimeStamp = long.Parse(node.InnerText);
                    break;

                case "skinname":
                    Champion = node.InnerText;
                    break;
                }
            }
            Show = show;
        }
Пример #17
0
 public void showUI(HousesDate house, ShowType showType)
 {
     if (house == IsShowingHouse && showType == IsShowingType)
     {
         return;
     }
     if (house == IsShowingHouse)
     {
         if (!IsStand)
         {
             return;
         }
         positionUI.GetComponent <RawImage>().material.SetColor("_Color", new Color(1, 1, 1, 1));
         houseStyleUI.gameObject.SetActive(false);
         outsideUI.gameObject.SetActive(false);
         transportUI.gameObject.SetActive(false);
         // buildingCamera.gameObject.GetComponent<RotateBuilding>().Reset();
     }
     else
     {
         UIReset();
         IsShowingHouse = house;
     }
     StopAllCoroutines();
     IsShowingType = showType;
     StartCoroutine(showPosition());
 }
Пример #18
0
        private void ShowCustomCmdPanel()
        {
            if (!net_client.IsConnected)
            {
                return;
            }

            GUILayout.BeginHorizontal();
            {
                //GUILayout.Label("Cmd:", GUILayout.Width(40));
                m_nCmdIndex = EditorGUILayout.Popup(m_nCmdIndex, m_arrayCustomCmds, GUILayout.Width(145));
                m_szParam   = GUILayout.TextField(m_szParam, GUILayout.Width(145));
                if (GUILayout.Button("Execute", GUILayout.Width(100)))
                {
                    string szCmd = string.Format("{0} {1}", m_arrayCustomCmds[m_nCmdIndex], m_szParam);
                    if (!string.IsNullOrEmpty(szCmd))
                    {
                        Cmd cmd = new Cmd(szCmd.Length);
                        cmd.WriteNetCmd(NetCmd.C2S_CustomCmd);
                        cmd.WriteString(szCmd);
                        net_client.SendCmd(cmd);

                        if (0 == m_arrayCustomCmds[m_nCmdIndex].CompareTo("FrustumQuery"))
                        {
                            m_eShowType = ShowType.enum_FrustumObjs;
                        }
                    }
                }
            }
            GUILayout.EndHorizontal();
        }
Пример #19
0
    public void Show <T>(out T p, object data = null, ShowType showType = ShowType.DissmissCurrent) where T : Panel
    {
        p = (T)GetPanel <T>();
        if (p == null)
        {
            return;
        }

        if (Activing(p))
        {
            if (showType != ShowType.Duplicate)
            {
                return;
            }
            p = Instantiate(p.gameObject, transform).GetComponent <T>();
        }

        if (activing.Count > 0)
        {
            if (showType == ShowType.DissmissCurrent)
            {
                activing.Pop().Hide();
            }
            else if (showType == ShowType.PauseCurrent)
            {
                activing.Peek().Hide();
            }
        }

        p.Show(showType);
        activing.Push(p);
    }
Пример #20
0
        /// <summary>
        /// 根据枚举类型返回关键字
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public static string GetKey(ShowType type)
        {
            string str = "";

            switch (type)
            {
            case ShowType.CUR_DATE:
                str = STR_CUR_DATE;
                break;

            case ShowType.CUR_TIME:
                str = STR_CUR_TIME;
                break;

            case ShowType.CUR_DATE_TIME:
                str = STR_CUR_DATE_TIME;
                break;

            case ShowType.PAGE:
                str = STR_PAGE;
                break;

            case ShowType.PAGE_OF:
                str = STR_PAGE_OF;
                break;

            case ShowType.FILE_PATH:
                str = STR_FILE_PATH;
                break;

            case ShowType.PROJECT_PATH:
                str = STR_PROJECT_PATH;
                break;

            case ShowType.DATE_PRINTED:
                str = STR_DATE_PRINTER;
                break;

            case ShowType.DATE_CREATED:
                str = STR_DATE_CREATED;
                break;

            case ShowType.DATE_LAST_MODIFIED:
                str = STR_DATE_LAST_MODIFIED;
                break;

            case ShowType.OBJECT:
                str = STR_OBJECT;
                break;

            case ShowType.OBJECT_TYPE:
                str = STR_OBJECT_TYPE;
                break;

            default:
                break;
            }
            return(str);
        }
Пример #21
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CustomText"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="text">The text.</param>
 /// <param name="image">The image.</param>
 /// <param name="textFormatName">Name of the text format.</param>
 /// <param name="showType">Type of the show.</param>
 public CustomText(string name, string text, Image image, string textFormatName, ShowType showType)
 {
     this._Name       = name;
     this._Text       = text;
     this._Image      = image;
     this._TextDesign = textFormatName;
     this._OutputType = showType;
 }
Пример #22
0
 public static string ToDescriptionString(this ShowType val)
 {
     DescriptionAttribute[] attributes = (DescriptionAttribute[])val
                                         .GetType()
                                         .GetField(val.ToString())
                                         .GetCustomAttributes(typeof(DescriptionAttribute), false);
     return(attributes.Length > 0 ? attributes[0].Description : string.Empty);
 }
Пример #23
0
        /// <summary>
        /// 获取匹配的链接
        /// &lt;a href="..." target="..." &gt;菜单名称&lt;/a&gt;
        /// </summary>
        /// <param name="urls">用户可访问的Url集合</param>
        /// <param name="addSeparator">是否添加分隔符--</param>
        /// <returns></returns>
        public List <string> GetMatchLinks(string moduleID, List <string> urls, ShowType type)
        {
            List <string>    links  = new List <string>();
            List <MenuGroup> groups = GetMenuGroups(moduleID);

            groups.ForEach(g => links.AddRange(g.GetGroupLinks(urls, type)));
            return(links);
        }
Пример #24
0
 public void OpenFlowerEgg(UInt64 Guid, ShowType type)
 {
     m_Guid      = Guid;
     m_Type      = type;
     m_nItemNum  = 1;
     m_CurSelect = null;
     LoadCharmItem();
 }
Пример #25
0
 public void CloseWindow()
 {
     m_Guid     = GlobeVar.INVALID_GUID;
     m_Type     = ShowType.ALL;
     m_nItemNum = 0;
     SelectItem(null);
     UIManager.CloseUI(UIInfo.FlowerEggRoot);
 }
Пример #26
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CustomText"/> class.
 /// </summary>
 public CustomText()
 {
     this._Name       = "";
     this._Text       = "";
     this._Image      = null;
     this._TextDesign = "<none>";
     this._OutputType = ShowType.Permanent;
 }
Пример #27
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            duration = null;
            ShowTypeDetailForm detailForm = new ShowTypeDetailForm(duration);

            detailForm.FormClosed += new FormClosedEventHandler(DetailForm_Closed);
            detailForm.ShowDialog();
        }
Пример #28
0
        // point 0左 1右 2上 3下
        public void setType(ShowType showType, DisappearType disappearType, String position)
        {
            String num1 = disappearType == DisappearType.DISAPPEAR_ORDER ? "0" : "1";
            String num2 = (showType == ShowType.PERSON_AND_PERSON || showType == ShowType.PERSON_AND_THING) ?  "1" : "0";
            String num3 = (showType == ShowType.THING_AND_PERSON || showType == ShowType.PERSON_AND_PERSON) ? "1" : "0";

            this.type = num1 + num2 + num3 + position;
        }
Пример #29
0
 /// <summary>
 /// 根据显示类型获取不同的buff字典
 /// </summary>
 /// <param name="_type"></param>
 /// <returns></returns>
 public Dictionary <int, BaseBuff> GetTypeBuffDict(ShowType _type)
 {
     if (!m_mountDict.ContainsKey(_type))
     {
         Debug.Log("接收器中不存在Buff的Type=" + _type);
         return(null);
     }
     return(m_mountDict[_type]);
 }
Пример #30
0
        protected string GetTargetString(ShowType showType, MarketItemModel model)
        {
            var result = string.Empty;

            switch (showType)
            {
            case ShowType.Tittle:
                result = model.Tittle;
                break;

            case ShowType.Description:
                result = model.Description;
                break;

            case ShowType.ClassId:
                result = model.ClassId;
                break;

            case ShowType.AssetId:
                result = model.AssetId;
                break;

            case ShowType.CreationDate:
                result = GetDateString(model.Created);
                break;

            case ShowType.LastUpdate:
                result = GetDateString(model.Updated);
                break;

            case ShowType.Price:
                result = model.Price.GetStringWithCurrencySprite(_text.color);
                break;

            case ShowType.Fee:
                result = model.Fee.GetStringWithCurrencySprite(_text.color);
                break;

            case ShowType.OrderStatus:
                result = model.Status.GetText();
                break;

            case ShowType.OffersCount:
                result = model.OffersCount.ToString();
                break;

            case ShowType.SellOfferId:
                result = model.SellOfferId;
                break;

            default:
                result = "NOT IMPLEMENT";
                DevLogger.Warning("Need implement for " + showType);
                break;
            }
            return(result);
        }
Пример #31
0
 public FormatInfo(ShowType type)
 {
     InitPos(type);
     ValueStart   = ' ';
     ValueEnd     = ' ';
     RegionStart  = '(';
     RegionEnd    = ')';
     ValSeparator = ',';
 }
Пример #32
0
 public CustomPopup( UIView _content,bool _cancelable, nfloat _width, nfloat _height, ShowType _showType, UIView _anchor = null)
 {
     cancelable = _cancelable;
     content = _content;
     width = _width;
     height = _height;
     anchor = _anchor;
     showType = _showType;
     window = new CustomWindow (this, content, cancelable, width, height, showType, anchor);
 }
Пример #33
0
 /// <summary>
 /// Extract the metadata from the video file (WTV/DVRMS/MP4/MKV/AVI/TS XML) and supplement with information downloaded from TVDB and MovieDB
 /// </summary>
 /// <param name="cjo">Conversion job options</param>
 /// <param name="disableDownloadSeriesDetails">(Optional) True if you want to override adn disable the DownloadSeriesDetails option from TVDB/MovieDB</param>
 public VideoMetaData(ConversionJobOptions cjo, JobStatus jobStatus, Log jobLog, bool disableDownloadSeriesDetails = false)
 {
     _videoFileName = cjo.sourceVideo;
     _downloadSeriesDetails = (cjo.downloadSeriesDetails && !disableDownloadSeriesDetails); // special case, if want to override it
     _downloadBannerFile = (cjo.downloadBanner && !disableDownloadSeriesDetails);
     _jobStatus = jobStatus;
     _jobLog = jobLog;
     _metadataCorrections = cjo.metadataCorrections;
     _tivoMAKKey = cjo.tivoMAKKey;
     _profile = cjo.profile;
     _taskName = cjo.taskName;
     _forceShowType = cjo.forceShowType;
     _prioritizeMatchDate = cjo.prioritizeOriginalBroadcastDateMatch;
 }
Пример #34
0
 private int ShowMeasure(ShowType show)
 {
     switch (show)
     {
         case ShowType.NONE:
         case ShowType.chat:
             return 1;
         case ShowType.away:
         case ShowType.xa:
             return 2;
         case ShowType.dnd:
             return 3;
         default:
             return 0;
     }
 }
Пример #35
0
        public List<SelectListItem> GetShows(ShowType tp, AdareContext db)
        {
            var res = new List<SelectListItem>();

            var showlist = db.AdareShows.Where(p => p.EventTypeId == (int)tp);

            showlist.ToList().ForEach(s => res.Add(GetEventItem(s)));

            // allow null in select list
            res.Add(new SelectListItem
            {
                Selected = true,
                Text = String.Empty,
                Value = "0",
            });

            return res;
        }
Пример #36
0
 public static byte GetState(ShowType show, PresenceType type)
 {
     switch (show)
     {
         case ShowType.NONE:
             switch (type)
             {
                 case PresenceType.unavailable:
                     return USER_OFFLINE;
                 default:
                     return USER_ONLINE;
             }
         case ShowType.chat:
             return USER_ONLINE;
         case ShowType.away:
             return USER_AWAY;
         case ShowType.dnd:
         case ShowType.xa:
             return USER_NOT_AVAILVABLE;
         default:
             return NO_STATE;
     }
 }
Пример #37
0
 public StatusUpdatedEventArgs(LeagueStatus status, PresenceType presenceType, ShowType show) {
   Status = status;
   PresenceType = presenceType;
   Show = show;
 }
Пример #38
0
 public async Task<Shows> Shows(ISession session, ShowType type)
 {
     if(type==ShowType.Anime)
         return await Shows(session);
     Shows s = new Shows();
     s.Status = ResponseStatus.Ok;
     return s;
 }
Пример #39
0
        private static void SaveDgml(ScanResult result, GroupType group, ShowType show, string templatePath, string outputPath)
        {
            XElement dg;
            XElement nodes;
            XElement links;
            if (String.IsNullOrEmpty(templatePath))
            {
                nodes = new XElement(XDgmlNamespace + "Nodes");
                links = new XElement(XDgmlNamespace + "Links");
                dg = new XElement(XDgmlNamespace + "DirectedGraph", nodes, links);
            }
            else // load from the provided template path.
            {
                dg = XElement.Load(templatePath);
                nodes = dg.Element(XDgmlNamespace + "Nodes");
                if (nodes == null)
                {
                    nodes = new XElement(XDgmlNamespace + "Nodes");
                    dg.Add(nodes);
                }

                links = dg.Element(XDgmlNamespace + "Links");
                if (links == null)
                {
                    links = new XElement(XDgmlNamespace + "Links");
                    dg.Add(links);
                }
            }

            // Draw the projects.
            if (ShowType.Projects == (show & ShowType.Projects))
            {
                Console.WriteLine("Graphing projects...");
                foreach (ScannedProject project in result.ProjectFiles.Values)
                {
                    XElement node = new XElement(XDgmlNamespace + "Node",
                                new XAttribute("Id", project.Key),
                                new XAttribute("Category", "ProjectFile"),
                                new XAttribute("Reference", project.Path),
                                new XElement(XDgmlNamespace + "Category",
                                    new XAttribute("Ref", String.Concat(project.Type, "Project"))
                                    )
                                );

                    if (GroupType.Projects == (group & GroupType.Projects))
                    {
                        node.Add(new XAttribute("Group", "collapsed"));
                    }

                    nodes.Add(node);

                    foreach (ScannedProject projectRef in project.TargetProjects)
                    {
                        links.Add(new XElement(XDgmlNamespace + "Link",
                                    new XAttribute("Category", "ProjectReference"),
                                    new XAttribute("Source", project.Key),
                                    new XAttribute("Target", projectRef.Key)
                                    )
                            );
                    }

                    if (ShowType.Files == (show & ShowType.Files))
                    {
                        foreach (ScannedSourceFile file in project.SourceFiles)
                        {
                            links.Add(new XElement(XDgmlNamespace + "Link",
                                        new XAttribute("Category", "CompilesFile"),
                                        new XAttribute("Source", project.Key),
                                        new XAttribute("Target", file.Key),
                                        new XElement(XDgmlNamespace + "Category",
                                            new XAttribute("Ref", "Contains")
                                            )
                                        )
                                );
                        }
                    }
                }
            }

            // Draw the files.
            if (ShowType.Files == (show & ShowType.Files))
            {
                Console.WriteLine("Graphing files...");
                foreach (ScannedSourceFile file in result.SourceFiles.Values)
                {
                    XElement node = new XElement(XDgmlNamespace + "Node",
                                new XAttribute("Id", file.Key),
                                new XAttribute("Category", "SourceFile"),
                                new XAttribute("Reference", file.Path)
                                );

                    if (GroupType.Files == (group & GroupType.Files))
                    {
                        node.Add(new XAttribute("Group", "collapsed"));
                    }

                    nodes.Add(node);
                }
            }

            // Draw the symbols.
            if (ShowType.Symbols == (show & ShowType.Symbols))
            {
                Console.WriteLine("Graphing symbols...");
                foreach (ScannedSymbol symbol in result.Symbols.Values)
                {
                    nodes.Add(new XElement(XDgmlNamespace + "Node",
                                new XAttribute("Id", symbol.Key),
                                new XAttribute("Category", symbol.Type),
                                new XAttribute("Reference", symbol.SourceFiles[0].Path)
                                )
                        );

                    if (ShowType.Files == (show & ShowType.Files))
                    {
                        foreach (ScannedSourceFile fileRef in symbol.SourceFiles)
                        {
                            links.Add(new XElement(XDgmlNamespace + "Link",
                                        new XAttribute("Category", "DefinesSymbol"),
                                        new XAttribute("Source", fileRef.Key),
                                        new XAttribute("Target", symbol.Key),
                                        new XElement(XDgmlNamespace + "Category",
                                            new XAttribute("Ref", "Contains")
                                            )
                                        )
                                );
                        }
                    }

                    if (ShowType.References == (show & ShowType.References))
                    {
                        foreach (ScannedSymbol symbolRef in symbol.TargetSymbols)
                        {
                            links.Add(new XElement(XDgmlNamespace + "Link",
                                        new XAttribute("Category", "SymbolReference"),
                                        new XAttribute("Source", symbol.Key),
                                        new XAttribute("Target", symbolRef.Key)
                                        )
                                );
                        }
                    }
                }
            }

            dg.Save(outputPath, SaveOptions.None);
        }
Пример #40
0
 private void showCategoryBookStyle(ShowType type)
 {
     separatePageNum();
     _showType = type;
     dgvBooks.Visible = false;
     panelItemList.Visible = true;
 }
        //Представление товаров, в зависимости от типа:
        private IEnumerable<ProductViewModel> GetProducts(ShowType ProductType)
        {
            //Выборка всех категорий
            List<productcategory> allcat = repository.categories.Categories.ToList();
            //Выборка общей модели товары
            IEnumerable<ProductViewModel> model = repository.musicInstruments
                                              .Select(x => new ProductViewModel
                                              {
                                                  Id = x.Id, IsNew = x.General.IsNew,
                                                  Name = x.General.Name,
                                                  Price = x.General.Price,
                                                  ImagePath = x.Image_path,
                                                  Reiting = x.General.Reiting,
                                                  Category = allcat.First(c => c.CategoryId == x.Category_Id)
                                              });
            //Формирование конкретной модели
            if (ProductType == ShowType.New)
            {
                model = model.Where(x => x.IsNew == true);
                ViewData["title"] = "Новинки";
            }
            if (ProductType == ShowType.Popular)
            {
                model = model.Where(x => x.Reiting > 4);
                ViewData["title"] = "Популярные товары";
            }

            return model;
        }
        private void DrawMenuPanel()
        {
            EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);
            EditorGUILayout.LabelField("Group by:", Styles.toolbarLabel, GUILayout.MaxWidth(60));
            m_GroupBy = (GroupByType)EditorGUILayout.EnumPopup(m_GroupBy, EditorStyles.toolbarPopup, GUILayout.MaxWidth(150));

            GUILayout.FlexibleSpace();

            m_ShowType = (ShowType)EditorGUILayout.EnumPopup(m_ShowType, EditorStyles.toolbarPopup, GUILayout.MaxWidth(100));

            EditorGUILayout.LabelField("Filter by:", Styles.toolbarLabel, GUILayout.MaxWidth(50));
            m_FilterType = (FilterType)EditorGUILayout.EnumPopup(m_FilterType, EditorStyles.toolbarPopup, GUILayout.MaxWidth(100));
            m_FilterText = GUILayout.TextField(m_FilterText, "ToolbarSeachTextField", GUILayout.MaxWidth(100));
            if (GUILayout.Button(GUIContent.none, string.IsNullOrEmpty(m_FilterText) ? "ToolbarSeachCancelButtonEmpty" : "ToolbarSeachCancelButton", GUILayout.ExpandWidth(false)))
                m_FilterText = "";
            EditorGUILayout.EndHorizontal();
        }
Пример #43
0
 public Presence(ShowType show, string status)
     : this()
 {
     this.Show		= show;
     this.Status		= status;
 }
Пример #44
0
        public async Task<Shows> Shows(ISession session, ShowType type)
        {
            try
            {
                CrunchySession s = session as CrunchySession;
                if (s == null)
                    return new Shows { ErrorMessage = "Invalid Session", Status = ResponseStatus.InvalidArgument };
                Shows ret = new Shows();
                ret.Items = new List<Show>();
                string url = string.Format(LibSet[ShowUrlS], ShowFromType(type));
                WebStream ws = await WebStream.Get(url,null,LibSet[UserAgentS],null,s.cookies.ToCookieCollection(),SocketTimeout,true,null,_info.ProxyFromGlobalRequirements(_global));
                if (ws != null && ws.StatusCode == HttpStatusCode.OK)
                {
                    if (!VerifyLogin(ws.Cookies))
                        SetLoginError(ret);
                    else
                    {
                        StreamReader rd = new StreamReader(ws);
                        string dta = rd.ReadToEnd();
                        rd.Dispose();
                        MatchCollection col = showregex.Matches(dta);
                        Dictionary<string, Show> ls = new Dictionary<string, Show>();
                        foreach (Match m in col)
                        {
                            if (m.Success)
                            {
                                Show cs = new Show();

                                cs.Id = int.Parse(m.Groups["id"].Value).ToString();
                                if (!ls.ContainsKey(cs.Id))
                                {
                                    cs.Name = m.Groups["title"].Value;
                                    cs.Type = type;
                                    cs.PluginName = CrunchyPluginInfo.PluginName;
                                    cs.PluginMetadata.Add("Url",
                                        new Uri("http://www.crunchyroll.com" + m.Groups["url"].Value).ToString());
                                    ls.Add(cs.Id, cs);
                                }
                            }
                        }
                        col = show2regex.Matches(dta);
                        foreach (Match m in col)
                        {
                            if (m.Success)
                            {
                                string id = int.Parse(m.Groups["id"].Value).ToString();
                                Show ccd = ls[id];
                                ccd.Description = Regex.Unescape(m.Groups["desc"].Value);
                            }
                        }
                        ret.Items = ls.Values.OrderBy(a => a.Name).Cast<Show>().ToList();
                        ret.Status = ResponseStatus.Ok;
                    }
                }
                else
                {
                    SetWebError(ret);
                }
                ws?.Dispose();
                return ret;
            }
            catch (Exception e)
            {
                return new Shows {ErrorMessage = e.ToString(), Status = ResponseStatus.SystemError};
            }
          
        }     
Пример #45
0
        private async Task<UpdateResponse> Updates(CrunchySession s, ShowType t)
        {
            int startpage = 0;
            UpdateResponse ret = new UpdateResponse();
            bool end = false;
            do
            {
                string url = string.Format(LibSet[UpdateUrlS], ShowFromType(t), startpage);
                WebStream ws = await WebStream.Get(url, null,LibSet[UserAgentS], null, s.cookies.ToCookieCollection(),SocketTimeout,true,null,_info.ProxyFromGlobalRequirements(_global));
                if (ws != null && ws.StatusCode == HttpStatusCode.OK)
                {
                    if (!VerifyLogin(ws.Cookies))
                    {
                        ws.Dispose();
                        SetLoginError(ret);
                        return ret;
                    }
                    StreamReader rd = new StreamReader(ws);
                    string dta = rd.ReadToEnd();
                    rd.Dispose();
                    MatchCollection scol = updregex.Matches(dta);
                    if (scol.Count == 0)
                        end = true;
                    foreach (Match m in scol)
                    {
                        string show = m.Groups["show"].Value;
                        string image = m.Groups["image"].Value;
                        string title = WebUtility.HtmlDecode(m.Groups["title"].Value);
                        string ep = m.Groups["ep"].Value;
                        Uri ur = new Uri("http://www.crunchyroll.com" + m.Groups["url"].Value);
                        int a = ep.IndexOf("&ndash;", StringComparison.InvariantCulture);
                        if (a >= 0)
                        {
                            ep = ep.Substring(0, a).Trim();
                            string tag = CrunchyPluginInfo.PluginName + "|" + show + "|" + ep;
                            if (UpdateHistory.Exists(tag))
                            {
                                Episode c = JsonConvert.DeserializeObject<Episode>(UpdateHistory.Get(tag));
                                ret.Found.Add(c);
                            }
                            else
                            {
                                Episode p = new Episode();
                                p.PluginMetadata.Add("Url",ur.ToString());
                                p.ShowName = title;
                                p.ShowId = show;
                                p.PluginName = CrunchyPluginInfo.PluginName;
                                p.UniqueTag = tag;
                                p.ImageUri = new Uri(image);
                                p.Type = t;
                                ret.NotFound.Add(p);

                            }
                        }

                    }


                }
                else
                {
                    ws?.Dispose();
                    SetWebError(ret);
                    return ret;
                }
                ws?.Dispose();
                startpage++;
            } while (!end);
            return ret;
        }
Пример #46
0
        /// <summary>
        /// 获取窗体查询权限SQL
        /// </summary>
        /// <param name="st">数据显示类型</param>
        /// <param name="formid">FormID</param>
        /// <returns></returns>
        public string GetAuthSQL(ShowType st, int formid)
        {
            string sResult = "(";
            //管理员(超级用户)则查看全部数据
            if (IsAdmin)
            {
                if (st == ShowType.FormShow)
                {
                    sResult += " iFlag IN (0,1,2,3)) ";
                }
                else
                {
                    sResult += " 1=1) ";
                }
            }
            else
            {
                string sLastAuthSQL = "";
                foreach (Hashtable ht in GetFormSecurity(formid))
                {
                    switch ((SecurityOperationValue)ht[SecurityOperation.View])
                    {
                        case SecurityOperationValue.None:
                            {
                                if (sLastAuthSQL != " (1=2) OR")
                                {
                                    sResult += " (1=2) OR";
                                    sLastAuthSQL = " (1=2) OR";
                                }
                                break;
                            }
                        case SecurityOperationValue.Self:
                            {
                                if (st == ShowType.FormShow)
                                {
                                    if (sLastAuthSQL != " (iFlag IN (0,1,2,3) AND sUserID='" + CurrentUserID + "') OR")
                                    {
                                        sResult += " (iFlag IN (0,1,2,3) AND sUserID='" + CurrentUserID + "') OR";
                                        sLastAuthSQL = " (iFlag IN (0,1,2,3) AND sUserID='" + CurrentUserID + "') OR";
                                    }
                                    break;
                                }
                                else
                                {
                                    if (sLastAuthSQL != " (sUserID='" + CurrentUserID + "') OR")
                                    {
                                        sResult += " (sUserID='" + CurrentUserID + "') OR";
                                        sLastAuthSQL = " (sUserID='" + CurrentUserID + "') OR";
                                    }
                                    break;
                                }
                            }
                        case SecurityOperationValue.Underling:
                            {
                                if (st == ShowType.FormShow)
                                {
                                    if (sLastAuthSQL != " (iFlag IN (0,1,2,3) AND sUserID IN('" + GetUserUnderlingStr.Replace(",", "','") + "')) OR")
                                    {
                                        sResult += " (iFlag IN (0,1,2,3) AND sUserID IN('" + GetUserUnderlingStr.Replace(",", "','") + "')) OR";
                                        sLastAuthSQL = " (iFlag IN (0,1,2,3) AND sUserID IN('" + GetUserUnderlingStr.Replace(",", "','") + "')) OR";
                                    }
                                    break;
                                }
                                else
                                {
                                    if (sLastAuthSQL != " (sUserID IN('" + GetUserUnderlingStr.Replace(",", "','") + "')) OR")
                                    {
                                        sResult += " (sUserID IN('" + GetUserUnderlingStr.Replace(",", "','") + "')) OR";
                                        sLastAuthSQL = " (sUserID IN('" + GetUserUnderlingStr.Replace(",", "','") + "')) OR";
                                    }
                                    break;
                                }
                            }
                        case SecurityOperationValue.SelfAndUnderling:
                            {
                                if (st == ShowType.FormShow)
                                {
                                    if (sLastAuthSQL != " (iFlag IN (0,1,2,3) AND sUserID IN('" + GetUserSelfAndUnderlingStr.Replace(",", "','") + "')) OR")
                                    {
                                        sResult += " (iFlag IN (0,1,2,3) AND sUserID IN('" + GetUserSelfAndUnderlingStr.Replace(",", "','") + "')) OR";
                                        sLastAuthSQL = " (iFlag IN (0,1,2,3) AND sUserID IN('" + GetUserSelfAndUnderlingStr.Replace(",", "','") + "')) OR";
                                    }
                                    break;
                                }
                                else
                                {
                                    if (sLastAuthSQL != " (sUserID IN('" + GetUserSelfAndUnderlingStr.Replace(",", "','") + "')) OR")
                                    {
                                        sResult += " (sUserID IN('" + GetUserSelfAndUnderlingStr.Replace(",", "','") + "')) OR";
                                        sLastAuthSQL = " (sUserID IN('" + GetUserSelfAndUnderlingStr.Replace(",", "','") + "')) OR";
                                    }
                                    break;
                                }
                            }
                        case SecurityOperationValue.Department:
                            {
                                if (st == ShowType.FormShow)
                                {
                                    if (sLastAuthSQL != " (iFlag IN (0,1,2,3) AND sUserID IN('" + GetUserDeptStr.Replace(",", "','") + "')) OR")
                                    {
                                        sResult += " (iFlag IN (0,1,2,3) AND sUserID IN('" + GetUserDeptStr.Replace(",", "','") + "')) OR";
                                        sLastAuthSQL = " (iFlag IN (0,1,2,3) AND sUserID IN('" + GetUserDeptStr.Replace(",", "','") + "')) OR";
                                    }
                                    break;
                                }
                                else
                                {
                                    if (sLastAuthSQL != " (sUserID IN('" + GetUserDeptStr.Replace(",", "','") + "')) OR")
                                    {
                                        sResult += " (sUserID IN('" + GetUserDeptStr.Replace(",", "','") + "')) OR";
                                        sLastAuthSQL = " (sUserID IN('" + GetUserDeptStr.Replace(",", "','") + "')) OR";
                                    }
                                    break;
                                }
                            }
                        case SecurityOperationValue.DeptUnderling:
                            {
                                if (st == ShowType.FormShow)
                                {
                                    if (sLastAuthSQL != " (iFlag IN (0,1,2,3) AND sUserID IN('" + GetUserUnderDeptStr.Replace(",", "','") + "')) OR")
                                    {
                                        sResult += " (iFlag IN (0,1,2,3) AND sUserID IN('" + GetUserUnderDeptStr.Replace(",", "','") + "')) OR";
                                        sLastAuthSQL = " (iFlag IN (0,1,2,3) AND sUserID IN('" + GetUserUnderDeptStr.Replace(",", "','") + "')) OR";
                                    }
                                    break;
                                }
                                else
                                {
                                    if (sLastAuthSQL != " (sUserID IN('" + GetUserUnderDeptStr.Replace(",", "','") + "')) OR")
                                    {
                                        sResult += " (sUserID IN('" + GetUserUnderDeptStr.Replace(",", "','") + "')) OR";
                                        sLastAuthSQL = " (sUserID IN('" + GetUserUnderDeptStr.Replace(",", "','") + "')) OR";
                                    }
                                    break;
                                }
                            }
                        case SecurityOperationValue.DepartmentAndUnderling:
                            {
                                if (st == ShowType.FormShow)
                                {
                                    if (sLastAuthSQL != " (iFlag IN (0,1,2,3) AND sUserID IN('" + GetUserDeptAndUnderDeptStr.Replace(",", "','") + "')) OR")
                                    {
                                        sResult += " (iFlag IN (0,1,2,3) AND sUserID IN('" + GetUserDeptAndUnderDeptStr.Replace(",", "','") + "')) OR";
                                        sLastAuthSQL = " (iFlag IN (0,1,2,3) AND sUserID IN('" + GetUserDeptAndUnderDeptStr.Replace(",", "','") + "')) OR";
                                    }
                                    break;
                                }
                                else
                                {
                                    if (sLastAuthSQL != " (sUserID IN('" + GetUserDeptAndUnderDeptStr.Replace(",", "','") + "')) OR")
                                    {
                                        sResult += " (sUserID IN('" + GetUserDeptAndUnderDeptStr.Replace(",", "','") + "')) OR";
                                        sLastAuthSQL = " (sUserID IN('" + GetUserDeptAndUnderDeptStr.Replace(",", "','") + "')) OR";
                                    }
                                    break;
                                }
                            }
                        case SecurityOperationValue.All:
                            {
                                if (st == ShowType.FormShow)
                                {
                                    if (sLastAuthSQL != " (iFlag IN (0,1,2,3)) OR")
                                    {
                                        sResult += " (iFlag IN (0,1,2,3)) OR";
                                        sLastAuthSQL = " (iFlag IN (0,1,2,3)) OR";
                                    }
                                    break;
                                }
                                else
                                {
                                    if (sLastAuthSQL != " (1=1) OR")
                                    {
                                        sResult += " (1=1) OR";
                                        sLastAuthSQL = " (1=1) OR";
                                    }
                                    break;
                                }
                            }
                        default:
                            {
                                if (sLastAuthSQL != " (1=2) OR")
                                {
                                    sResult += " (1=2) OR";
                                    sLastAuthSQL = " (1=2) OR";
                                }
                                break;
                            }
                    }
                }
                if (sResult.EndsWith("OR"))
                {
                    sResult = sResult.Substring(0, sResult.Length - 3) + ")";
                }

            }
            return sResult;
        }
Пример #47
0
        private XmppPresenceState DecodeShowAs(ShowType showas)
        {
            switch (showas)
            {
                case ShowType.Away:
                    return XmppPresenceState.Away;

                case ShowType.Busy:
                    return XmppPresenceState.Busy;

                case ShowType.ExtendedAway:
                    return XmppPresenceState.Idle;

                case ShowType.Online:
                    return XmppPresenceState.Available;
            }

            return XmppPresenceState.Offline;
        }
 public ShowTypeCreateOrUpdateCommand(ShowType ent)
 {
     this.ent = ent;
 }
Пример #49
0
        private void SetMyPresence(ShowType show, bool idle)
        {
            if (show == MyShow)
            {
                return;
            }

            if (idle && !_isIdle)
            {
                // coming to idle state
                _nonIdlePresence = _presence.Show;
                _isIdle = true;
            }
            else if (!idle && _isIdle)
            {
                // coming from idle state
                _isIdle = false;
            }

            MyShow = show;
        }
Пример #50
0
        public void RefreshFriend(string Bare, XMPP.protocol.client.PresenceType presenceType, ShowType Show)
        {
            Friend friend = Rosters[Bare];
            //dnd 忙碌 busy 4  away 离开 away 2
            //int state = 1;//不知道是什么
            switch (Show)
            {
                case ShowType.NONE:
                    bool isonline = friend.IsOnline;
                    friend.State = 0;
                    friend.IsOnline = isonline;
                    break;
                case ShowType.dnd:
                    //state = 4;
                    friend.State = 4;
                    break;
                case ShowType.away:
                    //state = 2;
                    friend.State = 2;
                    break;
            }
            //friend.State = state;
            Group group_item = Groups[friend.GroupName];
            int group_index = Controls.IndexOfKey(StringFinal.GroupName + friend.GroupID);
            GroupControl gruop_user = Controls[group_index] as GroupControl;

            int panel_index = Controls.IndexOfKey(StringFinal.UserPanelName + friend.GroupID);
            Panel panel_user = Controls[panel_index] as Panel;

            if (presenceType == XMPP.protocol.client.PresenceType.unavailable)
            {
                if (friend.IsOnline)
                {
                    if (gruop_user.GroupInfo.OnlineCount > 0)
                    {
                        group_item.OnlineCount -= 1;
                        gruop_user.GroupInfo = group_item;
                    }
                }
                friend.IsOnline = false;
                if(Path.InputAlertSwitch)
                    SoundPlayEx.MsgPlay(Path.InputAlertPath);
            }
            else
            {
                if (friend.IsOnline==false)
                {
                    group_item.OnlineCount += 1;
                    gruop_user.GroupInfo = group_item;
                }
                friend.IsOnline = true;
                if(Path.GlobalSwitch)
                    SoundPlayEx.MsgPlay(Path.GlobalPath);
            }

            int friend_index = panel_user.Controls.IndexOfKey(StringFinal.FriendName + friend.Uin);
            FriendControl friend_user = panel_user.Controls[friend_index] as FriendControl;
            friend_user.FriendInfo = friend;
            friend_user.UpdateImage();//更新名片

            UpdateLayout(panel_user);
            System.GC.Collect();
        }
Пример #51
0
 /// <summary>
 ///		Carga los mensajes de Twitter en el explorador
 /// </summary>
 private void LoadTwitterMesssages(ShowType intType)
 {
     // En el caso de un timeLine borra los mensajes antiguos
         if (intType == ShowType.Messages)
             objColMessages.ClearOld(Classes.TwitterConfiguration.MessagesTwitterMaximum);
     // Carga el HTML
         wbExplorer.LoadHTML(objColMessages.ToHTML());
     // Muestra el número de mensajes
         lblMesssages.Text = objColMessages.Count.ToString();
         switch (intType)
             { case ShowType.Messages:
                 case ShowType.MyMessages:
                         lblMesssages.Text += " mensajes";
                     break;
                 case ShowType.Followers:
                         lblMesssages.Text += " seguidores";
                     break;
                 case ShowType.Following:
                         lblMesssages.Text += " siguiendo";
                     break;
             }
 }
Пример #52
0
 private string ShowFromType(ShowType type)
 {
     string tp = "anime";
     if (type == ShowType.Drama)
         tp = "drama";
     else if (type == ShowType.Pop)
         tp = "pop";
     return tp;
 }
Пример #53
0
 /// <summary>
 ///		Carga los datos
 /// </summary>
 public void LoadData(ShowType intType)
 {
     // Oculta el botón de 'Mis mensajes' cuando estamos controlando otra cuenta
         cmdMyMessages.Visible = !HasUser;
     // Selecciona / deselecciona los checkbox
         cmdStatus.Checked = intType == ShowType.Messages;
         cmdMyMessages.Checked = intType == ShowType.MyMessages;
         cmdFollowers.Checked = intType == ShowType.Followers;
         cmdFollowing.Checked = intType == ShowType.Following;
     // Muestra los datos
         switch (intType)
             { case ShowType.Messages:
                         if (intLastType != ShowType.Messages)
                             Clear();
                         LoadTimeLine();
                     break;
                 case ShowType.MyMessages:
                         if (intLastType != ShowType.MyMessages)
                             Clear();
                         LoadMyMessages();
                     break;
                 case ShowType.Followers:
                         Clear();
                         LoadFollowers();
                     break;
                 case ShowType.Following:
                         Clear();
                         LoadFollowing();
                     break;
             }
     // Recarga el explorador
         LoadTwitterMesssages(intType);
     // Guarda el tipo mostrado
         intLastType = intType;
 }
Пример #54
0
        private void DrawMenuPanel()
        {
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField("Group by", GUILayout.MaxWidth(60));
            m_GroupBy = (GroupByType)EditorGUILayout.EnumPopup(m_GroupBy, GUILayout.MaxWidth(150));

            GUILayout.FlexibleSpace();

            m_ShowType = (ShowType)EditorGUILayout.EnumPopup(m_ShowType, GUILayout.MaxWidth(100));

            EditorGUILayout.LabelField("Filter by", GUILayout.MaxWidth(50));
            m_FilterType = (FilterType)EditorGUILayout.EnumPopup(m_FilterType, GUILayout.MaxWidth(100));
            m_FilterText = EditorGUILayout.TextField(m_FilterText, GUILayout.MaxWidth(100));
            if (GUILayout.Button("Clear", GUILayout.ExpandWidth(false)))
                m_FilterText = "";
            EditorGUILayout.EndHorizontal();
        }
Пример #55
0
 public ItemControl(ShowType type)
 {
     InitializeComponent();
     showType = type;
 }
Пример #56
0
 public void ShowLimitTip()
 {
     if (markLimitTip == 0)
     {
         markLimitTip = 1;
         showCurrentType = ShowType.LIMIT_TYPE;
         tipChanllageObject.SetActive(true);
         tipHandObject.SetActive(false);
         StartCoroutine(ShowThoseTip(ConstantString.TUITION_TIP_LIMIT_TXT));
     }
 }
Пример #57
0
 public Presence(ShowType show, string status, int priority)
     : this(show, status)
 {
     this.Priority	= priority;
 }
Пример #58
0
 public void ShowChanllangeTip()
 {
     if (markShowChanllageTip == 0)
     {
         markShowChanllageTip = 1;
         showCurrentType = ShowType.CHANLLANGE_TYPE;
         tipChanllageObject.SetActive(true);
         StartCoroutine(ShowThoseTip(ConstantString.TUITION_TIP_CHALLENGE_TXT));
     }
 }
Пример #59
0
        private void UpdateView(ShowType showType)
        {
            if (showType != _showType)
            {
                try
                {
                    this.Cursor = Cursors.WaitCursor;
                    _grid.SuspendLayout();
                    _grid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.None;
                    foreach (DataGridViewRow row in _grid.Rows)
                    {

                        _grid.CurrentCell = null;
                        switch (showType)
                        {
                            case ShowType.ShowAll:
                                row.Visible = true;
                                break;
                            case ShowType.TurfOnly:
                                {
                                    string s = (string)row.Cells["SUR"].Value;
                                    if (false == s.Equals("T", StringComparison.CurrentCultureIgnoreCase))
                                    {
                                        row.Visible = false;
                                    }
                                    else
                                    {
                                        row.Visible = true;
                                    }
                                }
                                break;
                            case ShowType.MaidenOnly:
                                {
                                    string s = (string)row.Cells["CLASS"].Value;
                                    if (s.IndexOf("MSW") >= 0 || s.IndexOf("MCL") >= 0)
                                    {
                                        row.Visible = true;
                                    }
                                    else
                                    {
                                        row.Visible = false;
                                    }
                                }
                                break;
                        }
                    }
                    _grid.ResumeLayout(false);
                    _grid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
                    _showType = showType;
                    _txtboxTitle.Text = Title;
                }
                finally
                {
                    this.Cursor = Cursors.Default;
                }

            }
        }
Пример #60
0
        public CustomWindow(INotifyCloseDone _parent,  UIView _content,bool _cancelable, nfloat _width, nfloat _height, ShowType _showType, UIView _anchor = null)
            : base(UIScreen.MainScreen.Bounds)
        {
            nfloat left = 0;
             	nfloat top = 0;

            cancelable = _cancelable;
            content = _content;
            anchor = _anchor;
            showType = _showType;
            CustomParent = _parent;
            nfloat width = _width + 4;
            nfloat height = _height + 4;

            UIColor bgrdColor = UIColor.FromRGBA (100, 100, 100, 100);

            //todo show at top bar notification
            switch(showType)
            {

                case ShowType.Dialog:
                    left =  (XFPopupConst.SCREEN_WIDTH  - width) * 0.5f;
                    top =  (XFPopupConst.SCREEN_HEIGHT - height) * 0.5f;
                    bgrdColor = UIColor.FromRGBA (100, 100, 100, 100);

                    break;

                case ShowType.DropDown:
                    CGPoint topleft = ConvertPointFromView (new CGPoint (0, 0), anchor);
                    //ConvertPointToWindow(new CGPoint(anchor.Frame.Left , anchor.Frame.Top),this);

                    left =  topleft.X;
                    if (topleft.Y + anchor.Frame.Height + height + 2 < this.Bounds.Height) {
                        top = topleft.Y + anchor.Frame.Height + 2;
                        topdown = true;
                    } else {
                        top = topleft.Y - height - 2;
                        topdown = false;
                    }
                    bgrdColor = UIColor.FromRGBA (0, 0, 0, 0);

                    break;
                default:
                    break;
            }

            wrap = new UIView (content.Bounds);
            wrap.BackgroundColor = UIColor.White;
            wrap.Layer.CornerRadius = 6f;
            wrap.Layer.ShadowOffset = SizeF.Empty;
            wrap.Layer.ShadowRadius = 3f;
            wrap.Layer.ShadowOpacity = 0.5f;
            wrap.Frame = new CGRect(left,top, _width,_height);
            wrap.AddSubview (content);

            AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            Opaque = false;

            BackgroundColor = bgrdColor;

            WindowLevel = UIKit.UIWindowLevel.Normal;
            AddSubview (wrap);
        }