Ejemplo n.º 1
0
        static void Main()
        {
            SetupNLog();

            // Reports
            var relativeReportBasePath = GetReportRelativeBasePath();

            // Datasources
            var relativeDatasourceBasePath = GetDatasourceRelativeBasePath();

            // Runtime Actions
            var runtimeActions = new List<IReportRuntimeAction>()
            {
                new ReportRuntimeAction<XRLabel>(label => label.Name.Contains("gold"), label => label.BackColor = Color.Gold)
            };

            var designerContext = new DesignerContext(runtimeActions, relativeReportBasePath, relativeDatasourceBasePath);

            Application.Run(designerContext.DesignForm);
        }
Ejemplo n.º 2
0
        static void Main()
        {
            SetupNLog();

            var bs = new AppBootStrapper(
                Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), DefaultRootFolderName));

            var mode = bs.DetectProjectMode();

            switch (mode)
            {
                    case AppProjectsStructureMode.None:
                    new Popups.NoProjectsExistWarning(bs).ShowDialog();
                    return;
                    case AppProjectsStructureMode.MultipleUnchosen:
                    new Popups.ChooseProject(bs).ShowDialog();
                    if (bs.DetectProjectMode() == AppProjectsStructureMode.MultipleUnchosen)
                        return;
                    break;
            }

            var projectBootstrapper = bs.GetProjectBootstrapper(ReportsDirectoryName,DataSourceDirectoryName,ActionsDirectoryName);

            projectBootstrapper.CreateFoldersIfNeeded();
            projectBootstrapper.ExecuteBootStrapperBatchFileIfExists(BootStrapperBatchFileName);

            MessageBox.Show("NOT IMPLEMENTED", "Now we can wire this up...");// + bs.GetProjectBootstrapper().ToString());
            return;

            // Runtime Actions
            var runtimeActions = new List<IReportRuntimeAction>()
            {
                new ReportRuntimeAction<XRLabel>(label => label.Name.Contains("gold"), label => label.BackColor = Color.Gold)
            };

            var rootProjectPath = string.Empty;
            List<IReportDatasourceProvider> datasourceProviders = null;

            var designerContext = new DesignerContext(runtimeActions, projectBootstrapper.ReportsFolderPath, rootProjectPath, datasourceProviders);

            Application.Run(designerContext.DesignForm);
        }