Exemplo n.º 1
0
        public Form1()
        {
            InitializeComponent();

            ApplicationStatus.activeServer = null;

            serverContainer = new ServerContainer(this);
            addServerForm = new AddServerForm(this);
            editServerForm = new EditServerForm(this);

            timer = new Timer();
            timer.Interval = pingInterval * 1000;
            timer.Tick += new EventHandler(timerTick);
            timer.Start();

            downloadMessageWatch = new Stopwatch();
            downloadMessageWatch.Start();

            serverList.View = View.Details;
            serverList.MultiSelect = false;

            int columnWidth = 130;
            serverList.Columns.Add("Name", columnWidth, HorizontalAlignment.Left);
            serverList.Columns.Add("Website", columnWidth, HorizontalAlignment.Left);
            serverList.Columns.Add("Version", columnWidth, HorizontalAlignment.Left);
            serverList.Columns.Add("Status", columnWidth, HorizontalAlignment.Left);

            VersionChecker.checkForNewVersion();
        }
Exemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();

            ApplicationStatus.activeServer = null;

            serverContainer = new ServerContainer(this);
            addServerForm   = new AddServerForm(this);
            editServerForm  = new EditServerForm(this);

            timer          = new Timer();
            timer.Interval = pingInterval * 1000;
            timer.Tick    += new EventHandler(timerTick);
            timer.Start();

            downloadMessageWatch = new Stopwatch();
            downloadMessageWatch.Start();

            serverList.View        = View.Details;
            serverList.MultiSelect = false;

            int columnWidth = 130;

            serverList.Columns.Add("Name", columnWidth, HorizontalAlignment.Left);
            serverList.Columns.Add("Website", columnWidth, HorizontalAlignment.Left);
            serverList.Columns.Add("Version", columnWidth, HorizontalAlignment.Left);
            serverList.Columns.Add("Status", columnWidth, HorizontalAlignment.Left);

            VersionChecker.checkForNewVersion();
        }
Exemplo n.º 3
0
        private void editServerButton_Click_1(object sender, EventArgs e)
        {
            if (!isServerSelected())
            {
                return;
            }

            if (isServerDownloading())
            {
                return;
            }

            if (editServerForm == null)
            {
                editServerForm = new EditServerForm(this);
            }

            if (!editServerForm.Visible)
            {
                editServerForm.Show();
            }
        }
Exemplo n.º 4
0
        private void editServerButton_Click_1(object sender, EventArgs e)
        {
            if (!isServerSelected()) return;

            if (isServerDownloading()) return;

            if (editServerForm == null)
                editServerForm = new EditServerForm(this);

            if (!editServerForm.Visible)
                editServerForm.Show();
        }