void DownFile_FormClosed(object sender, FormClosedEventArgs e) { BufferFormatV2 buff = new BufferFormatV2((int)FileCmd.DownClose); buff.AddItem(down.DownKey); user.SendData(buff.Finish()); if (FStream != null) { FStream.Close(); } user.DownDataOn = null; }
private void listView1_Click(object sender, EventArgs e) { if (listView1.SelectedItems.Count > 0) { ListViewItem item = listView1.SelectedItems[0]; if (item.Tag != null) { UserInfo tmp = item.Tag as UserInfo; if (tmp != null) { CurrentClient = tmp; if (!tmp.IsValidate) { LogOn tmpwin = new LogOn(); tmpwin.ShowDialog(); string password = tmpwin.PassWrod; Success logon = new Success() { Key = password }; tmp.SendData(BufferFormatV2.FormatFCA(logon)); } else { GetFile getfile = new GetFile(); tmp.SendData(BufferFormatV2.FormatFCA(getfile)); } } } } }