Ejemplo n.º 1
0
        public Explorer(Editor editor, EditorWindow window)
        {
            InitializeComponent();
            Editor = editor;
            Window = window;

            foreach (KeyValuePair<string, ProjectItem> item in Editor.Project.Files)
            {
                //treeView.Items.Add(item.Key);
            }
        }
Ejemplo n.º 2
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            string file = string.Empty;
            foreach (string item in e.Args)
            {
                if(File.Exists(item))
                {
                    file = item;
                }
            }
            EditorWindow window = new EditorWindow();
            window.Show();

            Welcome welcome = new Welcome();
            welcome.ShowDialog();

            if(welcome.Path == null)
            {
                Environment.Exit(0);
            }

            Project project;
            Renderer renderer = new Renderer();
            if(welcome.Type == OpenType.New)
            {
                project = Project.NewProject(welcome.Path);
            }
            else
            {
                project = new Project(welcome.Path);
            }

            Editor editor = new Editor(project, renderer);

            window.LoadEditor(editor);
            window.Switch();
        }
 public void LoadEditor(Editor editor)
 {
     this.editor = editor;
 }