static void Main(string[] args) { Singleton.Instance.OpenSession();//открываем сессию CreateBeginItem(); int key; bool tmp = true; while (tmp) { PrintCMD.MenuUP(); key = PrintCMD.ReadKey(); switch (key) { case 1: Controll.Genre(); break; case 2: Controll.Actor(); break; case 3: Controll.Film(); break; case 0: tmp = false; break; } } }
private void btnEntrar_Click(object sender, EventArgs e) { //instancia uma classe Controll para controlar meu formulário Controll controle = new Controll(); //pega os campos da tela string usuario = txtUsuario.Text; string senha = txtSenha.Text; //faz a busca para verificar se o login é correto ou não controle.acessarLogin(usuario, senha); //se o login não estiver correto igual ao banco de dados if (controle.verificaLogin == false) { MessageBox.Show("Erro de Login! Tente novamente.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Error); txtSenha.Clear(); txtUsuario.Clear(); txtUsuario.Focus(); } //se estiver correto else { MessageBox.Show("BEM-VINDO!", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); frmLogin.ActiveForm.Close(); } }
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { status = Controll.AddNew; txtMaPhieuThue.Text = ThamSo.LayPhieuNhan().ToString(); ctpnctrl.HienThi(dataGridViewX1, txtMaPhieuThue.Text); this.Allow(true); }
private void btnThemPhieuNhan_Click(object sender, EventArgs e) { status = Controll.AddNew; txtMaNhanPhong.Text = ThamSo.LayPhieuNhan().ToString(); ctpnctrl.HienThi(dataGridViewX1, txtMaNhanPhong.Text); this.Allow(true); }
private void toolLuuThoat_Click(object sender, EventArgs e) { bindingNavigatorPositionItem.Focus(); this.Luu(); status = Controll.Normal; this.Allow(false); }
private void btnCadastrar_Click(object sender, EventArgs e) { //instancia uma classe Controll para controlar meu formulário Controll controle = new Controll(); //pega os campos da tela string usuario = txtUsuario.Text; string senha = txtSenha.Text; //chama a função para tentar inserir o usuario controle.criarLogin(usuario, senha); MessageBox.Show(controle.mensagem, "Retorno", MessageBoxButtons.OK, MessageBoxIcon.Information); //Se conseguir criar o usuario, fecho a tela if (controle.loginInserido == true) { this.Close(); } //se não limpa os campos para tentar + 1 vez else { txtSenha.Clear(); txtUsuario.Clear(); txtUsuario.Focus(); } }
private void toolLuu_Them_Click(object sender, EventArgs e) { ctrlPhieuBan = new PhieuBanController(); status = Controll.AddNew; txtMaPhieu.Text = ThamSo.LayMaPhieuBan().ToString(); numTongTien.Value = 0; ctrlChiTiet.HienThiChiTiet(dgvDanhsachSP, txtMaPhieu.Text); this.Allow(true); }
public void Initialize(PoolEditorModel model, ScenePrefabImporterView sceneImportView) { Model = model; _updatersList = new ControllVerticalLayout("CN Box"); var updatersScroll = new ControllScrollView(_updatersList); var selectAllBtn = new ControllButton("Select all", EditorStyles.toolbarButton); selectAllBtn.AddLayoutOptions(GUILayout.MaxWidth(100)); selectAllBtn.EventClick += SelectAllBtn_EventClick; var tollbar = new ControllHorizontalLayout("toolbar", selectAllBtn, new ControllFlexibleSpace()); var updatersLayout = new ControllVerticalLayout("box", updatersScroll, tollbar); var editModeToggle = new ControllToggle("Edit mode", false, "Button"); editModeToggle.EventChanged += EditModeToggle_EventChanged; var proxyUpdateControll = new InternalControllUpdate(new ControllVerticalLayout(updatersLayout, editModeToggle)); proxyUpdateControll.EventBeforeDraw += UpdateUpdaterList; // create tabs view var generalTab = new TabView("Edit mode", proxyUpdateControll); var removeObjectsBtn = new ControllButton("Remove selected object"); removeObjectsBtn.EventClick += () => { EventRemoveObjects?.Invoke(); }; var objectsEdit = new TabView("Edit objects", removeObjectsBtn); var importingButton = new TabView("Scene importing", sceneImportView); var tabsControll = new ControllTabView(generalTab, objectsEdit, importingButton); _mainControll = tabsControll; var createBtn = new ControllButton("Create root"); createBtn.EventClick += () => { EventCreateRoot?.Invoke(); }; _createRootControll = createBtn; }
void Awake() { L = Screen.height / 2 / 14; GameObject g = GameObject.Find("Main Camera"); CameraControll = g.GetComponent <Controll> (); CameraTraform = g.GetComponent <Transform> (); camera = g.GetComponent <Camera> (); cameraupdate(); }
public ControllUpdaterActivity() : base(null) { _toggle = new ControllToggle("", false); var obj = new ControllObjectFieldAccess <Object>("", () => UpdaterStateInstance.Updater as Object, t => { }); _toggle.AddLayoutOptions(GUILayout.MaxWidth(20)); _layout = new ControllHorizontalLayout("CN Box", _toggle, obj); _layout.AddLayoutOptions(GUILayout.MaxHeight(20)); _layout.AddLayoutOptions(GUILayout.MinHeight(20)); }
private void toolLuuThem_Click(object sender, EventArgs e) { ctrl = new PhieuNhapController(); status = Controll.AddNew; txtMaPhieu.Text = ThamSo.LayMaPhieuNhap().ToString(); numTongTien.Value = 0; numDaTra.Value = 0; numConNo.Value = 0; ctrlMaSP.HienThiChiTietPhieuNhap(txtMaPhieu.Text, dataGridView); this.Allow(true); }
/*********************** END OF VARIABLES ***********************/ private void Start() { GM = GameObject.Find("GameManager").GetComponent <GameManager>(); controll = gameObject.GetComponent <Controll>(); scaleSpeed = 1f; enemyPoints = 1; lifePoints = 10; SetFace(); }
private void Awake() { if (instance == null) { DontDestroyOnLoad(this.gameObject); instance = this; } else { Destroy(this.gameObject); } characterBox = gameObject.GetComponent<BoxCollider2D>(); boundBox = GameObject.FindGameObjectWithTag("Background").GetComponent<BoxCollider2D>(); }
void Start() { spawer = new Spawer1(); ammo = new Ammo1(); //Debug.Log (spawer.getPrefab()); gun = Object.Instantiate(spawer.getPrefab(), transform, false); L = (Screen.height / 2) / 14; GameObject g = GameObject.Find("Main Camera"); CameraControll = g.GetComponent <Controll> (); CameraTraform = g.GetComponent <Transform> (); camera = g.GetComponent <Camera>(); DirectionLine = GetComponent <LineRenderer> (); }
private void saveToolStripButton_Click(object sender, EventArgs e) { bindingNavigatorPositionItem.Focus(); this.Luu(); status = Controll.Normal; this.Allow(false); foreach (DataGridViewRow row in dataGridViewX1.Rows) { if (row.Cells["MaPhong"].Value != null) { String maphong = row.Cells["MaPhong"].Value.ToString(); PhongData.CapNhatMaLoaiTinhTrangPhong(maphong, 3); } } }
private void toolStripluu_Click(object sender, EventArgs e) { bindingNavigatorPositionItem.Focus(); this.Luu(); status = Controll.Normal; this.Allow(false); foreach (DataGridViewRow row in dataGridViewX1.Rows) { if (row.Cells["MaPhong"].Value != null) { String maphongt = row.Cells["MaPhong"].Value.ToString(); QUANLYKHACHSAN.DataPlayer.PhongData.CapNhatMaLoaiTinhTrangPhong(maphongt, 2); } } }
// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { if (Fighter == null) { Fighter = animator.gameObject.GetComponent <Controll>(); } if (Fighter2 == null) { Fighter2 = animator.gameObject.GetComponent <Controll2>(); } if (soundEff != null) { if (Fighter != null) { Fighter.PlaySound(soundEff); } if (Fighter2 != null) { Fighter2.PlaySound(soundEff); } } if (Fighter != null) { damageColli_Player1 = GameObject.Find("Player1").GetComponentInChildren <DamageCollider>(); if (damageColli_Player1 != null) { damageColli_Player1.Damage = damage; } FighterAnimatorBegin(Fighter.gameObject, "Player2", animator, stateInfo, layerIndex); } if (Fighter2 != null) { DamageCollider damageColli = GameObject.Find("Player2").GetComponentInChildren <DamageCollider>(); if (damageColli_Player2 != null) { damageColli.Damage = damage; } FighterAnimatorBegin(Fighter2.gameObject, "Player1", animator, stateInfo, layerIndex); } }
public MemoryGame(int i_Rows, int i_Columns, string i_FirstPlayer, string i_SecondPlayer, bool i_VersusComputer) { m_RowsOFCells = i_Rows; m_ColumnsOfCells = i_Columns; m_UserChoice = eCellChoice.FirstChoice; this.Size = new Size(110 * i_Columns, 110 * i_Rows + 150); this.FormBorderStyle = FormBorderStyle.FixedToolWindow; this.StartPosition = FormStartPosition.CenterScreen; this.AutoSize = true; InitializeComponent(); m_Game = new Controll(i_FirstPlayer, i_SecondPlayer, i_Rows, i_Columns, i_VersusComputer); CreateArrayOfCoordinates(); m_FormArrayOfControls = new Control[m_RowsOFCells, m_ColumnsOfCells]; m_VersusComputer = i_VersusComputer; ShowDialog(); }
void Start() { // 메리가 있으면 메리 추가 if (GameObject.FindWithTag("Mary") != null) { player = GameObject.FindWithTag("Mary").gameObject; controll = player.GetComponent <Controll>(); } dialogueButton = transform.Find("Dialogue Button").gameObject; dialogueData = CSVReader.Read(txtFile); dialogueUI = GameObject.Find("Dialogue UI"); dialogueBox = dialogueUI.transform.Find("Dialogue Box").GetComponent <Image>(); txt = dialogueBox.transform.Find("Dialogue Text").GetComponent <Text>(); panel = dialogueUI.transform.Find("Dialogue Panel").GetComponent <Image>(); print(dialogueData.Count); }
public void StartLerp(Vector3 startPos, Vector3 targetPos, float speed) { StartPos = startPos; TargetPos = targetPos; Speed = speed; Distance = Vector3.Distance(startPos, targetPos); StartTime = Time.time; conObject = GameMaster.getGameMaster().GetComponent <Controll>(); conObject.startTeleporting(targetPos - startPos); Lerping = true; //ObjectPool.getObjectPool().getObject(ObjectPool.categorie.essential, (int)ObjectPool.essential.camera).GetComponent<justLook>().objectToLookAt = gameObject; gameObject.GetComponent <Player>().MeshRenderer.enabled = false; teleportationBall = ObjectPool.getObjectPool().getObject(ObjectPool.categorie.explosion, (int)ObjectPool.explosion.heroTeleportBall); lookedATarget = false; }
// Update is called once per frame void Update() { while (_queue.Count > 0) { QueueMessage message = _queue.Dequeue(); if (message.topic == "player_joined") { PlayerInfo info = message.payload.ToObject <PlayerInfo>(); CreatePlayer(info); } else if (message.topic == "on_connect") { PlayersList players = message.payload.ToObject <PlayersList>(); foreach (PlayerInfo info in players.players) { CreatePlayer(info); } } else if (message.topic == "player_leave") { PlayerInfo info = message.payload.ToObject <PlayerInfo>(); DestroyPlayer(info); } else if (message.topic == "movement") { PlayerInfo info = message.payload.ToObject <PlayerInfo>(); MovePlayer(info); } } while (_controllQueue.Count > 0) { Controll controll = _controllQueue.Dequeue(); _ch.Push("controll", new Dictionary <string, object>() { { "x", controll.x }, { "y", controll.y }, }); } if (Input.GetKeyDown(KeyCode.W)) { MoveTop(); } if (Input.GetKeyDown(KeyCode.D)) { MoveRight(); } if (Input.GetKeyDown(KeyCode.S)) { MoveDown(); } if (Input.GetKeyDown(KeyCode.A)) { MoveLeft(); } }
public PhieuDangKy(PhieuThuePhongControl ctrlPT) : this() { this.ctrl = ctrlPT; status = Controll.Normal; }
public PhieuDangKy() { InitializeComponent(); status = Controll.AddNew; }
public PhieuNhanPhong() { InitializeComponent(); status = Controll.AddNew; }
void Start() { Text1 = Text.GetComponent <Text>(); Cont = this.GetComponent <Controll>(); SW = Cont.ReturnSW(); }
public void OpenFile(string rowId) { //MessageBox.Show($"rel path: {relativePath} rowid:{rowId}, sqltablename: {sqlTableName}"); Controll.SearchFileInFileExplorer(relativePath, rowId, sqlTableName); }
public PhieuNhanPhong(PhieuNhanPhongControl ctrlPN) : this() { this.ctrl = ctrlPN; status = Controll.Normal; }
public frmBanSi(PhieuBanController ctrlPB) : this() { this.ctrlPhieuBan = ctrlPB; status = Controll.Normal; }
private void toolChinhSua_Click(object sender, EventArgs e) { status = Controll.Edit; this.Allow(true); }
public frmBanSi() { InitializeComponent(); status = Controll.AddNew; }