Exemplo n.º 1
0
 //добавление нового устройства
 private void toolStripButtonAddFavorite_Click(object sender, EventArgs e)
 {
     if (treeViewFavorites.SelectedNode != null)
     {
         string        category = treeViewFavorites.SelectedNode.Text;
         Favorite_Edit frm      = new Favorite_Edit();
         DialogResult  result   = frm.ShowDialog();
         if (result == DialogResult.OK)
         {
             LoadCategoryData(category);
         }
     }
 }
Exemplo n.º 2
0
        //редактирование устройства
        private void favoriteEditToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (treeViewFavorites.SelectedNode != null && listViewDetails.SelectedItems.Count != 0)
            {
                string category = treeViewFavorites.SelectedNode.Text;
                var    item     = listViewDetails.SelectedItems[0];
                string favName  = item.SubItems[0].Text;

                Favorite_Edit frm    = new Favorite_Edit(favName);
                DialogResult  result = frm.ShowDialog();
                if (result == DialogResult.OK)
                {
                    LoadCategoryData(category);
                }
            }
            else
            {
                NotifyInfo("Please select favorite to edit!");
            }
        }
Exemplo n.º 3
0
        //редактирование устройства
        private void favoriteEditToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (treeViewFavorites.SelectedNode != null && listViewDetails.SelectedItems.Count != 0)
            {
                string category = treeViewFavorites.SelectedNode.Text;
                var item = listViewDetails.SelectedItems[0];
                string favName = item.SubItems[0].Text;

                Favorite_Edit frm = new Favorite_Edit(favName);
                DialogResult result = frm.ShowDialog();
                if (result == DialogResult.OK)
                {
                    LoadCategoryData(category);                  
                }
            }
            else
            {
                NotifyInfo("Please select favorite to edit!");
            }
        }
Exemplo n.º 4
0
 //добавление нового устройства
 private void toolStripButtonAddFavorite_Click(object sender, EventArgs e)
 {
     if (treeViewFavorites.SelectedNode != null)
     {
         string category = treeViewFavorites.SelectedNode.Text;
         Favorite_Edit frm = new Favorite_Edit();
         DialogResult result = frm.ShowDialog();
         if (result == DialogResult.OK)
         {
             LoadCategoryData(category);
         }
     }
 }