// Use this for initialization void Start() { arm = GetComponent <GameObject>(); wrist = GameObject.FindObjectOfType(typeof(WristControl)) as WristControl; auriculaire = GameObject.FindObjectOfType(typeof(AuriculaireControl)) as AuriculaireControl; ringFinger = GameObject.FindObjectOfType(typeof(RingControl)) as RingControl; middleFinger = GameObject.FindObjectOfType(typeof(MiddleControl)) as MiddleControl; index = GameObject.FindObjectOfType(typeof(IndexControl)) as IndexControl; thumb = GameObject.FindObjectOfType(typeof(ThumbControl)) as ThumbControl; fingers = new List <Finger>(); fingers.Add(auriculaire); fingers.Add(ringFinger); fingers.Add(middleFinger); fingers.Add(index); fingers.Add(thumb); tempFingerDegree = 255; connector = new ArduinoConnector(); Debug.Log(connector.port); connector.Open(); connector.MoveFinger(31, 90); StartCoroutine(ArduinoEvent()); }
private void Move(string command) { var index = IndexControl.Get(); var count = CountControl.Get(); switch (command) { case Navigate.Bck: if (index > 0) { IndexControl.Set(--index); } break; case Navigate.Fwd: if (index < count - 1) { IndexControl.Set(++index); } break; case Navigate.Go: int newIndex; if (!int.TryParse(txtIndexControl.Text, out newIndex)) { newIndex = index + 1; } if (newIndex > 0 && newIndex <= count) { IndexControl.Set(newIndex - 1); } break; } SetView(Views.Control); }
public Index() { InitializeComponent(); WindowHelper.SetBorder(this, Grid); IndexControl control = new IndexControl(new IndexControlElementMedicalRecord(), new DataGridControlElementMedicalRecord()); control.SetBorder(Height, Width); Grid.Children.Add(control); }
public MainWindow() { InitializeComponent(); WindowHelper.SetBorder(this, this.Grid); IndexControl control = new IndexControl(new IndexControlElementCategory(), new DataGridControlElementCategory()); control.SetBorder(Height, Width); Grid.Children.Add(control); }
public DoctorsReview() { InitializeComponent(); WindowHelper.SetBorder(this, this.Grid); IndexControl control = new IndexControl(new IndexControlElementDoctor(), new DataGridControlElementDoctor(), detailsBtnVisibility: Visibility.Visible, crudBtnVisibility: Visibility.Hidden); control.SetBorder(Height, Width); Grid.Children.Add(control); }
public MedicalRecordsReview() { InitializeComponent(); WindowHelper.SetBorder(this, this.Grid); IndexControl control = new IndexControl(new IndexControlElementMedicalRecord(), new DataGridControlElementMedicalRecord(), crudBtnVisibility: Visibility.Hidden); control.SetBorder(Height, Width); Grid.Children.Add(control); }
public static async Task <IndexPage> CreateIndexPage() { IndexPage page = new IndexPage(); IndexControl control = await IndexControl.CreateIndexControl(new IndexControlElementClinic(), new DataGridControlElementClinic()); page.IndexPageGrid.Children.Add(control); page.ChangeTheme(); page.SwitchLanguage(); return(page); }
public static async Task <IndexPage> CreateIndexPage(bool hasCrud = true) { IndexPage page = new IndexPage(); IndexControl control = await IndexControl.CreateIndexControl(new IndexControlElementMedicalRecord(), new DataGridControlElementMedicalRecord(), crudBtnVisibility : hasCrud?Visibility.Visible : Visibility.Hidden); page.IndexPageGrid.Children.Add(control); page.ChangeTheme(); page.SwitchLanguage(); return(page); }
public static async Task <IndexPage> CreateIndexPage() { IndexPage page = new IndexPage(); IndexControl control = await IndexControl.CreateIndexControl(new IndexControlElementDoctor(), new DataGridControlElementDoctor(), detailsBtnVisibility : System.Windows.Visibility.Visible); page.IndexPageGrid.Children.Add(control); page.ChangeTheme(); page.SwitchLanguage(); return(page); }
private void SetView(int view) { switch (view) { case Views.Vehiculos: ListControl.Set(null); gridVehiculos.DataSource = VehiculosPendientes; gridVehiculos.DataBind(); IndexControl.Set(0); break; case Views.Control: if (!VehiculosSeleccionados.Any()) { ShowError(string.Format(CultureManager.GetError("MUST_SELECT_VALUE"), CultureManager.GetEntity("PARENTI03"))); SetView(Views.Vehiculos); return; } if (ListControl.Get() == null) { var viajes = GetDistribuciones(VehiculosSeleccionados).Where(x => !x.Controlado).Select(v => v.Id).ToList(); ListControl.Set(viajes); CountControl.Set(viajes.Count); } var index = IndexControl.Get(); var count = CountControl.Get(); var viaje = GetDistribucionAControlar(index); BindViaje(viaje); txtIndexControl.Text = (index + 1).ToString("#0"); lblCountControl.Text = count.ToString("#0"); btSiguiente.Visible = index < count - 1; btAnterior.Visible = index > 0; break; case Views.Resumen: var distribuciones = GetDistribuciones(new[] { -1 }); var controladas = distribuciones.Where(d => d.Controlado).Select(d => new ViajeDistribucionVo(d)).ToList(); //var noControladas = distribuciones.Where(d => !d.Controlado).ToList(); gridResumen.GroupedColumns.Clear(); gridResumen.GroupedColumns.Add(gridResumen.Columns[0] as C1Field); gridResumen.DataSource = controladas; gridResumen.DataBind(); break; } tab.ActiveTabIndex = view; updCompleto.Visible = true; updCompleto.Update(); }
private void CheckSaveRemoveMethod() { if (IndexControl.Equals("") || Student.FirstName.Equals("") || Student.LastName.Equals("") || BirthDateControl.Equals("") || Student.BirthPlace.Equals("")) { IsSaveEnabled = false; IsRemoveEnabled = false; } else { IsSaveEnabled = true; IsRemoveEnabled = true; } }
private IndexControl getOrCreateBlock(int index) { if (index < Controls.Count) { return(Controls[index]); } var textBlock = new IndexControl(); //textBlock.FontSize = 12; textBlock.Text = (index + 1).ToString(); textBlock.Foreground = new SolidColorBrush(Colors.Black); textBlock.Background = new SolidColorBrush(Colors.White); Controls.Add(textBlock); OnAddTextBlock?.Invoke(this, textBlock); return(textBlock); }
private void ViewModel_OnAddTextBlock(object sender, IndexControl e) { this.detailCanvas.Children.Add(e); }