Beispiel #1
0
        private void btnAmmoniaPurge_Click(object sender, EventArgs e)
        {
            switch (btnAmmoniaPurge.Image.Tag.ToString())
            {
            case "close":
                Point point = new Point();
                point.label1.Text = "Ammonia Valve Purge Is Closed";
                DialogResult dr = point.ShowDialog();
                if (dr == DialogResult.OK)
                {
                    btnAmmoniaPurge.Image     = Properties.Resources.open;
                    btnAmmoniaPurge.Image.Tag = "open";
                }
                break;

            case "open":
                PointOpen pointopen = new PointOpen();
                pointopen.label1.Text = "Ammonia Valve Purge Is Open";
                DialogResult dr1 = pointopen.ShowDialog();
                if (dr1 == DialogResult.OK)
                {
                    btnAmmoniaPurge.Image     = Properties.Resources.close;
                    btnAmmoniaPurge.Image.Tag = "close";
                }


                break;
            }
        }
Beispiel #2
0
        private void btnPoint_Click(object sender, EventArgs e)
        {
            switch (btnPoint.Image.Tag.ToString())
            {
            case "close":
                Point        point = new Point();
                DialogResult dr    = point.ShowDialog();
                if (dr == DialogResult.OK)
                {
                    btnPoint.Image     = Properties.Resources.open;
                    btnPoint.Image.Tag = "open";
                }
                break;

            case "open":
                PointOpen    pointopen = new PointOpen();
                DialogResult dr1       = pointopen.ShowDialog();
                if (dr1 == DialogResult.OK)
                {
                    btnPoint.Image     = Properties.Resources.close;
                    btnPoint.Image.Tag = "close";
                }


                break;
            }
        }