Exemplo n.º 1
0
 private void btn_OK_Click(object sender, EventArgs e)
 {
     if (!(this.btn_App.Enabled || this.m_IsCreatAnt))
     {
         base.Close();
     }
     else
     {
         AntennaConextMenuManager manager = new AntennaConextMenuManager(m_antennas);
         string info = string.Empty;
         if (this.m_IsCreatAnt)
         {
             this.m_myAntenna = this.CreatNewAntenna();
             if (!manager.AddNewAntenna(this.m_myAntenna, ref info))
             {
                 MessageBoxUtil.ShowInfo(info);
                 return;
             }
         }
         else
         {
             string str2 = string.Empty;
             if (!this.ParseValidate(ref str2))
             {
                 MessageBoxUtil.ShowInfo(str2);
                 return;
             }
             this.m_myAntenna = this.CreatNewAntenna();
             if (manager.ModifyAntennaData(this.m_oldAntName, this.m_myAntenna, ref info))
             {
                 this.BindingCollectionToObjects();
                 this.SetPosition(this.m_myAntenna.Name);
             }
             else
             {
                 MessageBoxUtil.ShowInfo(info);
                 return;
             }
         }
         AntennaSubSys.InitialAttOfAntenna();
         base.Close();
     }
 }
Exemplo n.º 2
0
 private void btn_App_Click(object sender, EventArgs e)
 {
     string info = string.Empty;
     if (!this.ParseValidate(ref info))
     {
         MessageBoxUtil.ShowInfo(info);
     }
     else
     {
         AntennaConextMenuManager manager = new AntennaConextMenuManager(m_antennas);
         this.m_myAntenna = this.CreatNewAntenna();
         string str2 = string.Empty;
         if (this.m_IsCreatAnt)
         {
             if (!manager.AddNewAntenna(this.m_myAntenna, ref str2))
             {
                 MessageBoxUtil.ShowInfo(str2);
                 return;
             }
             this.BindingCollectionToObjects();
             this.SetPosition(this.m_myAntenna.Name);
             this.m_IsCreatAnt = false;
             AntennaVertAttSmooth.NewVertDic(this.m_myAntenna);
         }
         else if (manager.ModifyAntennaData(this.m_oldAntName, this.m_myAntenna, ref str2))
         {
             this.m_myCurrency.Refresh();
             AntennaVertAttSmooth.NewVertDic(this.m_myAntenna);
         }
         else
         {
             MessageBoxUtil.ShowInfo(str2);
             return;
         }
         this.m_oldAntName = this.m_myAntenna.Name;
         AntennaSubSys.InitialAttOfAntenna();
         this.btn_App.Enabled = false;
     }
 }