| | |
| | |
|
| | | minNoBindCnt = composeCount - minBindCnt;
|
| | |
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("Compose107", GetComposeInfoStr(minBindCnt, minNoBindCnt)),
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("Compose107", GetComposeInfoStr()),
|
| | | (bool isCompose) =>
|
| | | {
|
| | | if (isCompose)
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | int bindCnt = 0;
|
| | | int noBindCnt = 0;
|
| | | if (fixedMatIsBindDict[idlist[0]].ContainsKey(1))
|
| | | {
|
| | | bindCnt = fixedMatIsBindDict[idlist[0]][1];
|
| | | }
|
| | |
|
| | | if (fixedMatIsBindDict[idlist[0]].ContainsKey(0))
|
| | | {
|
| | | noBindCnt = fixedMatIsBindDict[idlist[0]][0];
|
| | | }
|
| | |
|
| | | int remainBind = bindCnt % fixedCounts[0];
|
| | | int remainNOBind = noBindCnt % fixedCounts[0];
|
| | | bindCnt = bindCnt / fixedCounts[0];
|
| | | noBindCnt = noBindCnt / fixedCounts[0];
|
| | | if (bindCnt + noBindCnt < composeCount)
|
| | | {
|
| | | bindCnt = composeCount - noBindCnt;
|
| | | }
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("Compose107", GetComposeInfoStr(bindCnt, noBindCnt)),
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("Compose107", GetComposeInfoStr()),
|
| | | (bool isCompose) =>
|
| | | {
|
| | | if (isCompose)
|
| | |
| | | return isRefineMat;
|
| | | }
|
| | |
|
| | | private string GetComposeInfoStr(int bindCnt, int noBindCnt)
|
| | | private string GetComposeInfoStr()
|
| | | {
|
| | | if (CurComposeModel == null) return string.Empty;
|
| | | int[] makeIds = CurComposeModel.makeID;
|
| | | ItemConfig config = ItemConfig.Get(makeIds[0]);
|
| | | StringBuilder stringBuilder = new StringBuilder();
|
| | | if (bindCnt > 0)
|
| | | {
|
| | | string s = StringUtility.Contact(config.ItemName, Language.Get("Compose105"), "x", bindCnt, "</r>");
|
| | | stringBuilder.Append(s);
|
| | | }
|
| | |
|
| | | if (noBindCnt > 0)
|
| | | {
|
| | | string s = StringUtility.Contact(config.ItemName, Language.Get("Compose106"), "x", noBindCnt);
|
| | | stringBuilder.Append(s);
|
| | | }
|
| | |
|
| | | return stringBuilder.ToString();
|
| | | return config.ItemName;
|
| | | }
|
| | |
|
| | | private byte[] DictToArray(Dictionary<int, ItemModel> itemDict)
|
| | |
| | | secondTypeRedDict.Clear();
|
| | | thirdTypeRedDict.Clear();
|
| | |
|
| | | var firstType= (int)ComposeFuncType.Item;
|
| | | var firstType = (int)ComposeFuncType.Item;
|
| | | if (composeDataDict.ContainsKey(firstType))
|
| | | {
|
| | | var firstTypeData = composeDataDict[firstType];
|