Esempio n. 1
0
    private void ViewerActivWindow()
    {
        switch (NumberRoom)
        {
        case 0:
            AppRootStatic.SetActiveLabel(TypeLabel.Info, true);
            AppRootStatic.SetActiveLabel(TypeLabel.Header, true);
            AppRootStatic.SetActiveUI(TypeUI.AppMenu, true);
            AppRootStatic.SetActiveLabel(TypeLabel.AppMenuInfo1, false);
            AppRootStatic.SetActiveLabel(TypeLabel.AppMenuInfo2, false);
            AppRootStatic.SetActiveLabel(TypeLabel.AppMenuHelp, false);
            AppRootStatic.SetActiveButton(TypeButton.Back, false);
            AppRootStatic.SetActiveButton(TypeButton.NextInstr, false);
            AppRootStatic.SetActiveButton(TypeButton.PrevInstr, false);
            AppRootStatic.SetActiveButton(TypeButton.HideInfo1, false);
            AppRootStatic.SetActiveButton(TypeButton.HideInfo2, false);
            AppRootStatic.SetActiveButton(TypeButton.HideHelper, false);
            AppRootStatic.SetActiveUI(TypeUI.Metodic, false);
            AppRootStatic.SetActiveLabel(TypeLabel.Viewer, false);
            AppRootStatic.SetActiveUI(TypeUI.Exit, false);
            AppRootStatic.SetLabelText(TypeLabel.Header, Head.Header[NumberRoom]);
            AppRootStatic.SetActiveLabel(TypeLabel.Task, false);
            AppRootStatic.SetActiveButton(TypeButton.Task, false);
            oWindows = true;
            AppRootStatic.isMoviment = false;
            return;

        case 6:
            AppRootStatic.SetActiveLabel(TypeLabel.Info, true);
            AppRootStatic.SetActiveLabel(TypeLabel.Header, true);
            AppRootStatic.SetActiveUI(TypeUI.AppMenu, true);
            AppRootStatic.SetActiveLabel(TypeLabel.AppMenuInfo1, false);
            AppRootStatic.SetActiveLabel(TypeLabel.AppMenuInfo2, false);
            AppRootStatic.SetActiveLabel(TypeLabel.AppMenuHelp, false);
            AppRootStatic.SetActiveButton(TypeButton.Next, false);
            AppRootStatic.SetActiveButton(TypeButton.NextInstr, false);
            AppRootStatic.SetActiveButton(TypeButton.PrevInstr, false);
            AppRootStatic.SetActiveButton(TypeButton.HideInfo1, false);
            AppRootStatic.SetActiveButton(TypeButton.HideInfo2, false);
            AppRootStatic.SetActiveButton(TypeButton.HideHelper, false);
            AppRootStatic.SetLabelText(TypeLabel.Header, Head.Header[NumberRoom]);
            AppRootStatic.SetActiveLabel(TypeLabel.Task, false);
            AppRootStatic.SetActiveButton(TypeButton.Task, false);
            oWindows = true;
            AppRootStatic.isMoviment = false;
            return;

        default:
            AppRootStatic.SetActiveLabel(TypeLabel.Header, true);
            AppRootStatic.SetActiveUI(TypeUI.AppMenu, true);
            if (oWindows)
            {
                AppRootStatic.SetActiveLabel(TypeLabel.AppMenuInfo1, true);
                AppRootStatic.SetActiveLabel(TypeLabel.AppMenuInfo2, true);
                AppRootStatic.SetActiveLabel(TypeLabel.AppMenuHelp, true);
                AppRootStatic.SetActiveButton(TypeButton.Back, true);
                AppRootStatic.SetActiveButton(TypeButton.Next, true);
                AppRootStatic.SetActiveButton(TypeButton.NextInstr, true);
                AppRootStatic.SetActiveButton(TypeButton.PrevInstr, true);
                AppRootStatic.SetActiveButton(TypeButton.HideInfo1, true);
                AppRootStatic.SetActiveButton(TypeButton.HideInfo2, true);
                AppRootStatic.SetActiveButton(TypeButton.HideHelper, true);
                AppRootStatic.SetActiveButton(TypeButton.Task, true);
                AppRootStatic.NormalButtonHide();
                oWindows = false;
            }
            AppRootStatic.SetLabelText(TypeLabel.Header, Head.Header[NumberRoom]);
            AppRootStatic.SetLabelText(TypeLabel.AppMenuInfo1, Info1.Info[NumberRoom - 1]);
            AppRootStatic.SetLabelText(TypeLabel.AppMenuInfo2, GetStrinInfo2(Variants.Rooms[NumberRoom - 1]));
            AppRootStatic.SetValues(System.Convert.ToSingle(Variants.Rooms[NumberRoom - 1].ValueThermometr),
                                    System.Convert.ToSingle(Variants.Rooms[NumberRoom - 1].ValueAnimometr) / 10,
                                    System.Convert.ToSingle(Variants.Rooms[NumberRoom - 1].ValueHygrometeDry),
                                    System.Convert.ToSingle(Variants.Rooms[NumberRoom - 1].ValueHygrometeWet));
            AppRootStatic.SwitchToolOff();
            AppRootStatic.SetLabelText(TypeLabel.AppMenuHelp, Help.Helper[NumberRoom == 6 ? 1 : 0]);
            AppRootStatic.SetActiveLabel(TypeLabel.Info, false);
            AppRootStatic.SetActiveLabel(TypeLabel.Task, false);
            AppRootStatic.NormalButtonTask();
            ButtonInstrument();
            AppRootStatic.isMoviment = true;
            break;
        }
    }