Beispiel #1
0
        public frm_Main()
        {
            #region Required for Windows Form Designer support
            this.InitializeComponent();
            #endregion
            #region Event safeguard...
            this.Closing += new System.ComponentModel.CancelEventHandler(this.frm_Main_Closing);
            #endregion
            ntierproject = new NTierGenerator();
            this.Form_Refresh();

            if (
                                #if !NET_1_1
                System.Configuration.ConfigurationManager.AppSettings
                                #else
                System.Configuration.ConfigurationSettings.AppSettings
                                #endif
                [frm_about.APPSETTINGS_LICENSE] != frm_about.APPSETTINGS_LICENSE_IHAVEREADLINCENSE
                )
            {
                frm_about about = new frm_about();
                about.ShowDialog();
            }
        }
Beispiel #2
0
        public static void DoIt(
            string filePath_in,
            Statistics statistics_in,
            params string[] templateTypes_in
            )
        {
            NTierGenerator _generator = new NTierGenerator();

            _generator.Open(
                filePath_in,
                true,
                Notify
                );
            _generator.Build(
                Notify,
                statistics_in,
                templateTypes_in
                );

            #region oldstuff...
//			#region string _outputDir = ...;
//			string _outputDir = System.IO.Directory.GetParent(
//				Path.GetDirectoryName(filePath_in)
//			).FullName;
//			#endregion
//
//			Notify("", true);
//			Notify("opening...", true);
//			#region _metadata_temp = new cDBMetadata().LoadState_fromXML(filePath_in);
//			Notify("- reading configuration from xml file", true);
//			cDBMetadata _metadata_temp = new cDBMetadata();
//			_metadata_temp.LoadState_fromXML(filePath_in);
//			#endregion
//			#region _metadata = new cDBMetadata().LoadState_fromDB(...);
//			Notify("- reading metadata from db", true);
//			cDBMetadata _metadata = new cDBMetadata();
//			_metadata.LoadState_fromDB(
//				new cDBMetadata.dLoadState_fromDB(
//					Notify
//				),
//				_metadata_temp.DBs.Default.DBServerType,
//				_metadata_temp.DBs.Default.Connectionstring,
//				_metadata_temp.SubAppName
//			);
//			#endregion
//			#region _metadata.LoadState_fromXML(filePath_in, All_butDatabaseER);
//			Notify("- updating metadata with xml file", true);
//			_metadata.LoadState_fromXML(
//				filePath_in,
//				cDBMetadata.eMetadata.All_butDatabaseER
//			);
//			#endregion
//			#region string _metadataFilePath = ...;
//			string _metadataFilePath = string.Format(
//				System.Globalization.CultureInfo.CurrentCulture,
//				"{0}{1}OGen-metadatas{1}MD0_{2}-{3}.OGen-metadata.xml",
//				/*00*/ _outputDir,
//				/*01*/ Path.DirectorySeparatorChar,
//				/*02*/ _metadata_temp.ApplicationName,
//				/*03*/ _metadata_temp.DBs.Default.DBServerType.ToString()
//			);
//			string _dir = Path.GetDirectoryName(_metadataFilePath);
//			if (!Directory.Exists(_dir)) Directory.CreateDirectory(_dir);
//			#endregion
//			_metadata.SaveState_toXML(_metadataFilePath);
//			Notify("...finished!", true);
//			Notify("", true);
//
//			Notify("generating...", true);
//			#region new OGenGenerator(...).Build(...);
//			new OGenGenerator(
//				ConfigurationSettingsBinder.Read("OGen"),
//				_metadataFilePath,
//				cDBMetadata.root4xml,
//				ConfigurationSettingsBinder.Read("Templates"),
//				cTemplates.root4xml,
//				_metadata_temp.DBs.Default.DBServerType,
//				_metadata_temp.DBs.Default.Connectionstring,
//				_outputDir
//			).Build(
//				Notify,
//				_metadata
//			);
//			#endregion
//			Notify("...finished!", true);
//			//Notify("", true);
            #endregion
        }