public bool Check()
        {
            GetSet allSets = new GetSet();

            //List<Card> toCheck = allSets();
            return(false);
        }
Beispiel #2
0
    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;
        }
    }
Beispiel #3
0
        void UseGetSet()
        {
            GetSet getset = new GetSet();

            getset.MyInt = 10;
            Debug.Log("getset.MyInt: " + getset.MyInt);
            // "getset.MyInt: 10"
        }
Beispiel #4
0
    // Use this for initialization
    void Start()
    {
        GetSet gs = new GetSet();

        gs.MyIntEvent += IntChagge;
        gs.MyInt       = 10;
        Debug.Log(gs.DoubleInt);
    }
Beispiel #5
0
    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;
    }
Beispiel #6
0
 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);
 }
Beispiel #7
0
    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);
    }
Beispiel #8
0
            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);
                }
            }
Beispiel #9
0
    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);
        }
    }
Beispiel #10
0
            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);
                }
            }
Beispiel #11
0
            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);
                }
            }
Beispiel #12
0
        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();
            }
        }
Beispiel #13
0
 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); }
 }
Beispiel #14
0
        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);
        }
Beispiel #16
0
 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);
 }
Beispiel #17
0
 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);
 }
Beispiel #18
0
 public void Invoke(EventType @event)
 {
     LogEnter(@event, GetSet.Get(@event).GetInvocationList().Length - 1);
     proxy.Invoke(@event);
     LogExit(@event);
 }
Beispiel #19
0
 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);
 }
Beispiel #20
0
 public void Invoke <T1, T2, T3>(EventType @event, T1 t1, T2 t2, T3 t3)
 {
     GetSet.Get <T1, T2, T3>(@event)(t1, t2, t3);
 }
Beispiel #21
0
 public void Invoke <T>(EventType @event, T t)
 {
     GetSet.Get <T>(@event)(t);
 }
Beispiel #22
0
 public void Invoke(EventType @event)
 {
     GetSet.Get(@event)();
 }
 void Start()
 {
     GS = new GetSet();
     Get();
     Set();
 }
Beispiel #24
0
 public void Invoke <T1, T2>(EventType @event, T1 t1, T2 t2)
 {
     GetSet.Get <T1, T2>(@event)(t1, t2);
 }
Beispiel #25
0
 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;
 }