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; }
internal CheckBoxHandle(BindTypes bindType) : base(ThemeManager.SpriteType.ControlCheckBox) { // Initialize properties BindType = bindType; // Initalize theme specific properties OnThemeChange(); }
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; } }
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))) { }
public KeyBind( string displayName, bool defaultValue, BindTypes bindType, uint defaultKey1 = UnboundKey, uint defaultKey2 = UnboundKey) : this(displayName, defaultValue, bindType, new Tuple <uint, uint>(defaultKey1, defaultKey2)) { }
public static string Getaccess_value(string legoid) { string strRootLv = BindTypes.GetLegoLevel1_treeview(legoid, "0"); if (strRootLv == "S") { strRootLv = "P"; } return(strRootLv); }
public static ObservableList <string> GetEffectBindList() { if (effectBindList.Count == 0) { foreach (string key in BindTypes.Types()) { effectBindList.Add(key); } } return(effectBindList); }
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); }
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); }
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; }
public Column(string bind, int index, int arrayIndex, BindTypes bindType) { this.bind = bind; this.index = index; this.arrayIndex = arrayIndex; this.bindType = bindType; }