-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathScratch.cs
More file actions
43 lines (35 loc) · 1.33 KB
/
Copy pathScratch.cs
File metadata and controls
43 lines (35 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ScriptHelper
{
internal class Scratch
{
private void Movie_SelectedIndexChanged(object sender, EventArgs e)
{
// Get the TabControl object from the sender parameter
TabControl tabControl = sender as TabControl;
if (tabControl != null)
{
// Get the currently selected tab
TabPage selectedTab = tabControl.SelectedTab;
// Display a message box with the selected tab's name
MessageBox.Show("Selected tab: " + selectedTab.Name);
}
}
private void Movie_Selected(Object sender, TabControlEventArgs e)
{
System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
messageBoxCS.AppendFormat("{0} = {1}", "TabPage", e.TabPage);
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "TabPageIndex", e.TabPageIndex);
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Action", e.Action);
messageBoxCS.AppendLine();
MessageBox.Show(messageBoxCS.ToString(), "Selected Event");
}
}
}