예제 #1
0
        private void ControlDoor(Freezer f_choice, Button f_current)
        {
            string ont = f_current.Content.ToString();

            if (ont == "close")
            {
                LinearGradientBrush ddd = new LinearGradientBrush(Color.FromRgb(246, 217, 217), Color.FromRgb(218, 69, 69), new Point(0.5, 0), new Point(0.5, 1));
                f_current.Content    = "open";
                f_current.Background = ddd;
                f_choice.DoorOpen();
                Info.Text = f_choice.GetTC.FreezeName + " door open";
            }
            else
            {
                LinearGradientBrush ddd = new LinearGradientBrush(Color.FromRgb(218, 69, 69), Color.FromRgb(246, 217, 217), new Point(0.5, 0), new Point(0.5, 1));
                f_current.Content    = "close";
                f_current.Background = ddd;
                f_choice.DoorClose();
                Info.Text = f_choice.GetTC.FreezeName + " door close";
            }
        }