public void Setup(NewProjectFormActions action)
        {
            ClearScreens();

            SetupAction = action;

            if (Branding.ProductBranding == ApplicationBrand.VisualNHibernate)
            {
#if DEBUG
                string templateFile = Slyce.Common.RelativePaths.RelativeToAbsolutePath(Path.GetDirectoryName(Application.ExecutablePath), @"..\..\..\ArchAngel.Templates\NHibernate\Template\NHibernate.AAT.DLL");
#else
                //string templateFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), Branding.ProductName + Path.DirectorySeparatorChar + "Templates" + Path.DirectorySeparatorChar + "NHibernate.AAT.DLL");
                string templateFile = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "NHibernate.AAT.DLL");
#endif
                NewProjectTemplate = templateFile;
                switch (SetupAction)
                {
                case NewProjectFormActions.None:
                case NewProjectFormActions.ExistingProject:
                    AddScreen(new Screen1());
                    break;

                default:
                    break;
                }
                LoadScreensFromTemplate(NewProjectTemplate);
            }
            else
            {
                switch (SetupAction)
                {
                case NewProjectFormActions.None:
                case NewProjectFormActions.ExistingProject:
                    AddScreen(new Screen1());
                    AddScreen(new Screen2());
                    break;

                case NewProjectFormActions.NewProject:
                    AddScreen(new Screen2());
                    break;

                default:
                    throw new NotImplementedException("Not handled yet: " + SetupAction);
                }
            }

            HasBeenSetUp = true;
        }
Example #2
0
        public void Setup(NewProjectFormActions action)
        {
            ClearScreens();

            SetupAction = action;

            if (Branding.ProductBranding == ApplicationBrand.VisualNHibernate)
            {

            #if DEBUG
                string templateFile = Slyce.Common.RelativePaths.RelativeToAbsolutePath(Path.GetDirectoryName(Application.ExecutablePath), @"..\..\..\ArchAngel.Templates\NHibernate\Template\NHibernate.AAT.DLL");
            #else
                //string templateFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), Branding.ProductName + Path.DirectorySeparatorChar + "Templates" + Path.DirectorySeparatorChar + "NHibernate.AAT.DLL");
                string templateFile = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "NHibernate.AAT.DLL");
            #endif
                NewProjectTemplate = templateFile;
                switch (SetupAction)
                {
                    case NewProjectFormActions.None:
                    case NewProjectFormActions.ExistingProject:
                        AddScreen(new Screen1());
                        break;
                    default:
                        break;
                }
                LoadScreensFromTemplate(NewProjectTemplate);
            }
            else
            {

                switch (SetupAction)
                {
                    case NewProjectFormActions.None:
                    case NewProjectFormActions.ExistingProject:
                        AddScreen(new Screen1());
                        AddScreen(new Screen2());
                        break;
                    case NewProjectFormActions.NewProject:
                        AddScreen(new Screen2());
                        break;
                    default:
                        throw new NotImplementedException("Not handled yet: " + SetupAction);
                }
            }

            HasBeenSetUp = true;
        }