public VariantAxisInfo(VariantAxis axis)
        {
            m_axisName = axis.Name;
            m_Children = new List <VariantInfo>();

            foreach (var v in axis.Variants)
            {
                m_Children.Add(new VariantInfo(v, this));
            }
        }
        private static List <VariantAxis> CreateDefaultAxis()
        {
            var defaultAxis = new List <VariantAxis> ();
            //TODO add lang properly
            //TODO add device profile properly
            var lang = new VariantAxis("Languages", AxisType.Language);

            var dev = new VariantAxis("Quality Settings", AxisType.QualitySetting);

            defaultAxis.Add(lang);
            defaultAxis.Add(dev);


            return(defaultAxis);
        }
        public VariantAxis CreateNewAxis(string name)
        {
            int i       = 0;
            var newName = name;

            while (m_axis.Where(ax => ax.Name == newName).Any())
            {
                newName = string.Format("{0} {1}", name, ++i);
            }

            var newAxis = new VariantAxis(newName, AxisType.Other);

            m_axis.Add(newAxis);
            SetDBDirty();
            return(newAxis);
        }
 public AxisSelection(VariantAxis ax, Variant v)
 {
     axName     = ax.Name;
     vShortName = v.ShortName;
 }
 public void RemoveVariantFromVariantAxis(Variant v, VariantAxis ax)
 {
     ax.RemoveVariant(v);
     SetDBDirty();
 }
 public void RemoveVariantAxis(VariantAxis ax)
 {
     m_axis.Remove(ax);
     SetDBDirty();
 }
 public void AddChild(VariantAxis ax)
 {
     m_Children.Add(new VariantAxisInfo(ax));
 }
 public VariantAxisInfo GetChild(VariantAxis ax)
 {
     return(m_Children.Find(c => c.AssignedAxis == ax));
 }