public static void Init_e(string name) { switch (name) { case "MAH": try { MAH.TopMost = true; MAH.Show(); } catch { MAH = new mahovik {TopMost = true}; MAH.Show(); } break; case "targetCtrl": try { targetCtrl.TopMost = true; targetCtrl.Show(); } catch { targetCtrl = new targetControl {TopMost = true}; targetCtrl.Show(); } break; case "OSC": try { OSC.TopMost = true; OSC.Show(); } catch { OSC = new Oscilloscope(@"graph\clean.txt") {TopMost = true}; OSC.Show(); } break; case "vi001": try { vi001.ShowDialog(); } catch { vi001 = new vi001 {Name = "vi001", Text = "ВИ-001"}; vi001.ShowDialog(); } break; case "uvch": try { uvch.ShowDialog(); } catch { uvch = new uvch {Name = "uvch", Text = "Блок УВЧ"}; uvch.ShowDialog(); } break; case "vi002": try { vi002.ShowDialog(); } catch { vi002 = new vi001 {Name = "vi002", Text = "ВИ-002"}; vi002.ShowDialog(); } break; case "bk008": try { bk008.ShowDialog(); } catch { bk008 = new bk008 {Name = "bk008", Text = "БК-008"}; bk008.ShowDialog(); } break; case "hlp": try { if (hlp.helpEnabled()) hlp.Show(); } catch { hlp = new helper(); } break; case "MAIN1": try { MAIN1.ShowDialog(); } catch { MAIN1 = new MAIN(); MAIN1.ShowDialog(); } break; case "bv012": try { bv012.ShowDialog(); } catch { bv012 = new bv012(); bv012.ShowDialog(); } break; case "bsh0031": try { bsh03.ShowDialog(); } catch { bsh03 = new bsh003(); bsh03.ShowDialog(); } break; case "bp103": try { bp13.ShowDialog(); } catch { bp13 = new bp103(); bp13.ShowDialog(); } break; case "bp1162": try { bp62.ShowDialog(); } catch { bp62 = new bp116(); bp62.ShowDialog(); } break; case "bp1161": try { bp61.ShowDialog(); } catch { bp61 = new bp116(); bp61.ShowDialog(); } break; case "bg0022": try { bg22.ShowDialog(); } catch { bg22 = new bg002(); bg22.ShowDialog(); } break; case "bg0021": try { bg21.ShowDialog(); } catch { bg21 = new bg002(); bg21.ShowDialog(); } break; case "bg0032": try { bg32.ShowDialog(); } catch { bg32 = new bg003(); bg32.ShowDialog(); } break; case "bg0031": try { bg31.ShowDialog(); } catch { bg31 = new bg003(); bg31.ShowDialog(); } break; case "bg0052": try { bg52.ShowDialog(); } catch { bg52 = new bg005(); bg52.ShowDialog(); } break; case "bg0051": try { bg51.ShowDialog(); } catch { bg51 = new bg005(); bg51.ShowDialog(); } break; case "bv0041": try { bv41.ShowDialog(); } catch { bv41 = new bv004(1); bv41.ShowDialog(); } break; case "bv0042": try { bv42.ShowDialog(); } catch { bv42 = new bv004(2); bv42.ShowDialog(); } break; case "bm0051": try { bm51.ShowDialog(); } catch { bm51 = new bm005(); bm51.ShowDialog(); } break; case "bm0061": try { bm61.ShowDialog(); } catch { bm61 = new bm005(); bm61.ShowDialog(); } break; case "bg0042": try { bg0042.ShowDialog(); } catch { bg0042 = new bg004(); bg0042.ShowDialog(); } break; case "bg0041": try { bg0041.ShowDialog(); } catch { bg0041 = new bg004(); bg0041.ShowDialog(); } break; case "bg0012": try { bg0012.ShowDialog(); } catch { bg0012 = new bg001(); bg0012.ShowDialog(); } break; case "bg0011": try { bg0011.ShowDialog(); } catch { bg0011 = new bg001(); bg0011.ShowDialog(); } break; case "br0072": try { br72.ShowDialog(); } catch { br72 = new br007(); br72.ShowDialog(); } break; case "br0071": try { br71.ShowDialog(); } catch { br71 = new br007(); br71.ShowDialog(); } break; case "bv0092": try { bv9kit2.ShowDialog(); } catch { bv9kit2 = new bv009(); bv9kit2.ShowDialog(); } break; case "bv0091": try { bv9kit1.ShowDialog(); } catch { bv9kit1 = new bv009(); bv9kit1.ShowDialog(); } break; case "bv41": try { bv41.ShowDialog(); } catch { bv41 = new bv004(1); bv41.ShowDialog(); } break; case "bv010": try { bv10.ShowDialog(); } catch { bv10 = new bv010(); bv10.ShowDialog(); } break; case "bk8": try { bk8.ShowDialog(); } catch { bk8 = new bk008(); bk8.ShowDialog(); } break; case "bv002": try { bv2dal.Name = "bv002"; bv2dal.ShowDialog(); } catch { bv2dal = new bv001 {Name = "bv002"}; bv2dal.ShowDialog(); } break; case "bv001": try { bv1.Name = "bv001"; bv1.ShowDialog(); } catch { bv1 = new bv001 {Name = "bv001"}; bv1.ShowDialog(); } break; case "bya1": try { bya1.ShowDialog(); } catch { bya1 = new bya001(); bya1.ShowDialog(); } break; case "br0042": try { br42.ShowDialog(); } catch { br42 = new br004(2); br42.ShowDialog(); } break; case "br0041": try { br41.ShowDialog(); } catch { br41 = new br004(1); br41.ShowDialog(); } break; case "bsh0011": try { BSH001.ShowDialog(); } catch { BSH001 = new bsh001(); BSH001.ShowDialog(); } break; case "bsh0021": try { BSH002.ShowDialog(); } catch { BSH002 = new bsh002(); BSH002.ShowDialog(); } break; case "bk0061": try { bk0061.ShowDialog(); } catch { bk0061 = new bk006(); bk0061.ShowDialog(); } break; case "bk0071": try { BK007.ShowDialog(); } catch { BK007 = new bk007(); BK007.ShowDialog(); } break; case "bt006": try { BT006.ShowDialog(); } catch { BT006 = new bt006(); BT006.ShowDialog(); } break; case "bk005": try { BK005.ShowDialog(); } catch { BK005 = new bk005(); BK005.ShowDialog(); } break; case "shp001": try { shp1.ShowDialog(); } catch { shp1 = new shp001(); shp1.ShowDialog(); } break; case "bp119": try { bp19.ShowDialog(); } catch { bp19 = new bp119(); bp19.ShowDialog(); } break; case "br0031": try { br0031.Name = "br31"; br0031.ShowDialog(); } catch { br0031 = new br003 {Name = "br31"}; br0031.ShowDialog(); } break; case "br0032": try { br0031.Name = "br32"; br0032.ShowDialog(); } catch { br0032 = new br003 {Name = "br32"}; br0032.ShowDialog(); } break; case "IKO": try { IKO.ShowDialog(); } catch { IKO = new IKO(); IKO.ShowDialog(); } break; case "shp002": try { shp2.ShowDialog(); } catch { shp2 = new shp002(); shp2.ShowDialog(); } break; case "tuts": try { tuts1.ShowDialog(); } catch { tuts1 = new tuts(); tuts1.ShowDialog(); } break; case "tuts2": try { bya1.Show(); tuts1.Show(); } catch { tuts1 = new tuts(); bya1 = new bya001(); bya1.Show(); tuts1.Show(); } break; } }
public LoginsList(MAIN instance) { InitializeComponent(); m_MainInstance = instance; GetLogins(); }
private void btnLogin_Click(object sender, EventArgs e) { oUser = new DataAccess.User(); oCommonFunction = new CommonFunction.CommonFunction(); if (oCommonFunction.Decrypt(oDefUser.USERNAME.Trim()) == txtUsername.Text && oCommonFunction.Decrypt(oDefUser.PASSWORD.Trim()) == txtPassword.Text) //Default Login { this.ShowInTaskbar = false; this.Hide(); oMainForm = new MAIN(txtUsername.Text, txtPassword.Text, oCommonFunction.Decrypt(oDefUser.FULLNAME), oCommonFunction.Decrypt(oDefUser.ROLE)); oMainForm.ShowDialog(); return; } else { #region CheckDatabase oDatabase = new DataAccess.BackupRestoreDB(); if (!oDatabase.IsDatabaseExits()) { oFrmMsgBox = new frmMessageBox(ePublicVariable.eVariable.TransactionMessage.THE_DATABASE_DOES_NOT_EXITS.ToString().Replace("_", " ")); oFrmMsgBox.m_MessageType = frmMessageBox.MESSAGE_TYPE.INFO; oFrmMsgBox.ShowDialog(); Maintenance.frmBackupRestoreDB oFrm = new Maintenance.frmBackupRestoreDB(); oFrm.ShowDialog(); } #endregion #region DBLogin if (oUser.IsLogin(txtUsername.Text.Trim(), txtPassword.Text.Trim())) { foreach (DataRow row in oUser.GetUser("username", txtUsername.Text).Rows) { oMUser = new Model.User(); oMUser.USERNAME = row[0].ToString(); oMUser.FULLNAME = row[1].ToString(); oMUser.PASSWORD = row[2].ToString(); oMUser.ROLE = row[3].ToString(); oMUser.CONTACT_NO = row[4].ToString(); oMUser.ADDRESS = row[5].ToString(); } this.ShowInTaskbar = false; this.Hide(); oMainForm = new MAIN(oMUser); oMainForm.ShowDialog(); return; } else { lblNotification.Text = "THE USERNAME AND PASSWORD YOU HAVE ENTERED ARE INCORRECT"; txtUsername.Focus(); } #endregion } }
/////////////////////////////////////////////// // внутрение функции static bool show(List <TutorialSubject> listSubjects) // показать сообщение или очередь сообщений (внутреняя функция!) { if (!MAIN.isTutorialEnable) { queueTutorialsSubject.Clear(); return(false); } if (queueTutorialsSubject.Count == 0) { return(false); } Debug.Log("█ список для отображения обучения обновлён: ========================"); for (int i = 0; i < listSubjects.Count; i++) { Debug.Log(" обучающая тема в списке №" + i + ": " + listSubjects[i]); } TutorialSubject subject = queueTutorialsSubject[0]; if (Errors.isShowing() || WaitingServerAnsver.isShowing()) { return(false); } if (isShowing()) { return(false); } WritingText wt = null; switch (subject) { case TutorialSubject.TS_ENTER_IN_ROOM: { var targetT = GameObject.Find("playBtn").transform; frame.setTarget(targetT.gameObject, true); wt = WritingText.create("Нажмите для начала игры.", new Vector2(targetT.position.x, targetT.position.y - 3.5f), new Vector2(530.0f, 200.0f), 0.05f); } break; case TutorialSubject.TS_CHOOSE_COUNT_TICKETS: { GameObject ticketsButtonsGO = GameObject.Find("CountTicketsButtons"); if (ticketsButtonsGO == null) { Errors.showTest("<< TestError >> Не найдены кнопки radioButton(а)"); return(false); } //var targetT = ticketsButtonsGO.transform.GetChild(3); frame.setTarget(ticketsButtonsGO, true); wt = WritingText.create("Выбирете количество билетов в розыгрыше.\nНажмите для выбора.", new Vector2(ticketsButtonsGO.transform.position.x, ticketsButtonsGO.transform.position.y - 2.7f), new Vector2(900.0f, 300.0f)); } break; case TutorialSubject.TS_BUY_TICKETS: { var targetT = GameObject.Find("buyTicketsBtn").transform; frame.setTarget(targetT.gameObject, true); wt = WritingText.create("Нажмите для покупки выбранных билетов.", new Vector2(targetT.position.x, targetT.position.y + 0.6f), new Vector2(800.0f, 200.0f), 0.035f); frame.hideImmeaiately = true; } break; case TutorialSubject.TS_TEMPLEATES: { if (WindowController.isShowing()) { WindowController.hideCurrentWindow(); } var targetT = GameObject.Find("TemplatesHolder").transform; frame.setTarget(targetT.gameObject); prevTimeScale = Time.timeScale; MAIN.setGameTimeSpeed(0.05f, 1.0f); wt = WritingText.create("Цветными точками показаны возможные комбинации выигрышей.\nНиже - ожидаемый выигрыш прямо сейчас.", new Vector2(targetT.position.x, targetT.position.y - 4.0f), new Vector2(1300.0f, 500.0f), 0.0035f); } break; case TutorialSubject.TS_PREVIN: { if (WindowController.isShowing()) { WindowController.hideCurrentWindow(); } var aureols = GameObject.FindGameObjectsWithTag("aureols"); var withOut = GameObject.FindGameObjectsWithTag("missingBall"); if (aureols.Length == 0) { Errors.showTest("Ошибка обучения, не найдены предвыиграшные шаблоны"); return(false); } GameObject[] targets = new GameObject[aureols.Length + withOut.Length]; for (int i = 0; i < aureols.Length; i++) { targets[i] = aureols[i].gameObject.transform.parent.gameObject; } for (int i = 0; i < withOut.Length; i++) { targets[i + aureols.Length] = withOut[i].gameObject; } //for (int i = 0; i < targets.Length; i++) frame.setTargets(false, targets); wt = WritingText.create("Обратите внимание на мигающий шар - именно его не хватает до заполнения линии и получения выигрыша!", new Vector2(0.0f, -4.0f), new Vector2(1050.0f, 300.0f), 0.025f); prevTimeScale = Time.timeScale; MAIN.setGameTimeSpeed(0.05f, 1.0f); } break; case TutorialSubject.TS_BUY_BALL: { //if (!HUD.getBuyBallButton().isActiveAndEnabled ) return false; if (HUD.isPlaingAnim()) { Debug.Log("█ HUD.isPlaingAnim()"); queueTutorialsSubject.Remove(TutorialSubject.TS_BUY_BALL); return(false); } if (WindowController.isShowing()) { WindowController.hideCurrentWindow(); } var targetT = GameObject.Find("buyBallBtn").transform; if (targetT == null) { queueTutorialsSubject.Remove(TutorialSubject.TS_BUY_BALL); return(false); } frame.setTarget(targetT.gameObject, true); wt = WritingText.create("Нажмите,чтобы испытать удачу\nи найти недостающие шары!)", new Vector2(targetT.position.x - 1.0f, Screen.height * 0.001f - 3.4f), new Vector2(650.0f, 200.0f), 0.025f); } break; case TutorialSubject.TS_BUY_GOLD_BTN: { if (WindowController.isShowing()) { WindowController.hideCurrentWindow(); } var targetT = GameObject.Find("moneyBtn").transform; frame.setTarget(targetT.gameObject, true); //frame.setScreenTouch( true ); wt = WritingText.create("Чтобы раздобыть еще золота - загляните в магазин", new Vector2(targetT.position.x + 2.0f, targetT.position.y + 0.5f), new Vector2(1200.0f, 300.0f), 0.05f); frame.dontShowTip = true; //Debug.Log("█ [in create] tipWasShow == " + frame.tipWasShow); } break; case TutorialSubject.TS_BUY_GOLD: { if (!wasShowed(TutorialSubject.TS_BUY_GOLD_BTN)) { queueTutorialsSubject.Remove(TutorialSubject.TS_BUY_GOLD_BTN); queueTutorialsSubject.Remove(TutorialSubject.TS_BUY_GOLD); return(false); } var goldBtns = GameObject.FindGameObjectsWithTag("exchangeGoldBtns"); if (goldBtns.Length == 0) { return(false); } var targetT = goldBtns[0].transform;; frame.setTarget(targetT.gameObject, true); wt = WritingText.create("Для покупки золота нужны\nкристаллы. Попробуйте", new Vector2(targetT.position.x, Screen.height * 0.001f + 2.5f), new Vector2(550.0f, 300.0f), 0.05f); } break; case TutorialSubject.TS_EXIT: { if (ScenesController.currentScene != GameScene.RAFFLE) { queueTutorialsSubject.Remove(TutorialSubject.TS_EXIT); Debug.Log("█ TS_EXIT когда не в розыгрыше"); for (int i = 0; i < queueTutorialsSubject.Count; i++) { Debug.Log("в очереди:[" + i + "]" + queueTutorialsSubject[i]); } return(show(queueTutorialsSubject)); } var targetT = GameObject.Find("backBtn").transform; frame.setTarget(targetT.gameObject, true); wt = WritingText.create("Нажмите,чтобы начать\nновый розыгрыш. Удачи вам!", new Vector2(targetT.position.x - 3.0f, targetT.position.y - 2.8f), new Vector2(550.0f, 400.0f), 0.04f); } break; case TutorialSubject.TS_TUTORIAL_REPEAT: { var targetT = GameObject.Find("settingsBtn").transform; frame.setTarget(targetT.gameObject, true); frame.setScreenTouch(true); wt = WritingText.create("Обучение завершенно! Повторный курс и\nпрочие возможности можно найти здесь.\nДля продолжения коснитесь екрана...", new Vector2(targetT.position.x + 4.0f, targetT.position.y - 3.0f), new Vector2(800.0f, 400.0f), 0.04f); } break; } if (wt != null) { wt.transform.SetParent(frame.transform); } //prevActualMask = MAIN.getMain.actualInputLayer; //MAIN.getMain.actualInputLayer = LayerMask.GetMask("Tutorial"); frame.mySubject = subject; frame.show(subject); ScenesController.updateGetActualInputLayer(); //------------[ save ]-------------- showedTutorialSubjectsMask |= (int)subject; PlayerPrefs.SetInt("showedTutorialSubjects", showedTutorialSubjectsMask); return(true); }
//--------------------------------------------------------------------------- private void btLevel_Click(object sender, RoutedEventArgs e) { MAIN.fn_ShowPassword(); }