Ejemplo n.º 1
0
        private void Parse()
        {
            // get topic of email and remove topic
            var tmpTopic = Subject.Between(_topicParserConfiguration.TopicStart, _topicParserConfiguration.TopicEnd).Trim();
            Topic=new Topic() {Title = tmpTopic};

            // get subject w/o topic
            Subject = Subject.Replace(_topicParserConfiguration.TopicStart + tmpTopic + _topicParserConfiguration.TopicEnd, "")
                .Trim()
                .Replace("  ", " ").Replace("  ", " "); // replace all multiple spaces.
        }
Ejemplo n.º 2
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            if (cboTopics.SelectedItem == null && !string.IsNullOrWhiteSpace(cboTopics.Text))
            {
                var tmp = new Topic() { Title = cboTopics.Text };
                cboTopics.Items.Insert(0, tmp);
                cboTopics.SelectedItem = tmp;
            }

            _subject.Topic = (Topic)cboTopics.SelectedItem;
            _subject.Subject = txtSubject.Text;

            this.DialogResult = DialogResult.OK;
            this.Close();
        }