private void doSteps(object sender, RoutedEventArgs e) { MainLogic logic = ((App)App.Current).logic; Variables contex = (Variables)DataContext; logic.DoSteps(contex.Steps); }
public DisplayLogic(MainLogic logic, Action <string> setText) { _logic = logic; _setText = setText; _logic.SelectionChanged += _logic_SelectionChanged; UpdateText(); }
private void Test_Click(object sender, RoutedEventArgs e) { MainLogic logic = ((App)App.Current).logic; Variables contex = (Variables)DataContext; logic.testTriang(contex.N); }
public override void Init(MainLogic mainLogic) { this.mainLogic = mainLogic; agentsController = mainLogic.GetAgentsController(); agentsController.ActivateTest1Agents(); mainLogic.StopSpeechRecognition(); }
// moved // rotated // sensed // action made #endregion public void Init(MainLogic logic) { m_Logic = logic; // logic.GetInputManager(). // subs }
// Use this for initialization //The script adds itself to a list in the MainLogic which is used to deliver the the new color to all ATU model parts void Start() { ml = FindObjectOfType <MainLogic> (); ml.updmats.Add(this); Debug.Log(ml.updmats.Count); rend = GetComponentInParent <Renderer> (); }
private void fillInfoField(string timestamp) { MainLogic mainLogic = MainLogic.GetInst(); timestampTF.text = timestamp; railTF.text = (mainLogic.mainrail) ? "Main" : "Side"; switch (mainLogic.elecspeedhigh) { case 0: trainTypeTF.text = "Non Electric"; break; case 1: trainTypeTF.text = "Electric, speed < 160 Km/h"; break; case 2: trainTypeTF.text = "Electric, speed > 160 Km/h"; break; default: break; } turnRadiusTF.text = mainLogic.turnrad.text; turnTiltTF.text = mainLogic.turntilt.text; signHeightTF.text = mainLogic.objectheight.text; }
private static void Init(MainLogic mainLogic) { mainLogic.CreateBook("Искусство программирования 1", "RU", DateTime.Parse("11.03.1999")); mainLogic.CreateBook("Искусство программирования 2", "RU", DateTime.Parse("11.03.2000")); mainLogic.CreateBook("Искусство программирования 3", "RU", DateTime.Parse("11.03.2003")); mainLogic.CreateBook("Programming language C++", "EN", DateTime.Parse("23.07.2000")); mainLogic.CreateBook("Современные операционные системы", "RU", DateTime.Parse("05.02.2008")); mainLogic.CreateAuthor("Страуструп"); mainLogic.CreateAuthor("Таненбаум"); mainLogic.CreateAuthor("Кнут"); mainLogic.AddAuthorToBook(3, 1); mainLogic.AddAuthorToBook(3, 2); mainLogic.AddAuthorToBook(3, 3); mainLogic.AddAuthorToBook(1, 4); mainLogic.AddAuthorToBook(2, 5); mainLogic.CreateClient("Лагин Дмитрий Андреевич", "89374525024"); mainLogic.CreateClient("Тягин Игорь Васильевич", "89021234256"); mainLogic.CreateClient("Перменев Алексей Сергеевич", "89033355256"); mainLogic.AddBookGivenAway(4, 1, DateTime.Parse("20.06.2020")); mainLogic.AddBookGivenAway(3, 1, DateTime.Parse("20.05.2020")); mainLogic.AddBookGivenAway(1, 3, DateTime.Parse("05.06.2020")); }
public void CreateFitnessHistory(List <ExerciseSync> track_fitness) { if (track_fitness == null || track_fitness.Count < 1) { FitnessHistoryErrorTxt = "No hits found!"; return; } List <FitnessHistoryEntry> fh = new List <FitnessHistoryEntry>(); List <Exercise> le = null; String lastTime = ""; foreach (ExerciseSync es in track_fitness) { String time = es.Date; if (!lastTime.Equals(time)) { le = new List <Exercise>(); fh.Add(new FitnessHistoryEntry { Date = time, Exercises = le }); lastTime = time; } Exercise ex = MainLogic.GetExerciseById((es.Id)); if (ex != null) { ex.TimeFrame = es.TimeFrame; ex.Reps = es.Amount; ex.Intensity = es.Intensity; le.Add(ex); } } FitnessHistory = fh; }
public Synchronizer(MainLogic mainLogic, Communication com) { this.mainLogic = mainLogic; this.com = com; status = App.MealViewModel.Status; loadCachedData(); }
public FormCreateOrder(IClientLogic logicC, IProductLogic logicP, MainLogic logicM) { InitializeComponent(); this.logicC = logicC; this.logicP = logicP; this.logicM = logicM; }
private async void Window_Loaded(object sender, RoutedEventArgs e) { Logic = new MainLogic(); this.DataContext = Logic; await SwitchMode(true); }
// Use this for initialization void Start() { _state = State.Run; _jumpColdTimer = 0.0f; _jumpTime = 0; _main = GameObject.Find("Player").GetComponent<MainLogic>(); }
public void AddCombo(MainLogic.TILETYPE ntype) { if(ntype == type[complete]){ // iTween.ScaleTo(Combo[complete], iTween.Hash( // "x", 0.5f, // "y", 0.5f, // "easeType", "easeOutQuad", // "time", 1, // "oncomplete","AddComboEnd", // "oncompletetarget",gameObject, // "oncompleteparams",Combo[complete])); iTween.ScaleTo(Check[complete], iTween.Hash( "x", 15.0f, "y", 15.0f, "easeType", "easeOutQuad", "time", 0.5, "oncomplete","AddComboEnd", "oncompletetarget",gameObject, "oncompleteparams",Combo[complete])); complete ++; } else{ NewComboSetting (); } }
public void TestConsoleSuscriberOutput() { MainLogic.AttachConsoleProject(); MainLogic.RaiseMyAlinEvent("Test_Console_Suscriber_Output"); // this check is VISUAL }
static void Main(string[] args) { MainLogic main = new MainLogic(); main.ShowView(); Console.ReadKey(); }
// Start is called before the first frame update void Start() { /* code to catch next action * * persistChoices * * var nextThing = persistChoices.getNextAction(INTCHOICE); //code this * switch (nextThing.item1) * { * case "question": * //CALL QUESTION TEXT WRITING HERE * question text = nextThing.item2 * case "minigame": * minigame name = nextThing.item2 * //CALL SCENE WITH MINIGAME HERE * case "end": * //persistChoices.get * };*/ //LEAVES -> adds points if (current != null && current != this) { Destroy(this.gameObject); return; } else { current = this; } DontDestroyOnLoad(this.gameObject); }
/// <summary> /// アプリケーションのエントリーポイント /// </summary> /// <param name="args"></param> static void Main(string[] args) { try { // メインロジックの生成 using (MainLogic mainLogic = new MainLogic()) { // アプリケーションの終了イベントハンドラを設定する AppDomain.CurrentDomain.ProcessExit += (sender, e) => { Console.WriteLine("Process exiting"); System.Diagnostics.Debug.WriteLine("Process exiting"); // メインロジックの破棄処理を呼び出す mainLogic.Dispose(); }; // メインロジックを実行 mainLogic.Run(); } } catch (Exception exception) { Console.WriteLine(exception.Message + " " + exception.StackTrace); System.Diagnostics.Debug.WriteLine(exception.Message + " " + exception.StackTrace); } }
public LessonView(QuestionCategory category, MainLogic logic) { InitializeComponent(); Category = category; Logic = logic; ReloadList(); }
public static void SetTypesToDataBase(string tableName, string category, string billType, double amount, string date) { List <Bill> result = new List <Bill>(); Config connectionProperty = new Config(); connectionProperty.ConnectionString = BillAccounter.Properties.Settings.Default.ConnectionString; MainLogic ml = new MainLogic(); ml.SetData(tableName, category, billType, amount, date); /* * try * { * using (SqlConnection cnn = new SqlConnection(property.ConnectionString)) * { * cnn.Open(); * string sql = string.Format("INSERT INTO dbo.{0} (Category, TypeName, Amount) VALUES ('{1}', '{2}', '{3}')", tableName, category, billType, amount); * SqlCommand cmd = new SqlCommand(sql, cnn); * cmd.ExecuteNonQuery(); * } * } * catch(Exception ex) * { * throw new InvalidDataException("Wrong data!", ex); * }*/ }
private void SetImage(MainLogic.TILETYPE myType) { tk2dSprite sprite = myTile.GetComponent<tk2dSprite>(); tk2dSpriteAnimator ani = myTile.GetComponent<tk2dSpriteAnimator>(); switch(myType){ case MainLogic.TILETYPE.Enemy: ani.playAutomatically = true; ani.Play (); //sprite.SetSprite(datas,"Enemy"); break; case MainLogic.TILETYPE.Sword: ani.Stop(); sprite.SetSprite(datas,"Sword"); break; case MainLogic.TILETYPE.Wand: ani.Stop (); sprite.SetSprite(datas,"Wand"); break; case MainLogic.TILETYPE.Coin: ani.Stop (); sprite.SetSprite(datas,"Coin"); break; case MainLogic.TILETYPE.Potion: ani.Stop (); sprite.SetSprite(datas,"Potion"); break; } }
private void InputButton(object sender, RoutedEventArgs e) { if (logic.IsError) { TextField.Text = ""; logic.IsError = false; } if (TextField.Text.Length > 0) { if (MainLogic.IsOperator(TextField.Text[TextField.Text.Length - 1]) && MainLogic.IsOperator(((Button)sender).Content.ToString()[0])) { return; } } else { // pokud nemůžeme vložit první operaci poté číslo (vyjímka je mínus a plus) if (((Button)sender).Content.ToString() == "*" || ((Button)sender).Content.ToString() == "/") { return; } } //rozdělení výrazu na podřetězce string LastExpression = TextField.Text.Split('+', '-', '*', '/').Last(); //pokud poslední část výrazu již obsahuje desetinnou tečku neni možné vložit další if (LastExpression.Contains(',') && ((Button)sender).Content.ToString() == ",") { return; } TextField.Text += ((Button)sender).Content; }
public static void Insert(MainLogic logic) { /* logic.CreateAuthor("Ivan Petrov"); * logic.CreateAuthor("Petr Ivanov"); * * logic.CreateCategory("Health"); * logic.CreateCategory("Auto"); * logic.CreateCategory("Politics"); * * logic.CreateComment("VAuu", 1, 2); * logic.CreateComment("Davno zamwetil chto politica ne ta stala", 2, 1); * * logic.CreateNews("Ukrali tualet", DateTime.Parse("11.07.2000"), 1, 3); * logic.CreateNews("Novii VolksWagen polo za 10 rublei", DateTime.Parse("22.11.2000"), 1, 2); * logic.CreateNews("Konstitucia obnovili)", DateTime.Parse("21.02.2021"), 2, 1); * logic.CreateNews("Konstitucia otmenili)", DateTime.Parse("21.03.2021"), 2, 1); * * logic.CreateSubscription(1, 1); * logic.CreateSubscription(2, 3); * logic.CreateSubscription(3, 2); * * logic.CreateUsername("DOMINATOR777", "Alfkf", "123456"); * logic.CreateUsername("PESHKANAVALNOGO1", "KotYa883", "pasLol"); * logic.CreateUsername("OPOZICIA", "flflfl", "loveGames"); * logic.CreateUsername("babushkinirecepti", "salambrodyagi", "lovefTest");*/ }
public void InitConnection() { this.mockconnectionrepo = new Mock <IRepository <OwnerSchoolConnector> >(); this.ml = new MainLogic(this.mockconnectionrepo.Object); List <OwnerSchoolConnector> mockconnections = new List <OwnerSchoolConnector>(); var connection = new OwnerSchoolConnector() { Connection_Id = 1, Owner_Id = 1, School_Id = 1, }; mockconnections.Add(new OwnerSchoolConnector() { Connection_Id = 1, Owner_Id = 1, School_Id = 1, }); mockconnections.Add(new OwnerSchoolConnector() { Connection_Id = 2, Owner_Id = 1, School_Id = 2, }); mockconnections.Add(new OwnerSchoolConnector() { Connection_Id = 3, Owner_Id = 2, School_Id = 3, }); this.mockconnectionrepo.Setup(repo => repo.ReadAll()).Returns(mockconnections); this.mockconnectionrepo.Setup(repo => repo.Read(It.IsAny <int>())).Returns(connection); }
void Start() { headAngles = new Vector3[numberOfMovements]; index = 0; startingAngle = Camera.main.transform.eulerAngles; InvokeRepeating("MeasureHeadAngle", 0f, .001f); InvokeRepeating("ResetMovement", 0f, 5f); dialogue = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <DialogueManager>(); logic = GameObject.FindGameObjectWithTag("MainLogic").GetComponent <MainLogic>(); choiceManager = new ChoiceManager(); choiceManager.setPersist(PlayerPrefs.GetInt("FirstItem", 0), PlayerPrefs.GetInt("SecondItem", 0), PlayerPrefs.GetInt("ThirdItem", 0), PlayerPrefs.GetInt("FourthItem")); GotoNext(0); if (current != null && current != this) { Destroy(this.gameObject); return; } else { current = this; } DontDestroyOnLoad(this.gameObject); }
public GameEvent(MainLogic mainLogic) { this.mainLogic = mainLogic; allPlayers = mainLogic.allPlayers; alivePlayers = mainLogic.alivePlayers; deadPlayers = mainLogic.deadPlayers; }
public SearchController() { CustomerDb = new CustomerRepository(); ProductDb = new ProductRepository(); RestaurantDb = new RestaurantRepository(); DeliveryAddressDb = new DeliveryAddressRepository(); ml = new MainLogic(); }
void ReturnBonusesToPool() { for (int i = 0; i < m_AllFlyingBonuses.Count; i++) { MainLogic.GetMainLogic().GetEntityManager().ReturnToPool(m_AllFlyingBonuses[i]); } m_AllFlyingBonuses.Clear(); }
public void MainTest() { var args = new String[] { "Integration Test/config.xml" }; //todo path to config MainLogic.Main(args); Assert.IsTrue(File.Exists("IT_Storage.csv")); }
void Update() { if (SceneManager.GetActiveScene().name == "InterviewRoom") { dialogue = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <DialogueManager>(); } logic = GameObject.FindGameObjectWithTag("MainLogic").GetComponent <MainLogic>(); }
public FormCreateRequest(MainLogic logic, ExceptionHandling exceptionHandling, IRequestLogic requestLogic, IFlowerLogic flowerLogic) { InitializeComponent(); this.logic = logic; this.requestLogic = requestLogic; this.flowerLogic = flowerLogic; this.exceptionHandling = exceptionHandling; }
static async Task Main(string[] args) { FileHelper.CreateStructure(); DoWproLadderApi.ApiUrl = "https://dowpro.cf/api"; Logger logger = new Logger(); await MainLogic.CheckPlayback(logger); }
public FormCreateOrder(IBouquetLogic logicB, ExceptionHandling exceptionHandling, MainLogic logicM, IClientLogic logicC) { InitializeComponent(); this.logicB = logicB; this.exceptionHandling = exceptionHandling; this.logicM = logicM; this.logicC = logicC; }
public FormCreateOrder(IKomlectLogic logicP, IClientLogic logicC, MainLogic logicM) { InitializeComponent(); this.logicP = logicP; this.logicC = logicC; this.logicM = logicM; this.logicC = logicC; }
void InitUI() { int level = MainLogic.GetMainLogic().GetLevelLogic().GetCurrentLevel(); int currScores = MainLogic.GetMainLogic().GetLevelLogic().GetCurrScores(); SetLevel(level); SetScores(currScores); }
public static bool EqualType(MainLogic.TILETYPE fType,MainLogic.TILETYPE sType) { if(fType == sType){ return true; } else if(fType == MainLogic.TILETYPE.Sword && sType == MainLogic.TILETYPE.Enemy){ return true; } else if (fType == MainLogic.TILETYPE.Enemy && sType == MainLogic.TILETYPE.Sword){ return true; } return false; }
public LengthenRoundTimeEvent(MainLogic mainLogic) : base(mainLogic) { ; }
public IncreaseMaxHealthEvent(MainLogic mainLogic) : base(mainLogic) { ; }
public DecreaseCurrentHealthEvent(MainLogic mainLogic) : base(mainLogic) { ; }
// Code to execute when the application is launching (eg, from Start) // This code will not execute when the application is reactivated private void Application_Launching(object sender, LaunchingEventArgs e) { mainLogic = new MainLogic(); mainLogic.LoadData(); }
public ShortenRoundTimeEvent(MainLogic mainLogic) : base(mainLogic) { ; }
// 初期化 void Start () { instance = this; // 大当たり抽選テーブルの初期化 var ATARI = Enumerable.Range(0, ATARI_NUM).Select(v => true); var HAZURE = Enumerable.Range(0, HAZURE_NUM).Select(v => false); NML_Chusen = ATARI.Concat(HAZURE).ToArray(); // 大当たり(確変)抽選テーブルの初期化 var KH_ATARI = Enumerable.Range(0, KH_ATARI_NUM).Select(v => true); var KH_HAZURE = Enumerable.Range(0, KH_HAZURE_NUM).Select(v => false); KH_Chusen = KH_ATARI.Concat(KH_HAZURE).ToArray(); // リーチライン抽選テーブルの初期化 // リーチライン抽選リストを65536個の配列に変換する RL_Chusen = reachLines.Select(rl=>RL2Sequence(rl)).SelectMany(rls=>rls).ToArray(); // リーチパターン抽選テーブルの初期化 RP_Chusen123 = reachPattern123.Select(rl => RP2Sequence(rl)).SelectMany(rls => rls).ToArray(); RP_Chusen4 = reachPattern4.Select(rl => RP2Sequence(rl)).SelectMany(rls => rls).ToArray(); // リーチ抽選(ハズレ)テーブルの初期化 var H0_REACH = Enumerable.Range(0, H0_HAZURE_REACH).Select(v => true); var H0_HAZURE = Enumerable.Range(0, H0_HAZURE_HAZURE).Select(v => false); H0_Chusen = H0_REACH.Concat(H0_HAZURE).ToArray(); var H12_REACH = Enumerable.Range(0, H12_HAZURE_REACH).Select(v => true); var H12_HAZURE = Enumerable.Range(0, H12_HAZURE_HAZURE).Select(v => false); H12_Chusen = H12_REACH.Concat(H12_HAZURE).ToArray(); var H3_REACH = Enumerable.Range(0, H3_HAZURE_REACH).Select(v => true); var H3_HAZURE = Enumerable.Range(0, H3_HAZURE_HAZURE).Select(v => false); H3_Chusen = H3_REACH.Concat(H3_HAZURE).ToArray(); // リーチパターン抽選(ハズレ)テーブルの初期化 H_Reach_Chusen = reachPatternHazure.Select(rp => RP2Sequence(rp)).SelectMany(rps => rps).ToArray(); // リーチパターン(大当たり)テーブルの初期化 Atari123_Chusen = reachPatternAtari123.Select(rp => RP2Sequence(rp)).SelectMany(rps => rps).ToArray(); Atari4_Chusen = reachPatternAtari4.Select(rp => RP2Sequence(rp)).SelectMany(rps => rps).ToArray(); }
// Use this for initialization void Start() { animation = GetComponent<Animator>(); mainlogic = FindObjectOfType<MainLogic>(); }
private void SetImage(MainLogic.TILETYPE myType) { tk2dSprite sprite = myTile.GetComponent<tk2dSprite>(); switch(myType){ case MainLogic.TILETYPE.Enemy: SettingEnemy(); //sprite.SetSprite(datas,"Enemy"); break; case MainLogic.TILETYPE.Sword: sprite.SetSprite(datas,"Sword"); SettingNotEnemy(); break; case MainLogic.TILETYPE.Wand: sprite.SetSprite(datas,"Wand"); SettingNotEnemy(); break; case MainLogic.TILETYPE.Coin: sprite.SetSprite(datas,"Coin"); SettingNotEnemy(); break; case MainLogic.TILETYPE.Potion: sprite.SetSprite(datas,"Potion"); SettingNotEnemy(); break; } }
public Communication(MainLogic mainLogic) { this.mainLogic = mainLogic; }