public bool Check() { GetSet allSets = new GetSet(); //List<Card> toCheck = allSets(); return(false); }
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { GetSet attribute = (GetSet)base.attribute; EditorGUI.BeginChangeCheck(); EditorGUI.PropertyField(position, property, label); if (EditorGUI.EndChangeCheck()) { attribute.Dirty = true; } else if (attribute.Dirty) { var parent = GetParentObject(property.propertyPath, property.serializedObject.targetObject); var type = parent.GetType(); var info = type.GetProperty(attribute.Name); if (info == null) { Debug.LogError("Invalid property name \"" + attribute.Name + "\""); } else { info.SetValue(parent, fieldInfo.GetValue(parent), null); } attribute.Dirty = false; } }
void UseGetSet() { GetSet getset = new GetSet(); getset.MyInt = 10; Debug.Log("getset.MyInt: " + getset.MyInt); // "getset.MyInt: 10" }
// Use this for initialization void Start() { GetSet gs = new GetSet(); gs.MyIntEvent += IntChagge; gs.MyInt = 10; Debug.Log(gs.DoubleInt); }
private static void Move(List <Card> AfterList) { Card card = AfterList[0]; Card caller = AfterList[1]; Transform targetContainer = AfterList[2].transform; GetSet.SetTarget(caller, card); card.transform.parent = targetContainer; }
void Start() { GetSet gs = new GetSet(); gs.MyIntEvent += IntChanged; gs.MyInt = 10; Debug.Log(gs.doubleInt); AccessorStruct MyAccessorStruct = new AccessorStruct(); MyAccessorStruct.MyInt = 3; MyAccessorStruct.SetInt(3); Debug.Log(MyAccessorStruct.MyInt); }
public void Unsub <U, T1, T2, T3, T4, T5>(EventType @event, Listener <U> listenerU) { Action <T1, T2, T3, T4, T5> action = GetSet.Get <T1, T2, T3, T4, T5>(@event); if (listenerU is IListener <T1, T2, T3, T4, T5> ) { action -= ((IListener <T1, T2, T3, T4, T5>)listenerU).Invoke; GetSet.Set <T1, T2, T3, T4, T5>(@event, action); } else { LogUnsubWarn(listenerU, @event); } }
public static IEnumerator GraphTerp( AnimationCurve curve, GetSet <float> val, float transitionTime) { float elapsedTime = 0.0f; //While we haven't reached the end while (!Mathf.Approximately(val.value, curve.Evaluate(1))) { val.value = curve.Evaluate(elapsedTime); elapsedTime += Time.deltaTime / transitionTime; yield return(null); } }
public void Unsub <U>(EventType @event, Listener <U> listenerU) { Action action = GetSet.Get(@event); if (listenerU is IListener) { action -= ((IListener)listenerU).Invoke; GetSet.Set(@event, action); } else { LogUnsubWarn(listenerU, @event); } }
public void Sub <U, T1, T2>(EventType @event, Listener <U> listenerU) { Action <T1, T2> action = GetSet.Get <T1, T2>(@event); if (listenerU is IListener <T1, T2> ) { action += ((IListener <T1, T2>)listenerU).Invoke; GetSet.Set <T1, T2>(@event, action); } else { LogSubWarn(listenerU, @event); } }
public void SaveInfo(GetSet info) { if (!File.Exists(DbFile)) { CreateDatabase(); } using (var cnn = SimpleDbConnection()) { cnn.Open(); info.id = cnn.Query <int>( @"INSERT INTO Info ( url, httpstatus, statusdes, status, title, desc, hrefTag, imgTag, h, time ) VALUES ( @url, @httpstatus, @statusdes, @status, @title, @desc, @hrefTag, @imgTag, @h, @time ); select last_insert_rowid()", info).Single(); GetAlldescnotnull(); } }
public GetSet GetInfo(int id) { try { if (!File.Exists(DbFile)) { return(null); } using (var cnn = SimpleDbConnection()) { cnn.Open(); GetSet result = cnn.Query <GetSet>( @"SELECT id, url, httpstatus, statusdes, status, title, desc, hrefTag, imgTag, h, time FROM Info WHERE id = @id", new { id }).FirstOrDefault(); return(result); } } catch (Exception ex) { return(null); } }
public GetSet GetInfobyURL(string url) { try { if (!File.Exists(DbFile)) { return(null); } using (var cnn = SimpleDbConnection()) { cnn.Open(); GetSet result = cnn.Query <GetSet>( @"SELECT id, url, httpstatus, statusdes, status, title, desc, hrefTag, imgTag, h, time FROM Info WHERE url = @url", new { url }).Last(); return(result); } } catch (Exception ex) { return(null); } }
public MainWindow() { InitializeComponent(); DBConnectionSet connectionSet = new DBConnectionSet(); connectionSet.Connection = ConfigurationManager.AppSettings.Get("CS").ToString(); connectionSet.Database = ConfigurationManager.AppSettings.Get("DB").ToString(); connectionSet.Table = ConfigurationManager.AppSettings.Get("Table").ToString(); connectionSet.Filter = "Set"; connectionSet.FilterValue = Set.NeoGenesis; GetSet getSet = new GetSet(); fulllist.AddRange(getSet.Get(connectionSet)); int count = fulllist.Count; Console.WriteLine(count); }
public void Invoke <T1, T2, T3, T4, T5>(EventType @event, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { LogEnter(@event, GetSet.Get <T1, T2, T3, T4, T5>(@event).GetInvocationList().Length - 1); proxy.Invoke(@event, t1, t2, t3, t4, t5); LogExit(@event); }
public void Invoke <T1, T2>(EventType @event, T1 t1, T2 t2) { LogEnter(@event, GetSet.Get <T1, T2>(@event).GetInvocationList().Length - 1); proxy.Invoke(@event, t1, t2); LogExit(@event); }
public void Invoke(EventType @event) { LogEnter(@event, GetSet.Get(@event).GetInvocationList().Length - 1); proxy.Invoke(@event); LogExit(@event); }
public void Invoke <T1, T2, T3, T4, T5>(EventType @event, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { GetSet.Get <T1, T2, T3, T4, T5>(@event)(t1, t2, t3, t4, t5); }
public void Invoke <T1, T2, T3>(EventType @event, T1 t1, T2 t2, T3 t3) { GetSet.Get <T1, T2, T3>(@event)(t1, t2, t3); }
public void Invoke <T>(EventType @event, T t) { GetSet.Get <T>(@event)(t); }
public void Invoke(EventType @event) { GetSet.Get(@event)(); }
void Start() { GS = new GetSet(); Get(); Set(); }
public void Invoke <T1, T2>(EventType @event, T1 t1, T2 t2) { GetSet.Get <T1, T2>(@event)(t1, t2); }
public SplashForm(GetSet g) { InitializeComponent(); LDgs = g; }
/// <summary> /// Создание экземпляра редактирования свойства. /// </summary> /// <param name="state">Ссылка на объект, свойство которого надо менять.</param> /// <param name="property">Информация о меняемом свойстве.</param> public Edit(ClassType state, GetSet property) : base($"{nameof(Edit<ClassType, PropertyType>)}:{property.Name}") { State = state ?? throw new ArgumentNullException($"Поле {nameof(state)} должно быть не равно null."); Property = property; }