예제 #1
0
        private void btnView_Click(object sender, EventArgs e)
        {
            ListView.CheckedIndexCollection selText = lvText.CheckedIndices;

            if (selText == null || selText.Count == 0)
            {
                MessageBox.Show(LangPack.GetMongolian("Please select CG text to preview."), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            if (selText.Count != 1)
            {
                MessageBox.Show(LangPack.GetMongolian("Please select one CG text to preview."), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            BoardInfoDetail info = lvText.Items[selText[0]].Tag as BoardInfoDetail;

            BoardViewForm form = new BoardViewForm(info.text, info.isBlack, this.isPrimaryCG);

            form.ShowDialog();

            lvText.Items[selText[0]].Checked = false;
        }
예제 #2
0
        private void btnView_Click(object sender, EventArgs e)
        {
            BoardViewForm form = new BoardViewForm(tbText.Text, cbBlack.SelectedIndex == 0 ? false : true, this.primary);

            form.ShowDialog();
        }