private void btnSave_Click(object sender, EventArgs e) { var maping = new Maping(); maping.ElementByClassName = txtByClass.Text; maping.ElementById = txtById.Text; maping.ElementByIndex = (int)numByIndex.Value; maping.ElementByTagName = txtByTag.Text; maping.FieldInDb = txtFieldDb.Text; MapInfo(maping); DialogResult = DialogResult.OK; }
private void OnGetMapinfo(Maping obj) { if (chkMaps.InvokeRequired) { chkMaps.BeginInvoke(new MethodInvoker(() => { chkMaps.Items.Add(obj); })); } else { chkMaps.Items.Add(obj); } }
void Start() { B.Assert(zInstance == null); zInstance = this; // Find objects in scene, init references failText = GameObject.Find("FailText"); lightController = FindObjectOfType <LerpMap>(); // assume unique mapper = FindObjectOfType <Maping>(); player = GameObject.Find("Player").GetComponent <Assets.BasicMovement>(); tombstone = GameObject.Find("Tombstone"); winText = GameObject.Find("WinText"); B.Assert(player != null && lightController != null && tombstone != null); // ^Could use Resources.Load() here instead, but since both the player and tombstone are unique, we might as well just preplace them in the scene StartClock(); }
private void btnMapView_Click(object sender, EventArgs e) { Maping info = null; if (chkMaps.SelectedItem != null) { info = chkMaps.SelectedItem as Maping; } else { if (chkMaps.CheckedItems.Count > 0) { info = chkMaps.CheckedItems[0] as Maping; } } if (info != null) { string msg = string.Format( "FieldInDb: {0}\r\nContentByIdOrName: {1}\r\nConentByTagName: {2}\r\nContentByClassName: {3}\r\nContentByIndex: {4}" , info.FieldInDb, info.ElementById, info.ElementByTagName, info.ElementByClassName, info.ElementByIndex); MessageBox.Show(msg); } }
void Start() { B.Assert(zInstance == null); zInstance = this; // Find objects in scene, init references failText = GameObject.Find("FailText"); lightController = FindObjectOfType<LerpMap>(); // assume unique mapper = FindObjectOfType<Maping>(); player = GameObject.Find("Player").GetComponent<Assets.BasicMovement>(); tombstone = GameObject.Find("Tombstone"); winText = GameObject.Find("WinText"); B.Assert(player != null && lightController != null && tombstone != null); // ^Could use Resources.Load() here instead, but since both the player and tombstone are unique, we might as well just preplace them in the scene StartClock(); }