Beispiel #1
0
        private void editorFingerControl_DeleteClick(object sender, RoutedEventArgs e)
        {
            tbMsg.Text = string.Empty;
            EditorFingerControl editorFingerControl = sender as EditorFingerControl;

            panel.Children.Remove(editorFingerControl);
            controls.Remove(editorFingerControl);
        }
Beispiel #2
0
 private void BaseWindow_Loaded(object sender, RoutedEventArgs e)
 {
     foreach (var item in userInfo.Fingers)
     {
         EditorFingerControl editorFingerControl = new EditorFingerControl();
         editorFingerControl.Text         = item.FingerName;
         editorFingerControl.ID           = item.FingerID;
         editorFingerControl.Margin       = new Thickness(0, 25, 0, 0);
         editorFingerControl.TextChanged += editorFingerControl_TextChanged;
         editorFingerControl.DeleteClick += editorFingerControl_DeleteClick;
         panel.Children.Add(editorFingerControl);
         controls.Add(editorFingerControl);
     }
     this.MouseDown += EditorFingerWindow_MouseDown;
 }