コード例 #1
0
        private void viewGestureSkeleton(object sender, EventArgs e)
        {
            DockPanel         dp           = (DockPanel)((Border)sender).Child;
            string            gestureclass = (string)((System.Windows.Controls.Label)(dp.Children[0])).Content;
            List <Gesture>    samples      = (List <Gesture>)gesture_dataset.Where(x => x.Name.StartsWith(gestureclass)).ToList();
            ViewSamplesWindow _viewFrm     = new ViewSamplesWindow(samples);

            _viewFrm.Owner = this;
            _viewFrm.Show();
        }
コード例 #2
0
ファイル: SetManager.xaml.cs プロジェクト: unica-tesi-hci/DG3
        private async void btn_generate_samples_Click(object sender, RoutedEventArgs e)
        {
            if (SetExpressions.Count > 0)
            {
                try
                {
                    await SampleGenerator.GeneratePoints(DatasetNameTextBox.Text, SetExpressions);

                    GestureDataset = GestureIOCustom.LoadTrainingSet(SampleGenerator.SamplesFolder + DatasetNameTextBox.Text + "//");
                    ViewSamplesWindow _viewFrm = new ViewSamplesWindow(GestureDataset.ToList());
                    _viewFrm.Owner = this;
                    _viewFrm.Show();
                }
                catch
                {
                    MessageBox.Show(SampleGenerator.ConnectivityErrorMessage, "Sample Generation Error");
                }
            }
            else
            {
                MessageBox.Show(SampleGenerator.MinExpressionsErrorMessage, "Sample Generation Error");
            }
        }