예제 #1
0
 public override bool Initialize()
 {
     var initForm = new InitializeForm();
     initForm.ShowDialog();
     try
     {
         elManager = new ElectricityManager(initForm.selectedCOM, true);
     }
     catch (Exception ex)
     {
         elManager.CloseThePort();
         return false;
     }
     return true;
 }
예제 #2
0
        public override bool Initialize()
        {
            var initForm = new InitializeForm();

            initForm.ShowDialog();
            try
            {
                elManager = new ElectricityManager(initForm.selectedCOM, true);
            }
            catch (Exception ex)
            {
                elManager.CloseThePort();
                return(false);
            }
            return(true);
        }