Example #1
0
        private void BindPivotGrid(string batchID)
        {
            _detailDict = new Dictionary <string, DetailInfo>();

            bool isFirstItem = true;

            foreach (DataRow row in _eqpPlanTable.Rows)
            {
                JobChangePlanData.EqpPlan ep = new JobChangePlanData.EqpPlan(row);

                if (ep.ProductID.StartsWith("CE"))
                {
                    ep.ProductID = GetCellProductID(ep.ProductID);
                }

                if (ep.BatchID != batchID)
                {
                    continue;
                }



                string layer    = FindLayer(ep.ShopID, ep.StepID);
                string stepDesc = FindDesc(ep.ShopID, ep.StepID);

                if (layer == string.Empty)
                {
                    continue;
                }

                string     key = layer + ep.StepID;
                DetailInfo info;
                if (_detailDict.TryGetValue(key, out info) == false)
                {
                    info = new DetailInfo(ep.BatchID, ep.ShopID, layer, ep.StepID, stepDesc);

                    if (isFirstItem)
                    {
                        info.FillDummyDates(_shiftList);
                    }

                    _detailDict.Add(key, info);
                }

                DateTime shift = ShopCalendar.ShiftStartTimeOfDayT(ep.StartTime);



                info.AddQty(shift, ep.OutTargetQty);

                if (ep.StepID == "T02100")
                {
                    Console.WriteLine("a");
                }

                info.CalculateTimes(ep.StartTime, ep.EndTime);

                isFirstItem = false;
            }
        }
Example #2
0
    /// <summary>
    /// 供接口调用
    /// </summary>
    /// <param name="instanceId"></param>
    /// <returns></returns>
    public DetailInfo GetFlowInfoById(string instanceId)
    {
        var        context  = DBContext.GetSysContext();
        var        instance = context.WF_WorkFlowInstance.FirstOrDefault(x => x.InstanceID == instanceId);
        DetailInfo info     = new DetailInfo();
        var        appInfo  = context.WF_AppDict.FirstOrDefault(x => x.AppId == instance.AppID);

        info.FlowType      = appInfo == null ? "" : appInfo.AppName;
        info.FormTitle     = instance.FormTitle;
        info.StartDeptName = instance.CreateDeptName;
        info.StartTime     = instance.SumitTime.Value.ToString();
        info.StartUserName = instance.CreateByUserName;
        info.Content       = GetWorkflowContent(instance.FormID);
        if (!string.IsNullOrEmpty(info.Content))
        {
            //支持换行,制表位 by yanghechun 2015-12-30
            info.Content = info.Content.Replace(" ", "&nbsp;").Replace("\n", "<br/>");
        }
        info.DetailUrl       = GetDetailUrl(instanceId, appInfo);
        info.StepInfos       = GetStepInfos(instanceId);
        info.AttachmentInfos = context.BPM_Attachment.Where(x => x.FormID == instance.FormID && x.IsDel == 0).OrderBy(x => x.CreateAtTime).ToList();
        string rootUrl = "http://" + HttpContext.Current.Request.Url.Authority;

        foreach (var item in info.AttachmentInfos)
        {
            item.URL = string.Format("{0}{1}", rootUrl, item.URL);
        }
        return(GetWorkflowInfo(info));
    }
Example #3
0
    private string BroadcastContentSplit(string content, List <DetailInfo> items)
    {
        if (string.IsNullOrEmpty(content))
        {
            return(content);
        }
        this.BroadcastPlaceholderIndex = 0;
        int num = 0;

        while (num + ChatManager.ItemPlaceholder2Length <= content.get_Length())
        {
            string text = content.Substring(num, ChatManager.ItemPlaceholder2Length);
            if (text.Equals(ChatManager.ItemPlaceholder))
            {
                if (this.BroadcastPlaceholderIndex < items.get_Count())
                {
                    DetailInfo detailInfo = items.get_Item(this.BroadcastPlaceholderIndex);
                    if (!string.IsNullOrEmpty(detailInfo.label))
                    {
                        string detailInfoName = ChatManager.GetDetailInfoName(detailInfo);
                        content = content.ReplaceFirst(ChatManager.ItemPlaceholder, detailInfoName, 0);
                        int num2 = ChatManager.ItemPlaceholder.get_Length() - detailInfoName.get_Length();
                        num -= num2;
                    }
                }
                num += ChatManager.ItemPlaceholder2Length;
                this.BroadcastPlaceholderIndex++;
            }
            else
            {
                num++;
            }
        }
        return(content);
    }
Example #4
0
    private bool HorizonalOverflowIsFalse(float length, string previous_content, DetailInfo detailInfo)
    {
        int   num  = (int)(length / this.LINE_WIDTH);
        float num2 = length % this.LINE_WIDTH;

        if (this.IsLimitOneLine() && num > 0)
        {
            return(false);
        }
        if (detailInfo.type == DetailType.DT.Face)
        {
            Item2Face item2Face = ChatManager.CreateFace(detailInfo.cfgId, this.FaceParent);
            item2Face.SetFaceSize(this.FONT_SIZE);
            this.Faces.Add(item2Face);
            RectTransform rectTransform = item2Face.get_transform() as RectTransform;
            rectTransform.set_anchoredPosition(new Vector2(num2, (float)(-(float)num * this.FONT_SIZE)));
            RectTransform expr_80 = rectTransform;
            expr_80.set_anchoredPosition(expr_80.get_anchoredPosition() + this.GetFaceOffset());
            return(true);
        }
        string detailInfoName = ChatManager.GetDetailInfoName(detailInfo);

        this.ButtonItem(previous_content, detailInfo, detailInfoName);
        return(true);
    }
Example #5
0
    private void WorldInviteInterface(DetailInfo detailInfo)
    {
        if (!SystemOpenManager.IsSystemClickOpen(59, 0, true))
        {
            return;
        }
        if (this.m_chatInfo == null)
        {
            return;
        }
        DetailInfo detailInfo2 = null;

        for (int i = 0; i < this.m_chatInfo.items.get_Count(); i++)
        {
            if (this.m_chatInfo.items.get_Item(i).type == DetailType.DT.Role)
            {
                detailInfo2 = this.m_chatInfo.items.get_Item(i);
                break;
            }
        }
        if (detailInfo2 != null)
        {
            TeamBasicManager.Instance.HandleWorldInvite(detailInfo2.id, detailInfo2.label, (uint)detailInfo.num, detailInfo.label);
        }
        else
        {
            TeamBasicManager.Instance.HandleWorldInvite(detailInfo.id, string.Empty, (uint)detailInfo.num, detailInfo.label);
        }
    }
Example #6
0
    private void SetMailItems(List <DetailInfo> items, int drawMark)
    {
        this.MailItems.Clear();
        for (int i = 0; i < items.get_Count(); i++)
        {
            DetailInfo  detailInfo  = items.get_Item(i);
            OOItem2Draw oOItem2Draw = new OOItem2Draw();
            Items       items2      = DataReader <Items> .Get(detailInfo.cfgId);

            if (items2 != null)
            {
                oOItem2Draw.ID        = items2.id;
                oOItem2Draw.FrameIcon = GameDataUtils.GetItemFrame(items2.id);
                oOItem2Draw.ItemIcon  = GameDataUtils.GetIcon(items2.icon);
                oOItem2Draw.ItemName  = Utils.GetItemNum(items2.id, detailInfo.num);
            }
            else
            {
                oOItem2Draw.ID       = 0;
                oOItem2Draw.ItemIcon = ResourceManagerBase.GetNullSprite();
                oOItem2Draw.ItemName = string.Empty;
            }
            this.MailItems.Add(oOItem2Draw);
        }
    }
Example #7
0
    private void OnClickLink(DetailInfo detailInfo)
    {
        if (detailInfo == null)
        {
            return;
        }
        if (detailInfo.type == DetailType.DT.Equipment)
        {
            ItemTipUIViewModel.ShowItem(this.m_detailInfo.cfgId, null);
        }
        else if (detailInfo.type == DetailType.DT.Role)
        {
            ChatManager.OnClickRole(this.m_detailInfo.id, this.m_detailInfo.label, base.get_transform(), 0L);
        }
        else if (detailInfo.type == DetailType.DT.UI)
        {
            if (LinkNavigationManager.BroadcastLink(detailInfo.cfgId))
            {
                UIManagerControl.Instance.HideUI("ChatUI");
            }
        }
        else if (detailInfo.type == DetailType.DT.Interface)
        {
            GuangBoLianJie guangBoLianJie = DataReader <GuangBoLianJie> .Get(detailInfo.cfgId);

            if (guangBoLianJie == null)
            {
                return;
            }
            if (guangBoLianJie.@interface == 2)
            {
                this.WorldInviteInterface(detailInfo);
            }
        }
    }
Example #8
0
        private int EnterWriteDetail(WritableSheet writableSheet, DetailInfo detailInfo, int targetRowIndex,
                                     IList <ColumnDataSet> columnDataSetList, Dictionary <int, HashSet <string> > usedCells,
                                     Dictionary <string, int> maxWidthMap)
        {
            // 取得欄位設定欄位
            List <ColumnInfo> columnInfoList = detailInfo.ColumnInfoList;

            // 無資料跳出
            if (ExcelStringUtil.IsEmpty(detailInfo.ColumnInfoList) || ExcelStringUtil.IsEmpty(columnDataSetList) || columnDataSetList.Count == 0)
            {
                return(targetRowIndex);
            }

            // 計算 rowspan
            foreach (ColumnDataSet columnDataSet in columnDataSetList)
            {
                countRowspan(columnInfoList, columnDataSet);
            }

            // excel 欄位輸出
            foreach (ColumnDataSet columnDataSet in columnDataSetList)
            {
                targetRowIndex = writeDetail(
                    writableSheet,
                    columnInfoList,
                    columnDataSet,
                    targetRowIndex,
                    usedCells,
                    maxWidthMap);
            }

            return(targetRowIndex);
        }
Example #9
0
        private void ugGrid_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
        {
            if (ugGrid.Rows.Count == 0)
            {
                return;
            }
            if (ugGrid.ActiveRow.IsFilterRow)
            {
                return;
            }
            if (this.ugGrid.ActiveRow.Cells["ID"].Value == DBNull.Value)
            {
                return;
            }

            //PatientEdit openDialog = new PatientEdit(1, ugGrid.ActiveRow.Cells["ID"].Value.ToString());
            //openDialog.ShowDialog();
            //if (openDialog.DialogResult == DialogResult.OK)
            //{
            //    LoadBucterList();
            //}
            DetailInfo openDialog = new DetailInfo(OperateType.VIew, int.Parse(ugGrid.ActiveRow.Cells["ID"].Value.ToString()));

            openDialog.StartPosition = FormStartPosition.CenterScreen;
            openDialog.ShowDialog();
        }
    public void WriteTypeDetails(MemorySnapshot compare)
    {
        List <KeyValuePair <string, DetailInfo> > list = null;

        if (compare != null)
        {
            list = compare.detailTypeCount.ToList();
        }
        List <KeyValuePair <string, DetailInfo> > list2 = detailTypeCount.ToList();

        list2.Sort(delegate(KeyValuePair <string, DetailInfo> x, KeyValuePair <string, DetailInfo> y)
        {
            DetailInfo value5 = y.Value;
            int count         = value5.count;
            DetailInfo value6 = x.Value;
            return(count - value6.count);
        });
        using (StreamWriter streamWriter = new StreamWriter(GarbageProfiler.GetFileName("type_details_" + detailTypeStr)))
        {
            streamWriter.WriteLine("Delta,Count,NumArrayEntries,Type");
            foreach (KeyValuePair <string, DetailInfo> item in list2)
            {
                DetailInfo value = item.Value;
                int        num   = value.count;
                if (list != null)
                {
                    foreach (KeyValuePair <string, DetailInfo> item2 in list)
                    {
                        if (item2.Key == item.Key)
                        {
                            int        num2   = num;
                            DetailInfo value2 = item2.Value;
                            num = num2 - value2.count;
                            break;
                        }
                    }
                }
                StreamWriter streamWriter2 = streamWriter;
                object[]     obj           = new object[7]
                {
                    num,
                    ",",
                    null,
                    null,
                    null,
                    null,
                    null
                };
                DetailInfo value3 = item.Value;
                obj[2] = value3.count;
                obj[3] = ",";
                DetailInfo value4 = item.Value;
                obj[4] = value4.numArrayEntries;
                obj[5] = ",";
                obj[6] = item.Key;
                streamWriter2.Write(string.Concat(obj));
            }
        }
    }
Example #11
0
    private void Add2FaceInfos(int num)
    {
        DetailInfo detailInfo = new DetailInfo();

        detailInfo.type  = DetailType.DT.Face;
        detailInfo.cfgId = num;
        this.FaceInfos.Add(detailInfo);
    }
Example #12
0
        Expression TranslateCallExpression(ParameterExpression itemParameter, MethodCallExpression expressionBody)
        {
            MemberExpression member = expressionBody.Object as MemberExpression;
            DetailInfo       detail = GetDetailFromPropertyType(member.Type);
            LambdaExpression nameAndValueExpression = DetailMethodCallExpression(expressionBody, detail, member.Member.Name);

            return(EmbedDetailExpressionInSubselect(detail, itemParameter, nameAndValueExpression));
        }
Example #13
0
    protected string Content2FilterPlaceholder(string previous, string content, List <DetailInfo> items)
    {
        if (string.IsNullOrEmpty(content))
        {
            return(content);
        }
        this.PlaceholderIndex = 0;
        int num = 0;

        while (num + ChatManager.ItemPlaceholder2Length <= content.get_Length())
        {
            string text = content.Substring(num, ChatManager.ItemPlaceholder2Length);
            if (text.Equals(ChatManager.ItemPlaceholder))
            {
                if (this.PlaceholderIndex < items.get_Count())
                {
                    DetailInfo detailInfo     = items.get_Item(this.PlaceholderIndex);
                    float      preferredWidth = ChatManager.Instance.GetPreferredWidth(previous + content.Substring(0, num), this.FONT_SIZE, true);
                    if (!this.IsHorizonalOverflow)
                    {
                        if (!this.HorizonalOverflowIsFalse(preferredWidth, content.Substring(0, num), detailInfo))
                        {
                            return(content);
                        }
                    }
                    else
                    {
                        this.HorizonalOverflowIsTrue(preferredWidth, content.Substring(0, num), detailInfo);
                    }
                    if (detailInfo.type == DetailType.DT.Face)
                    {
                        string blank = ChatManager.GetBlank((float)this.FONT_SIZE * 1f, this.FONT_SIZE);
                        content = content.ReplaceFirst(ChatManager.ItemPlaceholder, blank, 0);
                        if (!string.IsNullOrEmpty(blank))
                        {
                            int num2 = ChatManager.ItemPlaceholder.get_Length() - blank.get_Length();
                            num -= num2;
                        }
                    }
                    else if (!string.IsNullOrEmpty(detailInfo.label))
                    {
                        string detailInfoName = ChatManager.GetDetailInfoName(detailInfo);
                        content = content.ReplaceFirst(ChatManager.ItemPlaceholder, detailInfoName, 0);
                        int num3 = ChatManager.ItemPlaceholder.get_Length() - detailInfoName.get_Length();
                        num -= num3;
                    }
                }
                num += ChatManager.ItemPlaceholder2Length;
                this.PlaceholderIndex++;
            }
            else
            {
                num++;
            }
        }
        return(content);
    }
Example #14
0
 /// <summary>
 /// Конструктор для DesignTime.
 /// </summary>
 public DetailInfoViewModel()
 {
     DetailInfo = new DetailInfo
     {
         Phone   = "88005553535",
         Address = "г.о.г. Бор",
         EMail   = "*****@*****.**",
     };
 }
Example #15
0
    protected override void ButtonItem(string previous_content, DetailInfo detailInfo, string name)
    {
        if (detailInfo.type == DetailType.DT.Default)
        {
            return;
        }
        float num = 0f;
        float preferredWidthOfSpace = ChatManager.Instance.GetPreferredWidthOfSpace(previous_content, this.FONT_SIZE, this.LINE_WIDTH, ref num);
        int   num2 = (int)(preferredWidthOfSpace / this.LINE_WIDTH);
        float num3 = preferredWidthOfSpace % this.LINE_WIDTH;
        float preferredWidthOfSpace2 = ChatManager.Instance.GetPreferredWidthOfSpace(previous_content + name, this.FONT_SIZE, this.LINE_WIDTH, ref num);
        float num4 = preferredWidthOfSpace2 - (float)(num2 + 1) * this.LINE_WIDTH;

        if (num4 < 0f)
        {
            num4 = 0f;
        }
        float num5 = preferredWidthOfSpace2 - preferredWidthOfSpace;

        if (num4 > 0f)
        {
            num5 = num5 - num4 - num;
        }
        Button2Touch buttonTouch = this.GetButtonTouch();

        buttonTouch.SetButton2Touch(this.m_chatInfo, this.m_rootContent, detailInfo, null);
        buttonTouch.m_myRectTransform.set_anchoredPosition(new Vector2(num3, (float)(-(float)this.GetButtonItemY(num2))));
        buttonTouch.Underline(num5, this.FONT_SIZE, true);
        int num6 = 0;

        while (num4 > 0f)
        {
            num6++;
            Button2Touch buttonTouch2 = this.GetButtonTouch();
            buttonTouch2.SetButton2Touch(this.m_chatInfo, this.m_rootContent, detailInfo, null);
            buttonTouch2.m_myRectTransform.set_anchoredPosition(new Vector2(0f, (float)(-(float)this.GetButtonItemY(num2 + num6))));
            if (num4 <= this.LINE_WIDTH)
            {
                if (num6 == 1)
                {
                    buttonTouch2.Underline(num4, this.FONT_SIZE, true);
                    num4 = 0f;
                }
                else
                {
                    buttonTouch2.Underline(num4, this.FONT_SIZE, true);
                    num4 = 0f;
                }
            }
            else
            {
                buttonTouch2.Underline(this.LINE_WIDTH, this.FONT_SIZE, true);
                num4 -= this.LINE_WIDTH;
            }
        }
    }
Example #16
0
        static Expression GetDetailExpression(ComparisonInfo comparison, DetailInfo detail)
        {
            ParameterExpression detailParameter = Expression.Parameter(detail.DetailType, "cd");
            var        nameEqual              = GetPropertyEquals(detailParameter, "Name", Expression.Constant(comparison.NameExpression.Member.Name));
            var        valueExpression        = GetPropertyComparison(detailParameter, detail.ValuePropertyName, comparison);
            Expression nameAndValue           = Expression.AndAlso(nameEqual, valueExpression);
            var        nameAndValueExpression = Expression.Lambda(nameAndValue, detailParameter);

            return(nameAndValueExpression);
        }
Example #17
0
        public DetailInfo getFuncStatus(DetailInfoSeverity serv, string stsCode, string desc)
        {
            DetailInfo status = new DetailInfo();

            status.Severity = serv;
            status.StatusCode = stsCode;
            status.StatusDesc = desc;

            return status;
        }
Example #18
0
    /// <summary>
    /// 获取流程详细
    /// </summary>
    /// <param name="instanceId"></param>
    /// <returns></returns>
    public static string GetWorkFlowInfo(string instanceId)
    {
        //MobileLog.InsertLog("getworkflowinfo", string.Format("instanceId={0}", instanceId), "", "");

        DetailInfo model = AppflowFactory.GetAppflow(instanceId).GetFlowInfoById(instanceId);
        //todo:从后台获取
        string json = JsonHelper.JsonSerializer(model);

        return(json);
    }
Example #19
0
        /// <summary>
        /// 修改详细资料
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public ActionResult UpdateDetailInfo(DetailInfo info)
        {
            LoveDb.UpdateDetail(CheckValid(), info);
            if (info.NativeCity == "选择城市")
            {
                info.NativeCity = "";
            }

            return(Json(info));
        }
Example #20
0
        MethodCallExpression EmbedDetailExpressionInSubselect(DetailInfo detail, ParameterExpression itemParameter, Expression nameAndValueExpression)
        {
            //var valuesProperty = Expression.Property(Expression.Property(itemParameter, "Details"), "Values"); // ci.Details.Values
            var valuesProperty = Expression.Property(itemParameter, "Details");             // ci.Detials
            //var ofTypeMethod = ofTypeMethodInfo.MakeGenericMethod(detail.DetailType); // System.Collections.Generic.IEnumerable`1[N2.Details.StringDetail] OfType[StringDetail](System.Collections.IEnumerable)
            //var ofTypeCall = Expression.Call(valuesProperty, ofTypeMethod, valuesProperty); // ci.Details.Values.OfType()
            var anyMethod = anyMethodInfo.MakeGenericMethod(detail.DetailType);             // Boolean Any[StringDetail](System.Collections.Generic.IEnumerable`1[N2.Details.StringDetail], System.Func`2[N2.Details.StringDetail,System.Boolean])

            return(Expression.Call(anyMethod, valuesProperty, nameAndValueExpression));
            //return Expression.Call(ofTypeCall, anyMethod, ofTypeCall, nameAndValueExpression);
        }
Example #21
0
    public static string GetDetailInfoName(DetailInfo detailInfo)
    {
        if (detailInfo.type != DetailType.DT.Equipment)
        {
            return(detailInfo.label);
        }
        Items items = DataReader <Items> .Get(detailInfo.cfgId);

        if (items != null)
        {
            return(GameDataUtils.GetItemNameCustom(items, "[" + GameDataUtils.GetChineseContent(items.name, false) + "]"));
        }
        return(string.Empty);
    }
Example #22
0
 public Task <ISTrainingPartResponse <bool> > AddOrUpdateAsync(DetailInfo detailInfo, DetailInfoType type)
 {
     return(repository.QueryAsync(async con =>
     {
         if (detailInfo.Id > 0)
         {
             return await con.UpdateAsync(detailInfo);
         }
         else
         {
             return await con.InsertAsync(detailInfo) > 0;
         }
     }));
 }
Example #23
0
 public static void AddChat(ChatManager.ChatInfo chatInfo)
 {
     ChatManager.ChatInfo chatInfo2 = chatInfo;
     if (chatInfo.src_channel == 2 && chatInfo.sender_uid <= 0L)
     {
         for (int i = 0; i < chatInfo.items.get_Count(); i++)
         {
             DetailInfo detailInfo = chatInfo.items.get_Item(i);
             if (detailInfo.type == DetailType.DT.GuildQuestionNotice)
             {
                 return;
             }
             if (detailInfo.type == DetailType.DT.GuildQuestion)
             {
                 string[] array = chatInfo.chat_content.Split(new char[]
                 {
                     '|'
                 });
                 if (i == 0 && array.Length > 0)
                 {
                     chatInfo2                   = new ChatManager.ChatInfo();
                     chatInfo2.chat_type         = chatInfo.chat_type;
                     chatInfo2.sender_uid        = chatInfo.sender_uid;
                     chatInfo2.src_channel       = chatInfo.src_channel;
                     chatInfo2.sender_occupation = chatInfo.sender_occupation;
                     chatInfo2.viplevel          = chatInfo.viplevel;
                     chatInfo2.time              = chatInfo.time;
                     chatInfo2.module            = chatInfo.module;
                     chatInfo2.items             = chatInfo.items;
                     chatInfo2.sender_name       = string.Format("第{0}题", array[0]);
                     chatInfo2.chat_content      = array[1];
                 }
             }
         }
     }
     if (ChatTipUIViewModel.chatNews.get_Count() >= 4)
     {
         ChatTipUIViewModel.chatNews.RemoveAt(0);
     }
     ChatTipUIViewModel.chatNews.Add(chatInfo2);
     if (ChatTipUIView.Instance != null && ChatTipUIView.Instance.get_gameObject() != null && ChatTipUIView.Instance.get_gameObject().get_activeInHierarchy())
     {
         ChatTipUIView.Instance.RefreshChats(ChatTipUIViewModel.chatNews);
     }
     else
     {
         ChatTipUIViewModel.IsNeedRefresh = true;
     }
 }
Example #24
0
        static Expression GetDetailExpression(ComparisonInfo comparison, DetailInfo detail)
        {
            ParameterExpression detailParameter = Expression.Parameter(detail.DetailType, "cd");
            var  nameEqual       = GetPropertyEquals(detailParameter, "Name", Expression.Constant(comparison.NameExpression.Member.Name));
            bool isLinkQuery     = detail.ValuePropertyName == "LinkedItem";
            var  valueExpression = GetPropertyComparison(detailParameter,
                                                         isLinkQuery
                    ? Expression.Property(Expression.Property(detailParameter, "LinkedItem"), "ID")
                    : Expression.Property(detailParameter, detail.ValuePropertyName),
                                                         comparison, isLinkQuery);
            Expression nameAndValue           = Expression.AndAlso(nameEqual, valueExpression);
            var        nameAndValueExpression = Expression.Lambda(nameAndValue, detailParameter);

            return(nameAndValueExpression);
        }
Example #25
0
 public void SetButton2Touch(ChatManager.ChatInfo chatInfo, Transform parent, DetailInfo detailInfo, Action callback = null)
 {
     this.m_chatInfo = chatInfo;
     UGUITools.ResetTransform(this.m_myRectTransform, parent);
     this.m_myRectTransform.set_anchorMin(new Vector2(0f, 0.5f));
     this.m_myRectTransform.set_anchorMax(new Vector2(0f, 0.5f));
     this.m_myRectTransform.set_pivot(new Vector2(0f, 1f));
     if (this.m_button2Collider == null)
     {
         this.m_button2Collider = this.m_myRectTransform.get_gameObject().AddComponent <Button>();
     }
     this.m_button2Collider.set_transition(0);
     this.m_button2Collider.get_onClick().AddListener(new UnityAction(this.OnButtonClick));
     this.m_action2Click = callback;
     this.m_detailInfo   = detailInfo;
 }
Example #26
0
        public JsonResult GetDetailsByName(string detailNameValue)
        {
            List <SheetDetail> DetailsList = db.SheetDetails.Where(n => n.DetailName.Contains(detailNameValue)).ToList();
            List <DetailInfo>  DetailsInfo = new List <DetailInfo>();

            foreach (var i in DetailsList)
            {
                DetailInfo Detail = new DetailInfo();
                Detail.ID           = i.Id;
                Detail.DetailName   = i.DetailName;
                Detail.DetailLength = i.DetailLength;
                Detail.DetailWidth  = i.DetailWidth;
                DetailsInfo.Add(Detail);
            }
            return(Json(DetailsInfo, JsonRequestBehavior.AllowGet));
        }
Example #27
0
    private bool CheckIsQuestionContent()
    {
        bool result = false;

        if (this.m_chatInfo.src_channel == 2 && this.m_chatInfo.items != null)
        {
            for (int i = 0; i < this.m_chatInfo.items.get_Count(); i++)
            {
                DetailInfo detailInfo = this.m_chatInfo.items.get_Item(i);
                if (detailInfo.type == DetailType.DT.GuildQuestion || detailInfo.type == DetailType.DT.GuildQuestionNotice || detailInfo.type == DetailType.DT.GuildRightAnswer)
                {
                    result = true;
                }
            }
        }
        return(result);
    }
Example #28
0
    private void JustSendMessageOfVoice(byte[] audio, int record_second)
    {
        if (!this.CheckChannelIsSendOn())
        {
            return;
        }
        long       targetByChannel = this.GetTargetByChannel();
        DetailInfo detailInfo      = new DetailInfo();

        detailInfo.type  = DetailType.DT.Audio;
        detailInfo.audio = audio;
        detailInfo.label = record_second.ToString();
        List <DetailInfo> list = new List <DetailInfo>();

        list.Add(detailInfo);
        ChatManager.Instance.Send(this.CurrentChatChannel, string.Empty, list, targetByChannel);
    }
    private void RefreshDetailInfos(List <DetailInfo> detailInfos, List <int> eventIds)
    {
        if (detailInfos == null || detailInfos.get_Count() == 0 || eventIds == null || eventIds.get_Count() == 0)
        {
            return;
        }
        int num = 0;

        while (num < detailInfos.get_Count() && num < eventIds.get_Count())
        {
            DetailInfo detailInfo = detailInfos.get_Item(num);
            if (eventIds.get_Item(num) > 0)
            {
                GuangBoLianJie guangBoLianJie = DataReader <GuangBoLianJie> .Get(eventIds.get_Item(num));

                if (guangBoLianJie != null)
                {
                    detailInfo.type = LinkType.GetDetailType(guangBoLianJie.type);
                    if (detailInfo.type == DetailType.DT.UI)
                    {
                        detailInfo.cfgId = guangBoLianJie.link;
                        detailInfo.label = GameDataUtils.GetChineseContent(guangBoLianJie.name, false);
                    }
                    else if (detailInfo.type == DetailType.DT.Interface)
                    {
                        detailInfo.cfgId = guangBoLianJie.hitEventId;
                        detailInfo.label = GameDataUtils.GetChineseContent(guangBoLianJie.name, false);
                    }
                    else if (detailInfo.type == DetailType.DT.Equipment && eventIds.get_Item(num) == 66)
                    {
                        detailInfo.label = GameDataUtils.GetItemName(detailInfo.cfgId, false, 0L);
                    }
                    if (guangBoLianJie.click == 0)
                    {
                        detailInfo.type = DetailType.DT.Default;
                    }
                }
            }
            else
            {
                detailInfo.type = DetailType.DT.Default;
            }
            num++;
        }
    }
Example #30
0
 public void SendMail(long receiverUID, string content)
 {
     if (MailManager.MailSendOn)
     {
         MailInfo   mailInfo   = new MailInfo();
         DetailInfo detailInfo = new DetailInfo();
         detailInfo.id = receiverUID;
         mailInfo.receivers.Add(detailInfo);
         mailInfo.content = new ArticleContent
         {
             text = content
         };
         NetworkManager.Send(new SendMailReq
         {
             msg = mailInfo
         }, ServerType.Data);
     }
 }
Example #31
0
    private bool HorizonalOverflowIsTrue(float length, string previous_content, DetailInfo detailInfo)
    {
        if (detailInfo.type == DetailType.DT.Face)
        {
            Item2Face item2Face = ChatManager.CreateFace(detailInfo.cfgId, this.FaceParent);
            item2Face.SetFaceSize(this.FONT_SIZE);
            this.Faces.Add(item2Face);
            RectTransform rectTransform = item2Face.get_transform() as RectTransform;
            rectTransform.set_anchoredPosition(new Vector2(length, 0f));
            RectTransform expr_54 = rectTransform;
            expr_54.set_anchoredPosition(expr_54.get_anchoredPosition() + this.GetFaceOffset());
            return(true);
        }
        string detailInfoName = ChatManager.GetDetailInfoName(detailInfo);

        this.ButtonItem(previous_content, detailInfo, detailInfoName);
        return(true);
    }
        public void DetailInfo_Test()
        {
            // Arrange
            DetailInfo detail = new DetailInfo("Test", new List<KeyValuePair<string, string>>());

            // Assert
            Assert.Equal("Test", detail.Name);
            Assert.NotNull(detail.Items);
        }