string total; //연산 완료된 숫자 --> view변수로 받아온 숫자를 여러 연산 기호 버튼에 따라 계산된 최종 값 public Form1() { InitializeComponent(); ///////////////////////////// 네트워킹 /////////////////////////////////////////// mainSock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP); _listupdate = new ListBoxUpdateDelegate(ListUpdate); ///////////////////////////// 계산기 //////////////////////////////////////// input = new List <string>(); //초기화 historys = new List <string>(); listBox1.DataSource = historys; //Listbox에 컬렉션 연결 listBox1.Invalidate(); }
public void OnFileEvent(object source, FileSystemEventArgs fsea) { DateTime dt = new DateTime(); dt = System.DateTime.UtcNow; FileInfo f = new FileInfo(fsea.FullPath); try { lstboxDel = delegate() { listBoxFiles.Items.Add(listBoxFiles.Items.Count.ToString() + " " + dt.ToLocalTime() + " " + fsea.ChangeType.ToString() + " " + fsea.FullPath + " " + f.Attributes.ToString()); listBoxFiles.SelectedIndex = listBoxFiles.Items.Count - 1; }; listBoxFiles.Invoke(lstboxDel); } catch (Exception) { } }