|
| Shell (Node _client) |
|
async Task | RecvThread () |
| Asynchronously receives data from the connected client and updates the UI with the received data.
|
|
|
override void | Dispose (bool disposing) |
| Releases the unmanaged resources used by the component and optionally releases the managed resources.
|
|
|
void | Shell_Load (object sender, EventArgs e) |
| Event handler for the form load event.
|
|
async void | button1_Click (object sender, EventArgs e) |
| Clears the text in textBox1 and sends a byte array with value 1 using the client asynchronously.
|
|
async void | button2_Click (object sender, EventArgs e) |
| Clears the text in the textBox and sends an asynchronous message to the client with the byte value 2.
|
|
async void | button3_Click (object sender, EventArgs e) |
| Sends a byte array with value 0 followed by the UTF-8 encoded text from textBox2 using the client .
|
|
void | textBox2_KeyDown (object sender, KeyEventArgs e) |
| Handles the KeyDown event for textBox2. If the Enter key is pressed, it triggers the click event for button3 and suppresses the key press.
|
|
void | textBox1_VisibleChanged (object sender, EventArgs e) |
| Sets the cursor position to the end of the text and scrolls the text box to ensure the cursor is visible when the text box becomes visible.
|
|
void | InitializeComponent () |
| Initializes the components of the form including buttons, text boxes, and event handlers.
|
|
◆ Shell()
xeno_rat_server.Forms.Shell.Shell |
( |
Node | _client | ) |
|
|
inline |
◆ button1_Click()
async void xeno_rat_server.Forms.Shell.button1_Click |
( |
object | sender, |
|
|
EventArgs | e ) |
|
inlineprivate |
Clears the text in textBox1 and sends a byte array with value 1 using the client asynchronously.
- Parameters
-
sender | The object that raised the event. |
e | The event data. |
This method clears the text in textBox1 and then sends a byte array with value 1 using the client asynchronously.
◆ button2_Click()
async void xeno_rat_server.Forms.Shell.button2_Click |
( |
object | sender, |
|
|
EventArgs | e ) |
|
inlineprivate |
Clears the text in the textBox and sends an asynchronous message to the client with the byte value 2.
- Parameters
-
sender | The object that raised the event. |
e | The event data. |
This method clears the text in the textBox and then sends an asynchronous message to the client using the SendAsync method of the client object. The message sent contains a byte value of 2.
◆ button3_Click()
async void xeno_rat_server.Forms.Shell.button3_Click |
( |
object | sender, |
|
|
EventArgs | e ) |
|
inlineprivate |
Sends a byte array with value 0 followed by the UTF-8 encoded text from textBox2 using the client .
- Parameters
-
sender | The object that raised the event. |
e | The event data. |
This method asynchronously sends a byte array with value 0 followed by the UTF-8 encoded text from textBox2 using the client . After sending, the text in textBox2 is cleared.
◆ Dispose()
override void xeno_rat_server.Forms.Shell.Dispose |
( |
bool | disposing | ) |
|
|
inlineprotected |
Releases the unmanaged resources used by the component and optionally releases the managed resources.
- Parameters
-
disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
This method releases the unmanaged resources used by the component and optionally releases the managed resources. If disposing is true, this method disposes of the managed resources.
◆ InitializeComponent()
void xeno_rat_server.Forms.Shell.InitializeComponent |
( |
| ) |
|
|
inlineprivate |
Initializes the components of the form including buttons, text boxes, and event handlers.
◆ RecvThread()
async Task xeno_rat_server.Forms.Shell.RecvThread |
( |
| ) |
|
|
inline |
Asynchronously receives data from the connected client and updates the UI with the received data.
This method continuously listens for incoming data from the connected client using asynchronous operations. When data is received, it is decoded from bytes to a string using UTF-8 encoding and appended to the text box in the UI, followed by a new line. The method runs until the client is disconnected or an error occurs.
- Exceptions
-
InvalidOperationException | Thrown when the client is not in a connected state. |
◆ Shell_Load()
void xeno_rat_server.Forms.Shell.Shell_Load |
( |
object | sender, |
|
|
EventArgs | e ) |
|
inlineprivate |
Event handler for the form load event.
- Parameters
-
sender | The object that raised the event. |
e | The event data. |
◆ textBox1_VisibleChanged()
void xeno_rat_server.Forms.Shell.textBox1_VisibleChanged |
( |
object | sender, |
|
|
EventArgs | e ) |
|
inlineprivate |
Sets the cursor position to the end of the text and scrolls the text box to ensure the cursor is visible when the text box becomes visible.
- Parameters
-
sender | The object that raised the event. |
e | The event data. |
- Exceptions
-
System.InvalidOperationException | Thrown when the text box is not in a valid state for the operation. |
◆ textBox2_KeyDown()
void xeno_rat_server.Forms.Shell.textBox2_KeyDown |
( |
object | sender, |
|
|
KeyEventArgs | e ) |
|
inlineprivate |
Handles the KeyDown event for textBox2. If the Enter key is pressed, it triggers the click event for button3 and suppresses the key press.
- Parameters
-
sender | The object that raised the event. |
e | A KeyEventArgs that contains the event data. |
This method checks if the Enter key is pressed and, if so, triggers the click event for button3 and suppresses the key press to prevent further processing of the Enter key.
◆ button1
System.Windows.Forms.Button xeno_rat_server.Forms.Shell.button1 |
|
private |
◆ button2
System.Windows.Forms.Button xeno_rat_server.Forms.Shell.button2 |
|
private |
◆ button3
System.Windows.Forms.Button xeno_rat_server.Forms.Shell.button3 |
|
private |
◆ client
Node xeno_rat_server.Forms.Shell.client |
|
private |
◆ components
System.ComponentModel.IContainer xeno_rat_server.Forms.Shell.components = null |
|
private |
Required designer variable.
◆ textBox1
System.Windows.Forms.TextBox xeno_rat_server.Forms.Shell.textBox1 |
|
private |
◆ textBox2
System.Windows.Forms.TextBox xeno_rat_server.Forms.Shell.textBox2 |
|
private |
The documentation for this class was generated from the following files:
- /Users/sumansaurabh/Documents/my-startup/xeno-rat/xeno rat server/Forms/Shell.cs
- /Users/sumansaurabh/Documents/my-startup/xeno-rat/xeno rat server/Forms/Shell.Designer.cs