public VirtualHostList() : base() { InitializeComponent(); dataStorageService = new DataStorageService(); var filePath = dataStorageService.Read <string>(AppConst.filePathConfig).Replace("\"", ""); if (!string.IsNullOrEmpty(filePath)) { context = new VirtualHostContext(filePath); context.Read(); setItems(); } //var a = new GetDirectoryForm().ShowDialog(); //setup(); //creating new column }
private void setup() { try { var filePath = getFilePath(); if (filePath == "" || !File.Exists(filePath)) { MessageBox.Show("Vui lòng sửa lại đường dẫn", "Đường dẫn lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { dataStorageService.Save(AppConst.filePathConfig, filePath); context = new VirtualHostContext(filePath); context.Read(); setItems(); } } catch (Exception ex) { //throw ex; } }