public override void OnActivate(int pinID) { if (pinID != 100) { return; } if (BootLoader.BootStates == BootLoader.BootState.SUCCESS) { ((Behaviour)this).set_enabled(false); this.ActivateOutputLinks(10); } else { if (GameUtility.Config_UseDevServer.Value) { Network.SetDefaultHostConfigured(GameUtility.DevServerSetting); } else if (GameUtility.Config_UseAwsServer.Value) { Network.SetDefaultHostConfigured("https://alchemist.gu3.jp/"); } Network.Mode = Network.EConnectMode.Online; string str = "grdev"; TextAsset textAsset = (TextAsset)Resources.Load <TextAsset>("networkver"); if (Object.op_Inequality((Object)textAsset, (Object)null)) { str = textAsset.get_text(); } Network.Version = str; ((Behaviour)this).set_enabled(true); BootLoader.GscInit(); } }
public void GetLastValueAccumulatorWhenTerminates_Then1643() { var strings = File.ReadLines(Program.InputTxt); var bootLoader = new BootLoader(strings); bootLoader.GetLastValueAccumulatorWhenTerminates().Should().Be(1643); }
public void GetLastValueAccumulatorWhenFirstRoundEnd_Then1262() { var strings = File.ReadLines(Program.InputTxt); var bootLoader = new BootLoader(strings); bootLoader.GetLastValueAccumulatorWhenFirstRoundEnd().Should().Be(1262); }
public static void Cleanup(TestContext _) { Helper.CleanDirectory(); if (!BootLoader.CheckForSystemPrerequisites()) { throw new System.Exception("NPM is not installed on this machine."); } BootLoader.InitializeComponents(); }
/// <summary> /// The application's main form. /// </summary> /// <param name="args">Command line arguments</param> public MainForm(string[] args) { InitializeComponent(); if (args.Length > 0) { configFileName = args[0]; } else { configFileName = "MFC.XML"; } BootLoader = new BootLoader(configFileName); }
private void App_OnStartup(object sender, StartupEventArgs e) { if (!Settings.Default.Upgraded) { Settings.Default.Upgrade(); Settings.Default.Upgraded = true; Settings.Default.Save(); } BootLoader.Boot(); var mainWindow = BootLoader.Resolve <MainWindow>(); mainWindow.Show(); }
private void SmartPlaylistNew_OnClick(object sender, RoutedEventArgs e) { var smartPlaylistEditor = BootLoader.Resolve <SmartPlaylistEditorWindow>(); smartPlaylistEditor.Left = Left + Width / 2 - smartPlaylistEditor.Width / 2; smartPlaylistEditor.Top = Top + Height / 2 - smartPlaylistEditor.Height / 2; bool?result = smartPlaylistEditor.ShowDialog(); if (result.HasValue && result.Value) { _library.SmartPlaylists.Add(smartPlaylistEditor.SmartPlaylist); _library.IsDirty = true; } }
public void BootLoader_GetAccumulatorValueBeforeInfiniteLoop_Returns_Value_Of_Accumulator_Before_Second_Execution() { // Arrange var expectedResult = new Dictionary <EvaluatedInstructions, int> { { EvaluatedInstructions.UnsuccessfulRunAccumulator, 5 }, { EvaluatedInstructions.SuccessfulRunAccumulator, 8 } }; // Act var actualResult = BootLoader.EvaluateInstructions(_bootInstructions); // Assert Assert.AreEqual(expectedResult, actualResult); }
/// <summary> /// New alternative constructor of the main form /// allowing the MFC to run as a service. /// </summary> /// <param name="args">command line arguments</param> /// <param name="isService">Flag if application is started as a windows service-</param> public MainForm(string[] args, bool isService) { this.isService = isService; InitializeComponent(); // First argument is XML configuration filename if (args.Length > 0) { configFileName = args[0]; } else { configFileName = "MFC.XML"; } BootLoader = new BootLoader(configFileName); }
protected void Application_Start() { BootLoader.Boot(); AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); GlobalConfiguration.Configuration .Formatters .JsonFormatter .SerializerSettings .ContractResolver = new CamelCasePropertyNamesContractResolver(); }
public void From_XML(System.Xml.Linq.XElement xml) { var attr = xml.Attribute("type"); if (attr != null) { var b = Domain_Types.qemu; Enum.TryParse(attr.Value, true, out b); type = b; } Metadata.From_XML(xml); BootLoader.From_XML(xml); CPU.From_XML(xml); Memory.From_XML(xml); System_Features.From_XML(xml); var element = xml.Element("clock"); if (element != null) { attr = xml.Attribute("offset"); if (attr != null) { clock = (Clock_Types)Enum.Parse(typeof(Clock_Types), attr.Value); } } element = xml.Element("devices"); if (element != null) { var emul = element.Element("emulator"); if (emul != null) { emulator = emul.Value; } Drives.From_XML(element); graphics.From_XML(element); element = element.Element("interface"); if (element != null) { Iface.From_XML(element); } } }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); //boot-up var builder = new ContainerBuilder(); builder.RegisterControllers(typeof(MvcApplication).Assembly); builder.RegisterApiControllers(typeof(MvcApplication).Assembly); var container = BootLoader.Init(builder); DependencyResolver.SetResolver(new AutofacDependencyResolver(container)); GlobalConfiguration.Configuration.DependencyResolver = new AutofacWebApiDependencyResolver(container); }
private void LibraryNew_Click(object sender, RoutedEventArgs e) { var dialog = new System.Windows.Forms.FolderBrowserDialog(); dialog.SelectedPath = _filesPath; System.Windows.Forms.DialogResult result = dialog.ShowDialog(); if (result == System.Windows.Forms.DialogResult.OK) { var processor = new Func <BackgroundWorker, Library.Model.Library>(bw => CreateNewLibrary(bw, dialog.SelectedPath)); var processingWindow = BootLoader.Resolve <ProcessingWindow>("processor", processor); processingWindow.Left = Left + Width / 2 - processingWindow.Width / 2; processingWindow.Top = Top + Height / 2 - processingWindow.Height / 2; processingWindow.ShowDialog(); _library = (Library.Model.Library)processingWindow.Result; SaveLibrary(); BindLibrary(); } }
/// <summary> /// 初始化 /// </summary> private void BootLoaderForm_Init() { this.panel_port.Enabled = false; //---限定窗体的最小值 this.MinimumSize = this.Size; //---限定窗体的最大值 this.MaximumSize = this.Size; //---初始化类 if (this.usedBootLoader == null) { this.usedBootLoader = new BootLoader(this, new SerialCOMMPort(this), this.comboBox_portName, this.richTextBox_msg); } //---事件注册 this.RegistrationEvent(); this.button_closePort.Enabled = false; this.panel_update.Enabled = false; this.panel_port.Enabled = true; }
public string To_XML() { var ret = "<domain type='" + type.ToString() + "'>"; ret += Metadata.To_XML(); ret += BootLoader.To_XML(); ret += CPU.To_XML(); ret += Memory.To_XML(); //standard options here.... ret += "<on_poweroff>destroy</on_poweroff>"; ret += "<on_reboot>restart</on_reboot>"; ret += "<on_crash>restart</on_crash>"; ret += System_Features.To_XML(); ret += "<clock offset='" + clock.ToString() + "'></clock>"; ret += "<devices>"; ret += "<emulator>" + emulator + "</emulator>"; ret += Drives.To_XML(); ret += graphics.To_XML(); ret += Iface.To_XML(); ret += "</devices>"; ret += "</domain>"; return(ret); }
private void LoadUserSetup() { BootLoader.LoadPlatformPlayer(); finishedLoading = true; }
public static void LoadBootScene() { BootLoader.Reboot(); SceneManager.LoadScene("1_CheckVersion"); }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { this.OnRetry(); } else { WebAPI.JSON_BodyResponse <FlowNode_ReqLoginPack.JSON_ReqLoginPackResponse> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <FlowNode_ReqLoginPack.JSON_ReqLoginPackResponse> >(www.text); if (jsonObject.body == null) { this.OnRetry(); } else { GameManager instance = MonoSingleton <GameManager> .Instance; instance.Player.ResetQuestChallenges(); instance.ResetJigenQuests(); if (!instance.Deserialize(jsonObject.body.quests)) { this.OnFailed(); } else { if (instance.IsRelogin) { instance.Player.DeleteTrophies(jsonObject.body.trophyprogs); instance.Player.DeleteTrophies(jsonObject.body.bingoprogs); } LoginNewsInfo.SetPubInfo(jsonObject.body.pubinfo); this.reflectTrophyProgs(jsonObject.body.trophyprogs); this.reflectTrophyProgs(jsonObject.body.bingoprogs); this.reflectLoginTrophyProgs(); if (jsonObject.body.channel != 0) { GlobalVars.CurrentChatChannel.Set(jsonObject.body.channel); } if (jsonObject.body.support != 0L) { GlobalVars.SelectedSupportUnitUniqueID.Set(jsonObject.body.support); } if (!string.IsNullOrEmpty(jsonObject.body.device_id)) { BootLoader.GetAccountManager().SetDeviceId((string)null, jsonObject.body.device_id); } if (jsonObject.body.is_pending == 1) { FlowNode_Variable.Set("REDRAW_GACHA_PENDING", "1"); } else { FlowNode_Variable.Set("REDRAW_GACHA_PENDING", "0"); } FlowNode_Variable.Set("SHOW_CHAPTER", "0"); Network.RemoveAPI(); instance.Player.OnLogin(); instance.IsRelogin = false; this.Success(); } } } }