private void m_pMessageType_SelectedIndexChanged(object sender, EventArgs e) { if (m_pMessageType.SelectedItem == null) { return; } // If selected item changed, store old item value. if (m_pCurrentMessageType != null) { if (m_pCurrentMessageType.Tag.ToString() == "delayed_delivery_warning") { m_pVirtualServer.SystemSettings.ReturnMessages.DelayedDeliveryWarning = new ServerReturnMessage(m_pSubject.Text, m_pText.Rtf); } else if (m_pCurrentMessageType.Tag.ToString() == "undelivered") { m_pVirtualServer.SystemSettings.ReturnMessages.Undelivered = new ServerReturnMessage(m_pSubject.Text, m_pText.Rtf); } } m_pCurrentMessageType = (WComboBoxItem)m_pMessageType.SelectedItem; if (m_pCurrentMessageType.Tag.ToString() == "delayed_delivery_warning") { m_pSubject.Text = m_pVirtualServer.SystemSettings.ReturnMessages.DelayedDeliveryWarning.Subject; m_pText.Rtf = m_pVirtualServer.SystemSettings.ReturnMessages.DelayedDeliveryWarning.BodyTextRtf; } else if (m_pCurrentMessageType.Tag.ToString() == "undelivered") { m_pSubject.Text = m_pVirtualServer.SystemSettings.ReturnMessages.Undelivered.Subject; m_pText.Rtf = m_pVirtualServer.SystemSettings.ReturnMessages.Undelivered.BodyTextRtf; } }
private void m_pMessageType_SelectedIndexChanged(object sender,EventArgs e) { if(m_pMessageType.SelectedItem == null){ return; } // If selected item changed, store old item value. if(m_pCurrentMessageType != null){ if(m_pCurrentMessageType.Tag.ToString() == "delayed_delivery_warning"){ m_pVirtualServer.SystemSettings.ReturnMessages.DelayedDeliveryWarning = new ServerReturnMessage(m_pSubject.Text,m_pText.Rtf); } else if(m_pCurrentMessageType.Tag.ToString() == "undelivered"){ m_pVirtualServer.SystemSettings.ReturnMessages.Undelivered = new ServerReturnMessage(m_pSubject.Text,m_pText.Rtf); } } m_pCurrentMessageType = (WComboBoxItem)m_pMessageType.SelectedItem; if(m_pCurrentMessageType.Tag.ToString() == "delayed_delivery_warning"){ m_pSubject.Text = m_pVirtualServer.SystemSettings.ReturnMessages.DelayedDeliveryWarning.Subject; m_pText.Rtf = m_pVirtualServer.SystemSettings.ReturnMessages.DelayedDeliveryWarning.BodyTextRtf; } else if(m_pCurrentMessageType.Tag.ToString() == "undelivered"){ m_pSubject.Text = m_pVirtualServer.SystemSettings.ReturnMessages.Undelivered.Subject; m_pText.Rtf = m_pVirtualServer.SystemSettings.ReturnMessages.Undelivered.BodyTextRtf; } }