public JsonResult ViewExamTypeandQuesType() { ResultInfo <QuestionPanel> ResultInfo = new ResultInfo <QuestionPanel>() { Status = false, Description = "Failed|Login" }; QuestionPanel obj = new QuestionPanel(); Social_Student PageObj = new Social_Student(); User_Backend bck = new User_Backend(); obj.ExamTypeDetails = PageObj.ViewExamType(); obj.typeOfQues = bck.GetQuestionType(); ResultInfo.Info = obj; if (ResultInfo.Info != null) { ResultInfo.Description = "Success| Get Results"; ResultInfo.Status = true; } return(Json(ResultInfo, JsonRequestBehavior.AllowGet)); }
public void OnResetButtonClicked() { QuestionPanel.Show("Do you want to save the game?", () => { // ez a QuestionPanel YesAction-je /* * string fileName = DateTime.Now.ToString("yyyy-dd-M--HH-mm-ss") + ".txt"; * string path = Application.dataPath; * * Debug.Log(path); * * DirectoryInfo di = new DirectoryInfo(Path.Combine(path, "Games")); * if (!di.Exists) * di.Create(); * * * Debug.Log(Path.Combine(di.FullName, fileName)); * Debug.Log("Mentve"); * var sr = File.CreateText(Path.Combine(di.FullName, fileName)); * //sr.WriteLine(JsonUtility.ToJson(tables)); * JsonSerializerSettings settings = new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.All }; * // sr.WriteLine(JsonConvert.SerializeObject(new MainMenuManager.SerializableObjects(), settings)); * * sr.WriteLine(JsonConvert.SerializeObject(CommandProcessor.Instance.getStackToSave(), settings)); * sr.Close();*/ GameSaveDataHolder gsdh = GameObject.FindGameObjectWithTag("GameSaveDataHolder").GetComponent <GameSaveDataHolder>(); gsdh.SaveToJSON(); CommandProcessor.Instance.CmdResetServerCommand(); LogManager.Instance.RpcShowLogPopup("Game saved"); }, () => { // ez a questionPanel NoAction-je CommandProcessor.Instance.CmdResetServerCommand(); }); }
public ForEmployee(string id) { InitializeComponent(); Settings.ForeColor = Color.FromArgb(227, 213, 212); Question.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = NewDelivery.Height; NavPanel.Top = NewDelivery.Top; NavPanel.Left = NewDelivery.Left; NewDelivery.ForeColor = Color.FromArgb(217, 35, 73); NewDelivery.Image = Properties.Resources.NewDelivery_on; NamePanel.Text = "Новая доставка"; UserID = id; connection = new SqlConnection(connectionString); connection.Open(); string query = $"SELECT [id] FROM [Delivery service employee] WHERE [user id]={UserID}"; cmd = new SqlCommand(query, connection); empid = cmd.ExecuteScalar().ToString(); connection.Close(); UpdateProfile(); UpdateDelivery(); NewDeliveryPanel.Show(); NewDeliveryPanel.Location = loc; ProfilePanel.Hide(); QuestionPanel.Hide(); InfoPanel.Hide(); MyDeliveryPanel.Hide(); }
void Awake() { mNetworkManager = FindObjectOfType <NetworkManager>(); mDialogueManager = FindObjectOfType <DialogueManager>(); mQuestionPanel = FindObjectOfType <QuestionPanel>(); mManager = FindObjectOfType <Manager>(); }
void Awake() { mQuestionPanel = FindObjectOfType <QuestionPanel>(); mLabel = GetComponentInChildren <dfLabel>(); mDialogueSizeTester = FindObjectOfType <DialogueSizeTester>(); mLabel.Text = ""; ScaleText(); }
public void Confirm() { switch (mode) { case QuestionMode.delete: manager.RemoveElement(); break; } QuestionPanel.SetActive(false); }
public void GetInside() { if (distance.text == "400" && isSuccessful) { QuestionPanel.SetActive(true); } else { FailurePanel.SetActive(true); } }
void Start() { index = -1; boss = FindObjectOfType <BossQuestions> (); qCanvas = FindObjectOfType <QuestionCanvas> (); panel = FindObjectOfType <QuestionPanel> (); button1 = GameObject.FindGameObjectWithTag("Choice1"); button2 = GameObject.FindGameObjectWithTag("Choice2"); button3 = GameObject.FindGameObjectWithTag("Choice3"); button4 = GameObject.FindGameObjectWithTag("Choice4"); }
private void CreateQuestion(object sender, RoutedEventArgs e) { if (choosedTheme != null && choosedDif != -1) { Question q = new Question("", QuestionStackPanel, this, choosedTheme, choosedDif, MW); QuestionStackPanel.Children.Remove(createQeust_button); QuestionStackPanel.Children.Add(createQeust_button); QuestionPanel.ScrollToVerticalOffset(QuestionStackPanel.Children.Count * 100); UpdateCounts(); } }
private void Settings_Click(object sender, EventArgs e) { QuestionPanel.Hide(); MyDeliveryPanel.Hide(); ProfilePanel.Hide(); NewDeliveryPanel.Hide(); NamePanel.Text = "Настройки"; Question.ForeColor = Color.FromArgb(227, 213, 212); NewDelivery.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = Settings.Height; NavPanel.Top = Settings.Top; NavPanel.Left = Settings.Left; Settings.ForeColor = Color.FromArgb(217, 35, 73); Settings.Image = Properties.Resources.Settings_on; NewDelivery.Image = Properties.Resources.NewDelivery; }
public JsonResult GetYearBySubjectTypeForQuestionPanel() { ResultInfo <List <string> > ResultInfo = new ResultInfo <List <string> >() { Status = false, Description = "Failed|Login" }; QuestionPanel nm = new QuestionPanel(); User_Backend PageObj = new User_Backend(); nm.Year = PageObj.GetYearBySubjectTypeForQuestionPanel(); ResultInfo.Info = nm.Year; if (ResultInfo.Info != null) { ResultInfo.Description = "Success| Get class name with id "; ResultInfo.Status = true; } return(Json(ResultInfo, JsonRequestBehavior.AllowGet)); }
// Use this for initialization void Start() { qCanvas = FindObjectOfType <QuestionCanvas> (); panel = FindObjectOfType <QuestionPanel> (); //populate array with relevant objects to show when game is paused showIfPaused = GameObject.FindGameObjectsWithTag("WhenPaused"); foreach (GameObject psed in showIfPaused) { psed.SetActive(false); } //populate array with relevant objects to show when game is in play/resumed showIfResumed = GameObject.FindGameObjectsWithTag("WhenResumed"); foreach (GameObject resmd in showIfResumed) { resmd.SetActive(true); } }
private void NewOrder_Click(object sender, EventArgs e) { UpdateDelivery(); QuestionPanel.Hide(); MyDeliveryPanel.Hide(); ProfilePanel.Hide(); NewDeliveryPanel.Show(); NewDeliveryPanel.Location = loc; NamePanel.Text = "Новая доставка"; Settings.ForeColor = Color.FromArgb(227, 213, 212); Question.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = NewDelivery.Height; NavPanel.Top = NewDelivery.Top; NavPanel.Left = NewDelivery.Left; NewDelivery.ForeColor = Color.FromArgb(217, 35, 73); NewDelivery.Image = Properties.Resources.NewDelivery_on; }
public void Check(Player player, NetworkInstanceId ownerNetId, UnityAction yesEvent, UnityAction noEvent, string warningString, string voteString) { if (yesEvent == null) { yesEvent = () => { } } ; if (noEvent == null) { noEvent = () => { } } ; PermissionType permissionType; if (ownerNetId == player.netId) { permissionType = OwnerPermissionType; } else { permissionType = OthersPermissionType; } if (permissionType == PermissionType.ALLOW) { yesEvent(); } else if (permissionType == PermissionType.WARNING) { QuestionPanel.Show(warningString, yesEvent, noEvent); } else if (permissionType == PermissionType.VOTE) { VoteManager.Instance.CreateVote(voteString, yesEvent, noEvent); } else { noEvent(); } } }
private void gunaButton5_Click(object sender, EventArgs e) { UpdateQuestions(); QuestionPanel.Location = loc; Delivers.Hide(); InfoPanel.Hide(); QuestionPanel.Show(); Workers.Hide(); MyDeliveryPanel.Hide(); NewDeliveryPanel.Hide(); NamePanel.Text = "Вопросы"; Settings.ForeColor = Color.FromArgb(227, 213, 212); NewDelivery.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Question.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = Help.Height; NavPanel.Top = Help.Top; NavPanel.Left = Help.Left; Help.ForeColor = Color.FromArgb(217, 35, 73); }
private void Settings_Click(object sender, EventArgs e) { InfoPanel.Show(); InfoPanel.Location = loc; QuestionPanel.Hide(); MyDeliveryPanel.Hide(); Delivers.Hide(); Workers.Hide(); NewDeliveryPanel.Hide(); NamePanel.Text = "Справка"; Question.ForeColor = Color.FromArgb(227, 213, 212); NewDelivery.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = Settings.Height; NavPanel.Top = Settings.Top; NavPanel.Left = Settings.Left; Settings.ForeColor = Color.FromArgb(217, 35, 73); }
private void Help_Click(object sender, EventArgs e) { InfoPanel.Location = loc; InfoPanel.Show(); QuestionPanel.Hide(); MyDeliveryPanel.Hide(); ProfilePanel.Hide(); NewDeliveryPanel.Hide(); NamePanel.Text = "Помощь"; Settings.ForeColor = Color.FromArgb(227, 213, 212); NewDelivery.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Question.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = Help.Height; NavPanel.Top = Help.Top; NavPanel.Left = Help.Left; Help.ForeColor = Color.FromArgb(217, 35, 73); Help.Image = Properties.Resources.Help_on; NewDelivery.Image = Properties.Resources.Company; }
private void NewOrder_Click(object sender, EventArgs e) { UpdateClients(); InfoPanel.Hide(); Workers.Hide(); Delivers.Hide(); QuestionPanel.Hide(); MyDeliveryPanel.Hide(); NewDeliveryPanel.Show(); NewDeliveryPanel.Location = loc; NamePanel.Text = "Клиенты"; Settings.ForeColor = Color.FromArgb(227, 213, 212); Question.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = NewDelivery.Height; NavPanel.Top = NewDelivery.Top; NavPanel.Left = NewDelivery.Left; NewDelivery.ForeColor = Color.FromArgb(217, 35, 73); }
private void Question_Click(object sender, EventArgs e) { QuestionPanel.Location = loc; QuestionPanel.Show(); UpdateQuestions(); MyDeliveryPanel.Hide(); ProfilePanel.Hide(); NewDeliveryPanel.Hide(); NamePanel.Text = "Задать вопрос"; Settings.ForeColor = Color.FromArgb(227, 213, 212); NewDelivery.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = Question.Height; NavPanel.Top = Question.Top; NavPanel.Left = Question.Left; Question.ForeColor = Color.FromArgb(217, 35, 73); Question.Image = Properties.Resources.Question_on; NewDelivery.Image = Properties.Resources.NewDelivery; }
internal void AddQuestion(Question q = null, bool scrollToEnd = false) { SetNativeEnabled(false); var questionEditor = new QuestionEditor(q, s => !questions.Any(x => x.question == s)); questionEditor.FormClosing += (s, e) => { SetNativeEnabled(true); Focus(); if (questionEditor.DialogResult == DialogResult.OK) { changes = true; Question question = questionEditor.GetQuestion(); questions.Add(question); var questionPanel = new QPanel(QuestionPanel, question, QuestionPanel.Controls.Count); AddPanel(questionPanel); if (scrollToEnd) { QuestionPanel.VerticalScroll.Value = 0; QuestionPanel.ScrollControlIntoView(questionPanel); } RefreshOK(); foreach (var control in QuestionPanel.Controls) { QPanel qPanel = control as QPanel; qPanel.ID = qPanel.ID; } } }; questionEditor.Show(); }
private void Orders_Click(object sender, EventArgs e) { InfoPanel.Hide(); QuestionPanel.Hide(); UpdateDelivery(); MyDeliveryPanel.Location = loc; MyDeliveryPanel.Show(); ProfilePanel.Hide(); NewDeliveryPanel.Hide(); NamePanel.Text = "Наши доставки"; Settings.ForeColor = Color.FromArgb(227, 213, 212); NewDelivery.ForeColor = Color.FromArgb(227, 213, 212); Question.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = Orders.Height; NavPanel.Top = Orders.Top; NavPanel.Left = Orders.Left; Orders.ForeColor = Color.FromArgb(217, 35, 73); Orders.Image = Properties.Resources.MyDelivery_on; NewDelivery.Image = Properties.Resources.Company; }
private void Question_Click(object sender, EventArgs e) { UpdateWorkers(); InfoPanel.Hide(); Workers.Location = loc; Workers.Show(); Delivers.Hide(); QuestionPanel.Hide(); MyDeliveryPanel.Hide(); Delivers.Hide(); NewDeliveryPanel.Hide(); NamePanel.Text = "Работники"; Settings.ForeColor = Color.FromArgb(227, 213, 212); NewDelivery.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = Question.Height; NavPanel.Top = Question.Top; NavPanel.Left = Question.Left; Question.ForeColor = Color.FromArgb(217, 35, 73); }
private void Orders_Click(object sender, EventArgs e) { InfoPanel.Hide(); QuestionPanel.Hide(); UpdateOwners(); MyDeliveryPanel.Location = loc; MyDeliveryPanel.Show(); NewDeliveryPanel.Hide(); Delivers.Hide(); Workers.Hide(); NamePanel.Text = "Владельцы"; Settings.ForeColor = Color.FromArgb(227, 213, 212); NewDelivery.ForeColor = Color.FromArgb(227, 213, 212); Question.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = Orders.Height; NavPanel.Top = Orders.Top; NavPanel.Left = Orders.Left; Orders.ForeColor = Color.FromArgb(217, 35, 73); }
public void FlipCardsInHand() { if (cardsHolderTransform.childCount <= 0) { return; } if (!CardsAreVisibleToOthers) { QuestionPanel.Show("This will make cards in your hand visible to other players!", () => { CommandProcessor.Instance.ExecuteClientCommand(new CommandShowHand(Player.LocalPlayer, this, true)); CardsAreVisibleToOthers = true; }, null); } else { QuestionPanel.Show("This will make cards in your hand looking face down for other players!", () => { CommandProcessor.Instance.ExecuteClientCommand(new CommandShowHand(Player.LocalPlayer, this, false)); CardsAreVisibleToOthers = false; }, null); } }
public ForAdmin(string id) { InitializeComponent(); Settings.ForeColor = Color.FromArgb(227, 213, 212); Question.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = NewDelivery.Height; NavPanel.Top = NewDelivery.Top; NavPanel.Left = NewDelivery.Left; NewDelivery.ForeColor = Color.FromArgb(217, 35, 73); NamePanel.Text = "Новая доставка"; UserID = id; UpdateClients(); NewDeliveryPanel.Show(); NewDeliveryPanel.Location = loc; MyDeliveryPanel.Hide(); QuestionPanel.Hide(); InfoPanel.Hide(); Workers.Hide(); Delivers.Hide(); }
public void Cancle() { mode = QuestionMode.none; QuestionPanel.SetActive(false); }
public void ShowQuestion(string q) { questionText.text = q; QuestionPanel.SetActive(true); }
public void OnIngameExitPressed() { if (isHosting) { QuestionPanel.Show("Are you sure you want to exit to the lobby?", () => { QuestionPanel.Show("Do you want to save the game?", () => { // ez a QuestionPanel YesAction-je /* * string fileName = DateTime.Now.ToString("yyyy-MM-dd--HH-mm-ss")+".txt"; * string path = Application.dataPath; * * Debug.Log(path); * * DirectoryInfo di = new DirectoryInfo(Path.Combine(path, "Games")); * if (!di.Exists) * di.Create(); * * * Debug.Log(Path.Combine(di.FullName, fileName)); * Debug.Log("Mentve"); * var sr = File.CreateText(Path.Combine(di.FullName, fileName)); * //sr.WriteLine(JsonUtility.ToJson(tables)); * JsonSerializerSettings settings = new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.All }; * // SerializableObjects so = new SerializableObjects(); * //so.loadForSave(); * // sr.WriteLine(JsonConvert.SerializeObject(CommandProcessor.Instance.getStackToSave(), settings)); * * sr.WriteLine(JsonConvert.SerializeObject(gsdh, settings)); * sr.Close(); */ GameSaveDataHolder gsdh = GameObject.FindGameObjectWithTag("GameSaveDataHolder").GetComponent <GameSaveDataHolder>(); gsdh.SaveToJSON(); lobbyNetworkManager.ChangeToLobbyScene(); HideMainMenu(); lobbyPanel.Show(() => { ShowMainMenu(); lobbyNetworkManager.StopHost(); }); }, () => { // ez a questionPanel NoAction-je lobbyNetworkManager.ChangeToLobbyScene(); HideMainMenu(); lobbyPanel.Show(() => { ShowMainMenu(); lobbyNetworkManager.StopHost(); }); }); }, null); } else { QuestionPanel.Show("Are you sure you want to leave the match?", () => { lobbyNetworkManager.StopClient(); lobbyPanel.Hide(); ShowMainMenu(); }, null); } }
void Awake() { mNetworkManager = FindObjectOfType<NetworkManager>(); mDialogueManager = FindObjectOfType<DialogueManager>(); mQuestionPanel = FindObjectOfType<QuestionPanel>(); mManager = FindObjectOfType<Manager>(); }