Пример #1
0
        private void Refresh()
        {
            servers = AwsCommandUtility.GetServers();
            bindingSource1.DataSource      = servers;
            lastRefreshToolStripLabel.Text = "Last Refreshed: " + DateTime.Now.ToString();

            //Fix extensions
            foreach (Server ec2 in servers)
            {
                if (!extenstions.ContainsKey(ec2.Id))
                {
                    extenstions.Add(ec2.Id, new ServerExtension());
                }
            }

            for (int i = 0; i < servers.Count; i++)
            {
                var id = servers[i].Id;
                //var copy_cell = dataGridView1.Rows[i].Cells["CopyIP"] as DataGridViewButtonCell;
                //copy_cell.Value = extenstions[id].IpCopied?"Copied":"";
                var restart_cell = dataGridView1.Rows[i].Cells["RestartSS"] as DataGridViewButtonCell;
                restart_cell.Value = extenstions[id].IpCopied ? "Restarted" : "";
            }
        }
Пример #2
0
 public async Task <IActionResult> Index()
 {
     return(View(AwsCommandUtility.GetServers()));
 }