예제 #1
0
 /// <summary>
 /// 选中tab
 /// </summary>
 /// <param name="selTab"></param>
 private void SelectImage(PostEnum selTab)
 {
     if (selTab == PostEnum.PostAll)
     {
         Dispatcher.BeginInvoke(() =>
         {
             allMsgImg.Source  = new BitmapImage(new Uri("/Images/post/allMsgSel.png", UriKind.Relative));
             atMeImg.Source    = new BitmapImage(new Uri("/Images/post/atMe.png", UriKind.Relative));
             replyMeImg.Source = new BitmapImage(new Uri("/Images/post/replyMe.png", UriKind.Relative));
         });
     }
     else if (selTab == PostEnum.Replyme)
     {
         Dispatcher.BeginInvoke(() =>
         {
             allMsgImg.Source  = new BitmapImage(new Uri("/Images/post/allMsg.png", UriKind.Relative));
             atMeImg.Source    = new BitmapImage(new Uri("/Images/post/atMe.png", UriKind.Relative));
             replyMeImg.Source = new BitmapImage(new Uri("/Images/post/replyMeSel.png", UriKind.Relative));
         });
     }
     else if (selTab == PostEnum.Atme2)
     {
         Dispatcher.BeginInvoke(() =>
         {
             allMsgImg.Source  = new BitmapImage(new Uri("/Images/post/allMsg.png", UriKind.Relative));
             atMeImg.Source    = new BitmapImage(new Uri("/Images/post/atMeSel.png", UriKind.Relative));
             replyMeImg.Source = new BitmapImage(new Uri("/Images/post/replyMe.png", UriKind.Relative));
         });
     }
 }
예제 #2
0
    public void ReplacePost(PostEnum newValue)
    {
        var index     = PlayerComponentsLookup.Post;
        var component = (PostComponent)CreateComponent(index, typeof(PostComponent));

        component.Value = newValue;
        ReplaceComponent(index, component);
    }
예제 #3
0
 public Employee(string fname, string lname, PostEnum post, int salary, int year, int month, int day)
 {
     FName   = fname;
     LName   = lname;
     _post   = post;
     Salary  = salary;
     Recruit = new DateTime(year, month, day);
 }
예제 #4
0
        /// <summary>
        /// 获取动态更新 根据类型
        /// </summary>
        private void getPostByType(string type)
        {
            Dictionary <string, string> parm = new Dictionary <string, string>();

            if (type == "PostAll")
            {
                chargeList(0);
                if (!string.IsNullOrEmpty(max_id))
                {
                    //parm.Add("since_id",since_id);
                    parm.Add("max_id", max_id);
                    parm.Add("pagesize", pageSize.ToString());
                }
                else
                {
                    parm.Add("pagesize", pageSize.ToString());
                }
                postenum   = PostEnum.PostAll;
                title.Text = "动态更新";
                PostViewModel.GetUlity(postenum, parm, ResultNewPost);
            }
            else if (type == "Atme2")
            {
                chargeList(0);
                postenum = PostEnum.Atme2;
                parm.Add("pageindex", pageindex.ToString());
                parm.Add("pagesize", pageSize.ToString());
                title.Text = "提到我的";
                PostViewModel.GetUlity(postenum, parm, ResultNewPost);
            }
            else if (type == "Replyme")
            {
                chargeList(1);
                postenum = PostEnum.Replyme;
                parm.Add("max_id", max_id);
                parm.Add("pagesize", pageSize.ToString());
                title.Text = "回复我的";
                PostViewModel.GetUlity(postenum, parm, ResultReplybyme);
            }
            else
            {
                chargeList(0);
                if (!string.IsNullOrEmpty(max_id))
                {
                    //parm.Add("since_id",since_id);
                    parm.Add("max_id", max_id);
                    parm.Add("pagesize", pageSize.ToString());
                }
                else
                {
                    parm.Add("pagesize", pageSize.ToString());
                }
                postenum = PostEnum.PostAll;
                PostViewModel.GetUlity(postenum, parm, ResultNewPost);
            }
            SelectImage(postenum);
        }
예제 #5
0
        /// <summary>
        /// 请求
        /// </summary>
        /// <param name="postEnum">类型</param>
        /// <param name="parm">参数</param>
        /// <param name="callback">回调</param>
        public static void GetUlity(PostEnum postEnum, Dictionary <string, string> parm, HttpWeb.callbackResult callback)
        {
            string uriStr = string.Empty;

            if (postEnum == PostEnum.PostAll)
            {
                uriStr = MDApi.PostAll;
            }
            else if (postEnum == PostEnum.Atme2)
            {
                uriStr = MDApi.Atme2;
            }
            else if (postEnum == PostEnum.Replyme)
            {
                uriStr = MDApi.Replyme;
            }
            HttpWeb.CreateGetHttpResponse(uriStr, parm, callback);
        }
예제 #6
0
 public Employee()
 {
     post   = PostEnum.Manager;
     Orders = new ObservableCollection <Order>();
 }