private void ShowReceiveFileDialog() { //CREATE A RECEIVE FORM SO THE USER CAN SEE THE APPLICATION IS WORKING frmSending tmpFrm = new frmSending(); tmpFrm.FileName = "Retrieving File"; tmpFrm.Text = "Get Status"; tmpFrm.Show(); }
private void sendFileToolStripButton_Click(object sender, EventArgs e) { //DISPLAY THE OPEN FILE DIALOG AND THEN SEND A FILE TO THE USER if (openDialog.ShowDialog() != DialogResult.Cancel) { string FileName = FileName = new FileInfo(openDialog.FileName).Name; new Message_SendFile() { ConversationID = this.ConversationID, FileBytes = File.ReadAllBytes(openDialog.FileName), Sender = ThisConnection.DisplayName, SenderID = ThisConnection.UserID, FileID = Guid.NewGuid().ToString(), FileName = FileName }.Send(ThisConnection); //SHOW THE SENDING FORM SO THE USER KNOWS THE APP IS WORKING frmSending tmpFrm = new frmSending(); tmpFrm.FileName = FileName; tmpFrm.Show(this); } }