Пример #1
0
        public static string GetRestartModeString(RestartMode rstMode)
        {
            switch (rstMode)
            {
            case RestartMode.RESTART:
                return("restart");

            case RestartMode.SHUTDOWN:
                return("shutdown");

            case RestartMode.XSTART:
                return("xstart");

            case RestartMode.ISTART:
                return("istart");

            case RestartMode.PSTART:
                return("pstart");

            case RestartMode.BSTART:
                return("bstart");

            default:
                return("restart");
            }
        }
Пример #2
0
    //     public Animator display1, display2, display3, buttons, failDialog, successDialog
    public void Guess()
    {
        try {
            isIntroEnabled = false;
            if (guess.text.ToUpper().Replace(" ", "") != chosenInstrument.ToString())
            {
                failDialog.Play("Showup");
                rmode = RestartMode.FAIL;
            }
            else
            {
                successDialog.Play("Showup");
                rmode = RestartMode.CORRECT;

                accumulatedText.text = $"+{accumulated}";
                hasWon = true;

                oldInstruments.Remove(chosenInstrument);
            }

            guess.text = "";

            display1.Play("FadeOut1");
            display2.Play("FadeOut2");
            display3.Play("FadeOut3");
            buttons.Play("ButtonFadeOut");
        } catch (Exception) {
        }
    }
Пример #3
0
    public void Setup()
    {
        try {
            selectedInstruments.Clear();
            rmode           = RestartMode.NONE;
            mode            = HelpMode.IMAGE;
            hasWon          = false;
            accumulated     = 100;
            startsWith.text = "";
            poolInstance    = oldInstruments.ToList();
            StartCoroutine(ToggleIntro());

            foreach (OptionDisplay display in displays)
            {
                Instrument r = GetRandomInstrument();
                if (r == Instrument.NONE)
                {
                    Option o = ScriptableObject.CreateInstance <Option>();
                    o.image          = mysteryBox;
                    o.instrumentName = "";
                    o.instrument     = Instrument.NONE;
                    display.option   = o;
                }
                else
                {
                    selectedInstruments.Add(r);
                    display.option = options.GetOption(r);
                }
                display.Setup();
            }

            chosenInstrument = selectedInstruments.GetRandomInstrument();
        } catch (Exception) {
        }
    }
Пример #4
0
        public async Task RestartAsync(RestartMode restartMode)
        {
            string rstMode = GetRestartModeString(restartMode);

            Tuple <string, string>[] dataParameters = { Tuple.Create("restart-mode", rstMode) };
            Tuple <string, string>[] urlParameters  = { Tuple.Create("json", "1") };

            await ControllerSession.CallAsync <dynamic>(RequestMethod.POST, "ctrl", dataParameters, urlParameters).ConfigureAwait(false);
        }
Пример #5
0
 public bool TryAddScopeID(ScopeID scopeID, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode memberDef, InternalStreamingOdpDynamicMemberLogic memberLogic)
 {
     if (this.IsParentScopeIDAlreadySet(memberDef))
     {
         RestartMode restartMode = (RestartMode)((!this.CanMarkRestartable(memberDef)) ? 1 : 0);
         this.m_queryRestartPosition.Add(new ScopeIDContext(scopeID, memberDef, memberLogic, restartMode));
         return(true);
     }
     return(false);
 }
 internal bool TryAddScopeID(ScopeID scopeID, Microsoft.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode memberDef, InternalStreamingOdpDynamicMemberLogic memberLogic)
 {
     if (IsParentScopeIDAlreadySet(memberDef))
     {
         RestartMode restartMode = (!CanMarkRestartable(memberDef)) ? RestartMode.Rom : RestartMode.Query;
         m_queryRestartPosition.Add(new ScopeIDContext(scopeID, memberDef, memberLogic, restartMode));
         return(true);
     }
     return(false);
 }
Пример #7
0
        public void Restart(RestartMode restartMode)
        {
            string method  = "POST";
            string rstMode = GetRestartModeString(restartMode);

            Tuple <string, string>[] dataParameters = { Tuple.Create("restart-mode", rstMode) };
            Tuple <string, string>[] urlParameters  = { Tuple.Create("json", "1") };

            Controller.Call <dynamic>(method, "ctrl", dataParameters, urlParameters);
        }
Пример #8
0
        /// <summary>
        ///     Restarts the shell with a specified mode.
        /// </summary>
        /// <param name="mode">The restart mode.</param>
        /// <returns>Whether the restart is successful.</returns>
        public bool Restart(RestartMode mode)
        {
            var vsRestartMode = __VSRESTARTTYPE.RESTART_Normal;

            if (mode == RestartMode.Elevated)
            {
                vsRestartMode = __VSRESTARTTYPE.RESTART_Elevated;
            }

            return(!ErrorHandler.Failed(Restart(vsRestartMode)));
        }
Пример #9
0
 public ScopeIDContext(ScopeID scopeID, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode memberDef, InternalStreamingOdpDynamicMemberLogic memberLogic, RestartMode restartMode)
     : base(restartMode)
 {
     this.m_scopeID     = scopeID;
     this.m_memberDef   = memberDef;
     this.m_memberLogic = memberLogic;
 }
Пример #10
0
 public RestartContext(RestartMode mode)
 {
     this.m_restartMode = mode;
 }
Пример #11
0
 internal ScopeIDContext(ScopeID scopeID, Microsoft.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode memberDef, InternalStreamingOdpDynamicMemberLogic memberLogic, RestartMode restartMode)
     : base(restartMode)
 {
     m_scopeID     = scopeID;
     m_memberDef   = memberDef;
     m_memberLogic = memberLogic;
 }