コード例 #1
0
        public static void CloseForm(TransferNotiForm form)
        {
            try
            {
                Logger.info("CloseForm:TransferNotiForm 닫기");
                lock (lockObject)
                {
                    if (transferAreas.ContainsKey(form.Top))
                    {
                        transferAreas[form.Top] = AreaToUse.EMPTY;
                    }

                    bool result = notiForms.Remove(form);
                    if (result)
                    {
                        Logger.info("CloseForm: notiForms에서 form삭제");
                    }
                    else
                    {
                        Logger.info("CloseForm: notiForms에서 form삭제실패-Not found.");
                    }

                    form.Close();
                }
            }
            catch (Exception ex)
            {
                Logger.error(ex.ToString());
            }
        }
コード例 #2
0
 private static void RemoveFirst()
 {
     try
     {
         Logger.info("TransferNotiForm 가장 오래된 것 삭제");
         lock (lockObject)
         {
             TransferNotiForm miniform = (TransferNotiForm)notiForms[0];
             if (transferAreas.ContainsKey(miniform.Top))
             {
                 transferAreas[miniform.Top] = AreaToUse.EMPTY;
             }
             miniform.Close();
             notiForms.RemoveAt(0);
         }
     }
     catch (Exception ex)
     {
         Logger.error(ex.ToString());
     }
 }