private void LogDS(int hitCount, int limit, long totalDamage) { int start; string hc = hitCount.ToString(); string li = limit.ToString(); string td = totalDamage.ToString("###,###"); AppendInfo("连击了 "); start = SimulationRichTextBox.Text.Length; SimulationRichTextBox.AppendText(hc); SimulationRichTextBox.Select(start, hc.Length); SimulationRichTextBox.SelectionColor = Color.Green; AppendInfo(" 次,耗费 "); start = SimulationRichTextBox.Text.Length; SimulationRichTextBox.AppendText(li); SimulationRichTextBox.Select(start, li.Length); SimulationRichTextBox.SelectionColor = Color.Green; AppendInfo(" 点额度,造成 "); start = SimulationRichTextBox.Text.Length; SimulationRichTextBox.AppendText(td); SimulationRichTextBox.Select(start, td.Length); SimulationRichTextBox.SelectionColor = Color.Green; AppendInfo(" 点伤害\r\n"); SimulationRichTextBox.ScrollToCaret(); }
public void AppendInfo(string s) { int start = SimulationRichTextBox.Text.Length; SimulationRichTextBox.AppendText(s); SimulationRichTextBox.Select(start, s.Length); SimulationRichTextBox.SelectionColor = Color.Black; SimulationRichTextBox.ScrollToCaret(); }
private void LogInfo(string s) { int start = SimulationRichTextBox.Text.Length; SimulationRichTextBox.AppendText(s + "\r\n"); SimulationRichTextBox.Select(start, s.Length); SimulationRichTextBox.SelectionColor = Color.Black; SimulationRichTextBox.ScrollToCaret(); }
private void LogOneBerserk(bool isAvoid, bool isMiss, bool isCritical, int oneDamage) { int start; start = SimulationRichTextBox.Text.Length; SimulationRichTextBox.AppendText("免体"); SimulationRichTextBox.Select(start, 2); if (isAvoid == true) { SimulationRichTextBox.SelectionColor = Color.Green; } else { SimulationRichTextBox.SelectionColor = Color.White; } SimulationRichTextBox.AppendText(" "); start = SimulationRichTextBox.Text.Length; SimulationRichTextBox.AppendText("暴击"); SimulationRichTextBox.Select(start, 2); if (isCritical == true) { SimulationRichTextBox.SelectionColor = Color.Green; } else { SimulationRichTextBox.SelectionColor = Color.White; } SimulationRichTextBox.AppendText(" "); string od = oneDamage.ToString("###,###"); start = SimulationRichTextBox.Text.Length; SimulationRichTextBox.AppendText(od); SimulationRichTextBox.Select(start, od.Length); if (isCritical == true) { SimulationRichTextBox.SelectionColor = Color.Red; } else { SimulationRichTextBox.SelectionColor = Color.Black; } SimulationRichTextBox.AppendText("\r\n"); SimulationRichTextBox.ScrollToCaret(); }