public void CreateColor(Color theColor, string theName, string Code, string rgbString) { GameObject ReseneColor = Instantiate(ColorPrefab, Content.position, Content.rotation, Content); MyColour colorScript = ReseneColor.GetComponent <MyColour>(); colorScript.SetColor(theName, Code, rgbString, theColor, this); colourList.Add(colorScript); }
private void Form_squedul_Load(object sender, EventArgs e) { schedulerControl1.Start = DateTime.Now; // TODO: esta línea de código carga datos en la tabla 'dS_DataEmprende.tipo_evento' Puede moverla o quitarla según sea necesario. this.tipo_eventoTableAdapter.Fill(this.dS_DataEmprende.tipo_evento); schedulerStorage1.Appointments.Labels.Clear(); int color; string tipo_evento; MyColour c = new MyColour(); tipo_eventoBindingSource.MoveFirst(); for (int i = 0; i < tipo_eventoBindingSource.Count; i++) { DataRowView view = (DataRowView)tipo_eventoBindingSource.Current; color = Convert.ToInt32(view["color"].ToString()); tipo_evento = view["tipo_evento"].ToString(); c.Colour = Color.FromKnownColor((KnownColor)color); AppointmentLabel lbl = new AppointmentLabel(Color.FromName(c.Colour.Name), tipo_evento, tipo_evento); schedulerStorage1.Appointments.Labels.Add(lbl); tipo_eventoBindingSource.MoveNext(); } if (mia.nivel_acceso == 1) { this.appointmentsTableAdapter.Fill(this.dS_DataEmprende.Appointments); } if (mia.nivel_acceso == 3) { this.appointmentsTableAdapter.filtra_tipo_cita(this.dS_DataEmprende.Appointments, mia.id_profesor); } actualiza_apps_grupos(); }
private void Form_squedul_Load(object sender, EventArgs e) { schedulerControl1.Start = DateTime.Now; // TODO: esta línea de código carga datos en la tabla 'dS_DataEmprende.tipo_evento' Puede moverla o quitarla según sea necesario. this.tipo_eventoTableAdapter.Fill(this.dS_DataEmprende.tipo_evento); schedulerStorage1.Appointments.Labels.Clear(); int color; string tipo_evento; MyColour c = new MyColour(); tipo_eventoBindingSource .MoveFirst(); for (int i = 0; i < tipo_eventoBindingSource.Count; i++) { DataRowView view = (DataRowView)tipo_eventoBindingSource.Current; color = Convert.ToInt32(view["color"].ToString()); tipo_evento = view["tipo_evento"].ToString(); c.Colour = Color.FromKnownColor((KnownColor)color); AppointmentLabel lbl = new AppointmentLabel(Color.FromName(c.Colour.Name), tipo_evento,tipo_evento); schedulerStorage1.Appointments.Labels.Add(lbl); tipo_eventoBindingSource.MoveNext(); } if (mia.nivel_acceso == 1) this.appointmentsTableAdapter.Fill(this.dS_DataEmprende.Appointments); if (mia.nivel_acceso == 3) this.appointmentsTableAdapter.filtra_tipo_cita(this.dS_DataEmprende.Appointments, mia.id_profesor); actualiza_apps_grupos(); }