protected void Submit_Click(object sender, EventArgs e) { DirectionController dc = new DirectionController(); dc.Insert(txtDirectionTitle.Text, chkDefault.Checked); Response.Redirect("ListDirection.aspx"); }
protected void Page_Load(object sender, EventArgs e) { DirectionController dc = new DirectionController(); rptDirections.DataSource = dc.GetDirections(); rptDirections.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { LanguageController lc = new LanguageController(); ddlLanguageID.DataSource = lc.GetLanguages(); ddlLanguageID.DataTextField = "LanguageTitle"; ddlLanguageID.DataValueField = "LanguageID"; ddlLanguageID.DataBind(); ddlLanguageID.Items.Insert(0, new ListItem("Root Language", "0")); DirectionController dc = new DirectionController(); ddlDirectionID.DataSource = dc.GetDirections(); ddlDirectionID.DataTextField = "DirectionTitle"; ddlDirectionID.DataValueField = "DirectionID"; ddlDirectionID.DataBind(); ddlDirectionID.Items.Insert(0, new ListItem("Root Direction", "0")); MenuController cc = new MenuController(); ddlParentID.DataSource = cc.GetParentMenus(); ddlParentID.DataTextField = "Title"; ddlParentID.DataValueField = "MenuID"; ddlParentID.DataBind(); ddlParentID.Items.Insert(0, new ListItem("Root Menu", "0")); int num = 0; chkPublished.Checked = true; txtMenuOrder.Text = num.ToString(); } }
protected void Edit_Click(object sender, EventArgs e) { Uri myUri = new Uri(Request.Url.ToString()); string DirectionID = HttpUtility.ParseQueryString(myUri.Query).Get("ID"); DirectionController dc = new DirectionController(); dc.Update(int.Parse(DirectionID), txtDirectionTitle.Text, chkDefault.Checked); Response.Redirect("ListDirection.aspx"); }
protected override void OnInstantiate() { fsm = new UnitStateFSM(this); if (!direction_controller) { direction_controller = GameObject.Find("DirectionController").GetComponent <DirectionController>(); direction_controller.gameObject.SetActive(false); } //InitializeVariables(); }
protected void Delete_Click(object sender, EventArgs e) { LinkButton btn = (LinkButton)sender; int DirectionID = int.Parse(btn.CommandArgument); DirectionController dc = new DirectionController(); dc.DeleteDirection(DirectionID); rptDirections.DataSource = dc.GetDirections(); rptDirections.DataBind(); }
// ルート探索ボタン押下時に呼び出されるメソッド public void RouteSearch() { SelectedObj = eventSystem.currentSelectedGameObject.gameObject; SelectedParentObj = SelectedObj.transform.parent.gameObject; GoalLocationInfo = SelectedParentObj.GetComponent <NamePanelTable>().Location; // GoalLocationInfo = NamePanelTable.Location; Debug.Log("(1)GoalLocationInfo: " + GoalLocationInfo); GoalFlag = true; Script = DirectionMapAPIManager.GetComponent <DirectionController>(); Script.GoalSearch(); }
// Start is called before the first frame update void Start() { movementController = GetComponent <MovementController>(); dashController = GetComponent <DashController>(); heightController = GetComponent <HeightController>(); directionController = GetComponent <DirectionController>(); orderedControllers.Add(dashController); orderedControllers.Add(heightController); orderedControllers.Add(movementController); orderedControllers.Add(directionController); }
private void Awake() { Instance = this; _controllers = new GameObject { name = "AllControllers" }; _directionController = _controllers.AddComponent <DirectionController>(); _cameraMover = GameObject.Find("Main Camera").GetComponent <CameraMover>(); _player = Instantiate(Player); _pause = GameObject.Find("UI").GetComponent <Pause>(); _data = gameObject.GetComponent <Data>(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DirectionController dc = new DirectionController(); //Check if no paratmeter exist, redirect to list page. Uri myUri = new Uri(Request.Url.ToString()); string DirectionID = HttpUtility.ParseQueryString(myUri.Query).Get("ID"); if (DirectionID == null) { Response.Redirect("/UserControl/Template/Directions/ListDirection.aspx"); } dc.GetDirection(int.Parse(DirectionID)); txtDirectionTitle.Text = dc.DirectionTitle; chkDefault.Checked = dc.DefaultDirection; } }
void UIInitialize() { _controller = DirectionController.Factory.Create(); var controllerPosition = new Vector2(); controllerPosition.x = Screen.width / 2; controllerPosition.y = Screen.height * 0.15f; _controller.SetInitialPosition(controllerPosition); var uiSystem = FindObjectOfType <UISystem>(); uiSystem.AttachUI(_controller.gameObject); _playButton = Instantiate(Resources.Load("Prefabs/PlayButton")) as GameObject; var buttonPosition = Camera.main.ScreenToWorldPoint(controllerPosition + new Vector2(0, 100)); buttonPosition.z = 0; _playButton.transform.position = buttonPosition; _playButton.GetComponent <Button>().onClick.AddListener(OnPlayButtonClicked); uiSystem.AttachUI(_playButton); _homeButton = Instantiate(Resources.Load("Prefabs/HomeButton")) as GameObject; var homeButtonPosition = Camera.main.ScreenToWorldPoint(new Vector3(Screen.width * 0.1f, Screen.height * 0.1f, 0)); homeButtonPosition.z = 0; _homeButton.transform.position = homeButtonPosition; _homeButton.GetComponent <Button>().onClick.AddListener(OnHomeButtonClicked); uiSystem.AttachUI(_homeButton); _title = Instantiate(Resources.Load("Prefabs/Title")) as GameObject; var titlePosition = Camera.main.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height * 0.8f, 0)); titlePosition.z = 0; _title.transform.position = titlePosition; uiSystem.AttachUI(_title); _curtain = Instantiate(Resources.Load("Prefabs/Curtain")) as GameObject; _scoreTitle = GameObject.Find("Canvas/ScoreTitle"); _timeText = GameObject.Find("Canvas/Time"); _score = GameObject.Find("Canvas/Score"); }
protected override void _Link() { Papet.InputProcess += FSMControl; Papet.FSM.AddState(new State("Idle", StateMode.BlackList, "")); Papet.FSM.AddState(new State("Move", StateMode.BlackList, "") { PhysicsProcessAction = Move }); Papet.FSM.AddState(new State("Jump", StateMode.WhiteList, "Idle") { InAction = Jump, PhysicsProcessAction = OffJump }); Papet.FSM.SwitchState("Idle"); _DirectionController = new DirectionController(Papet.FSM, 2f); }
private void LocalClient_DownloadDataCompleted(object sender, System.Net.DownloadDataCompletedEventArgs e) { try { string json = Encoding.UTF8.GetString(e.Result); var googleDirection = JsonConvert.DeserializeObject <GoogleDirection>(json); PolylineOptions po = DirectionController.ResolveRoute(googleDirection); RunOnUiThread(() => { mProgressBar.Visibility = ViewStates.Invisible; mMap.AddPolyline(po); }); } catch (Exception ex) { Console.WriteLine("** Error ** : El servidor Google Route no devolvio valores correctos /n " + ex.Message); } }
void Awake() { _instance = this; }
static void Main(string[] args) { if (args.Length > 1) { Console.WriteLine("Too many arguments"); PrintHelp(); return; } if (args.Length == 0) { Console.WriteLine("Too few arguments"); PrintHelp(); } else { switch (args[0]) { case "start": if (!PrintConnectionStatus()) { break; } Console.WriteLine($"Start parser - {DateTime.Now}"); cursorTop = Console.CursorTop; cursorLeft = Console.CursorLeft; Parser.ChangeCount += Parser_ChangeCount; if (!Parser.Parse(50)) { Console.WriteLine($"Parsing error: {Parser.Error}"); break; } Console.WriteLine($"Search completed. Found: {Parser.CurrentCount} - {DateTime.Now}"); Console.WriteLine("Start save data to database"); if (!DirectionController.InsertDirections(Parser.Directions)) { Console.WriteLine("Save data to database error. Check connection and make sure the table exists"); break; } else { Console.WriteLine("Data saved сuccessfully"); } long?checksum = DirectionController.GetCheckSUMDirections(); if (checksum == null) { Console.WriteLine("Error getting checksum. Check connection and make sure the table exists"); break; } else { Console.WriteLine($"Checksum: {checksum} - {DateTime.Now}"); } Console.WriteLine($"Complete: Found {Parser.Directions.Where(x => x.From != null && x.To != null).Count()}/{Parser.Directions.Count} with checksum {checksum} - {DateTime.Now}"); break; case "help": PrintHelp(); break; default: Console.WriteLine("Unknown argument"); PrintHelp(); break; } } Console.Write("Press any key to exit"); Console.ReadKey(); }
private void Awake() { projectileController = GetComponent <ProjectileController>(); propulsionController = GetComponent <PropulsionController>(); directionController = GetComponent <DirectionController>(); }