private void mi_categoryCreate_Click(object sender, RoutedEventArgs e)
 {
     if (ccw == null)
     {
         ccw = new CreateCategoryWindow();
         ccw.OnChildTextInputEvent += new
                                      CreateCategoryWindow.OnChildTextInputHandler(ccw_OnChildTextInputEvent);
         ccw.Owner = this;
         ccw.ShowDialog();
     }
 }
 void ccw_OnChildTextInputEvent(string Parameters)
 {
     if (ccw != null)
     {
         ccw.Close();
         ccw.OnChildTextInputEvent -= new
                                      CreateCategoryWindow.OnChildTextInputHandler(ccw_OnChildTextInputEvent);
         ccw = null;
     }
     dbcon.AddCategory(Id, parentId, Parameters);
     reLoadCategoryList();
 }