private void btnCreate_Click(object sender, EventArgs e) { SiteData storeData = new SiteData(); storeData.Location = this.LocalFilePath.Text.Trim(); storeData.SQLServer = this.SQLServerField.Text.Trim(); storeData.SQLDatabase = this.SQLDatabaseField.Text.Trim(); storeData.SQLUsername = this.SQLUsernameField.Text.Trim(); storeData.SQLPassword = this.SQLPasswordField.Text.Trim(); storeData.SourceFolder = System.IO.Path.GetDirectoryName(Application.ExecutablePath) + "\\src\\"; storeData.WebSiteAddress = this.WebSiteAddressField.Text.Trim(); storeData.PrepArgs(); storeData.InstallSourceCode = true; CreateSiteWorker worker = new CreateSiteWorker(); worker.Show(); worker.Focus(); worker.CreateStore(storeData); this.Dispose(); }
static void Main(string[] args) { string version = Assembly.GetExecutingAssembly().GetName().Version.ToString(); Console.WriteLine("Create MT Store | " + version); Console.WriteLine(); if (args.Length < 6) { ShowHelp(); return; } Console.WriteLine("Parsing Arguments"); SiteData data = new SiteData(); data.InstallSourceCode = true; data.SourceFolder = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\src\\"; foreach (string arg in args) { ParseArg(data, arg); } data.PrepArgs(); SiteBuilder builder = new SiteBuilder(); builder.ProgressReport += new SiteBuilder.ProgressReportDelegate(builder_ProgressReport); if (builder.CreateSite(data)) { Console.WriteLine("Create store SUCCESS!"); } else { Console.WriteLine("Create store FAILED!"); } }