/// <summary>
        /// The setup.
        /// </summary>
        /// <param name="scannedSource">
        /// The scanned source.
        /// </param>
        /// <param name="srcName">
        /// The src Name.
        /// </param>
        /// <param name="addAction">
        /// The add Action.
        /// </param>
        /// <param name="preset">
        /// The preset.
        /// </param>
        public void Setup(Source scannedSource, string srcName, Action <IEnumerable <SelectionTitle> > addAction, Preset preset)
        {
            this.TitleList.Clear();
            this.addToQueue = addAction;

            if (scannedSource != null)
            {
                IEnumerable <Title> titles = orderedByTitle
                                         ? scannedSource.Titles
                                         : scannedSource.Titles.OrderByDescending(o => o.Duration).ToList();

                foreach (Title item in titles)
                {
                    SelectionTitle title = new SelectionTitle(item, srcName)
                    {
                        IsSelected = true
                    };
                    TitleList.Add(title);
                }
            }

            if (preset != null)
            {
                this.CurrentPreset = string.Format(ResourcesUI.QueueSelection_UsingPreset, preset.Name);
            }

            this.NotifyOfPropertyChange(() => this.IsAutoNamingEnabled);
        }
Example #2
0
    public override bool Init(InitBaseData initData, Action callback = null)
    {
        var data = initData as InitOtherPlayerData;

        foreach (var item in data.TitleList)
        {
            if (TitleList.ContainsKey(item.Key))
            {
                TitleList[item.Key] = item.Value;
            }
            else
            {
                TitleList.Add(item.Key, item.Value);
            }
        }
        AllianceName = data.AllianceName;

        RobotId = data.RobotId;

        if (!base.Init(initData))
        {
            return(false);
        }
        serverId  = data.ServerId;
        AreaState = data.AreaState;

        var tbPvpRule = Table.GetPVPRule(GameLogic.Instance.Scene.TableScene.PvPRule);

        if (tbPvpRule.NameColorRule == (int)NameColorRule.FightingEachOther && GameLogic.Instance.Scene.TableScene.IsHideName == 1)
        {
            Name = GameUtils.GetDictionaryText(220697 + RoleId);
        }
        return(true);
    }
Example #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 public ConfigViewModel()
 {
     this.WindowTitle = NameTitle.Config.ToString();
     TitleList.Add(item: new EntityViewTitleHierarchy()
     {
         Title = this.WindowTitle
         ,
         NameTitle = NameTitle.Config
     });
 }
 /// <summary>
 /// Constructor
 /// </summary>
 public MainViewModel()
 {
     this.WindowTitle = NameTitle.Main.ToString();
     TitleList.Add(item: new EntityViewTitleHierarchy()
     {
         Title = this.WindowTitle
         ,
         NameTitle = NameTitle.Main
     });
 }
Example #5
0
 /// <summary>
 /// 获取每个表的字段名
 /// </summary>
 private void getTitleList()
 {
     foreach (String tabname in m_selectedTableList)
     {
         List <String> tempList = new List <string>();
         tempList = RealDBHelper.getTitleList(tabname + "-" + Instru);
         TitleList.Add(tempList);
         Pusher._pusher.TitleDict.Add(tabname + "-" + Instru, tempList);
     }
     Pusher._pusher.TitleList = TitleList;
 }
Example #6
0
 private void SetTitle(int id, int value)
 {
     if (TitleList.ContainsKey(id))
     {
         TitleList[id] = value;
     }
     else
     {
         TitleList.Add(id, value);
     }
     NameBoardUpdate();
 }
Example #7
0
        internal static TitleList covnertDataTableToList(DataTable dataTable)
        {
            TitleList titles = new TitleList();

            try{
                foreach (DataRow dataRow in dataTable.Rows)
                {
                    titles.Add(covnertDataRowToTitle(dataRow));
                }
            }
            catch { }
            return(titles);
        }
Example #8
0
 /// <summary>
 /// 获取数据
 /// </summary>
 public void GetDate()
 {
     try
     {
         List <SeatManage.ClassModel.AMS_Advertisement> modelList = SeatManage.Bll.AdvertisementOperation.GetAdList(null, SeatManage.EnumType.AdType.TitleAd);
         TitleList.Clear();
         foreach (SeatManage.ClassModel.AMS_Advertisement model in modelList)
         {
             SeatManage.ClassModel.TitleAdvertInfoV2 view = SeatManage.ClassModel.TitleAdvertInfoV2.ToModel(model.AdContent);
             view.AdContent = model.AdContent;
             view.ID        = model.ID;
             TitleList.Add(view);
         }
     }
     catch (Exception ex)
     {
         ErrorMessage = ex.Message;
         SeatManage.SeatManageComm.WriteLog.Write("获取学校通知失败" + ex.Message);
     }
 }
Example #9
0
        /// <summary>
        /// The setup.
        /// </summary>
        /// <param name="scannedSource">
        /// The scanned source.
        /// </param>
        /// <param name="srcName">
        /// The src Name.
        /// </param>
        /// <param name="addAction">
        /// The add Action.
        /// </param>
        public void Setup(Source scannedSource, string srcName, Action <IEnumerable <SelectionTitle> > addAction)
        {
            this.TitleList.Clear();
            this.addToQueue = addAction;

            if (scannedSource != null)
            {
                IEnumerable <Title> titles = orderedByTitle
                                         ? scannedSource.Titles
                                         : scannedSource.Titles.OrderByDescending(o => o.Duration).ToList();

                foreach (Title item in titles)
                {
                    SelectionTitle title = new SelectionTitle(item, srcName)
                    {
                        IsSelected = true
                    };
                    TitleList.Add(title);
                }
            }

            this.NotifyOfPropertyChange(() => this.IsAutoNamingEnabled);
            this.NotifyOfPropertyChange(() => this.IsAutomaticTrackSelectionEnabled);
        }