private void CentralServerConfigForm_Load(object sender, EventArgs e) { if (monitorForm != null) { this.Text = "Docker公共配置 - " + monitorForm.getSessionConfig().Host; cfgDir = MainForm.TEMP_DIR + monitorForm.getSessionConfig().Host; cfgDir = cfgDir.Replace("\\", "/"); if (!Directory.Exists(cfgDir)) { Directory.CreateDirectory(cfgDir); } string cfgPath = monitorForm.getSessionConfig().CentralServerConfigDir; if (string.IsNullOrWhiteSpace(cfgPath)) { string home = monitorForm.getSftp().getHome(); if (!home.EndsWith("/")) { home += "/"; } remoteCfgPath = home + "docker/central-server-config"; monitorForm.getSessionConfig().CentralServerConfigDir = remoteCfgPath; AppConfig.Instance.SaveConfig(2); } else { remoteCfgPath = cfgPath; } stb_remote_dir.Text = remoteCfgPath; LoadRemoteYmls(); } else { btn_reload.Enabled = false; btn_show.Enabled = false; 载到本地ToolStripMenuItem.Enabled = false; 到服务器ToolStripMenuItem.Enabled = false; 更改文件名ToolStripMenuItem.Enabled = false; 除文件ToolStripMenuItem.Enabled = false; this.AllowDrop = true; } }
private void menuItem_lookAttr_Click(object sender, EventArgs e) { FATabStripItem tab = (FATabStripItem)faTab.SelectedItem; if (tab != null && TAB_MONITOR.ContainsKey(tab)) { MonitorForm form = TAB_MONITOR[tab]; SessionConfig sessionConfig = form.getSessionConfig(); if (null != sessionConfig) { SshSettingForm ssForm = new SshSettingForm(sessionConfig); ssForm.ShowDialog(this); RenderSessionList(); } } }