示例#1
0
        /// <summary>
        /// スクリーンショットを撮ってownerのバッファに登録する
        /// </summary>
        /// <param name="owner"></param>
        /// <returns></returns>
        public string takeScreenshot(MainForm owner)
        {
            var visible = owner.Visible;
            __screenshot = owner.TakeScreenshot(Screen.PrimaryScreen.Bounds);
            using (var form = new Form())
            {
                if (form.WindowState == FormWindowState.Maximized)
                {
                    form.WindowState = FormWindowState.Normal;
                }
                form.FormBorderStyle = FormBorderStyle.None;
                form.WindowState = FormWindowState.Maximized;
                form.Paint += (sender, e) => e.Graphics.DrawImage(__screenshot, Point.Empty);
                form.Show();
                form.Activate();

                owner.Hide();
                ShowDialog(owner);
            }
            if (visible) owner.Show();

            return __imageName;
        }
示例#2
0
文件: UI.cs 项目: furaga/SukuSuku
 // コンスタラクタ
 public UI(MainForm owner)
 {
     this.owner = owner;
 }
示例#3
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="owner"></param>
 public ShortcutForm(MainForm owner)
 {
     InitializeComponent();
     this.owner = owner;
 }