Exemplo n.º 1
0
    private string urlUpdateSong  = "http://tbm2.com/music/run_music_update.php";   //"https://dawntaylorgames.com/runmusic/run_music_update.php";//



    private void Awake()
    {
        if (S != null)
        {
            Destroy(gameObject);
        }
        S = this;
        DismissMessage();
    }
Exemplo n.º 2
0
        protected void lnkBan_Click(object sender, EventArgs e)
        {
            var         closeLink = (Control)sender;
            GridViewRow row       = (GridViewRow)closeLink.NamingContainer;
            var         id        = ((TextBox)row.FindControl("txtID")).Text.Trim();

            if (id == string.Empty)
            {
                return;
            }

            var hidSuspent = ((HiddenField)row.Cells[0].FindControl("hidSuspent")).Value.ToBool();

            var categories = new Categories();

            categories.Add(new Category
            {
                CatType     = Constants.PartType,
                CatCode     = FRType,
                ID          = ((TextBox)row.FindControl("txtID")).Text.ToUpper(),
                Description = ((TextBox)row.FindControl("txtDesp")).Text,
                CreatedDate = Dates.ToDateTime(((HiddenField)row.FindControl("hidCreatedDate")).Value.Trim(), DateFormat.Format_01),
                Action      = Constants.UpdateAction,
                Suspend     = !hidSuspent
            });

            var firstOrDefault = categories.FirstOrDefault();

            if (firstOrDefault != null)
            {
                firstOrDefault.DataBaseInfo = UserContext.DataBaseInfo;
            }

            var controlPanel = new ControlPanelManager();

            if (controlPanel.SetCategory(categories))
            {
                CustomMessageControl.MessageBodyText = hidSuspent ? GlobalCustomResource.ModalityIncluded : GlobalCustomResource.ModalitySuspended;
                CustomMessageControl.MessageType     = MessageTypes.Success;
                CustomMessageControl.ShowMessage();
                AuditLog.LogEvent(UserContext, SysEventType.INFO, hidSuspent ? "Modality Included" : "Modality Suspended",
                                  hidSuspent ? GlobalCustomResource.ModalityIncluded : GlobalCustomResource.ModalitySuspended, true);
                lnkAddNew.Enabled = true;
                lnkAddNew.Style.Add("cursor", "Pointer");
                BindData(null);
            }
            else
            {
                CustomMessageControl.MessageBodyText = hidSuspent ? GlobalCustomResource.ModalityIncludedFailed : GlobalCustomResource.ModalitySuspendedFailed;
                CustomMessageControl.MessageType     = MessageTypes.Error;
                CustomMessageControl.ShowMessage();
                AuditLog.LogEvent(UserContext, SysEventType.INFO, hidSuspent ? "Modality Included FAILED" : "Modality Suspended FAILED",
                                  hidSuspent ? GlobalCustomResource.ModalityIncludedFailed : GlobalCustomResource.ModalitySuspendedFailed, true);
            }
        }
Exemplo n.º 3
0
    //Modifyed singleton pattern
    public static ControlPanelManager Instance()
    {
        if (!myControlPanelManager)
        {
            myControlPanelManager = FindObjectOfType(typeof(ControlPanelManager)) as ControlPanelManager;
            if (!myControlPanelManager)
            {
                Debug.Log("I can't continute because I need at least one control panel manager instance!");
            }
        }

        return(myControlPanelManager);
    }
Exemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        Instance            = this;
        controlPanelManager = ControlPanelManager.Instance();
        recognizer          = new GestureRecognizer();
        isVisualAnalysisOn  = false;

        recognizer.TappedEvent += (source, tapCount, ray) =>
        {
            toggleVisualAnalysisStatus();
        };
        recognizer.StartCapturingGestures();
    }
Exemplo n.º 5
0
        protected void lnkSave_Click(object sender, EventArgs e)
        {
            var categories = new Categories();

            lnkAddNew.Enabled = true;
            lnkAddNew.Style.Add("cursor", "Pointer");

            foreach (GridViewRow gvRow in GridViewTable.Rows)
            {
                categories.Add(new Category
                {
                    CatType     = Constants.PartType,
                    CatCode     = FRType,
                    ID          = ((TextBox)gvRow.FindControl("txtID")).Text.ToUpper(),
                    Description = ((TextBox)gvRow.FindControl("txtDesp")).Text,
                    CreatedDate = Dates.ToDateTime(((HiddenField)gvRow.FindControl("hidCreatedDate")).Value.Trim(), DateFormat.Format_01),
                    Action      = (string.IsNullOrEmpty((((HiddenField)gvRow.FindControl("hdnAction")).Value)) ? Constants.UpdateAction : ((HiddenField)gvRow.FindControl("hdnAction")).Value),
                    Suspend     = false
                });
            }
            var firstOrDefault = categories.FirstOrDefault();

            if (firstOrDefault != null)
            {
                firstOrDefault.DataBaseInfo = UserContext.DataBaseInfo;
            }
            var controlPanel = new ControlPanelManager();

            if (controlPanel.SetCategory(categories))
            {
                CustomMessageControl.MessageBodyText = GlobalCustomResource.ModalitySaved;
                CustomMessageControl.MessageType     = MessageTypes.Success;
                CustomMessageControl.ShowMessage();
                AuditLog.LogEvent(UserContext, SysEventType.INFO, "Category SAVED", GlobalCustomResource.ModalitySaved, true);
                BindData(null);
            }
            else
            {
                CustomMessageControl.MessageBodyText = GlobalCustomResource.ModalityFailed;
                CustomMessageControl.MessageType     = MessageTypes.Error;
                CustomMessageControl.ShowMessage();
                AuditLog.LogEvent(UserContext, SysEventType.INFO, "Category UPDATE FAILED", GlobalCustomResource.ModalityFailed, true);
            }
        }
Exemplo n.º 6
0
    // Use this for initialization
    void Start()
    {
        Debug.Log("Register Voice Manager");
        controlPanelManager = ControlPanelManager.Instance();

        keywordToActionDict.Add("Reset world", () =>
        {
            // Call the OnReset method on every descendant object.
            this.BroadcastMessage("OnClearAllAnalysisTextMessages");
        });

        keywordToActionDict.Add("Turn On Visual analysis", () =>
        {
            Debug.Log("turn on visual analysis");
            controlPanelManager.ChangeVisualAnalysisStatus("ON");
        });

        keywordToActionDict.Add("Help me avoid soda", () =>
        {
            Debug.Log("Help me avoid soda");
            controlPanelManager.ChangeVisualAnalysisStatus("ON");
        });

        keywordToActionDict.Add("Turn Off Visual analysis", () =>
        {
            Debug.Log("turn off visual analysis");
            controlPanelManager.ChangeVisualAnalysisStatus("OFF");
        });


        // Tell the KeywordRecognizer about our keywordToActionDict.
        keywordRecognizer = new KeywordRecognizer(keywordToActionDict.Keys.ToArray());

        // Register a callback for the KeywordRecognizer and start recognizing!
        keywordRecognizer.OnPhraseRecognized += KeywordRecognizer_OnPhraseRecognized;
        keywordRecognizer.Start();
    }
 private void Start()
 {
     instance = this;
 }