Exemplo n.º 1
0
        public Compile(bool canCompile, CHMProject project)
        {
            InitializeComponent();
            this.canCompile = canCompile;
            this.chmProject = project;
            this.progressListBox.Items.Clear();
            HHCWrapper.FinishedBuild -= HHCWrapper_FinishedBuild;
            HHCWrapper.FinishedBuild += HHCWrapper_FinishedBuild;
            HHCWrapper.StartBuild -= HHCWrapper_StartBuild;
            HHCWrapper.StartBuild += HHCWrapper_StartBuild;
            HHCWrapper.CreateTemporaryFiles -= HHCWrapper_CreateTemporaryFiles;
            HHCWrapper.CreateTemporaryFiles += HHCWrapper_CreateTemporaryFiles;
            HHCWrapper.CreateTOC -= HHCWrapper_CreateTOC;
            HHCWrapper.CreateTOC += HHCWrapper_CreateTOC;
            HHCWrapper.CreateHHP -= HHCWrapper_CreateHHP;
            HHCWrapper.CreateHHP += HHCWrapper_CreateHHP;
            HHCWrapper.ProgressBuild += HHCWrapper_ProgressBuild;

            if (project != null && !string.IsNullOrEmpty(project.OutputFile))
                this.outputFile.Text = project.OutputFile;
        }
Exemplo n.º 2
0
 public void OpenProject(CHMProject chmProject)
 {
     if (chmProject != null)
         this.SetRootTreeNode(chmProject, chmProject.Name);
 }
Exemplo n.º 3
0
        public void SetRootTreeNode(CHMProject project, string name)
        {
            this.rootNode = new TreeNode(name);
            this.rootNode.ImageIndex = PROJECT;
            this.rootNode.SelectedImageIndex = PROJECT;
            chmTreeEditor.Nodes.Add(this.rootNode);

            if (project.Topics != null)
            {
                foreach (CHMTopic topic in project.Topics)
                {
                    AddTreeNodes(null, topic, true);
                }
            }

            this.chmTreeEditor.ExpandAll();
            this.openedProject = project;
            projectSettings1.SetProject(this.openedProject);
            htmlEditor1.Project = project;

            this.chmTreeEditor.SelectedNode = this.rootNode;
        }
Exemplo n.º 4
0
        public void SetProject(CHMProject project)
        {
            this.init = true;
            this.currentProject = project;
            ReloadTopics();

            this.projectName.Text = project.Name;
            this.outputFile.Text = project.OutputFile;
            this.windowTitle.Text = project.WindowTitle;
            this.fullTextSearch.Checked = project.FullTextSearch;

            this.init = false;
        }