private void HandleUpdate(GGResult result) { // RefreshContents(nowindex); string oldtag = result.GetTag(); string newtag = CmdInvoker.GetGGList().GetGGItemAt(result.GetItemIndex()).GetTag(); if (CmdInvoker.GetTagCount(newtag) == 1) { TEXTBOX_NO++; TagList.Add(newtag); DeletedTagLists.Add(false); NewRichTextBox(); } if (CmdInvoker.GetTagCount(oldtag) == -1) { TEXTBOX_NO--; int index = GetTagIndex(result.GetTag()); DeletedTagLists[index] = true; TagList.RemoveAt(index); RTBIndex = GetPrevIndex(); RTBIndex = GetNextIndex(); } }
private void HandleAddDelete(GGResult result) { // RefreshContents(nowindex); if (result.GetResultType() == GGResult.RESULT_TYPE.RESULT_ADD) { if (CmdInvoker.GetTagCount(result.GetTag()) == 1) { TEXTBOX_NO++; TagList.Add(result.GetTag()); DeletedTagLists.Add(false); NewRichTextBox(); } } else if(result.GetResultType() == GGResult.RESULT_TYPE.RESULT_REMOVE) //delete { if (CmdInvoker.GetTagCount(result.GetTag()) == -1) { TEXTBOX_NO--; int index = GetTagIndex(result.GetTag()); DeletedTagLists[index] = true; TagList.RemoveAt(index); RTBIndex = GetPrevIndex(); RTBIndex = GetNextIndex(); } } }