private void MainForm_Load(object sender, EventArgs e) { if (System.IO.File.Exists("layout.sf")) { _deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString); dockPanel1.LoadFromXml("layout.sf", _deserializeDockContent); } if (frmExplorer == null) { frmExplorer = new frmExplorer(); frmExplorer.Show(this.dockPanel1); frmExplorer.DockTo(this.dockPanel1, DockStyle.Left); } frmConnect connect = new frmConnect(); connect.ShowDialog(this); //client = new RedisClient("127.0.0.1", 6379); //client.Auth("123456"); //client.MonitorReceived += Client_MonitorReceived; //Task task = new Task(new Action(client.Monitor)); //Func<string> func = new Func<string>(client.Monitor); //func.BeginInvoke(null, null); //client.Monitor(); }
private IDockContent GetContentFromPersistString(string persistString) { Console.WriteLine(persistString); if (persistString == typeof(frmExplorer).ToString()) { return(frmExplorer = new frmExplorer()); } return(null); }