public CodeGenerator(FuzzlynOptions options) { Options = options; Random = new Randomizer(options); Types = new TypeManager(Random); Statics = new StaticsManager(Random, Types); Methods = new MethodManager(Random, Types, Statics); }
public void MethodManagerTest2_Will_Find_Test_Of_Single_Category() { MethodManager manager = new MethodManager(); IList<TestMethod> tests = manager.GetTestsInTestClass(typeof(MethodManagerTest2), TestType.UnitTest, "Category1"); Confirm.IsTrue(tests.Count == 1); Confirm.Equal("MethodManagerTest2_Will_Find_Test_Of_Single_Category", tests[0].Name); }
public void MethodManagerTest2_Will_Find_Test_Of_Single_Category() { MethodManager manager = new MethodManager(); IList <TestMethod> tests = manager.GetTestsInTestClass(typeof(MethodManagerTest2), TestType.UnitTest, "Category1"); Confirm.IsTrue(tests.Count == 1); Confirm.Equal("MethodManagerTest2_Will_Find_Test_Of_Single_Category", tests[0].Name); }
private void GotoNext(object sender, RoutedEventArgs e) { MethodManager.DoAppLog(2, "b", "c", "d", "e", "f", "g"); string screenName = "Screen0021"; //var sm = new ScreenManager(); //string pScreen = this.Name; //Array stateArr = sm.GetStateArray(); ShowNextWindow(screenName); }
private void GotoLanguagePage(object sender, RoutedEventArgs e) { MethodManager.DoAppLog(0, "Screen000", "", "GotoMenu", MethodManager.GetMacAddress(), "", ""); string screenName = "Screen001"; Sm = new ScreenManager(); string pScreen = this.Name; Array stateArr = Sm.GetStateArray(); ShowNextWindow(screenName); this.Hide(); Player.Pause(); }
private void button_Click(object sender, RoutedEventArgs e) { try { IMethodStrategy strategy = MethodManager.GetStrategy(type.Text, double.Parse(a.Text), double.Parse(b.Text), double.Parse(eps.Text)); Tuple <double, int> res = strategy.Evaluate(new Func(func.Text)); result.Content = "x = " + res.Item1; iterations.Content = "Ітерацій: " + res.Item2; } catch (Exception exc) { result.Content = "Помилка: " + exc.Message; } }
//private void GotoNext(object sender, TouchEventArgs e) //{ // MethodManager.DoAppLog(2, "b", "c", "d", "e", "f", "g"); // string screenName = "Screen003"; // //var sm = new ScreenManager(); // //string pScreen = this.Name; // //Array stateArr = sm.GetStateArray(); // ShowNextWindow(screenName); //} private void GotoNext1(object sender, RoutedEventArgs e) { MethodManager.DoAppLog(3, "b", "c", "d", "e", "f", "g"); string screenName = "Screen080"; //var sm = new ScreenManager(); //string pScreen = this.Name; //Array stateArr = sm.GetStateArray(); try { ShowNextWindow(screenName); } catch (Exception ex) { //MessageBox.Show(ex.Message); } }
/// <summary> /// Sound the alarm, start the timer, and enable the buttons /// </summary> public void SoundTheAlarm(AudioClip audioClip) { if (PlayDialogueOnConditions(audioClip, ref isWaitingForAlarm)) { SfxManager sfxManager = SfxManager.instance; sfxManager.alarmAudioSource.Play(); sfxManager.pipeLeakAudioSource.Play(); StartCoroutine(TimerManager.instance.RunTimer()); MethodManager methodManager = MethodManager.instance; methodManager.ManageFunctions(); methodManager.brokenPipe.SetActive(true); RandomizeMaterials[] buttons = methodManager.buttonHolder.GetComponentsInChildren <RandomizeMaterials>(); foreach (var button in buttons) { button.StartRandomizer(); } LightChanger.instance.StartDimmer(); } }
public App() { InitializeComponent(); TodoManager = new MethodManager(new RestServices()); MainPage = new NavigationPage(new LoginPage()); }
public void Dispose() { PropertyManager.Clear(template); MethodManager.Clear(template); }
public IEnumerator startSimulatorCt(bool isFirst = false) { currentSimulatorMatchIsFirst = isFirst; isInit = false; isPlaying = false; playGameOver = false; clearStage(); if (isFirst) { sindex = 0; cutSceneMapManager.visible = false; mapManager = normalMapManager; gameCameraContainer.SetActive(true); tk2dCam.useTargetResolution = false; tk2dCam.gameObject.SetActive(false); mapManager.isSetStage = false; } else { ++sindex; } uiManager.uiPlay.init(); GameManager.me.player.init(GameDataManager.selectedPlayerData, true, true, 0); GameManager.me.player.pet.init(player); mapManager.clearStage(); bulletManager.clearStage(); effectManager.clearStage(); characterManager.clearStage(); MethodManager.clearInGameFunc(); player.isEnabled = true; player.state = Monster.NORMAL; player.resetPosition(); int len = deletePool.childCount; for (int i = len - 1; i >= 0; --i) { UnityEngine.Object.Destroy(deletePool.GetChild(i).gameObject); } GameManager.me.stageManager.heroMonster = null; stageManager.playTime = 0.0f; characterManager.longestWalkedTargetZonePlayerLine.Set(-9999.0f); Debug.LogError("simulator isfirst : " + isFirst); if (isFirst) { loadRoundMonsterModelData(); while (gameDataManager.isCompleteLoadMap == false) { yield return(null); } ; while (gameDataManager.isCompleteLoadModel == false) { yield return(null); } ; while (SoundManager.instance.isCompleteLoadSound == false) { yield return(null); } ; while (effectManager.isCompleteLoadEffect == false) { yield return(null); } ; characterManager.startPreLoading(); while (CharacterManager.isCompletePreloading == false) { yield return(null); } ; characterManager.inGameGUITooltipContainer.gameObject.SetActive(false); } if (BattleSimulator.instance.viewBackground) { normalMapManager.createBackground(stageManager.getMapId(), true); mapManager.visible = true; } // _updateLoopLeftTime = 0.0f; GameManager.setTimeScale = 1.0f; // 화면에 있을 몬스터 캐릭터 세팅. mapManager.setStage(stageManager.nowRound); if (GameManager.me.pvpPlayer != null) { GameManager.me.pvpPlayer.state = Monster.NORMAL; } uiManager.changeUI(UIManager.Status.UI_PLAY); uiManager.uiPlay.showMenu(0.0f); uiManager.uiPlay.hideReadyBattleAnimation(); int randomeSeed = 4989; #if UNITY_EDITOR if (BattleSimulator.instance.wantSameResult) { randomeSeed = BattleSimulator.instance.randomSeed; } else { randomeSeed = UnityEngine.Random.Range(1000, 999999); //Guid.NewGuid().GetHashCode();//UnityEngine.Random.Range(1000,99999); } BattleSimulator.instance.nowSeed = randomeSeed; #else randomeSeed = UnityEngine.Random.Range(1000, 99999); #endif inGameRandom = new Well512Random((uint)randomeSeed); replayManager.init(randomeSeed); GameManager.me.characterManager.updatePlayerFirst = (inGameRandom.Range(0, 101) > 50); stageManager.playTime = 0.0f; UnitSlot.summonPosIndex = inGameRandom.Range(0, 12); UIPlayUnitSlot.summonPosIndex = inGameRandom.Range(0, 12); characterManager.longestWalkedTargetZonePlayerLine.Set(-9999.0f); yield return(null); _currentScene = Scene.STATE.PLAY_BATTLE; isPaused = false; isInit = true; isPlaying = true; }
public static void DoStoreForRetailer() { var messageType = "KIOSK-REQUEST"; var origin = MethodManager.GetMacAddress(); var destination = String.Empty; var adminUser = "******"; var transactionId = "01.00.1209387817.31.0035133522.POS-12/234.1782096210243"; var senderIpAddress = MethodManager.GetIpAddress(); var userId = 100; decimal latitude = (decimal)7.1023; //read latitude from machine profile decimal longitude = (decimal)6.5093; //read longitude from machine profile var screen = "777"; //read screen from screen manager var state = "2"; //read state from screen manager var description = "Deposit Information"; var contentType = "Deposit Transaction Type"; var notes = "This is a deposit message"; //var amount = _totalAmount; //var depositorPhoneNumber = DepositorPhoneNumber; //var accountNum = ReceiverAccountNumber; try { var accept = Gctrl.DoGlyDeStore(MHandle); if (!accept.Contains("ERROR")) { //Deposit Infomation //instantiate PiarOutput for deposit var depositParams = new List <Common.PairOutput>(); var param0 = new Common.PairOutput { Text = "TransactionId", Value = transactionId }; var param1 = new Common.PairOutput { Text = "Amount", Value = Convert.ToString(_totalAmount, CultureInfo.CurrentCulture) }; var param2 = new Common.PairOutput { Text = "AcctNo", Value = Banks.AccountNumber }; var param3 = new Common.PairOutput { Text = "Bank", Value = Banks.Name }; var param4 = new Common.PairOutput { Text = "Currency", Value = "NGN" }; var param5 = new Common.PairOutput { Text = "Depositor", Value = Banks.PhoneNumber }; var param6 = new Common.PairOutput { Text = "SessionId", Value = "1" }; depositParams.Add(param0); depositParams.Add(param1); depositParams.Add(param2); depositParams.Add(param3); depositParams.Add(param4); depositParams.Add(param5); depositParams.Add(param6); //depositContent.Parameters = depositParams; var depositContent = new Content { MethodCall = "DEPOSIT", Parameters = depositParams }; List <Common.PairOutput> denParams = new List <Common.PairOutput>(); foreach (DataRow row in CountDataTable.Rows) { Common.PairOutput den = new Common.PairOutput { Text = row[0].ToString(), Value = row[1].ToString() }; denParams.Add(den); } //denomContent Parameters var denomContent = new Content { MethodCall = "DENOMINATION", Parameters = denParams }; TransactionCls.DenominationContents = denomContent; TransactionCls.MethodContent = depositContent; var msg = MethodManager.DoMethod(messageType, origin, destination, adminUser, transactionId, senderIpAddress, userId, longitude, latitude, screen, state, description, contentType, notes, _totalAmount.ToString(CultureInfo.CurrentCulture), Banks.AccountNumber); if (msg == "1") { } //MessageBox.Show(msg); } } catch (Exception ex) { //MessageBox.Show(ex.Message); } //} }
public void Setup() { MockFactory = new Mock <IProxyGeneratorFactoryManager>(); MockMethodParameterManager = new Mock <IMethodParameterManager>(); MethodManager = new MethodManager(MockFactory.Object); }
public void DoStoreForRetailer(string handle) { txtTotalCounted.Text = "125500"; //MethodManager mm = new MethodManager(); if (txtTotalCounted.Text != "") { //var sockIp = ConfigurationManager.AppSettings["SocketIp"]; //var sockPort = ConfigurationManager.AppSettings["SocketPort"]; var messageType = "KIOSK-REQUEST"; //var origin = "6a7eb98f-a3ef-4e1a-9fc7-66365c2a3778"; var origin = MethodManager.GetMacAddress(); //var destination = sockIp + ":" + sockPort; var destination = String.Empty; var adminUser = "******"; var transactionId = "01.00.1209387817.31.0035133522.POS-12/234.1782096210243"; //var methodCall = "DEPOSIT"; var senderIpAddress = MethodManager.GetIpAddress(); //var senderMacAdd = GetMacAddress; var userId = 100; decimal latitude = (decimal)7.1023; //read latitude from machine profile decimal longitude = (decimal)6.5093; //read longitude from machine profile var screen = "777"; //read screen from screen manager var state = "2"; //read state from screen manager var description = "Deposit Information"; var contentType = "whatever"; var notes = "This is a deposit message"; var amount = txtTotalCounted.Text; var accountNum = "1234Account"; try { var accept = Gctrl.DoGlyDeStore(handle); if (!accept.Contains("ERROR")) { //Deposit Infomation //instantiate PiarOutput for deposit var depositParams = new List <Common.PairOutput>(); var param0 = new Common.PairOutput { Text = "TransactionId", Value = transactionId }; var param1 = new Common.PairOutput { Text = "Amount", Value = amount }; var param2 = new Common.PairOutput { Text = "AcctNo", Value = accountNum }; var param3 = new Common.PairOutput { Text = "Currency", Value = "NGN" }; var param4 = new Common.PairOutput { Text = "Depositor", Value = "Yames" }; var param5 = new Common.PairOutput { Text = "SessionId", Value = "1" }; depositParams.Add(param0); depositParams.Add(param1); depositParams.Add(param2); depositParams.Add(param3); depositParams.Add(param4); depositParams.Add(param5); //depositContent.Parameters = depositParams; var depositContent = new Content { MethodCall = "DEPOSIT", Parameters = depositParams }; TransactionCls.MethodContent = depositContent; var msg = MethodManager.DoMethod(messageType, origin, destination, adminUser, transactionId, senderIpAddress, userId, longitude, latitude, screen, state, description, contentType, notes, amount, accountNum); if (msg == "1") { TransactionFrm win = new TransactionFrm { Topmost = true, WindowStyle = WindowStyle.None, WindowState = WindowState.Maximized }; //close glory handle Gctrl.DoGloryClose(_handle); _handle = ""; _handle = null; //call glory method to clear handle from device memory Gctrl.DoClearDeviceHandle(_handle); this.Close(); win.ShowDialog(); } // MessageBox.Show(msg); } } catch (Exception ex) { MessageBox.Show(ex.Message); } } }
static void SatisYap(MethodManager oyuncu) { Console.WriteLine(oyuncu + " için satış yapıldı."); }