コード例 #1
0
        public KeyBind(string displayName, bool defaultValue, BindTypes bindType, Tuple <uint, uint> defaultKeys)
            : base(displayName, DefaultHeight)
        {
            // Initialize properties
            ControlHandle = new CheckBoxHandle(bindType)
            {
                IsActive = defaultValue
            };
            TextObjects.Add(TextHandle = new Text(DisplayName, DefaultFont)
            {
                TextOrientation = Text.Orientation.Bottom,
                Color           = DefaultColorGold
            });
            DefaultValue = defaultValue;
            CurrentValue = defaultValue;
            BindType     = bindType;
            Keys         = defaultKeys;
            Buttons      = new Tuple <KeyButtonHandle, KeyButtonHandle>(new KeyButtonHandle(KeyStrings.Item1, this, true), new KeyButtonHandle(KeyStrings.Item2, this));

            // Initalize theme specific properties
            OnThemeChange();

            // Listen to active state changes
            ControlHandle.OnActiveStateChanged += delegate(DynamicControl sender, EventArgs args) { CurrentValue = sender.IsActive; };

            // Add controls to base container
            Add(ControlHandle);
            Add(Buttons.Item1);
            Add(Buttons.Item2);

            // Listen to required events
            Buttons.Item1.OnActiveStateChanged += OnActiveStateChanged;
            Buttons.Item2.OnActiveStateChanged += OnActiveStateChanged;
        }
コード例 #2
0
            internal CheckBoxHandle(BindTypes bindType) : base(ThemeManager.SpriteType.ControlCheckBox)
            {
                // Initialize properties
                BindType = bindType;

                // Initalize theme specific properties
                OnThemeChange();
            }
コード例 #3
0
 private void OnEffectBindTypeSelected(int index, string title)
 {
     // && !string.IsNullOrEmpty(effectInfo.EffectName) && effectInfo.EffectName != BindTypes.NONE
     if (effectInfo != null)
     {
         int ty = BindTypes.GetType(title);
         effectInfo.BindType = ty;
     }
 }
コード例 #4
0
 public KeyBind(
     string displayName,
     bool defaultValue,
     BindTypes bindType,
     char defaultKey1,
     char defaultKey2)
     : this(displayName, defaultValue, bindType, new Tuple <uint, uint>(Char.ToUpper(defaultKey1), Char.ToUpper(defaultKey2)))
 {
 }
コード例 #5
0
 public KeyBind(
     string displayName,
     bool defaultValue,
     BindTypes bindType,
     uint defaultKey1 = UnboundKey,
     uint defaultKey2 = UnboundKey)
     : this(displayName, defaultValue, bindType, new Tuple <uint, uint>(defaultKey1, defaultKey2))
 {
 }
コード例 #6
0
        public static string Getaccess_value(string legoid)
        {
            string strRootLv = BindTypes.GetLegoLevel1_treeview(legoid, "0");

            if (strRootLv == "S")
            {
                strRootLv = "P";
            }
            return(strRootLv);
        }
コード例 #7
0
ファイル: DataManager.cs プロジェクト: daxingyou/client-2
 public static ObservableList <string> GetEffectBindList()
 {
     if (effectBindList.Count == 0)
     {
         foreach (string key in BindTypes.Types())
         {
             effectBindList.Add(key);
         }
     }
     return(effectBindList);
 }
コード例 #8
0
        public static List <board> get_employee()
        {
            DBAccess _dbacc = new DBAccess();
            var      comp   = (BindTypes.GetCompanyId("Emp", HttpContext.Current.User.Identity.Name.ToString())).ToString();
            DataSet  ds     = new DataSet();

            ds = _dbacc.GetDataSet("SELECT * FROM Employee where CompanyId=" + comp);

            List <board> sd = new List <board>();

            foreach (DataRow row in ds.Tables[0].Rows)
            {
                board bo = new board();
                bo.name = row["UserName"].ToString();
                sd.Add(bo);
            }
            return(sd);
        }
コード例 #9
0
    public void Show(string title, EffectInfo eInfo, bool isNew, Action <EffectInfo> onEditorCompleteHandler)
    {
        if (container != null)
        {
            container.SetActive(true);
        }
        titleText.text          = title;
        effectInfo              = eInfo;
        isNewCreate             = isNew;
        oldEffectInfo           = effectInfo.Clone();
        OnEditorCompleteHandler = onEditorCompleteHandler;
        flySpeed.SetValue(effectInfo.FlySpeed, DataManager.FlySpeedMax);
        speedText.text = effectInfo.FlySpeed.ToString();


        int index = DataManager.GetEffectIndex(effectInfo.EffectName);

        effectNameSet.ListView.Select(index);

        int    eType = effectInfo.EffectType;
        string ety   = EffectTypes.GetValue(eType);

        index = DataManager.GetEffectTypeIndex(ety);
        effectTypeSet.ListView.Select(index);


        index = DataManager.GetSoundIndex(effectInfo.SoundName);
        soundNameSet.ListView.Select(index);

        soundDelayText.text = effectInfo.SoundPlayDelayTime.ToString();
        soundPlayPointSet.SetValue(effectInfo.SoundPlayDelayTime, DataManager.ActionSoundDelayMax);


        isLoop.isOn = effectInfo.IsLoop;

        string by = BindTypes.GetKey(effectInfo.BindType);

        index = DataManager.GetEffectBindIndex(by);
        effectBindTypeSet.ListView.Select(index);

        by    = BoneTypes.ValueToKey(effectInfo.BindName);
        index = DataManager.GetEffectBindnIndex(by);
        effectBindNameSet.ListView.Select(index);
    }
コード例 #10
0
ファイル: CSVReader.cs プロジェクト: elp87/elpExtensions
 public Column(string bind, int index, object additionalArg, bool isAddArgFirst, BindTypes bindType)
 {
     this.bind = bind;
     this.index = index;
     this.additionalArg = additionalArg;
     this.isAddArgFirst = isAddArgFirst;
     this.bindType = bindType;
 }
コード例 #11
0
ファイル: CSVReader.cs プロジェクト: elp87/elpExtensions
 public Column(string bind, int index, int arrayIndex, BindTypes bindType)
 {
     this.bind = bind;
     this.index = index;
     this.arrayIndex = arrayIndex;
     this.bindType = bindType;
 }