Inheritance: System.Windows.Forms.Form
示例#1
0
        private void ChangeComment()
        {
            int selectedIndex = listBoxClipboard.SelectedIndex;

            if (selectedIndex != -1)
            {
                Buffer            buffer = listBoxClipboard.Items[selectedIndex] as Buffer;
                ChangeCommentForm form   = new ChangeCommentForm(buffer.Comment);

                form.StartPosition = this.Visible ? FormStartPosition.CenterParent : FormStartPosition.CenterScreen;

                if (form.ShowDialog() == DialogResult.OK)
                {
                    buffer.Comment = form.Comment;
                    SaveHistoryToFile();
                }
            }
        }
示例#2
0
        private void ChangeComment()
        {
            int selectedIndex = listBoxClipboard.SelectedIndex;

            if (selectedIndex != -1)
            {
                Buffer buffer = listBoxClipboard.Items[selectedIndex] as Buffer;
                ChangeCommentForm form = new ChangeCommentForm(buffer.Comment);

                form.StartPosition = this.Visible ? FormStartPosition.CenterParent : FormStartPosition.CenterScreen;

                if (form.ShowDialog() == DialogResult.OK)
                {
                    buffer.Comment = form.Comment;
                    SaveHistoryToFile();
                }
            }
        }