/// <summary>
        /// PersistStringから復元
        /// </summary>
        public static FormIntegrate FromPersistString(FormMain parent, String str)
        {
            WindowInfo info = new WindowInfo();

            info = (WindowInfo)info.Load(new StringReader(str.Substring(PREFIX.Length)));
            FormIntegrate form = new FormIntegrate(parent);

            form.WindowData = info;
            return(form);
        }
		private void windowCaptureButton_WindowCaptured( IntPtr hWnd ) {

			int capacity = WinAPI.GetWindowTextLength( hWnd ) * 2;
			StringBuilder stringBuilder = new StringBuilder( capacity );
			WinAPI.GetWindowText( hWnd, stringBuilder, stringBuilder.Capacity );

			if ( MessageBox.Show( stringBuilder.ToString() + "\r\n" + WARNING_MESSAGE,
				GeneralRes.WCWarningTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Question )
				== System.Windows.Forms.DialogResult.Yes ) {

				FormIntegrate form = new FormIntegrate( parent );
				form.Show( hWnd );
			}
		}
Ejemplo n.º 3
0
 /// <summary>
 /// PersistStringから復元
 /// </summary>
 public static FormIntegrate FromPersistString( FormMain parent, String str )
 {
     WindowInfo info = new WindowInfo();
     info = (WindowInfo)info.Load( new StringReader( str.Substring( PREFIX.Length ) ) );
     FormIntegrate form = new FormIntegrate( parent );
     form.WindowData = info;
     return form;
 }
 /// <summary>
 /// FormIntegrateが新しく作られたら追加
 /// </summary>
 public void AddCapturedWindow( FormIntegrate form )
 {
     capturedWindows.Add( form );
 }