Пример #1
0
        public static object Seek(DepType needThis)
        {
            try
            {
                var act = BaseActivity.CurrentActivity;
                if (needThis == DepType.Activity)
                {
                    return(act);
                }

                var stage = BaseActivity.CurrentStage;
                if (needThis == DepType.GestureStage)
                {
                    return(stage);
                }

                var prov = (stage as IGestureRecognizerStage).DataProvider;
                if (needThis == DepType.IProvider)
                {
                    return(prov);
                }

                if (needThis == DepType.ILoggingProvider && prov is ILoggingProvider)
                {
                    return(prov);
                }

                if (needThis == DepType.Dataset && Machine_Learning.DataSet.Current != null)
                {
                    return(Machine_Learning.DataSet.Current);
                }

                var actML = act as Machine_Learning.MachineLearningActivity.IMachineLearningActivity;
                if (needThis == DepType.GestureClass &&
                    actML != null &&
                    actML.SelectedGestureClass != null)
                {
                    return(actML.SelectedGestureClass);
                }

                if (needThis == DepType.Sequence &&
                    actML != null &&
                    actML.MostRecentSample != null)
                {
                    return(actML.MostRecentSample);
                }
            }
            catch (NullReferenceException)
            {
                return(null);
            }

            return(null);
        }
Пример #2
0
            public static Dep Create(DepType type)
            {
                switch (type)
                {
                case DepType.FileRef: return(new FileRef());

                case DepType.TypeRef: return(new TypeRef());

                case DepType.NamespaceRef: return(new NamespaceRef());
                }
                return(null);
            }
Пример #3
0
 /// <summary>
 /// Инфо в виде строки
 /// </summary>
 /// <returns></returns>
 public override string GetInfo()
 {
     return($"{ID} {Name} {LastName} {Balance} {DepType.ToString()} кредитов {credits.Count} шт.");
 }
Пример #4
0
 /// <summary>
 /// Инфо в виде строки
 /// </summary>
 /// <returns></returns>
 public override string GetInfo()
 {
     return($"{ID} VIP {Name} {LastName} {Balance} {DepType.ToString()} кредитов {credits.Count} шт. деп.бонус {DepositBonus}, - к ставке кредита {CreditMinusTax}");
 }
Пример #5
0
 /// <summary>
 /// Инфо в виде строки
 /// </summary>
 /// <returns></returns>
 public override string GetInfo()
 {
     return($"{ID} {Name} {Adress} {Balance} {DepType.ToString()} лизингов {credits.Count} шт.");
 }