private void saveToolStripMenuItem_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(rtb_Text.Text.Trim())) { XDCUnity.WriteTextFileText(currentScreenPath, rtb_Text.Text); } }
/// <summary> /// 保存内容 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SaveToolStripMenuItem_Click(object sender, EventArgs e) { if (DialogResult.OK == MessageBox.Show("Sure to Save?", "XDC Virtual Host", MessageBoxButtons.OKCancel)) { if (XDCUnity.WriteTextFileText(currentFilePath, rtb_Msg.Text.Trim())) { MessageBox.Show("Save Successed."); } else { MessageBox.Show("Save Failed."); } } }