void DrawData() { CancelInvoke(); Data.Instance.capitulosData.activeCapitulo = null; int id = 0; all.Clear(); Utils.RemoveAllChildsIn(container); foreach (CapitulosData.Capitulo c in Data.Instance.capitulosData.capitulos) { if ( (state == states.ONLY_ACTIVE && !Data.Instance.dateData.IsFromThePast(c.date)) || state == states.ALL ) { CheckAddMonth(c.date); AdminButton button = Instantiate(adminButton); button.Init(id, c.date + " " + c.time + "hs", OnClicked); AddGameObject(button.gameObject); all.Add(button); } id++; } if (all.Count == 0) { isEmptyPanel.SetActive(true); } else { isEmptyPanel.SetActive(false); } }
public UserEditWindow(UserData user) { InitializeComponent(); CurrentUser = user; this.DataContext = CurrentUser; UserPermissons = User.ParsePermission(user.Permissions.Split(' ')); isAdmin = user.Type == "Администратор" ? true : false; isAdmins = user.Type == "Администратор" ? true : false; PasswordBorder.Visibility = Visibility.Collapsed; LoginPlace.IsReadOnly = true; if (MainWindow.User.Type != "Администратор") { AdminTools.Visibility = Visibility.Hidden; } else { AdminTools.Visibility = Visibility.Visible; } if (isAdmin) { UserButton.UpdateColorToStart(); AdminButton.UpdateColorToEnd(); UserStatusControl.IsEnabled = false; } else { UserButton.UpdateColorToEnd(); AdminButton.UpdateColorToStart(); } }
void DrawData() { CancelInvoke(); Data.Instance.capitulosData.activeCapitulo = null; int id = 0; all.Clear(); Utils.RemoveAllChildsIn(container); foreach (CapitulosData.Capitulo c in Data.Instance.capitulosData.capitulos) { if ( (state == states.ONLY_ACTIVE && !Data.Instance.dateData.IsFromThePast(c.date)) || state == states.ALL ) { AdminButton button = Instantiate(adminButton); button.transform.SetParent(container); button.transform.localScale = Vector3.one; button.Init(id, c.date + " " + c.time + "hs", OnClicked); all.Add(button); } id++; } if (all.Count == 0) { SetSignal("No hay capítulos..."); } else { SetSignal(""); } }
private void AdminButton_MouseDown(object sender, MouseButtonEventArgs e) { if (MainWindow.User.Type == "Администратор") { UserButton.UpdateColorToStart(); AdminButton.UpdateColorToEnd(); isAdmins = true; } }
private void MainMenu_Load(object sender, EventArgs e) { welcomeLabel.Text = "Welcome " + Login.customer.Name; if (Login.customer.Type != 'A') { AdminButton.Hide(); } if (lbll.checkDaysForLoans(Login.customer.Username)) { MessageBox.Show("You have not yet returned a book after a week!"); } }
void DrawData() { CancelInvoke(); int id = 0; Utils.RemoveAllChildsIn(container); foreach (TrainingData.Training q in Data.Instance.trainingData.entrenamiento) { AdminButton button = Instantiate(adminButton); button.transform.SetParent(container); button.transform.localScale = Vector3.one; button.Init(id, q.preguntas.pregunta, OnClicked); id++; } }
void OnClicked(AdminButton button) { print("CapitulosAdmin clicked" + button.id); Data.Instance.capitulosData.activeCapitulo = Data.Instance.capitulosData.capitulos[button.id]; Data.Instance.triviaData.LoadPlaylist(Data.Instance.capitulosData.activeCapitulo.playlistID, GotoEdit, true); }
void OnClicked(AdminButton button) { Data.Instance.trainingData.activeQuestion = Data.Instance.trainingData.entrenamiento[button.id]; GotoEdit(); }
void OnClicked(AdminButton button) { Data.Instance.capitulosData.activeCapitulo = Data.Instance.capitulosData.capitulos[button.id]; Data.Instance.resultsData.LoadResultsData(Data.Instance.capitulosData.activeCapitulo.key); Data.Instance.triviaData.LoadPlaylist(Data.Instance.capitulosData.activeCapitulo.playlistID, GotoEdit, true); }