コード例 #1
0
ファイル: UKI_add_Head.xaml.cs プロジェクト: icelab-uki/uki
 public void editGroup(m_Group g_origin)
 {
     addNew         = false;
     this.Title     = "Edit Detection Group";
     butAdd.Content = "Edit";
     this.g_origin  = g_origin;
     textBox1.Text  = g_origin.name;
 }
コード例 #2
0
ファイル: UKI_add_Head.xaml.cs プロジェクト: icelab-uki/uki
 void finish()
 {
     try
     {
         String name = textBox1.Text;
         if (name != "")
         {
             if (addNew)
             {
                 if (map_type == type_e_event)
                 {
                     m_Event ev = new m_Event();
                     ev.name = name;
                     form_editor.addEvent(ev, addIndex);
                 }
                 else if (map_type == type_m_motion)
                 {
                     m_Motion m = new m_Motion();
                     m.name = name;
                     form_editor.addMotion(m, addIndex);
                 }
                 else if (map_type == type_group)
                 {
                     m_Group g = new m_Group();
                     g.name = name;
                     form_editor.addGroup(g, addIndex);
                 }
             }
             else
             {
                 int[] loc = form_editor.getTVI_Location(self);
                 if (map_type == type_e_event)
                 {
                     ev_origin.name = name;
                     form_editor.reloadTree_event(loc);
                 }
                 else if (map_type == type_m_motion)
                 {
                     m_origin.name = name;
                     form_editor.reloadTree_motion(loc);
                 }
                 else if (map_type == type_group)
                 {
                     g_origin.name = name;
                     form_editor.reloadTree_map_map(loc);
                 }
             }
             this.Close();
         }
     }
     catch { }
 }