Ejemplo n.º 1
0
        public lSearchCtrlDate(string fieldName, string alias, ctrlType type, Point pos, Size size)
            : base(fieldName, alias, type, pos, size)
        {
#if fit_txt_size
            int w = lConfigMng.getWidth(lConfigMng.getDateFormat()) + 20;
#else
            int w = 100;
#endif
            m_to.Text                = "to";
            m_to.AutoSize            = true;
            m_startdate.Width        = w;
            m_startdate.Format       = DateTimePickerFormat.Custom;
            m_startdate.CustomFormat = lConfigMng.getDisplayDateFormat();
            m_enddate.Width          = w;
            m_enddate.Format         = DateTimePickerFormat.Custom;
            m_enddate.CustomFormat   = lConfigMng.getDisplayDateFormat();
            FlowLayoutPanel datePanel = new FlowLayoutPanel();
            datePanel.BorderStyle = BorderStyle.FixedSingle;
            datePanel.Dock        = DockStyle.Top;
            datePanel.AutoSize    = true;
            datePanel.Controls.AddRange(new Control[] { m_startdate, m_to, m_enddate });

            m_panel.Controls.AddRange(new Control[] { m_label, datePanel });

            m_startdate.TextChanged += valueChanged;
            m_enddate.TextChanged   += M_enddate_TextChanged;

            //set font
            m_startdate.Font = lConfigMng.getFont();
            m_enddate.Font   = lConfigMng.getFont();
            m_to.Font        = lConfigMng.getFont();
        }
Ejemplo n.º 2
0
    public void BeAttcked(GameObject attackObj)
    {
        if (nowHp <= 0)
        {
            return;
        }
        nowHp -= attNum;
        if (nowHp <= 0)
        {
            GameObject destroyEffect = (GameObject)Instantiate(fireEffect, transform.position, transform.rotation);
            destroyEffect.transform.SetParent(transform, false);
            destroyEffect.transform.localPosition = Vector3.zero;
            controlType = ctrlType.none;
            if (attackObj != null)
            {
                Tank tk = attackObj.GetComponent <Tank> ();
                if (tk != null && tk.controlType == ctrlType.player)
                {
                    tk.StartShowKill();
                }
            }
        }

        if (controlType == ctrlType.computer)
        {
            ai.OnAttack(attackObj);
        }
    }
Ejemplo n.º 3
0
 public lSearchCtrlText(string fieldName, string alias, ctrlType type, Point pos, Size size)
     : base(fieldName, alias, type, pos, size)
 {
     m_text              = lConfigMng.crtTextBox();
     m_text.Width        = 200;
     m_text.TextChanged += valueChanged;
     m_panel.Controls.AddRange(new Control[] { m_label, m_text });
 }
Ejemplo n.º 4
0
        public lInputCtrlText(string fieldName, string alias, ctrlType type, Point pos, Size size)
            : base(fieldName, alias, type, pos, size)
        {
            m_text       = ConfigMng.CrtTextBox();
            m_text.Width = 200;

            m_panel.Controls.AddRange(new Control[] { m_label, m_text });
        }
Ejemplo n.º 5
0
 public lInputCtrl(string fieldName, string alias, ctrlType type, Point pos, Size size)
     : base(fieldName, alias, type, pos, size)
 {
     m_label             = ConfigMng.CrtLabel();
     m_label.Text        = alias + " : ";
     m_label.TextAlign   = ContentAlignment.MiddleLeft;
     m_panel.BorderStyle = BorderStyle.None;
 }
Ejemplo n.º 6
0
        public lInputCtrlDate(string fieldName, string alias, ctrlType type, Point pos, Size size)
            : base(fieldName, alias, type, pos, size)
        {
#if fit_txt_size
            int w = ConfigMng.getWidth(ConfigMng.getDateFormat()) + 20;
#else
            int w = 100;
#endif
            m_date.Width        = w;
            m_date.Format       = DateTimePickerFormat.Custom;
            m_date.CustomFormat = ConfigMng.GetDisplayDateFormat();
            m_date.Font         = ConfigMng.GetFont();

            m_panel.Controls.AddRange(new Control[] { m_label, m_date });
        }
Ejemplo n.º 7
0
        public lSearchCtrl(string fieldName, string alias, ctrlType type, Point pos, Size size)
        {
            m_fieldName = fieldName;
            m_alias     = alias;
            m_type      = type;
            m_pos       = pos;
            m_size      = size;

            m_label.Text = alias;
#if fit_txt_size
            m_label.AutoSize = true;
#else
            m_label.Width = 100;
#endif
            m_label.TextAlign = ContentAlignment.MiddleLeft;
            m_panel.AutoSize  = true;
#if true
            m_panel.BorderStyle = BorderStyle.FixedSingle;
#endif
        }
Ejemplo n.º 8
0
        public lSearchCtrlCurrency(string fieldName, string alias, ctrlType type, Point pos, Size size)
            : base(fieldName, alias, type, pos, size)
        {
            m_to.Text     = "to";
            m_to.AutoSize = true;
#if fit_txt_size
            int w = lConfigMng.getWidth("000,000,000,000");
#else
            int w = 100;
#endif
            m_startVal.Width = w;
            m_endVal.Width   = w;

            FlowLayoutPanel datePanel = new FlowLayoutPanel();
            datePanel.BorderStyle = BorderStyle.FixedSingle;
            datePanel.Dock        = DockStyle.Top;
            datePanel.AutoSize    = true;
            datePanel.Controls.AddRange(new Control[] { m_startVal, m_to, m_endVal });

            m_panel.Controls.AddRange(new Control[] { m_label, datePanel });

            m_startVal.TextChanged += valueChanged;
            m_endVal.TextChanged   += M_endVal_TextChanged;
        }
Ejemplo n.º 9
0
 public lSearchCtrlNum(string fieldName, string alias, ctrlType type, Point pos, Size size)
     : base(fieldName, alias, type, pos, size)
 {
     m_mode = SearchMode.match;
 }