internal DeployForm(ProjectNodeHandler projectNodeHandler) { InitializeComponent(); _projectNodeHandler = projectNodeHandler; foreach (TreeNode node in _projectNodeHandler.Node.Nodes) { FileNodeHandler fh = node.Tag as FileNodeHandler; if (fh == null) continue; _fileNodeHandler = fh; break; } }
private void LoadDevProject(string projectName, DevSiteLoginInfo devSite) { ReloadProjectList(); foreach (ToolStripMenuItem item in cmOpenProject.DropDownItems) item.Checked = item.Text == projectName; MainForm.CurrentProject = Projects.LoadProjectHandler(projectName); if (CurrentProject == null) return; if (CurrentProject.Status == ProjectStatus.LoadFail) return; //ProjectHandler project = null; //if (devSite != null) // project = new ProjectHandler(projectName, devSite); //else // project = new ProjectHandler(projectName); ProjectHandler project = MainForm.CurrentProject; tvProjects.Nodes.Clear(); TreeNode tn = tvProjects.Nodes.Add(projectName); tn.SelectedImageKey = "project"; tn.ImageKey = "project"; ProjectNodeHandler projectNodeHandler = new ProjectNodeHandler(tn, project); projectNodeHandler.Reloaded += new EventHandler(projectNodeHandler_Reloaded); tn.Tag = projectNodeHandler; TreeNode udtNode = tn.Nodes.Add("UDT"); udtNode.ImageKey = "udts"; udtNode.SelectedImageKey = "udts"; udtNode.ToolTipText = "自訂資料表"; UDTNodeHandler udtNodeHandler = new UDTNodeHandler(udtNode); udtNode.Tag = udtNodeHandler; udtNodeHandler.Reload(); MainForm.CurrentUDT = udtNodeHandler.UDTHandler; TreeNode udsNode = tn.Nodes.Add("UDS"); udsNode.ImageKey = "udss"; udsNode.SelectedImageKey = "udss"; udsNode.ToolTipText = "自訂服務"; UDSNodeHandler udsNodeHandler = new UDSNodeHandler(udsNode); udsNode.Tag = udsNodeHandler; udsNodeHandler.Reload(); MainForm.CurrentUDS = udsNodeHandler.UDSHandler; TreeNode fileNode = tn.Nodes.Add("檔案管理"); fileNode.SelectedImageKey = "upload"; fileNode.ImageKey = "upload"; MainForm.CurrentFileNodeHandler = null; if (MainForm.LoginArgs.SucceedModuleLogin) { fileNode.ToolTipText = string.Empty; FileNodeHandler fileNodeHandler = new FileNodeHandler(fileNode); fileNode.Tag = fileNodeHandler; MainForm.CurrentFileNodeHandler = fileNodeHandler; } else { fileNode.ToolTipText = "檔案管理伺服器登入失敗"; } tvProjects.ExpandAll(); udtNodeHandler.CollapseOutsideProject(); udsNodeHandler.CollapseOutsideProject(); }
public FileEditable(FileNodeHandler fileNodeHandler) { _fileNodeHandler = fileNodeHandler; }
internal FileUIEditor(FileNodeHandler fileNodeHandler) { InitializeComponent(); _fileNodeHandler = fileNodeHandler; _moduleHandler = fileNodeHandler.ModuleHandler; }