public PMessageForm(Message message) { Message = message; this.InitializeComponent(); XAuthor.Text = Author; XTopic.Text = Topic; XText.Text = Text; }
public static List<Message> GetMail(int uId, string password) { Message m = new Message(); m.Text = "dfgddgdfgdgdg"; m.Topic = "Important"; m.IsRead = false; m.From = new User(); m.From.Login = "******"; List<Message> t = new List<Message>(); t.Add(m); m = new Message(); m.Text = "dfgddgdfgdgdg"; m.Topic = "Another"; m.From = new User(); m.From.Login = "******"; m.IsRead = true; t.Add(m); return t; }
private void Button_Click_1(object sender, RoutedEventArgs e) { Message m = new Message(); m.Text = XText.Text; m.Topic = XTopic.Text; m.From = DataSaver.CurrentUser; try { m.To = GetAddresant(); } catch { MessageBox.Show("Невозможно отправить письмо без адресата"); } if (m.Text.Length == 0 && m.Topic.Length == 0) { MessageBox.Show("Невозможно отправить пустое письмо"); return; } DataBaseInterface.SendMessage(DataSaver.UId, DataSaver.PasswordHash, m); ((MainWindow)Application.Current.MainWindow).Navigate(new PMailForm()); }
public static void SendMessage(int uId, string password, Message m) { }