public AngryProfessor(int numberOfStudents, int requiredStudents, List<int> arrivalTimes)
 {
     this.result = RESULT.YES;
     this.numberOfStudents = numberOfStudents;
     this.requiredStudents = requiredStudents;
     this.arrivalTimes = arrivalTimes;
 }
Ejemplo n.º 2
0
 private void ErrCheck(RESULT result)
 {
     if (result != RESULT.OK)
     {
         string msg = string.Format("FMOD Error! {0} - {1}", result, Error.String(result));
         Logging.LogManager.GetLogger(this).Fatal(msg);
         throw new FMODException(result, msg);
     }
 }
	    private  RESULT CreateSound(RESULT result)
	    {
		    if (!_soundcreated)
		    {
			    result = _system.createSound((string) null, (_mode | MODE.CREATESTREAM), ref _createsoundexinfo,
				    ref _sound);
			    _soundcreated = true;
		    }
		    return result;
	    }
 public void Resolve()
 {
     int count = 0;
     foreach (int time in arrivalTimes)
     {
         count += time <= 0 ? 1 : 0;
         if (count >= this.requiredStudents)
         {
             this.result = RESULT.NO;
             break;
         }
     }
 }
Ejemplo n.º 5
0
        public RESULT lookupPath(Guid guid, out string path)
        {
            path = null;
            byte[] array  = new byte[256];
            int    num    = 0;
            RESULT rESULT = System.FMOD_Studio_System_LookupPath(this.rawPtr, guid.ToByteArray(), array, array.Length, out num);

            if (rESULT == RESULT.ERR_TRUNCATED)
            {
                array  = new byte[num];
                rESULT = System.FMOD_Studio_System_LookupPath(this.rawPtr, guid.ToByteArray(), array, array.Length, out num);
            }
            if (rESULT == RESULT.OK)
            {
                path = Encoding.UTF8.GetString(array, 0, num - 1);
            }
            return(rESULT);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Set Music Position 0-100
        /// </summary>
        /// <param name="pos">Percent</param>
        public void SetPosition(uint pos)
        {
            uint ln = 0;

            if (music != null)
            {
                music.getLength(ref ln, TIMEUNIT.MS);
            }
            pos = (ln * pos / 100);
            if (Channel != null)
            {
                RESULT result = Channel.setPosition(pos, TIMEUNIT.MS);
                if (EngineError != null)
                {
                    EngineError(result);
                }
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        ///Switch Of Mute Mode
        /// </summary>
        public void SetMute()
        {
            bool mute = false;

            if (Channel != null)
            {
                RESULT result = Channel.getMute(ref mute);
                if (EngineError != null)
                {
                    EngineError(result);
                }
                result = Channel.setMute(!mute);
                if (EngineError != null)
                {
                    EngineError(result);
                }
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Set Pause On If The Sound Is Playing Or Set it Off
        /// </summary>
        public void SetPaused()
        {
            bool paused = false;

            if (Channel != null)
            {
                RESULT result = Channel.getPaused(ref paused);
                if (EngineError != null)
                {
                    EngineError(result);
                }
                result = Channel.setPaused(!paused);
                if (EngineError != null)
                {
                    EngineError(result);
                }
            }
        }
Ejemplo n.º 9
0
        public RESULT getPath(out string path)
        {
            path = null;
            byte[] array  = new byte[256];
            int    num    = 0;
            RESULT rESULT = EventDescription.FMOD_Studio_EventDescription_GetPath(this.rawPtr, array, array.Length, out num);

            if (rESULT == RESULT.ERR_TRUNCATED)
            {
                array  = new byte[num];
                rESULT = EventDescription.FMOD_Studio_EventDescription_GetPath(this.rawPtr, array, array.Length, out num);
            }
            if (rESULT == RESULT.OK)
            {
                path = Encoding.UTF8.GetString(array, 0, num - 1);
            }
            return(rESULT);
        }
Ejemplo n.º 10
0

        
Ejemplo n.º 11
0
        public static double calculateScore(List <String> QuestionIds, List <String> AnswerLists, int apply_id, int index)
        {
            APTECH_SEM_3Entities db = new APTECH_SEM_3Entities();
            bool flag = false;

            try
            {
                RESULT result = (from p in db.RESULTs where p.APPLY_ID == apply_id select p).SingleOrDefault();
                for (int i = 0; i < QuestionIds.Count; i++)
                {
                    int    parseQuestionId = int.Parse(QuestionIds[i]);
                    ANSWER answer          = (from p in db.ANSWERs where p.QUESTION_ID == parseQuestionId && p.STATUS == true select p).SingleOrDefault();
                    if (answer.ANSWER1 == AnswerLists[i])
                    {
                        switch (index)
                        {
                        case 1:
                            flag = true;
                            result.TEST_RESULT_1 += answer.QUESTION.POINT;
                            break;

                        case 2:
                            flag = true;
                            result.TEST_RESULT_2 += answer.QUESTION.POINT;
                            break;

                        case 3:
                            flag = true;
                            result.TEST_RESULT_3 += answer.QUESTION.POINT;
                            break;
                        }
                    }
                }
                if (db.SaveChanges() == 0 && flag == true)
                {
                    throw new Exception("CAN NOT UPDATE RESULT");
                }
                return(result.TEST_RESULT_1 + result.TEST_RESULT_2 + result.TEST_RESULT_3);
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 12
0
    private void Init()
    {
        UnityUtil.Log("FMOD_StudioSystem: Initialize");
        if (FMOD_StudioSystem.isInitialized)
        {
            return;
        }
        UnityEngine.Object.DontDestroyOnLoad(base.gameObject);
        UnityUtil.Log("FMOD_StudioSystem: System_Create");
        FMOD_StudioSystem.ERRCHECK(FMOD.Studio.System.create(out this.system));
        FMOD.Studio.INITFLAGS iNITFLAGS = FMOD.Studio.INITFLAGS.NORMAL;
        FMOD.System           system;
        FMOD_StudioSystem.ERRCHECK(this.system.getLowLevelSystem(out system));
        FMOD.ADVANCEDSETTINGS aDVANCEDSETTINGS = default(FMOD.ADVANCEDSETTINGS);
        aDVANCEDSETTINGS.randomSeed = (uint)DateTime.Now.Ticks;
        FMOD_StudioSystem.ERRCHECK(system.setAdvancedSettings(ref aDVANCEDSETTINGS));
        UnityUtil.Log("FMOD_StudioSystem: system.init");
        RESULT rESULT = this.system.initialize(1024, iNITFLAGS, FMOD.INITFLAGS.NORMAL, IntPtr.Zero);

        if (rESULT == RESULT.ERR_HEADER_MISMATCH)
        {
            UnityUtil.LogError("Version mismatch between C# script and FMOD binary, restart Unity and reimport the integration package to resolve this issue.");
        }
        else
        {
            FMOD_StudioSystem.ERRCHECK(rESULT);
        }
        FMOD_StudioSystem.ERRCHECK(this.system.flushCommands());
        rESULT = this.system.update();
        if (rESULT == RESULT.ERR_NET_SOCKET_ERROR)
        {
            UnityUtil.LogWarning("LiveUpdate disabled: socket in already in use");
            iNITFLAGS &= ~FMOD.Studio.INITFLAGS.LIVEUPDATE;
            FMOD_StudioSystem.ERRCHECK(this.system.release());
            FMOD_StudioSystem.ERRCHECK(FMOD.Studio.System.create(out this.system));
            FMOD_StudioSystem.ERRCHECK(this.system.getLowLevelSystem(out system));
            aDVANCEDSETTINGS            = default(FMOD.ADVANCEDSETTINGS);
            aDVANCEDSETTINGS.randomSeed = (uint)DateTime.Now.Ticks;
            FMOD_StudioSystem.ERRCHECK(system.setAdvancedSettings(ref aDVANCEDSETTINGS));
            rESULT = this.system.initialize(1024, iNITFLAGS, FMOD.INITFLAGS.NORMAL, IntPtr.Zero);
            FMOD_StudioSystem.ERRCHECK(rESULT);
        }
        FMOD_StudioSystem.isInitialized = true;
    }
Ejemplo n.º 13
0
        public int DoSaveData(FormCollection form, int?ID = null)
        {
            RESULT saveModel;

            if (ID == 0)
            {
                saveModel        = new RESULT();
                saveModel.BUD_ID = UserProvider.Instance.User.ID;
                saveModel.BUD_DT = DateTime.UtcNow.AddHours(8);
            }
            else
            {
                saveModel = this.DB.RESULT.Where(s => s.ID == ID).FirstOrDefault();
            }
            saveModel.TITLE      = form["title"];
            saveModel.DISABLE    = form["disable"] == null ? false : Convert.ToBoolean(form["disable"]);
            saveModel.SQ         = form["sortIndex"] == null ? 1 : Convert.ToDouble(form["sortIndex"]);
            saveModel.CONTENT    = form["contenttext"];
            saveModel.PUB_DT_STR = form["publishDate"];
            saveModel.UPT_DT     = DateTime.UtcNow.AddHours(8);
            saveModel.UPT_ID     = UserProvider.Instance.User.ID;
            PublicMethodRepository.FilterXss(saveModel);

            if (ID == 0)
            {
                this.DB.RESULT.Add(saveModel);
            }
            else
            {
                this.DB.Entry(saveModel).State = EntityState.Modified;
            }

            try
            {
                this.DB.SaveChanges();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            int identityId = (int)saveModel.ID;

            return(identityId);
        }
Ejemplo n.º 14
0
    private void loadBank(string path)
    {
        if (FMOD_Listener.sLoadedBanks.ContainsKey(path))
        {
            return;
        }
        UnityUtil.Log("Loading " + path + "...");
        Bank   value  = null;
        RESULT rESULT = FMOD_StudioSystem.instance.System.loadBankFile(path, LOAD_BANK_FLAGS.NORMAL, out value);

        if (rESULT == RESULT.ERR_VERSION)
        {
            UnityUtil.LogError(path + " was built with an incompatible version of FMOD Studio.");
        }
        if (rESULT == RESULT.OK)
        {
            UnityUtil.Log("Loading " + path + " succeeded.");
            FMOD_Listener.sLoadedBanks.Add(path, value);
        }
        else if (rESULT == RESULT.ERR_EVENT_ALREADY_LOADED)
        {
            UnityUtil.LogError(string.Concat(new string[]
            {
                "There may be an old FMOD bank left in the StreamingAssets directory. Loading ",
                path,
                " failed with ",
                rESULT.ToString(),
                "."
            }));
        }
        else
        {
            UnityUtil.LogError(string.Concat(new string[]
            {
                "Loading ",
                path,
                " failed: ",
                Error.String(rESULT),
                " (",
                rESULT.ToString(),
                ")"
            }));
        }
    }
Ejemplo n.º 15
0
 private void LoadPlugins(Settings fmodSettings)
 {
     foreach (string plugin in fmodSettings.Plugins)
     {
         if (!string.IsNullOrEmpty(plugin))
         {
             string pluginPath = RuntimeUtils.GetPluginPath(plugin);
             uint   handle;
             RESULT rESULT = lowlevelSystem.loadPlugin(pluginPath, out handle);
             if (rESULT == RESULT.ERR_FILE_BAD || rESULT == RESULT.ERR_FILE_NOTFOUND)
             {
                 string pluginPath2 = RuntimeUtils.GetPluginPath(plugin + "64");
                 rESULT = lowlevelSystem.loadPlugin(pluginPath2, out handle);
             }
             CheckInitResult(rESULT, $"Loading plugin '{plugin}' from '{pluginPath}'");
             loadedPlugins.Add(plugin, handle);
         }
     }
 }
Ejemplo n.º 16
0
    public void UpdateBattle()
    {
        long  battleEndTimeStamp = TimeHelper.GetCurrentTimestampScaled();
        float battleUsedSeconds  = (float)(battleEndTimeStamp - battleStartTimeStamp) / 1000.0f;

        battleUsedSeconds = battleUsedSeconds;

        if (InstancePlayer.instance.battle.IsPlayerWin())
        {
            battleResult = RESULT.WIN;

            AudioGroup.Play(GetComponent <AudioGroup> ().win, _camera, AudioGroup.TYPE.MUSIC);
        }
        else if (InstancePlayer.instance.battle.IsPlayerLoss())
        {
            battleResult = RESULT.LOSS;

            AudioGroup.Play(GetComponent <AudioGroup> ().loss, _camera, AudioGroup.TYPE.MUSIC);
        }
        else if (battleUsedSeconds >= 1000 * BATTLE_DURATION_SEC)
        {
            battleResult = RESULT.NOTIME;

            AudioGroup.Play(GetComponent <AudioGroup> ().loss, _camera, AudioGroup.TYPE.MUSIC);
        }

        if (battleResult != RESULT.UNKNOWN)
        {
            SwitchState(STATE.OVER);

            if (battleResult != RESULT.NOTIME)
            {
                List <Unit> units = _unitGroup.allUnits;
                foreach (Unit unit in units)
                {
                    if (!unit.isDead)
                    {
                        unit.WinAndExit();
                    }
                }
            }
        }
    }
Ejemplo n.º 17
0
    public static RESULT MultiFight(int missionMagicId, int times, PBConnect_multiFight.DelegateConnectCallback callback)
    {
        /*
         * Model_Mission modelMission = InstancePlayer.instance.model_User.model_level.GetMission (missionMagicId);
         * DataMission dataMission = DataManager.instance.dataMissionGroup.GetMission (missionMagicId);
         *
         * if (modelMission.remainFightNum < times) {
         *      return RESULT.LACK_TIMES;
         * }
         *
         * if (modelMission.starCount < 3) {
         *      return RESULT.LACK_STAR;
         * }
         *
         * int totalEnergyCost = dataMission.EnergyCost * times;
         * if (InstancePlayer.instance.model_User.model_Energy.energy < totalEnergyCost) {
         *      return RESULT.LACK_ENERGY;
         * }
         */


        RESULT r = CheckMultyFight(missionMagicId, times);

        if (r != RESULT.OK)
        {
            return(r);
        }

        Assert.assert(_callback == null);
        _callback = callback;


        MultiFightRequest request = new MultiFightRequest();

        request.api = new Model_ApiRequest().api;

        request.missionId = missionMagicId;
        request.num       = times;

        (new PBConnect_multiFight()).Send(request, OnMultiFight);

        return(r);
    }
Ejemplo n.º 18
0
        private void btnEndCom_Click(object sender, EventArgs e)
        {
            //tổng hợp các điểm số từ bảng tạm
            int    qt = TracNghiem.SoCauTraLoiDung(temp.id, pemp.id);
            string tb = string.Format("Điểm là {0}, số câu đúng {1}", qt * 10.0 / 60, qt);

            MessageBox.Show(tb);
            //lưu vào bảng kết quả
            //xóa tất cả các record từ bảng tạm
            RESULT t = new RESULT()
            {
                idCom = pemp.id, idStudent = temp.id, idSubtract = pemp.subtractID, score = qt * 10.0 / 60
            };

            TracNghiem.GhiKetQuaLai(t);
            TracNghiem.XoaBangTam(pemp.id, temp.id, pemp.subtractID);
            gpQuiz.Enabled = false;
            Close();
        }
Ejemplo n.º 19
0
    private void SwitchTarget(RESULT r)
    {
        if (_unit.unitFire.isAttacking)
        {
            return;
        }

        if (_currentTarget == null)
        {
            _currentTarget = r;
        }
        else if (IsTargetInShootRange(r) && !IsTargetInShootRange(_currentTarget))
        {
            _currentTarget = r;
        }
        else if (IsTargetInCloseRange(r))
        {
            if (IsTargetInCloseRange(_currentTarget))
            {
                float n = (r.target.transform.position - _unit.transform.position).magnitude;
                float o = (_currentTarget.target.transform.position - _unit.transform.position).magnitude;
                if (n < o)
                {
                    _currentTarget = r;
                }
            }
            else
            {
                _currentTarget = r;
            }
        }
        else
        {
            /*
             *      Vector3 v1 = _currentTarget.target.transform.position - _unit.transform.position;
             *      Vector3 v2 = r.target.transform.position - _unit.transform.position;
             *      if(v2.magnitude < v1.magnitude * 0.7f)
             *      {
             *              _currentTarget = r;
             *      }
             */
        }
    }
Ejemplo n.º 20
0
        public RESULT DeleteDrug()
        {
            RESULT result = new RESULT();

            try
            {
                string ownerId, id;

                id            = HttpContext.Current.Request.Form["id"];
                ownerId       = HttpContext.Current.Request.Form["ownerId"];
                result.result = Dap.drugs.deleteDrug(ownerId, id);
            }
            catch (Exception e)
            {
                result.state = false;
                result.msg   = e.Message;
            }
            return(result);
        }
Ejemplo n.º 21
0
        public void Stop()
        {
            if (!SoundSystem.AudioFound)
            {
                return;
            }

            if (!IsPlaying())
            {
                return;
            }

            RESULT result = ActiveChannel.stop();

            if (result != RESULT.OK)
            {
                throw new Exception("Stop Sound Failed\r\n" + result.ToString());
            }
        }
Ejemplo n.º 22
0
 /// <summary>
 /// Отправить сообщение главной форме для отображения в строке статуса
 /// </summary>
 /// <param name="res">Результат выполнения операции</param>
 /// <param name="message">Строка - сообщение для отображения</param>
 protected void dataAskedHostMessageToStatusStrip(RESULT res, string message)
 {
     if (string.IsNullOrEmpty(message) == false)
     {
         (_iFuncPlugin as HFuncDbEdit).DataAskedHost(new object[] { m_Id
                                                                    , (int)HFunc.ID_FUNC_DATA_ASKED_HOST.MESSAGE_TO_STATUSSTRIP // par[0] должен быть 'IsPrimitive'
                                                                    , res == HandlerDbTaskCalculate.RESULT.Exception ? TYPE_MESSAGE.EXCEPTION
                 : res == HandlerDbTaskCalculate.RESULT.Error ? TYPE_MESSAGE.ERROR
                     : res == HandlerDbTaskCalculate.RESULT.Warning ? TYPE_MESSAGE.WARNING
                         : res == HandlerDbTaskCalculate.RESULT.Ok ? TYPE_MESSAGE.ACTION
                             : res == HandlerDbTaskCalculate.RESULT.Debug ? TYPE_MESSAGE.DEBUG
                                 : TYPE_MESSAGE.UNKNOWN
                                                                    , message });
     }
     else
     {
         Logging.Logg().Warning(string.Format(@"HPanelTepCommon::dataAskedHostMessageToStatusStrip () - пустая строка для отображения в строке статуса..."), Logging.INDEX_MESSAGE.NOT_SET);
     }
 }
Ejemplo n.º 23
0
    public static RESULT DelNotification(int[] ids, PBConnect_delNotify.DelegateConnectCallback callback)
    {
        RESULT r = Check(ids);

        if (r != RESULT.OK)
        {
            return(r);
        }

        DelNotifyRequest request = new DelNotifyRequest();

        request.api = (new Model_ApiRequest()).api;

        ListHelper.Push <int> (request.notifyIds, ids);

        (new PBConnect_delNotify()).Send(request, callback);

        return(r);
    }
Ejemplo n.º 24
0
        public FMODSound(SoundSystem system, string path)
        {
            if (!SoundSystem.AudioFound)
            {
                return;
            }

            _system = system;
            RESULT result = system.System.createSound(path, MODE.HARDWARE, ref _sound);

            if (result != RESULT.OK)
            {
                result = system.System.createSound(path, MODE.SOFTWARE, ref _sound);
                if (result != RESULT.OK)
                {
                    throw new Exception("Create Sound Failed\r\n" + path + "\r\n" + result.ToString());
                }
            }
        }
Ejemplo n.º 25
0
		public Notification(String title, TYPE windowType = TYPE.YESNO)
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
            this.Text = title;

            //Disable normal window functions
            this.MinimizeBox = false;
            this.MaximizeBox = false;
            this.ControlBox = false;
            this.ShowInTaskbar = false;
            this.TopMost = true; //make it appear on the very top
            
			this.Size = new System.Drawing.Size(400, 400);
			this.AutoSize = true;
			this.Capture = true;
			this.Visible = false;
			this.Controls.Add(Description);
			Description.AutoSize = true;
			this.WindowType = windowType;
			if(this.WindowType == TYPE.YESNO)
			{
				//show yes and no button
				this.button_YES.Click += delegate { WindowResult = RESULT.YES; this.Close();};
				this.button_YES.Visible = true;
				this.button_NO.Click += delegate { WindowResult = RESULT.NO; this.Close();};
				this.button_NO.Visible = true;
			}
			else if(this.WindowType == TYPE.NOTIFY)
			{
				//show confirmed button
				this.button_Confirm.Click += delegate { WindowResult = RESULT.YES; };
				this.button_Confirm.Visible = true;
			}
			else
			{
				 //window type of TYPE.TRANSIENT has no button visible.
			}
		}
Ejemplo n.º 26
0
 //Mail the APPROVED candidates
 public ActionResult Mail(int APPLY_ID, int TEST_ID)
 {
     try
     {
         ResultService resultService = new ResultService();
         RESULT        result        = new RESULT();
         result.APPLY_ID = APPLY_ID;
         result.TEST_ID  = TEST_ID;
         //create result before mail
         resultService.create(result);
     }
     catch (Exception)
     {
     }
     try
     {
         //Mail
         AptechSem3.Service.MailService mailService  = new Service.MailService();
         ApplicationService             applyService = new ApplicationService();
         JOB_APPLICATION apply = applyService.findById(APPLY_ID.ToString());
         AptechSem3.Service.UsrService userService = new AptechSem3.Service.UsrService();
         USR         usr         = userService.findUsrByApplyID(APPLY_ID);
         TestService testService = new TestService();
         TEST        test        = testService.findById(TEST_ID.ToString());
         //message
         String message = "<p>Dear " + apply.NAME + ",</p>" +
                          "<p>Thank you for applying for the position with The Webster Company.</p>" +
                          "<p>We would like to invite you to our online test for the position. Your test has been scheduled for " + test.START_TIME + " to " + test.END_TIME + ".</p>" +
                          "<p>Your account for this test:</p>" +
                          "<p>Username: "******"</p>" + "<p>Password: "******"</p>" +
                          "<p>Please reply if you have any question.</p>" +
                          "<p>Sincerly,</p>" +
                          "<p>The Webster Company</p>";
         mailService.sendMail(apply.MAIL, test.TEST_NAME, message);
         ViewBag.error = "Mail success";
     }
     catch (Exception ex)
     {
         ViewBag.error = ex.Message;
     }
     return(RedirectToAction("ApplicationDetail", "Manager", new { applyId = APPLY_ID }));
 }
Ejemplo n.º 27
0
 public static void LoadBank(string bankName, bool loadSamples = false)
 {
     if (Instance.loadedBanks.ContainsKey(bankName))
     {
         LoadedBank value = Instance.loadedBanks[bankName];
         value.RefCount++;
         if (loadSamples)
         {
             value.Bank.loadSampleData();
         }
         Instance.loadedBanks[bankName] = value;
     }
     else
     {
         string     bankPath   = RuntimeUtils.GetBankPath(bankName);
         LoadedBank loadedBank = default(LoadedBank);
         RESULT     loadResult = Instance.studioSystem.loadBankFile(bankPath, LOAD_BANK_FLAGS.NORMAL, out loadedBank.Bank);
         Instance.loadedBankRegister(loadedBank, bankPath, bankName, loadSamples, loadResult);
     }
 }
Ejemplo n.º 28
0
        // GET: RESULTs/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RESULT rESULT = db.RESULTs.Find(id);

            if (rESULT == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Admin_ID   = new SelectList(db.ADMINs, "Admin_ID", "AdminName", rESULT.Admin_ID);
            ViewBag.Class_ID   = new SelectList(db.CLASSes, "Class_ID", "ClassName", rESULT.Class_ID);
            ViewBag.Section_ID = new SelectList(db.SECTIONs, "Section_ID", "SectionName", rESULT.Section_ID);
            ViewBag.Student_ID = new SelectList(db.STUDENTs, "Student_ID", "StudentName", rESULT.Student_ID);
            ViewBag.Subject_ID = new SelectList(db.SUBJECTs, "Subject_ID", "SubjectName", rESULT.Subject_ID);
            ViewBag.Teacher_ID = new SelectList(db.TEACHERs, "Teacher_ID", "TeacherName", rESULT.Teacher_ID);
            return(View(rESULT));
        }
Ejemplo n.º 29
0
    public static RESULT Dismiss(int id, int count, PBConnect_dismissUnit.DelegateConnectCallback callback)
    {
        RESULT r = Check(id, count);

        if (r != RESULT.OK)
        {
            return(r);
        }

        ProcessUnitRequest request = new ProcessUnitRequest();

        request.api = (new Model_ApiRequest()).api;

        request.unitId = id;
        request.num    = count;

        (new PBConnect_dismissUnit()).Send(request, callback);

        return(r);
    }
Ejemplo n.º 30
0
    //军官----------------------------------------------------------

    // 上阵
    public RESULT AddHero(Model_UnitGroup model_UnitGroup)
    {
        RESULT result = RESULT.SUCCESS;

        int teamId = model_UnitGroup.teamId;
        int posId  = model_UnitGroup.posId;
        int heroId = model_UnitGroup.heroId;

        if (IsTeamContaninHero(teamId, heroId))
        {
            result = RESULT.SAME_HERO;                          // 队伍中已经包含该类型Hero
        }
        else
        {
            Model_UnitGroup formation_Unit = GetUnitGroup(teamId, posId);
            formation_Unit.AddHero(heroId);
        }

        return(result);
    }
        /// <summary>
        /// Gets a low level channel group from a studio bus.
        /// If no bus is found then it will return the master channel group
        /// </summary>
        /// <returns>The channel group from bus.</returns>
        /// <param name="busPath">Bus.</param>
        public static ChannelGroup GetChannelGroupFromBus(string busPath)
        {
            RESULT       result = RESULT.OK;
            Bus          bus;
            ChannelGroup channelGroup;

            result = Instance.StudioSystem.getBus(busPath, out bus);

            if (result != RESULT.OK)
            {
                result = Instance.LowLevelSystem.getMasterChannelGroup(out channelGroup);
                Instance.CheckResult(result, "FMOD.GetMasterChannelGroup");
                return(channelGroup);
            }

            result = bus.getChannelGroup(out channelGroup);
            Instance.CheckResult(result, "Bus.GetChannelGroup");

            return(channelGroup);
        }
Ejemplo n.º 32
0
            public void Update(float deltaTime, Matrix world)
            {
                if (!(GameDataManager.GameType == GameDataManager.GameTypes.DS1 ||
                      GameDataManager.GameType == GameDataManager.GameTypes.DS1R ||
                      GameDataManager.GameType == GameDataManager.GameTypes.DS3 ||
                      GameDataManager.GameType == GameDataManager.GameTypes.SDT))
                {
                    return;
                }

                FMOD.EVENT_STATE state = EVENT_STATE.PLAYING;
                evtRes = Event.getState(ref state);

                if (evtRes == RESULT.ERR_INVALID_HANDLE)
                {
                    EventIsOver = true;
                    return;
                }

                if (state == EVENT_STATE.READY)
                {
                    EventIsOver = true;
                }
                else
                {
                    var position = Vector3.Transform(((GetPosFunc?.Invoke() ?? Vector3.Zero) * new Vector3(1, 1, 1)), world);
                    var velocity = Vector3.Zero;// (position - oldPos) / deltaTime;

                    // Flatten position to be on a flat plane
                    //position.Y = 0;

                    FMOD.VECTOR posVec = new VECTOR(position);
                    FMOD.VECTOR velVec = new VECTOR(velocity);

                    // If it fails due to the event being released, it's fine. No weirdness should happen.
                    evtRes = Event.set3DAttributes(ref posVec, ref velVec);
                    evtRes = Event.setVolume(BaseSoundVolume * AdjustSoundVolume);

                    oldPos = position;
                }
            }
Ejemplo n.º 33
0

        
Ejemplo n.º 34
0
    public int Tick()
    {
        if (_result != RESULT.WORKING)
        {
            return((int)_result);
        }

        if (_delay > 0)
        {
            _delay -= TimeHelper.deltaTime;
            return((int)_result);
        }

        _duration -= TimeHelper.deltaTime;
        if (_duration <= 0)
        {
            _result = RESULT.DONE;
            return((int)_result);
        }


//		unit.targetSelect.Update ();

        Vector3 p = UnitHelper.GetOrientation(unit.body.transform);

        VectorHelper.ResizeVector(ref p, 10);
        p += unit.transform.position;
        unit.unitDriver.SetTargetPosition(p);

        unit.unitFire.Update();

        unit.gridCorrect.HideCurrentGrid();
        {
            unit.unitDriver.Update();
            unit.aimmingControl.Update();
        }
        unit.gridCorrect.ShowCurrentGrid();
        unit.gridCorrect.Update();

        return((int)_result);
    }
Ejemplo n.º 35
0
        static private void CreateDeviceList()
        {
            if (m_deviceList.Count > 0)
            {
                return;
            }

            // Create a bare system object to get the driver count
            FMODSystem system = null;
            RESULT     result = Factory.System_Create(ref system);

            if (result == RESULT.ERR_FILE_BAD)
            {
                MessageBox.Show("Error creating audio device: 32/64 bit incompatibility.");
            }

            int driverCount = 0;

            system.getNumDrivers(ref driverCount);

            if (driverCount > 0)
            {
                // There are audio devices available

                // Create device list
                system.getNumDrivers(ref driverCount);
                StringBuilder sb = new StringBuilder(256);
                int           i;
                for (i = 0; i < driverCount; i++)
                {
                    GUID GUID = new GUID();
                    system.getDriverInfo(i, sb, sb.Capacity, ref GUID);
                    if (!sb.ToString().Contains("DAX"))
                    {
                        m_deviceList.Add(sb.ToString());
                    }
                }
            }

            system.release();
        }
Ejemplo n.º 36
0
      public void Copy(DataBlock db)
      {
         this.m_channelsBitField = db.m_channelsBitField;
         this.m_channels = db.m_channels;
         this.m_sample = db.m_sample;
         this.m_start = db.m_start;
         this.m_stop = db.m_stop;
         this.m_min = db.m_min;
         this.m_max = db.m_max;
         this.m_sampleRate = db.m_sampleRate;
         this.m_samplesPerChannel = db.m_samplesPerChannel;
         this.m_triggerVoltage = db.m_triggerVoltage;
         this.m_triggerPos = db.m_triggerPos;
         this.m_result = db.m_result;
         this.m_dataType = db.m_dataType;
         this.m_Annotations = db.m_Annotations;
         this.m_index = db.m_index;

         Alloc();

         System.Array.Copy(db.m_Buffer, 0, m_Buffer, 0, db.m_Buffer.Length);
      }
Ejemplo n.º 37
0
    public void Tackle()
    {
        result = RESULT.NONE;

        if (tackled == null || tackler == null)
        {
            throw new UnityException("Manque tackled ou tackler");
        }

        if (this.IsCrit())
        {
            result = RESULT.CRITIC;

            if (callback != null)
                callback(result);
        }
        else
        {
            remainingTime = tempsPlaquage;
            result = RESULT.QTE;

            tackled.ShowButton("A");
        }
    }
Ejemplo n.º 38
0
 private void ERRCHECK(RESULT result)
 {
     if (result != RESULT.OK)
     {
         throw new Exception(string.Format("Sound system error ({0})\n\n{1}", result, Error.String(result)));
     }
 }
Ejemplo n.º 39
0
 private void ErrCheck(RESULT result)
 {
     if (result != RESULT.OK)
     {
         var msg = string.Format("FMOD Error! {0} - {1}", result, Error.String(result));
         _log.FatalFormat(msg);
         throw new FMODException(result, msg);
     }
 }
Ejemplo n.º 40
0
 public FmodDspException(RESULT fmodError)
     : base(fmodError)
 {
 }
 private void ErrCheck(RESULT result)
 {
     if (result != RESULT.OK)
         throw new ApplicationException("FMOD error! " + result + " - " + Error.String(result));
 }
Ejemplo n.º 42
0
 public BaseFmodInvalidException(RESULT fmodError)
     : base(fmodError)
 {
 }
Ejemplo n.º 43
0
 private void ERRCHECK(RESULT result)
 {
     if (result != RESULT.OK)
         throw new Exception("FMOD error! " + result + " - " + Error.String(result));
 }
Ejemplo n.º 44
0
 /// <summary>
 /// Check for any error when using FMOD procedures.
 /// </summary>
 /// <param name="result">The result of the FMOD operatio.</param>
 private void CheckError(RESULT result)
 {
     //Throw exception if it's not okay
     if (result != RESULT.OK) throw new System.Exception(Error.String(result));
 }
Ejemplo n.º 45
0
        private void finishCmd(RESULT result)
        {
            if (cb != null) {
                cb (result, builder.ToString ());
            }

            cb = null;
            polls = 0;
            state = STATE.IDLE;
            builder.Clear ();
        }
Ejemplo n.º 46
0
 protected FmodPluginException(RESULT fmodError)
     : base(fmodError)
 {
 }
Ejemplo n.º 47
0
 private RESULT ERRCHECK(RESULT result)
 {
     UnityUtil.ERRCHECK(result);
     return result;
 }
Ejemplo n.º 48
0
 public FmodException(RESULT fmodError)
     : base(Error.String(fmodError))
 {
     FMODError = fmodError;
 }
Ejemplo n.º 49
0
		public FModException(RESULT result)
		{
			Result = result;
		}
Ejemplo n.º 50
0
    public void setupDrop()
    {
        Vector3 posBallEndDrop;

        float randAngle = Random.Range(-ball.randomLimitAngle, ball.randomLimitAngle);
        if (ball != null)
        {
            owner = ball.Owner;
            ball.AttachToRoot();
            //ball.rigidbody.isKinematic = false;
            //ball.rigidbody.useGravity = false;

            ownerDirection = ball.Owner.transform.forward;
            ball.Owner = null;

            angleX = Mathf.Deg2Rad * randAngle;

            ball.transform.position = owner.BallPlaceHolderDrop.transform.position;
            initPos = ball.transform.position;

            owner.canCatchTheBall = false;
        }

        acceleration = ball.accelerationDrop > 0f ? -ball.accelerationDrop : ball.accelerationDrop;
        switch (type)
        {
            case TYPEOFDROP.KICK:
                posBallEndDrop = positionBallEndDrop(ball.multiplierDropKick, Game.instance.settings.GameStates
                                                                          .MainState
                                                                          .PlayingState
                                                                          .MainGameState
                                                                          .RunningState
                                                                          .BallFreeState
                                                                          .angleDropKick);
                break;
            case TYPEOFDROP.UPANDUNDER:
                posBallEndDrop = positionBallEndDrop(ball.multiplierDropUpAndUnder, ball.angleDropUpAndUnder);
                break;
            default:
                posBallEndDrop = Vector3.zero;
                break;
        }
        collisionGoalPost(posBallEndDrop);
        if (hitPosGoalPost == Vector3.zero)
        {
            res = RESULT.SUCCESS;
            drawCircle(posBallEndDrop);
        }
        else
        {
            res = RESULT.COLLISION;
            Debug.Log("pos collision " + hitPosGoalPost);
        }
    }
Ejemplo n.º 51
0
    public void Update()
    {
        if (result == RESULT.QTE)
        {
            if (this.atUpdate != null) this.atUpdate(tackler, tackled);

            /* Pass On Tackle */
            if (
                tackled.Team.Player != null &&
                (

                    Input.GetKeyDown(game.settings.Inputs.tackle.keyboard(tackled.Team)) ||
                    tackled.Team.Player.XboxController.GetButtonDown(game.settings.Inputs.tackle.xbox)

                )
            ){
                result = RESULT.PASS;
                if (callback != null)
                {
                    tackled.HideButton();
                    callback(result);
                }

                return;
            }

            remainingTime -= Time.deltaTime;
            if (remainingTime <= 0)
            {
                result = RESULT.NORMAL;
                if (callback != null)
                {
                    tackled.HideButton();
                    callback(result);
                }

                return;
            }
        }
    }
Ejemplo n.º 52
0
		private static void ERRCHECK(RESULT result)
		{
			if (result != RESULT.OK)
			{
			}
		}
Ejemplo n.º 53
0
 protected FmodNetException(RESULT fmodError)
     : base(fmodError)
 {
 }
Ejemplo n.º 54
0
 private static string GetExceptionMessage(string message, RESULT result)
 {
     return String.Format("{0}{1}{1}Error {2}", message, Environment.NewLine, result);
 }
Ejemplo n.º 55
0
 public BaseFmodFileException(RESULT fmodError, string fileName)
     : base(fmodError)
 {
     FileName = fileName;
 }
Ejemplo n.º 56
0
        public static string String(RESULT errcode)
        {
            switch (errcode)
            {
                case RESULT.OK:
                    return "No errors.";
                case RESULT.ERR_ALREADYLOCKED:
                    return "Tried to call lock a second time before unlock was called. ";
                case RESULT.ERR_BADCOMMAND:
                    return "Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound::lock on a streaming sound). ";
                case RESULT.ERR_CDDA_DRIVERS:
                    return "Neither NTSCSI nor ASPI could be initialised. ";
                case RESULT.ERR_CDDA_INIT:
                    return "An error occurred while initialising the CDDA subsystem. ";
                case RESULT.ERR_CDDA_INVALID_DEVICE:
                    return "Couldn't find the specified device. ";
                case RESULT.ERR_CDDA_NOAUDIO:
                    return "No audio tracks on the specified disc. ";
                case RESULT.ERR_CDDA_NODEVICES:
                    return "No CD/DVD devices were found. ";
                case RESULT.ERR_CDDA_NODISC:
                    return "No disc present in the specified drive. ";
                case RESULT.ERR_CDDA_READ:
                    return "A CDDA read error occurred. ";
                case RESULT.ERR_CHANNEL_ALLOC:
                    return "Error trying to allocate a channel. ";
                case RESULT.ERR_CHANNEL_STOLEN:
                    return "The specified channel has been reused to play another sound. ";
                case RESULT.ERR_COM:
                    return "A Win32 COM related error occured. COM failed to initialize or a QueryInterface failed meaning a Windows codec or driver was not installed properly. ";
                case RESULT.ERR_DMA:
                    return "DMA Failure.  See debug output for more information. ";
                case RESULT.ERR_DSP_CONNECTION:
                    return "DSP connection error.  Connection possibly caused a cyclic dependancy. ";
                case RESULT.ERR_DSP_FORMAT:
                    return "DSP Format error.  A DSP unit may have attempted to connect to this network with the wrong format. ";
                case RESULT.ERR_DSP_NOTFOUND:
                    return "DSP connection error.  Couldn't find the DSP unit specified. ";
                case RESULT.ERR_DSP_RUNNING:
                    return "DSP error.  Cannot perform this operation while the network is in the middle of running.  This will most likely happen if a connection or disconnection is attempted in a DSP callback. ";
                case RESULT.ERR_DSP_TOOMANYCONNECTIONS:
                    return "DSP connection error.  The unit being connected to or disconnected should only have 1 input or output. ";
                case RESULT.ERR_FILE_BAD:
                    return "Error loading file. ";
                case RESULT.ERR_FILE_COULDNOTSEEK:
                    return "Couldn't perform seek operation.  This is a limitation of the medium (ie netstreams) or the file format. ";
                case RESULT.ERR_FILE_DISKEJECTED:
                    return "Media was ejected while reading. ";
                case RESULT.ERR_FILE_EOF:
                    return "End of file unexpectedly reached while trying to read essential data (truncated data?). ";
                case RESULT.ERR_FILE_NOTFOUND:
                    return "File not found. ";
                case RESULT.ERR_FILE_UNWANTED:
                    return "Unwanted file access occured. ";
                case RESULT.ERR_FORMAT:
                    return "Unsupported file or audio format. ";
                case RESULT.ERR_HTTP:
                    return "A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere. ";
                case RESULT.ERR_HTTP_ACCESS:
                    return "The specified resource requires authentication or is forbidden. ";
                case RESULT.ERR_HTTP_PROXY_AUTH:
                    return "Proxy authentication is required to access the specified resource. ";
                case RESULT.ERR_HTTP_SERVER_ERROR:
                    return "A HTTP server error occurred. ";
                case RESULT.ERR_HTTP_TIMEOUT:
                    return "The HTTP request timed out. ";
                case RESULT.ERR_INITIALIZATION:
                    return "FMOD was not initialized correctly to support this function. ";
                case RESULT.ERR_INITIALIZED:
                    return "Cannot call this command after System::init. ";
                case RESULT.ERR_INTERNAL:
                    return "An error occured that wasn't supposed to.  Contact support. ";
                case RESULT.ERR_INVALID_ADDRESS:
                    return "On Xbox 360, this memory address passed to FMOD must be physical, (ie allocated with XPhysicalAlloc.) ";
                case RESULT.ERR_INVALID_FLOAT:
                    return "Value passed in was a NaN, Inf or denormalized float. ";
                case RESULT.ERR_INVALID_HANDLE:
                    return "An invalid object handle was used. ";
                case RESULT.ERR_INVALID_PARAM:
                    return "An invalid parameter was passed to this function. ";
                case RESULT.ERR_INVALID_POSITION:
                    return "An invalid seek position was passed to this function. ";
                case RESULT.ERR_INVALID_SPEAKER:
                    return "An invalid speaker was passed to this function based on the current speaker mode. ";
                case RESULT.ERR_INVALID_SYNCPOINT:
                    return "The syncpoint did not come from this sound handle.";
                case RESULT.ERR_INVALID_VECTOR:
                    return "The vectors passed in are not unit length, or perpendicular. ";
                case RESULT.ERR_MAXAUDIBLE:
                    return "Reached maximum audible playback count for this sound's soundgroup. ";
                case RESULT.ERR_MEMORY:
                    return "Not enough memory or resources. ";
                case RESULT.ERR_MEMORY_CANTPOINT:
                    return "Can't use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used. ";
                case RESULT.ERR_MEMORY_SRAM:
                    return "Not enough memory or resources on console sound ram. ";
                case RESULT.ERR_NEEDS2D:
                    return "Tried to call a command on a 3d sound when the command was meant for 2d sound. ";
                case RESULT.ERR_NEEDS3D:
                    return "Tried to call a command on a 2d sound when the command was meant for 3d sound. ";
                case RESULT.ERR_NEEDSHARDWARE:
                    return "Tried to use a feature that requires hardware support.  (ie trying to play a VAG compressed sound in software on PS2). ";
                case RESULT.ERR_NEEDSSOFTWARE:
                    return "Tried to use a feature that requires the software engine.  Software engine has either been turned off, or command was executed on a hardware channel which does not support this feature. ";
                case RESULT.ERR_NET_CONNECT:
                    return "Couldn't connect to the specified host. ";
                case RESULT.ERR_NET_SOCKET_ERROR:
                    return "A socket error occurred.  This is a catch-all for socket-related errors not listed elsewhere. ";
                case RESULT.ERR_NET_URL:
                    return "The specified URL couldn't be resolved. ";
                case RESULT.ERR_NET_WOULD_BLOCK:
                    return "Operation on a non-blocking socket could not complete immediately. ";
                case RESULT.ERR_NOTREADY:
                    return "Operation could not be performed because specified sound is not ready. ";
                case RESULT.ERR_OUTPUT_ALLOCATED:
                    return "Error initializing output device, but more specifically, the output device is already in use and cannot be reused. ";
                case RESULT.ERR_OUTPUT_CREATEBUFFER:
                    return "Error creating hardware sound buffer. ";
                case RESULT.ERR_OUTPUT_DRIVERCALL:
                    return "A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted. ";
                case RESULT.ERR_OUTPUT_ENUMERATION:
                    return "Error enumerating the available driver list. List may be inconsistent due to a recent device addition or removal.";
                case RESULT.ERR_OUTPUT_FORMAT:
                    return "Soundcard does not support the minimum features needed for this soundsystem (16bit stereo output). ";
                case RESULT.ERR_OUTPUT_INIT:
                    return "Error initializing output device. ";
                case RESULT.ERR_OUTPUT_NOHARDWARE:
                    return "FMOD_HARDWARE was specified but the sound card does not have the resources nescessary to play it. ";
                case RESULT.ERR_OUTPUT_NOSOFTWARE:
                    return "Attempted to create a software sound but no software channels were specified in System::init. ";
                case RESULT.ERR_PAN:
                    return "Panning only works with mono or stereo sound sources. ";
                case RESULT.ERR_PLUGIN:
                    return "An unspecified error has been returned from a 3rd party plugin. ";
                case RESULT.ERR_PLUGIN_INSTANCES:
                    return "The number of allowed instances of a plugin has been exceeded ";
                case RESULT.ERR_PLUGIN_MISSING:
                    return "A requested output, dsp unit type or codec was not available. ";
                case RESULT.ERR_PLUGIN_RESOURCE:
                    return "A resource that the plugin requires cannot be found. (ie the DLS file for MIDI playback) ";
                case RESULT.ERR_PRELOADED:
                    return "The specified sound is still in use by the event system, call EventSystem::unloadFSB before trying to release it. ";
                case RESULT.ERR_PROGRAMMERSOUND:
                    return "The specified sound is still in use by the event system, wait for the event which is using it finish with it. ";
                case RESULT.ERR_RECORD:
                    return "An error occured trying to initialize the recording device. ";
                case RESULT.ERR_REVERB_INSTANCE:
                    return "Specified Instance in FMOD_REVERB_PROPERTIES couldn't be set. Most likely because another application has locked the EAX4 FX slot. ";
                case RESULT.ERR_SUBSOUND_ALLOCATED:
                    return "This subsound is already being used by another sound, you cannot have more than one parent to a sound.  Null out the other parent's entry first. ";
                case RESULT.ERR_SUBSOUND_CANTMOVE:
                    return "Shared subsounds cannot be replaced or moved from their parent stream, such as when the parent stream is an FSB file.";
                case RESULT.ERR_SUBSOUND_MODE:
                    return "The subsound's mode bits do not match with the parent sound's mode bits.  See documentation for function that it was called with.";
                case RESULT.ERR_SUBSOUNDS:
                    return "The error occured because the sound referenced contains subsounds.  (ie you cannot play the parent sound as a static sample, only its subsounds.) ";
                case RESULT.ERR_TAGNOTFOUND:
                    return "The specified tag could not be found or there are no tags. ";
                case RESULT.ERR_TOOMANYCHANNELS:
                    return "The sound created exceeds the allowable input channel count.  This can be increased using the maxinputchannels parameter in System::setSoftwareFormat. ";
                case RESULT.ERR_UNIMPLEMENTED:
                    return "Something in FMOD hasn't been implemented when it should be! contact support! ";
                case RESULT.ERR_UNINITIALIZED:
                    return "This command failed because System::init or System::setDriver was not called. ";
                case RESULT.ERR_UNSUPPORTED:
                    return "A command issued was not supported by this object.  Possibly a plugin without certain callbacks specified. ";
                case RESULT.ERR_UPDATE:
                    return "An error caused by System::update occured. ";
                case RESULT.ERR_VERSION:
                    return "The version number of this file format is not supported. ";

                case RESULT.ERR_EVENT_FAILED:
                    return "An Event failed to be retrieved, most likely due to 'just fail' being specified as the max playbacks behavior. ";
                case RESULT.ERR_EVENT_GUIDCONFLICT:
                    return "An event with the same GUID already exists. ";
                case RESULT.ERR_EVENT_INFOONLY:
                    return "Can't execute this command on an EVENT_INFOONLY event. ";
                case RESULT.ERR_EVENT_INTERNAL:
                    return "An error occured that wasn't supposed to.  See debug log for reason. ";
                case RESULT.ERR_EVENT_MAXSTREAMS:
                    return "Event failed because 'Max streams' was hit when FMOD_INIT_FAIL_ON_MAXSTREAMS was specified. ";
                case RESULT.ERR_EVENT_MISMATCH:
                    return "FSB mis-matches the FEV it was compiled with. ";
                case RESULT.ERR_EVENT_NAMECONFLICT:
                    return "A category with the same name already exists. ";
                case RESULT.ERR_EVENT_NEEDSSIMPLE:
                    return "Tried to call a function on a complex event that's only supported by simple events. ";
                case RESULT.ERR_EVENT_NOTFOUND:
                    return "The requested event, event group, event category or event property could not be found. ";
                case RESULT.ERR_EVENT_ALREADY_LOADED:
                    return "The specified project has already been loaded. Having multiple copies of the same project loaded simultaneously is forbidden. ";

                case RESULT.ERR_MUSIC_NOCALLBACK:
                    return "The music callback is required, but it has not been set. ";
                case RESULT.ERR_MUSIC_UNINITIALIZED:
                    return "Music system is not initialized probably because no music data is loaded. ";
                case RESULT.ERR_MUSIC_NOTFOUND:
                    return "The requested music entity could not be found.";

                default:
                    return "Unknown error.";
            }
        }
Ejemplo n.º 57
0
        // SyncPermissionsToServer
        //
        public RESULT SyncPermissionsToServer(string credential, string[] permissionId, PERMISSION_STATE[] target_state_code, out PERMISSION_STATE[] final_state_code,out RESULT[] result)
        {
            // Authenticate
            LoginObjectEntity loginEnity = _purViewManager.GetLoginObject(credential);

            // PermissionSyncToServer
            result[i] = (RESULT)_permissionSyncAdapter.PermissionSyncToServer(permissionId[i], target_state_code[i], loginEnity, out final_state_code[i]);
        }