Exemple #1
0
 private void cmdRefresh_Click(object sender, EventArgs e)
 {
     listView1.Items.Clear();
     proc = WindowPOS.GetWindowsInfo();
     foreach (var item in proc)
     {
         listView1.Items.Add(new ListViewItem(new string[] { item.proc.ProcessName, item.rect.Left.ToString(), item.rect.Top.ToString(), item.rect.Right.ToString(), item.rect.Bottom.ToString() }));
     }
 }
Exemple #2
0
        public Form1()
        {
            InitializeComponent();

            if (!IsUserAdministrator())
            {
                MessageBox.Show("ERROR", "Please restart application as ADMINISTRATOR", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            proc = WindowPOS.GetWindowsInfo();
            foreach (var item in proc)
            {
                listView1.Items.Add(new ListViewItem(new string[] { item.proc.ProcessName, item.rect.Left.ToString(), item.rect.Top.ToString(), item.rect.Right.ToString(), item.rect.Bottom.ToString() }));
            }
        }
Exemple #3
0
 private void cmdSave_Click(object sender, EventArgs e)
 {
     WindowPOS.SaveWindowStates(WindowPOS.GetWindowsInfo(), listView1.SelectedIndices);
 }