// ComboBoxの選択項目実行を行うイベントの本処理。 public void ComboBoxEvent(string command, string text) { CuiApplicationResult result = new CuiApplicationResult(); if (command.Equals(COMMAND_GO_HOME)) { // 初期画面に戻します。 MakeInitView("最初の画面に戻したよ。"); } else if (command.Equals(COMMAND_CALC)) { Samlpe3 sample = new Samlpe3(); sample.main(result); MakeReport(result); } else if (command.Equals(COMMAND_IMAGE)) { sample4 sample = new sample4(); sample.main(result); MakeReport(result); } else { m_bot.Play("pronama_execute.png", command + "," + text + "は何だろう?"); } }
// ドラッグ&ドロップの本処理 public void DragAndDrop(string[] files, string text) { Sample2 sample = new Sample2(); CuiApplicationResult result = new CuiApplicationResult(); sample.main(files, text, result); MakeReport(result); }
// テキスト内容を変更されたというイベントの本処理。 public void TextBoxEvent(string text) { Sample1 sample = new Sample1(); CuiApplicationResult result = new CuiApplicationResult(); sample.main(text, result); MakeReport(result); }
// アプリから戻されたCuiApplicationResultを元に出力します。 private void MakeReport(CuiApplicationResult result) { if (result.htmlPath != null) { string url = m_contentsPath + result.htmlPath; if (m_browser.MakeHtmlWithTemplate(url, result.html) == true) { m_browser.SetURL(url); } } m_bot.Play(result.imgPath, result.serif); }
//GUIとの口です。 public void main(string text, CuiApplicationResult result) { //GUIとの口です。 //textの文字列が数字かどうかを判定。 //それに基づいて、 // html(のメインデータ) // セリフ // 出力イメージ //を指定します。 judgeText(text); result.html = MakeReportHtml(text); result.htmlPath = SAMPLE1_HTML_FILENAME; result.serif = MakeSerif(text); result.imgPath = SAMPLE1_EXEC_IMG; }
//GUIとの口です。 public void main(string[] files, string text, CuiApplicationResult result) { //GUIとの口です。 //textの文字列が数字かどうかを判定。 //それに基づいて、 // html(のメインデータ) // セリフ // 出力イメージ //を指定します。 string textFile = readTextFile(files[0]); result.html = MakeReportHtml(textFile, text); result.htmlPath = SAMPLE2_HTML_FILENAME; result.serif = MakeSerif(files[0]); result.imgPath = SAMPLE2_EXEC_IMG; }
//GUIとの口です。 public void main(CuiApplicationResult result) { //GUIとの口です。 //textの文字列が数字かどうかを判定。 //それに基づいて、 // html(のメインデータ) // セリフ // 出力イメージ //を指定します。 // このサンプルでは電卓を起動するだけですので // HTML(出力画面)は作成せず、セリフだけ反応するようにしています。 ExecuteCalc(); result.html = null; result.htmlPath = null; // WebBrowser領域は使わない。 result.serif = "電卓を起動したよ!"; result.imgPath = SAMPLE3_EXEC_IMG; }
//GUIとの口です。 public void main(CuiApplicationResult result) { //GUIとの口です。 //textの文字列が数字かどうかを判定。 //それに基づいて、 // html(のメインデータ) // セリフ // 出力イメージ //を指定します。 // このサンプルでは電卓を起動するだけですので // HTML(出力画面)は作成せず、セリフだけ反応するようにしています。 m_otherFileType = false; m_url = null; MakeImgURL(); result.html = MakeReportHtml(); result.htmlPath = SAMPLE4_HTML_FILENAME; result.serif = "結果はこんな感じでーす!"; result.imgPath = SAMPLE4_EXEC_IMG; }