public void PicturePrint(string path, Queue <string> strs, Fn fn = null, Scane.ElFN efn = null, Scane who = null) { if (path == null || !LoadMainPictureImage(path)) { return; } MainPicture.Tag = true; //判断加载成功 TB_Dialogue.Visible = false; MainPicture.Visible = true; //载入数据 while (strs.Count > 0) { TEXT.Enqueue(strs.Dequeue()); } if (path != null) { PICTUREPATH = path; } if (fn != null) { TEXTFN = () => { if (TEXT.Count > 0) { return; } else { fn(); TEXTFN = null; } }; //TEXTFN = fn; } if (efn != null && who != null) { WHO = who; ENTERFN = (Scane) => { if (TEXT.Count > 0) { return; } else { efn(WHO); ENTERFN = null; WHO = null; } }; } DisableAllButton(); timer_Dialogue.Tick += PicturePrint; if (!timer_Dialogue.Enabled) { timer_Dialogue.Enabled = true; } }
public void Print(string[] strs, Fn fn = null, Scane.ElFN efn = null, Scane who = null) { TB_Dialogue.Visible = true; MainPicture.Visible = false; if (strs.Length <= 0) { return; } Queue <string> que = new Queue <string>(); for (int i = 0; i < strs.Length; ++i) { que.Enqueue(strs[i]); } Print(que, fn, efn, who); }
public void Print(Queue <string> strs, Fn fn = null, Scane.ElFN efn = null, Scane who = null) { TB_Dialogue.Visible = true; MainPicture.Visible = false; //载入数据 while (strs.Count > 0) { TEXT.Enqueue(strs.Dequeue()); } if (fn != null) { TEXTFN = () => { if (TEXT.Count > 0) { return; } else { fn(); TEXTFN = null; } }; //TEXTFN = fn; } if (efn != null && who != null) { WHO = who; ENTERFN = (Scane) => { if (TEXT.Count > 0) { return; } else { efn(WHO); ENTERFN = null; } }; } DisableAllButton(); if (!timer_Dialogue.Enabled) { timer_Dialogue.Enabled = true; } }
public void PicturePrint(string path, string[] strs, Fn fn = null, Scane.ElFN efn = null, Scane who = null) { if (path == null || !LoadMainPictureImage(path)) { return; } MainPicture.Tag = true; //判断加载成功 TB_Dialogue.Visible = false; MainPicture.Visible = true; if (strs.Length <= 0) { return; } Queue <string> que = new Queue <string>(); for (int i = 0; i < strs.Length; ++i) { que.Enqueue(strs[i]); } PicturePrint(path, que, fn, efn, who); }