Exemple #1
0
 public capture(Delegate capture)
 {
     this.captureMethod = (captureDelegate)capture;
     this.AutoScaleMode = AutoScaleMode.None;
     InitializeComponent();
     p = MainCore.getCaptureFormStartPoint();
 }
Exemple #2
0
        private void init()
        {
            int thisWidth, thisHeight;

            thisWidth = 380; /* this.Width; */ thisHeight = 230; /* this.Height; */ //왜 width랑 height가 이상하게나오지?
            switch (frmSetting.locationmode)
            {
            case 0:         //왼쪽위고정
                frmSetting.lastlocation.X = 0;
                frmSetting.lastlocation.Y = 0;
                break;

            case 1:
            case 4:                 //캡처영역중앙
                frmSetting.lastlocation.X = (xy.X + sz.Width / 2) - thisWidth / 2;
                frmSetting.lastlocation.Y = (xy.Y + sz.Height / 2) - thisHeight / 2;
                break;

            case 2:
            case 5:                 //마지막마우스땐곳
                Point p = MainCore.getCaptureFormStartPoint();
                Size  s = MainCore.getCaptureFormMaxSize();
                frmSetting.lastlocation.X = Cursor.Position.X - thisWidth / 2;
                frmSetting.lastlocation.Y = Cursor.Position.Y - thisHeight / 2;
                if (frmSetting.lastlocation.X < p.X)
                {
                    frmSetting.lastlocation.X = p.X;
                }
                if (frmSetting.lastlocation.Y < p.Y)
                {
                    frmSetting.lastlocation.Y = p.Y;
                }
                if (frmSetting.lastlocation.X > (s.Width + p.X) - thisWidth)
                {
                    frmSetting.lastlocation.X = (s.Width + p.X) - thisWidth;
                }
                if (frmSetting.lastlocation.Y > (s.Height + p.Y) - thisHeight)
                {
                    frmSetting.lastlocation.Y = (s.Height + p.Y) - thisHeight;
                }
                break;

            case 3:         //그냥자율
                break;
            }

            this.Location = frmSetting.lastlocation;

            if (frmSetting.isAutoClose)
            {
                tim.Interval = frmSetting.autoclosetime * 1000;
                tim.Enabled  = true;
            }
            pbox.Image = bmp;
            Opacity    = frmSetting.opacity * 0.01;
        }
Exemple #3
0
 //모든 모니터를 감싸게 설정
 private void capture_Shown(object sender, EventArgs e)
 {
     Location = MainCore.getCaptureFormStartPoint();
     Size     = MainCore.getCaptureFormMaxSize();
 }