static void Main(string[] args) { _starter = new Starter(); _starter.Start(); handler = new ConsoleEventDelegate(ConsoleEventCallback); SetConsoleCtrlHandler(handler, true); Console.ReadLine(); }
protected void Application_Start() { RegisterRoutes(RouteTable.Routes); _starter = new Starter<IOrchardHost>(HostInitialization, HostBeginRequest, HostEndRequest); _starter.OnApplicationStart(this); LocalizationInfoFactory.Init( new WebIpAddressProvider(), new WebServiceGeoLocationInfoProvider(105065, "QhPUJhXH8sh8")); }
public void Add(Starter s) { ++Starters; if(s.WinPayoff > 0) { ++Winners; TotalWinPayoff += s.WinPayoff; } TotalFieldSize += s.FieldSize; }
/// <summary> /// Главная точка входа для приложения. /// </summary> static void Main() { if (!Environment.UserInteractive) { ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new ServerService() }; ServiceBase.Run(ServicesToRun); } else { Starter starter = new Starter(); starter.Start(); } }
private void tb2_btn_StartSmaliToApk_Click(object sender, EventArgs e) { string text = this.tb2_txt_smali_dir.Text ?? ""; if (string.IsNullOrEmpty(text)) { MessageBox.Show("Smali文件夹路径不能为空"); } else if (!Directory.Exists(text)) { MessageBox.Show("文件夹不存在"); } else { string text2 = this.tb2_txt_apk_path.Text; if (string.IsNullOrEmpty(text2)) { MessageBox.Show("保存的文件路径不能为空"); } else { this.tab2_loading.Visible = true; this.tab2_loading.Start(); string[] cmd = new string[] { "-jar", Application.StartupPath + "\\lib\\smali.dll", text, "-o", text2 }; Thread thread = new Thread(delegate { int num = Starter.StartMain(cmd); this.loadingStop(this.tab2_loading); if (num == 0) { MessageBox.Show("编译Smali成功", "消息提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } }); thread.Start(); } } }
void AddStarterToGrid(Starter s) { int rowIndex = _grid.Rows.Add(); var cells = _grid.Rows[rowIndex].Cells; cells[_trackCodeColIndex].Value = s.TrackCode; cells[_dateColIndex].Value = s.Date; cells[_horseNameColIndex].Value = s.HorseName; cells[_jockeyColIndex].Value = Utilities.CapitalizeOnlyFirstLetter(s.Jockey); cells[_surfaceColIndex].Value = s.Surface; cells[_distanceColIndex].Value = Utilities.ConvertYardsToMilesOrFurlongsAbreviation((int)s.Distance); string raceClass = Utilities.MakeRaceCondition(s.StateBredFlag, s.AgeSexRestrictions, s.AbbrRaceClass, s.RaceGrade, s.RaceName); if(raceClass.Length >20) { raceClass = raceClass.Substring(0, 19); } cells[_classificationColIndex].Value = raceClass; cells[_oddsColIndex].Value = s.Odds; cells[_finalPositionColIndex].Value = s.FinishPosition; Color backColor = Color.White; Color foreColor = Color.Black; if(s.FinishPosition == 1) { backColor = Color.LightPink; } else if (s.FinishPosition == 2) { backColor = Color.LightGreen; } _grid.Rows[rowIndex].Tag = s; _grid.Rows[rowIndex].DefaultCellStyle.BackColor = _grid.Rows[rowIndex].DefaultCellStyle.SelectionBackColor = backColor; _grid.Rows[rowIndex].DefaultCellStyle.ForeColor= _grid.Rows[rowIndex].DefaultCellStyle.SelectionForeColor = foreColor; }
private static void StartConsole(string[] args) { string parameter = string.Concat(args); switch (parameter) { case "/install": ServiceControllerHelper.InstallService(GlobalConfiguration.Settings.ServiceName); break; case "/uninstall": ServiceControllerHelper.UninstallService(GlobalConfiguration.Settings.ServiceName); break; default: var starter = new Starter(); starter.Start(); System.Diagnostics.Trace.WriteLine(string.Format("{0} started in console mode", GlobalConfiguration.Settings.ServiceName)); System.Console.ReadKey(); starter.Stop(); break; } }
private void CompileCompleted() { foreach (var line in Builder.Counters) { AddCounters(line); } if (CheckKeyPressed()) return; string imageFile = Options.BootLoaderImage != null ? Options.BootLoaderImage : Builder.ImageFile; Starter = new Starter(Options, AppLocations, imageFile, this, Builder.Linker); Starter.Launch(); }
protected void Application_Start() { RegisterRoutes(RouteTable.Routes); _starter = new Starter<IOrchardHost>(HostInitialization, HostBeginRequest, HostEndRequest); _starter.OnApplicationStart(this); }
protected override void OnStart(string[] args) { m_LoaderService = new Starter(); m_LoaderService.Start(); }
private void CompileCompleted() { foreach (var line in Builder.Counters) { AddCounters(line); } if (CheckKeyPressed()) return; Starter = new Starter(Options, AppLocations, Builder.ImageFile, this); Starter.Launch(); if (Options.ExitOnLaunch) { Application.Exit(); } }