Beispiel #1
0
        public void AddOldView(object sender, EventArgs e)
        {
            FrmViewModelProperty property = new FrmViewModelProperty(true);

            if (((property.ShowDialog() == DialogResult.OK) && (property.selectedView != null)) && (property.selectedView.Count > 0))
            {
                this.thePanal.AddSelectedOldView(property.selectedView);
            }
            property.Dispose();
        }
Beispiel #2
0
 private void lvwViewModel_ItemActivate(object sender, EventArgs e)
 {
     if (this.lvwViewModel.SelectedItems.Count == 1)
     {
         ListViewItem item = this.lvwViewModel.SelectedItems[0];
         if (item.Tag != null)
         {
             FrmViewModelProperty property = new FrmViewModelProperty(true, item.Tag as DEViewModel);
             if (property.ShowDialog() == DialogResult.OK)
             {
                 item.Tag  = property.theVM;
                 item.Text = property.theVM.Name.Trim();
                 string str = "";
                 if (property.theVM.IsActive == 'A')
                 {
                     str = "激活";
                 }
                 else
                 {
                     str = "未激活";
                 }
                 item.SubItems[3].Text = str;
                 item.SubItems[4].Text = property.theVM.Description;
                 for (int i = 0; i < TagForTiModeler.TreeNode_ViewNetwork.Nodes.Count; i++)
                 {
                     if (((DEViewModel)TagForTiModeler.TreeNode_ViewNetwork.Nodes[i].Tag).Oid.Equals(property.theVM.Oid))
                     {
                         TagForTiModeler.TreeNode_ViewNetwork.Nodes[i].Tag  = property.theVM;
                         TagForTiModeler.TreeNode_ViewNetwork.Nodes[i].Text = property.theVM.Name.Trim();
                         break;
                     }
                 }
             }
             property.Dispose();
         }
     }
 }