示例#1
0
        public void SetProjectStatus(string szProjectName, STATUS status)
        {
            XmlNode oneNode = XmlUtil.EnsureElement(settingsNode, "status", "project", szProjectName);

            oneNode.InnerText = status.ToString();
            Save();
        }
示例#2
0
 public List <DDBinding> GetAllCustomers(STATUS customerStatus = STATUS.ACTIVE)
 {
     return(GetAll <MASTER>().Where(x => x.MASTER_VALUE.Equals(customerStatus.ToString()))
            .Join(GetAll <CUSTOMER>(), m => m.MASTER_ID, s => s.STATUS_ID, (a, b) => b)
            .Select(s =>
                    new DDBinding
     {
         Id = s.CUSTOMER_ID,
         Name = s.CUSTOMER_NAME
     }).ToList());
 }
示例#3
0
 public List <DDBinding> GetAllTractorModels(int supplierId, STATUS tractorStatus = STATUS.ACTIVE)
 {
     return(GetAll <MASTER>().Where(x => x.MASTER_VALUE.Equals(tractorStatus.ToString()))
            .Join(GetAll <TRACTOR_MODEL>(), m => m.MASTER_ID, s => s.TRACTOR_STATUS, (a, b) => b).Where(d => d.SUPPLIER_ID == supplierId)
            .Select(s =>
                    new DDBinding
     {
         Id = s.TRACTOR_MODEL_ID,
         Name = s.TRACTOR_MODEL_NAME
     }).ToList());
 }
示例#4
0
    public static DiscordResponse ChangeStatus(string token, STATUS status)
    {
        var content = new Dictionary <string, string>
        {
            { "status", status.ToString() }
        };

        return(Send(
                   METHODS.PATCH,
                   $"v{ApiVer}/users/@me/settings",
                   JsonSerializer.Serialize(content),
                   token
                   ));
    }
示例#5
0
        public override string ToString()
        {
            // e.g. {REQUEST_PORT, “SVC1”, 0, SUCCESS}

            string result = "";

            result += "{";
            result += msg_type.ToString();
            result += ", ";
            result += service_name;
            result += ", ";
            result += port.ToString();
            result += ", ";
            result += status.ToString();
            result += "}";

            return(result);
        }
示例#6
0
        public void RefreshStatus()
        {
            string cmd = "boot2docker status";

            DisplayConsolCommand(cmd);
            string result = ExecuteCommand(cmd);

            try
            {
                _lastStatus = (STATUS)Enum.Parse(typeof(STATUS), result.Replace('\n', ' ').Trim().ToUpper());
            }
            catch (Exception)
            {
                Console.WriteLine("Unknow status detected : " + result);
                _lastStatus = STATUS.UNKNOWN;
            }

            System.Console.WriteLine(_lastStatus.ToString());
        }
        /// <summary>
        /// Load Notes from MS onenote
        /// </summary>
        private async void ConnectOneNote()
        {
            COLOR  color       = COLOR.WHITE;
            STATUS status      = STATUS.TODO;
            string description = "";
            int    pos1        = 0;
            int    pos2        = 0;

            ResultText.Text = "";
            var sectionList = await Managers.Instance.onenote.GetHttpContentWithToken(_oneNoteEndPoint, Managers.Instance.user.AccessToken);

            List <ApiBaseResponse> data = sectionList as List <ApiBaseResponse>;

            if (data == null)
            {
                ResultText.Text += sectionList as string;
            }
            else
            {
                foreach (var it in data)
                {
                    color  = COLOR.WHITE;
                    status = STATUS.TODO;

                    PageResponse page    = it as PageResponse;
                    var          content = await Managers.Instance.onenote.GetHttpContentWithToken(page.ContentUrl, Managers.Instance.user.AccessToken, true);

                    description = content as string;

                    if ((pos1 = description.IndexOf("COLOR=")) != -1 && (pos2 = description.IndexOf(";", pos1)) != -1)
                    {
                        var tmp = description.Substring(pos1 + 6, pos2 - pos1 - 6);
                        for (var i = 0; i < 5; ++i)
                        {
                            COLOR color_ = (COLOR)i;
                            if (color_.ToString() == tmp)
                            {
                                color       = (COLOR)i;
                                description = description.Substring(0, pos1) + description.Substring(pos2 + 1);
                                break;
                            }
                        }
                    }

                    if ((pos1 = description.IndexOf("STATUS=")) != -1 && (pos2 = description.IndexOf(";", pos1)) != -1)
                    {
                        var tmp = description.Substring(pos1 + 7, pos2 - pos1 - 7);
                        for (var i = 0; i < 4; ++i)
                        {
                            STATUS status_ = (STATUS)i;
                            if (status_.ToString() == tmp)
                            {
                                status      = (STATUS)i;
                                description = description.Substring(0, pos1) + description.Substring(pos2 + 1);
                                break;
                            }
                        }
                    }

                    if (Managers.Instance.AddToDo(page.Title, description, DateTime.Now, DateTime.Now, status, color))
                    {
                        ListToDo.Items.Add(page.Title);
                    }
                }
            }
            Managers.Instance.db.SaveDb();
        }
示例#8
0
    void Update()
    {
        ppsValue = (int)sld_pps.value; //ppsを取得
        dir      = !tgl_dir.isOn;      //向きを取得 ※チェックボックスとコマンドのtrue/falseが逆になっている

        if (!SerialConnect_Arduino_Base.Instance.GetisConnect())
        {
            return;
        }

        try
        {
            //ステータスの更新
            SerialConnect_Arduino_Base.ReceiveCmd status = SerialConnect_Arduino_Unipolar.Instance_Unipolar.UnipolarStatus;
            bool _motplay  = false;
            bool _motready = false;
            switch (motor)
            {
            case SerialConnect_Arduino_Unipolar.CMD_TYPE.MOTOR1:
                _motready = status.HasFlag(SerialConnect_Arduino_Base.ReceiveCmd.flg_7);
                _motplay  = status.HasFlag(SerialConnect_Arduino_Base.ReceiveCmd.flg_6);
                break;

            case SerialConnect_Arduino_Unipolar.CMD_TYPE.MOTOR2:
                _motready = status.HasFlag(SerialConnect_Arduino_Base.ReceiveCmd.flg_5);
                _motplay  = status.HasFlag(SerialConnect_Arduino_Base.ReceiveCmd.flg_4);
                break;

            case SerialConnect_Arduino_Unipolar.CMD_TYPE.MOTOR3:
                _motready = status.HasFlag(SerialConnect_Arduino_Base.ReceiveCmd.flg_3);
                _motplay  = status.HasFlag(SerialConnect_Arduino_Base.ReceiveCmd.flg_2);
                break;

            case SerialConnect_Arduino_Unipolar.CMD_TYPE.MOTOR4:
                _motready = status.HasFlag(SerialConnect_Arduino_Base.ReceiveCmd.flg_1);
                _motplay  = status.HasFlag(SerialConnect_Arduino_Base.ReceiveCmd.flg_0);
                break;
            }

            if (!_motready)
            {
                now_status = STATUS.NOT_READY;
            }
            else
            {
                if (_motplay)
                {
                    now_status = STATUS.START;
                }
                else
                {
                    now_status = STATUS.STOP;
                }
            }

            txt_status.text = now_status.ToString() + " pps:" + ppsValue.ToString();
        }
        catch (System.Exception)
        {
            txt_status.text = "Fail to update Status";
        }
    }
示例#9
0
    void OnGUI()
    {
        GUIStyle style = new GUIStyle();

        switch (Application.loadedLevelName.ToString())
        {
        //Begin of case "Title"/////////////////////////
        ////////////////////////////////////////////
        case "Title":

            style.fontSize         = 18;
            style.normal.textColor = Color.gray;
            style.alignment        = TextAnchor.MiddleCenter;

            Vector2 text_size = new Vector2(m_w * 0.2f, m_h * 0.05f);


            //Background Image
            //GUI.Box(new Rect(0.0f, 0.0f, m_w, m_h), "");

            switch (GameManager.GetTitleStatus())
            {
            case "WAITFORKEY":
                style.fontSize         = 22;
                style.normal.textColor = Color.yellow;


                text_size = new Vector2(m_w * 0.4f, m_h * 0.05f);
                GUI.Box(new Rect((m_w * 0.5f) - (text_size.x * 0.5f), m_h * 0.9f, text_size.x, text_size.y), "Press Any Key To Start", style);
                break;

            case "MAIN":
                style.normal.textColor = Color.yellow;
                GUI.Box(new Rect((m_w * 0.2f) - (text_size.x * 0.5f), m_h * 0.9f, text_size.x, text_size.y), "Main", style);
                style.normal.textColor = Color.gray;
                GUI.Box(new Rect((m_w * 0.4f) - (text_size.x * 0.5f), m_h * 0.9f, text_size.x, text_size.y), "Tutorial", style);
                GUI.Box(new Rect((m_w * 0.6f) - (text_size.x * 0.5f), m_h * 0.9f, text_size.x, text_size.y), "TestStage", style);
                GUI.Box(new Rect((m_w * 0.8f) - (text_size.x * 0.5f), m_h * 0.9f, text_size.x, text_size.y), "Option", style);

                break;

            case "TUTORIAL":
                GUI.Box(new Rect((m_w * 0.2f) - (text_size.x * 0.5f), m_h * 0.9f, text_size.x, text_size.y), "Main", style);
                style.normal.textColor = Color.yellow;
                GUI.Box(new Rect((m_w * 0.4f) - (text_size.x * 0.5f), m_h * 0.9f, text_size.x, text_size.y), "Tutorial", style);
                style.normal.textColor = Color.gray;
                GUI.Box(new Rect((m_w * 0.6f) - (text_size.x * 0.5f), m_h * 0.9f, text_size.x, text_size.y), "TestStage", style);
                GUI.Box(new Rect((m_w * 0.8f) - (text_size.x * 0.5f), m_h * 0.9f, text_size.x, text_size.y), "Option", style);
                break;

            case "TESTSTAGE":
                GUI.Box(new Rect((m_w * 0.2f) - (text_size.x * 0.5f), m_h * 0.9f, text_size.x, text_size.y), "Main", style);
                GUI.Box(new Rect((m_w * 0.4f) - (text_size.x * 0.5f), m_h * 0.9f, text_size.x, text_size.y), "Tutorial", style);
                style.normal.textColor = Color.yellow;
                GUI.Box(new Rect((m_w * 0.6f) - (text_size.x * 0.5f), m_h * 0.9f, text_size.x, text_size.y), "TestStage", style);
                style.normal.textColor = Color.gray;
                GUI.Box(new Rect((m_w * 0.8f) - (text_size.x * 0.5f), m_h * 0.9f, text_size.x, text_size.y), "Option", style);
                break;

            case "OPTION":
                GUI.Box(new Rect((m_w * 0.2f) - (text_size.x * 0.5f), m_h * 0.9f, text_size.x, text_size.y), "Main", style);
                GUI.Box(new Rect((m_w * 0.4f) - (text_size.x * 0.5f), m_h * 0.9f, text_size.x, text_size.y), "Tutorial", style);
                GUI.Box(new Rect((m_w * 0.6f) - (text_size.x * 0.5f), m_h * 0.9f, text_size.x, text_size.y), "TestStage", style);
                style.normal.textColor = Color.yellow;
                GUI.Box(new Rect((m_w * 0.8f) - (text_size.x * 0.5f), m_h * 0.9f, text_size.x, text_size.y), "Option", style);
                break;
            }

            break;

        //End of case "Title"/////////////////////////
        ////////////////////////////////////////////
        case "Main":
        case "Tutorial":
        case "Test01":

            style.normal.textColor = Color.yellow;

            //For Debug
            if (DEBUG_MODE)
            {
                Vector2 base_pos = new Vector2(20, m_h - 50);

                GUI.Box(new Rect(base_pos.x, base_pos.y, 20, 20), "GROUND :" + grounded.ToString(), style);
                GUI.Box(new Rect(base_pos.x, base_pos.y + 20, 20, 20), "status :" + status.ToString(), style);
            }
            //End of For Debug
            style.fontSize = 25;

            if (GameManager.GameClear())
            {
                style.normal.textColor = UnityEngine.Color.white;
                GUI.Box(new Rect(m_w * 0.05f, m_h * 0.8f, 40.0f, 20.0f), "CLEARED!", style);
            }
            else if (GameManager.Miss())
            {
                style.normal.textColor = UnityEngine.Color.red;
                if (GameManager.GameOver())
                {
                    GUI.Box(new Rect(m_w * 0.05f, m_h * 0.8f, 40.0f, 20.0f), "GAMEOVER!", style);
                }
                else
                {
                    GUI.Box(new Rect(m_w * 0.05f, m_h * 0.8f, 40.0f, 20.0f), "MISSED!!", style);
                }
            }

            //Display FPS
            string fps = Application.targetFrameRate.ToString();
            GUI.Box(new Rect(m_w * 0.9f, m_h * 0.9f, 40.0f, 20.0f), fps, style);



            //About HitPoint
            int[] life = player.GetLifeInfo();
            for (int i = 0; i < life[0]; i++)
            {
                if (i < life[1])
                {
                    GUI.Box(new Rect(m_basePos_lifePoint.x + (m_interval_life * i), m_basePos_lifePoint.y, m_scale_lifePoint, m_scale_lifePoint), icon_heart [1], GUIStyle.none);
                }
                else
                {
                    GUI.Box(new Rect(m_basePos_lifePoint.x + (m_interval_life * i), m_basePos_lifePoint.y, m_scale_lifePoint, m_scale_lifePoint), icon_heart [0], GUIStyle.none);
                }
            }
            //End of About HitPoint

            /*
             *              //About spiritBar
             *              float[] spirit = player.GetSpiritInfo ();
             *              float value_percent = spirit[1] / spirit[0];
             *              float scaleX = m_scale_spiritBarFrame.x * value_percent;
             *
             *              GUI.Box (new Rect (m_basePos_spiritBar.x, m_basePos_spiritBar.y, m_scale_spiritBarFrame.x, m_scale_spiritBarFrame.y), spiritBar, GUIStyle.none);
             *
             *              //spiritBar frame
             *              GUI.Box (new Rect (m_basePos_spiritBar.x, m_basePos_spiritBar.y, m_scale_spiritBarFrame.x, m_scale_spiritBarFrame.y), spiritBar_frame, GUIStyle.none);
             *
             *              //End of About spiritBar
             */
            break;
//End of case "Main"/////////////////////////
////////////////////////////////////////////

        default:
            break;
        }
    }