Exemplo n.º 1
0
        public void MakeLayerTransForm(bool isTranslateFormTopMostFlag, bool isProcessTransFlag)
        {
            if (MyLayerTransForm == null)
            {
                MyLayerTransForm = new TransFormLayer();

                MyLayerTransForm.Name          = "TransFormLayer";
                MyLayerTransForm.StartPosition = FormStartPosition.Manual;
                MyLayerTransForm.Location      = new Point(20, Screen.PrimaryScreen.Bounds.Height - 300);
                MyLayerTransForm.setTopMostFlag(isTranslateFormTopMostFlag);
                MyLayerTransForm.Show();
                MyLayerTransForm.UpdateTransform();
            }
            else
            {
                Util.ShowLog("Active layer");
                MyLayerTransForm.setTopMostFlag(isTranslateFormTopMostFlag);
                MyLayerTransForm.Activate();
                MyLayerTransForm.Show();
                MyLayerTransForm.UpdateTransform();
            }


            if (isProcessTransFlag == false)
            {
                MyLayerTransForm.disableOverHitLayer();
                MyLayerTransForm.setVisibleBackground();
            }
            else
            {
                MyLayerTransForm.setOverHitLayer();
                MyLayerTransForm.setInvisibleBackground();
            }
        }
Exemplo n.º 2
0
        public void DestoryTransForm()
        {
            if (MyBasicTransForm != null)
            {
                MyBasicTransForm.destroyForm();
            }

            if (MyLayerTransForm != null)
            {
                MyLayerTransForm.destroyForm();
            }

            MyBasicTransForm = null;
            MyLayerTransForm = null;
        }
Exemplo n.º 3
0
        //설정 파일로 저장.
        private void SaveSetting(string fileName)
        {
            MySettingManager.NowTransType = transType;

            //MySettingManager.NowOCRSpeed = (ocrProcessSpeed / 500) - 1;
            MySettingManager.NowColorGroupCount = groupCombo.Items.Count - 2;
            MySettingManager.NowColorGroup      = colorGroup;
            MySettingManager.NowOCRGroupcount   = locationXList.Count;
            MySettingManager.NowLocationXList   = locationXList;
            MySettingManager.NowLocationYList   = locationYList;
            MySettingManager.NowSizeXList       = sizeXList;
            MySettingManager.NowSizeYList       = sizeYList;

            //제외 영역
            MySettingManager.nowExceptionGroupCount    = exceptionLocationXList.Count;
            MySettingManager.nowExceptionLocationXList = exceptionLocationXList;
            MySettingManager.nowExceptionLocationYList = exceptionLocationYList;
            MySettingManager.nowExceptionSizeXList     = exceptionSizeXList;
            MySettingManager.nowExceptionSizeYList     = exceptionSizeYList;

            //번역창 위치 설정 - 디폴트는 모두 없애고 초기화 땐 저장을 안 한다.
            if (eCurrentState == eCurrentStateType.SetDefault)
            {
                MySettingManager.transFormLocationX = -1;
                MySettingManager.transFormLocationY = -1;

                MySettingManager.transFormSizeX = -1;
                MySettingManager.transFormSizeY = -1;
            }
            else if (eCurrentState != eCurrentStateType.Init)
            {
                if (FormManager.Instace.MyLayerTransForm != null)
                {
                    TransFormLayer transForm = FormManager.Instace.MyLayerTransForm;
                    MySettingManager.transFormLocationX = transForm.Location.X;
                    MySettingManager.transFormLocationY = transForm.Location.Y;

                    MySettingManager.transFormSizeX = transForm.Size.Width;
                    MySettingManager.transFormSizeY = transForm.Size.Height;
                }
            }


            MySettingManager.saveSetting(fileName);
        }