Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: System dialogs
PostPosted: Sun Apr 07, 2013 12:47 am 

Joined: Wed Mar 27, 2013 1:49 pm
Posts: 17

Offline
How can we use system dialog (like the one appear on max or min value of Analog numeric) in script.

Can we have form designed with vertical scroll bar? I need to enter list of items on the form which may take more space than one screen.


 Profile  
 
 Post subject: Re: System dialogs
PostPosted: Sun Apr 07, 2013 4:21 am 

Joined: Wed Mar 27, 2013 1:49 pm
Posts: 17

Offline
I mean the dialog like in the attached image. Can we access similar dialog via script?


Attachments:
dialog.jpg
dialog.jpg [ 8.59 KiB | Viewed 3897 times ]
 Profile  
 
 Post subject: Re: System dialogs
PostPosted: Mon Apr 08, 2013 1:12 am 
User avatar

Joined: Thu Nov 29, 2012 2:27 pm
Posts: 92

Offline
Well I haven’t heard or seen anything about it so It´s probably not meant to be used from anything else than the built in functions.

But there is a way to use them anyhow.

Code:
Neo.ApplicationFramework.Tools.Messagebox.MessageBoxFX.Show(System.IntPtr.Zero, "I´m a iX-Message :)");


Attachment:
Messagebox.png
Messagebox.png [ 10.09 KiB | Viewed 3887 times ]



Code:
Neo.ApplicationFramework.Tools.Messagebox.MessageBoxFX.Show(System.IntPtr.Zero, "I´m another iX-Message :)", "Test Message", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);


Attachment:
Messagebox_2.png
Messagebox_2.png [ 16.15 KiB | Viewed 3887 times ]


The methods wants a pointer to the owner of the window but I have only set it to zero.

Please note! I have no idea of what problems / error this can cause in your application (because of the lack of documentation), and I have only tested this for PC-targets.

_________________
Edmund Andersson

AITECH AB

Part of Beijer Integrator Group


 Profile  
 
 Post subject: Re: System dialogs
PostPosted: Mon Apr 08, 2013 2:40 am 

Joined: Wed Mar 27, 2013 1:49 pm
Posts: 17

Offline
Thanks.

I am trying on T7A target, but getting error that I am missing an assembly..

using System.Windows.Forms;
using System;
using System.Drawing;
using Neo.ApplicationFramework.Tools;
using Neo.ApplicationFramework.Common.Graphics.Logic;
using Neo.ApplicationFramework.Controls;
using Neo.ApplicationFramework.Interfaces;
using System.Windows;
using System.IO;


 Profile  
 
 Post subject: Re: System dialogs
PostPosted: Mon Apr 08, 2013 3:10 am 
User avatar

Joined: Thu Nov 29, 2012 2:27 pm
Posts: 92

Offline
Well that´s because your target is a panel with Windows CE and Compact framework... And WPF is not available there.

There is also a class called MessageBoxCF, have a try at that (I have never tried it).

Why are you not using the "ordinary" message box function i .Net?

_________________
Edmund Andersson

AITECH AB

Part of Beijer Integrator Group


 Profile  
 
 Post subject: Re: System dialogs
PostPosted: Mon Apr 08, 2013 1:40 pm 

Joined: Thu May 03, 2012 11:06 am
Posts: 22

Offline
Hi,

I confirm the proposal from Edmund, you can use the MessageBoxCF, like the these example:

// you have to use this directive
using Neo.ApplicationFramework.Tools.Messagebox;

// Dialog with 3.5s timer:
MessageBoxCF DialogBoxLoad = new MessageBoxCF("Text1", "Text2", 3500);
DialogBoxLoad.Show();
Attachment:
Picture 1.jpeg
Picture 1.jpeg [ 8.55 KiB | Viewed 3872 times ]


or

// Dialog with OK and an Icon:
MessageBoxCF DialogBoxText3Text4 = new MessageBoxCF("xxxxxxxxxxxxxx", "yyyyyyyyyyyyyyyyyyy", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
DialogBoxText3Text4.Show();
Attachment:
Picture 2.jpeg
Picture 2.jpeg [ 20.77 KiB | Viewed 3872 times ]


Bye
Philippe


 Profile  
 
 Post subject: Re: System dialogs
PostPosted: Tue Apr 09, 2013 3:41 am 

Joined: Wed Mar 27, 2013 1:49 pm
Posts: 17

Offline
Thanks a lot.

Can we have form designed with vertical scroll bar? I need to enter list of items on the form which may take more space than one screen.


 Profile  
 
 Post subject: Re: System dialogs
PostPosted: Fri Jul 13, 2018 6:23 am 

Joined: Fri Feb 03, 2012 11:38 am
Posts: 13

Offline
Hi

I am interested in using MessageBoxCF (with X2 terminal), but what feature does it allow? Can I have buttons Yes/No + the timer function?

And perhaps a stupid question, but how do I read if operator pressed Yes or No with this message box type?

btw, it seems MessageBoxFX is not available anymore in iX 2.40


Thanx!


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: