Search found 8 matches

by TolikTipaTut1
Tue Oct 08, 2019 12:29 pm
Forum: PowerShell
Topic: How can i create my own event?
Replies: 8
Views: 3539

Re: How can i create my own event?

Sorry, I put it wrong.
I want to create a class counter.
It has a method that counts to 16 and then "calls" an event.

Can I create my own events in powershell?
by TolikTipaTut1
Tue Oct 08, 2019 12:12 pm
Forum: PowerShell
Topic: How can i create my own event?
Replies: 8
Views: 3539

Re: How can i create my own event?

And what should I do if I create my own class ?
How can I create events there?
by TolikTipaTut1
Tue Oct 08, 2019 12:11 pm
Forum: PowerShell GUIs
Topic: Can`t open a form in another thread.
Replies: 9
Views: 1187

Re: Can`t open a form in another thread.

Yes, our professor didn't tell me that threads are required.
So, I'll paste code into button.add_click)

P.S. But I'll continue to understand runspaces, because it's really interesting)
Thank you very much for your help!
by TolikTipaTut1
Tue Oct 08, 2019 11:38 am
Forum: PowerShell
Topic: How can i create my own event?
Replies: 8
Views: 3539

How can i create my own event?

Hello!
Help me please.
I`m trying to create my own event, for example:
A user presses a button for 5 times and several methods start up.

How can i solve it ?
by TolikTipaTut1
Tue Oct 08, 2019 11:15 am
Forum: PowerShell GUIs
Topic: Can`t open a form in another thread.
Replies: 9
Views: 1187

Re: Can`t open a form in another thread.

I am a university of geodesy and cartography student.
Our lecturer gave us this homework.
I insisted on using С# perform this task ...
by TolikTipaTut1
Tue Oct 08, 2019 10:45 am
Forum: PowerShell GUIs
Topic: Can`t open a form in another thread.
Replies: 9
Views: 1187

Re: Can`t open a form in another thread.

Thank you very much! Actually, I`ve got some kind of "homework". The task is: I need to get the shortest car route. So, I need 3 threads: GUI for users to interact with, the engine and some kind of "bridge" thread. Sorry for my english. How can I create events in powershell ? For example: A user pre...
by TolikTipaTut1
Tue Oct 08, 2019 3:32 am
Forum: PowerShell GUIs
Topic: Can`t open a form in another thread.
Replies: 9
Views: 1187

Re: Can`t open a form in another thread.

jvierra, thank you for your answer! But I still don`t understand... In your code you used "$ps.Invoke()" method to open the window. This method opens a window. But while the window is open, the code should execute further in another thread... And if I use "Invoke()" method instead "BeginInvoke()", I...
by TolikTipaTut1
Mon Oct 07, 2019 10:53 am
Forum: PowerShell GUIs
Topic: Can`t open a form in another thread.
Replies: 9
Views: 1187

Can`t open a form in another thread.

Hello! I`m creating a Form in another thread using powershell. I created my own class class MainForm : System.Windows.Forms.Form { <#some code#> } Form name is "Start_Window". I`m using "ShowDialog()" method to show it. If i run my script in ISE, "Start_Window" appears. But if i run my script using ...