Custom Projects


You can create your own custom project types using Korduene SDK, ProjectBase class is provided which has all the interface needed for creating your own projects. Beside creating your own custom projects, you also have access to WinForms project which allows you to create WinForms projects using your extension and be in full control of your project.

Project Attributes
IsProject: This is a Korduene specifice attribute, your project classes should have IsProject attribute for Korduene to reconize them as projects and not mix them with other classes in your extension.
Custom C++ Project (with its own Editors and compiler)
using Korduene;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CppProject
{
    [IsProject]
    public class Project : Korduene.Project.ProjectBase
    {
        CppCompiler compiler = new CppCompiler();
        public Project()
        {
            ProjectTypeInfo.Description = "C++ Project";
            ProjectTypeInfo.Image = CppProject.Properties.Resources.cppicon;
            ProjectTypeInfo.Language = "C++";
            ProjectTypeInfo.Name = "C++ Project";
            ProjectTypeInfo.ProtectionEnabled = false;
            ProjectTypeInfo.UsesCustomNodes = true;
            ProjectTypeInfo.DefaultFileName = "CppProject";
            Korduene.KGraph.GraphCore.EscapeLiteral = string.Empty;
        }
        public override void NewEditor()
        {
            CppEditor cppeditor = new CppEditor();
            cppeditor.ContentName = Korduene.Utilities.FileNameCreator.Create("Class", Directories.Graphs);
            cppeditor.Show(KordueneCore.MainWindow.DockPanel);
        }
        public override void LoadEditorByName(string name)
        {
            CppEditor cppeditor = new CppEditor();
            cppeditor.ContentName = name;
            cppeditor.Show(KordueneCore.MainWindow.DockPanel);
            cppeditor.LoadEditor();
        }
        public override string GetGraphCode(Korduene.KGraph.Graph graph)
        {
            return compiler.GetGraphCode(graph);
        }
        public override void Compile(bool modify = false)
        {
            compiler.Compile(this, modify);
        }
    }
}