public override void OnInspectorGUI(ParticleSystem s)
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     EditorGUI.BeginChangeCheck();
     bool flag = ModuleUI.GUIToggle(s_Texts.separateAxes, this.m_SeparateAxes, new GUILayoutOption[0]);
     if (EditorGUI.EndChangeCheck())
     {
         if (flag)
         {
             this.m_X.RemoveCurveFromEditor();
         }
         else
         {
             this.m_X.RemoveCurveFromEditor();
             this.m_Y.RemoveCurveFromEditor();
             this.m_Z.RemoveCurveFromEditor();
         }
     }
     MinMaxCurveState state = this.m_X.state;
     this.m_Y.state = state;
     this.m_Z.state = state;
     if (flag)
     {
         this.m_X.m_DisplayName = s_Texts.x;
         base.GUITripleMinMaxCurve(GUIContent.none, s_Texts.x, this.m_X, s_Texts.y, this.m_Y, s_Texts.z, this.m_Z, null, new GUILayoutOption[0]);
     }
     else
     {
         this.m_X.m_DisplayName = s_Texts.size;
         ModuleUI.GUIMinMaxCurve(s_Texts.size, this.m_X, new GUILayoutOption[0]);
     }
 }
Example #2
0
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     ModuleUI.GUIIntDraggableX2(s_Texts.tiles, s_Texts.tilesX, this.m_TilesX, s_Texts.tilesY, this.m_TilesY);
     int num = ModuleUI.GUIPopup(s_Texts.animation, this.m_AnimationType, s_Texts.types);
     if (num == 1)
     {
         ModuleUI.GUIToggle(s_Texts.randomRow, this.m_RandomRow);
         if (!this.m_RandomRow.boolValue)
         {
             ModuleUI.GUIInt(s_Texts.row, this.m_RowIndex);
         }
     }
     if (num == 1)
     {
         this.m_FrameOverTime.m_RemapValue = this.m_TilesX.intValue;
     }
     if (num == 0)
     {
         this.m_FrameOverTime.m_RemapValue = this.m_TilesX.intValue * this.m_TilesY.intValue;
     }
     ModuleUI.GUIMinMaxCurve(s_Texts.frameOverTime, this.m_FrameOverTime);
     ModuleUI.GUIFloat(s_Texts.cycles, this.m_Cycles);
 }
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     ModuleUI.GUIFloat(s_Texts.ratio, this.m_Ratio, new GUILayoutOption[0]);
     ModuleUI.GUIMinMaxCurve(s_Texts.lifetime, this.m_Lifetime, new GUILayoutOption[0]);
     ModuleUI.GUIFloat(s_Texts.minVertexDistance, this.m_MinVertexDistance, new GUILayoutOption[0]);
     ModuleUI.GUIPopup(s_Texts.textureMode, this.m_TextureMode, s_Texts.textureModeOptions, new GUILayoutOption[0]);
     ModuleUI.GUIToggle(s_Texts.worldSpace, this.m_WorldSpace, new GUILayoutOption[0]);
     ModuleUI.GUIToggle(s_Texts.dieWithParticles, this.m_DieWithParticles, new GUILayoutOption[0]);
     ModuleUI.GUIToggle(s_Texts.sizeAffectsWidth, this.m_SizeAffectsWidth, new GUILayoutOption[0]);
     ModuleUI.GUIToggle(s_Texts.sizeAffectsLifetime, this.m_SizeAffectsLifetime, new GUILayoutOption[0]);
     ModuleUI.GUIToggle(s_Texts.inheritParticleColor, this.m_InheritParticleColor, new GUILayoutOption[0]);
     base.GUIMinMaxGradient(s_Texts.colorOverLifetime, this.m_ColorOverLifetime, new GUILayoutOption[0]);
     ModuleUI.GUIMinMaxCurve(s_Texts.widthOverTrail, this.m_WidthOverTrail, new GUILayoutOption[0]);
     base.GUIMinMaxGradient(s_Texts.colorOverTrail, this.m_ColorOverTrail, new GUILayoutOption[0]);
     if (base.m_ParticleSystemUI.m_ParticleSystem.trails.enabled)
     {
         ParticleSystemRenderer component = base.m_ParticleSystemUI.m_ParticleSystem.GetComponent<ParticleSystemRenderer>();
         if ((component != null) && (component.trailMaterial == null))
         {
             EditorGUILayout.HelpBox("Assign a Trail Material in the Renderer Module", MessageType.Warning, true);
         }
     }
 }
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     base.GUIMinMaxGradient(s_Texts.color, this.m_Gradient, new GUILayoutOption[0]);
 }
Example #5
0
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     ModuleUI.GUIMinMaxCurve(s_Texts.rotation, this.m_Curve);
 }
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     ModuleUI.GUIFloat(s_Texts.multiplier, this.m_Multiplier, new GUILayoutOption[0]);
 }
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     base.GUITripleMinMaxCurve(GUIContent.none, s_Texts.x, this.m_X, s_Texts.y, this.m_Y, s_Texts.z, this.m_Z, null, new GUILayoutOption[0]);
     ModuleUI.GUIBoolAsPopup(s_Texts.space, this.m_InWorldSpace, s_Texts.spaces, new GUILayoutOption[0]);
 }
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     ModuleUI.GUIMinMaxCurve(s_Texts.size, this.m_Curve);
     ModuleUI.GUIMinMaxRange(s_Texts.velocityRange, this.m_Range);
 }
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     base.GUIMinMaxGradient(s_Texts.color, this.m_Gradient);
     ModuleUI.GUIMinMaxRange(s_Texts.velocityRange, this.m_Range);
 }
 protected override void Init()
 {
     if (this.m_Multiplier == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_Multiplier = base.GetProperty("multiplier");
     }
 }
Example #11
0
 protected override void Init()
 {
     if (this.m_Curve == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_Curve = new SerializedMinMaxCurve(this, s_Texts.rotation, ModuleUI.kUseSignedRange);
         this.m_Curve.m_RemapValue = 57.29578f;
     }
 }
 protected override void Init()
 {
     if (this.m_Curve == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_Curve = new SerializedMinMaxCurve(this, s_Texts.size);
         this.m_Curve.m_AllowConstant = false;
         this.m_Range = base.GetProperty("range");
     }
 }
 public override void OnGUI(Rect rect)
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     this.KeyboardHandling(base.editorWindow);
     float width = 80f;
     Rect rect2 = EditorGUILayout.BeginVertical(new GUILayoutOption[0]);
     if (Event.current.type != EventType.Layout)
     {
         this.m_WantedSize = rect2;
     }
     GUILayout.BeginHorizontal(new GUILayoutOption[0]);
     GUILayout.Label(s_Texts.header, EditorStyles.boldLabel, new GUILayoutOption[0]);
     GUILayout.EndHorizontal();
     EditorGUI.BeginChangeCheck();
     GUILayout.BeginHorizontal(new GUILayoutOption[0]);
     GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.Width(width) };
     GUILayout.Label(s_Texts.name, options);
     EditorGUI.FocusTextInControl("NewLibraryName");
     GUI.SetNextControlName("NewLibraryName");
     this.m_NewLibraryName = GUILayout.TextField(this.m_NewLibraryName, new GUILayoutOption[0]);
     GUILayout.EndHorizontal();
     GUILayout.BeginHorizontal(new GUILayoutOption[0]);
     GUILayoutOption[] optionArray2 = new GUILayoutOption[] { GUILayout.Width(width) };
     GUILayout.Label(s_Texts.location, optionArray2);
     this.m_SelectedIndexInPopup = EditorGUILayout.Popup(this.m_SelectedIndexInPopup, s_Texts.fileLocations, new GUILayoutOption[0]);
     GUILayout.EndHorizontal();
     if (EditorGUI.EndChangeCheck())
     {
         this.m_ErrorString = null;
     }
     GUILayout.BeginHorizontal(new GUILayoutOption[0]);
     if (!string.IsNullOrEmpty(this.m_ErrorString))
     {
         Color color = GUI.color;
         GUI.color = new Color(1f, 0.8f, 0.8f);
         GUILayout.Label(GUIContent.Temp(this.m_ErrorString), EditorStyles.helpBox, new GUILayoutOption[0]);
         GUI.color = color;
     }
     GUILayout.FlexibleSpace();
     if (GUILayout.Button(GUIContent.Temp("Create"), new GUILayoutOption[0]))
     {
         this.CreateLibraryAndCloseWindow(base.editorWindow);
     }
     GUILayout.EndHorizontal();
     GUILayout.Space(15f);
     EditorGUILayout.EndVertical();
 }
 protected override void Init()
 {
     if (this.m_X == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_X = new SerializedMinMaxCurve(this, s_Texts.x, "x", ModuleUI.kUseSignedRange);
         this.m_Y = new SerializedMinMaxCurve(this, s_Texts.y, "y", ModuleUI.kUseSignedRange);
         this.m_Z = new SerializedMinMaxCurve(this, s_Texts.z, "z", ModuleUI.kUseSignedRange);
         this.m_InWorldSpace = base.GetProperty("inWorldSpace");
     }
 }
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     MinMaxCurveState state = this.m_X.state;
     base.GUITripleMinMaxCurve(GUIContent.none, s_Texts.x, this.m_X, s_Texts.y, this.m_Y, s_Texts.z, this.m_Z, this.m_RandomizePerFrame, new GUILayoutOption[0]);
     ModuleUI.GUIBoolAsPopup(s_Texts.space, this.m_InWorldSpace, s_Texts.spaces, new GUILayoutOption[0]);
     using (new EditorGUI.DisabledScope((state != MinMaxCurveState.k_TwoScalars) && (state != MinMaxCurveState.k_TwoCurves)))
     {
         ModuleUI.GUIToggle(s_Texts.randomizePerFrame, this.m_RandomizePerFrame, new GUILayoutOption[0]);
     }
 }
Example #16
0
 protected override void Init()
 {
     if (this.m_TilesX == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_FrameOverTime = new SerializedMinMaxCurve(this, s_Texts.frameOverTime, "frameOverTime");
         this.m_TilesX = base.GetProperty("tilesX");
         this.m_TilesY = base.GetProperty("tilesY");
         this.m_AnimationType = base.GetProperty("animationType");
         this.m_Cycles = base.GetProperty("cycles");
         this.m_RandomRow = base.GetProperty("randomRow");
         this.m_RowIndex = base.GetProperty("rowIndex");
     }
 }
 protected override void Init()
 {
     if (this.m_Z == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_X = new SerializedMinMaxCurve(this, s_Texts.x, "x", ModuleUI.kUseSignedRange);
         this.m_Y = new SerializedMinMaxCurve(this, s_Texts.y, "y", ModuleUI.kUseSignedRange);
         this.m_Z = new SerializedMinMaxCurve(this, s_Texts.z, "curve", ModuleUI.kUseSignedRange);
         this.m_X.m_RemapValue = 57.29578f;
         this.m_Y.m_RemapValue = 57.29578f;
         this.m_Z.m_RemapValue = 57.29578f;
         this.m_SeparateAxes = base.GetProperty("separateAxes");
     }
 }
 protected override void Init()
 {
     if (this.m_X == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_X = new SerializedMinMaxCurve(this, s_Texts.x, "x", ModuleUI.kUseSignedRange);
         this.m_Y = new SerializedMinMaxCurve(this, s_Texts.y, "y", ModuleUI.kUseSignedRange);
         this.m_Z = new SerializedMinMaxCurve(this, s_Texts.z, "z", ModuleUI.kUseSignedRange);
         this.m_Magnitude = new SerializedMinMaxCurve(this, s_Texts.magnitude, "magnitude");
         this.m_SeparateAxis = base.GetProperty("separateAxis");
         this.m_InWorldSpace = base.GetProperty("inWorldSpace");
         this.m_Dampen = base.GetProperty("dampen");
     }
 }
Example #19
0
 protected override void Init()
 {
     if (this.m_X == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_X = new SerializedMinMaxCurve(this, s_Texts.x, "curve");
         this.m_Y = new SerializedMinMaxCurve(this, s_Texts.y, "y");
         this.m_Z = new SerializedMinMaxCurve(this, s_Texts.z, "z");
         this.m_X.m_AllowConstant = false;
         this.m_Y.m_AllowConstant = false;
         this.m_Z.m_AllowConstant = false;
         this.m_SeparateAxes = base.GetProperty("separateAxes");
     }
 }
 protected override void Init()
 {
     if (this.m_StrengthX == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_StrengthX = new SerializedMinMaxCurve(this, s_Texts.x, "strength", ModuleUI.kUseSignedRange);
         this.m_StrengthY = new SerializedMinMaxCurve(this, s_Texts.y, "strengthY", ModuleUI.kUseSignedRange);
         this.m_StrengthZ = new SerializedMinMaxCurve(this, s_Texts.z, "strengthZ", ModuleUI.kUseSignedRange);
         this.m_SeparateAxes = base.GetProperty("separateAxes");
         this.m_Damping = base.GetProperty("damping");
         this.m_Frequency = base.GetProperty("frequency");
         this.m_Octaves = base.GetProperty("octaves");
         this.m_OctaveMultiplier = base.GetProperty("octaveMultiplier");
         this.m_OctaveScale = base.GetProperty("octaveScale");
         this.m_Quality = base.GetProperty("quality");
         this.m_ScrollSpeed = new SerializedMinMaxCurve(this, s_Texts.scrollSpeed, "scrollSpeed", ModuleUI.kUseSignedRange);
         this.m_ScrollSpeed.m_AllowRandom = false;
         this.m_RemapX = new SerializedMinMaxCurve(this, s_Texts.x, "remap", ModuleUI.kUseSignedRange);
         this.m_RemapY = new SerializedMinMaxCurve(this, s_Texts.y, "remapY", ModuleUI.kUseSignedRange);
         this.m_RemapZ = new SerializedMinMaxCurve(this, s_Texts.z, "remapZ", ModuleUI.kUseSignedRange);
         this.m_RemapX.m_AllowRandom = false;
         this.m_RemapY.m_AllowRandom = false;
         this.m_RemapZ.m_AllowRandom = false;
         this.m_RemapX.m_AllowConstant = false;
         this.m_RemapY.m_AllowConstant = false;
         this.m_RemapZ.m_AllowConstant = false;
         this.m_RemapEnabled = base.GetProperty("remapEnabled");
         if (s_PreviewTexture == null)
         {
             s_PreviewTexture = new Texture2D(0x60, 0x60, TextureFormat.RGBA32, false, true);
             s_PreviewTexture.name = "ParticleNoisePreview";
             s_PreviewTexture.filterMode = FilterMode.Bilinear;
             s_PreviewTexture.hideFlags = HideFlags.HideAndDontSave;
             s_Texts.previewTexture.image = s_PreviewTexture;
         }
         s_PreviewTextureDirty = true;
         this.previewTextureStyle = new GUIStyle(ParticleSystemStyles.Get().label);
         this.previewTextureStyle.alignment = TextAnchor.LowerCenter;
         this.previewTextureStyle.imagePosition = ImagePosition.ImageAbove;
     }
 }
Example #21
0
    void Awake()
    {
        if (!mInstance)
            mInstance = this;
        //otherwise, if we do, kill this thing
        else
        {
            Destroy(this.gameObject);
            return;
        }

        DontDestroyOnLoad(this);
        missionsManager = GetComponent<MissionsManager>();
        texts = GetComponent<Texts>();
        settings = GetComponent<Settings>();
        userData = GetComponent<UserData>();
        clothesSettings = GetComponent<ClothesSettings>();
        savedSettings = GetComponent<SavedSettings>();
    }
 protected override void Init()
 {
     if (this.m_Ratio == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_Ratio = base.GetProperty("ratio");
         this.m_RandomDistribution = base.GetProperty("randomDistribution");
         this.m_Light = base.GetProperty("light");
         this.m_UseParticleColor = base.GetProperty("color");
         this.m_SizeAffectsRange = base.GetProperty("range");
         this.m_AlphaAffectsIntensity = base.GetProperty("intensity");
         this.m_MaxLights = base.GetProperty("maxLights");
         this.m_Range = new SerializedMinMaxCurve(this, s_Texts.rangeCurve, "rangeCurve");
         this.m_Intensity = new SerializedMinMaxCurve(this, s_Texts.intensityCurve, "intensityCurve");
     }
 }
 protected override void Init()
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     if (this.m_LengthInSec == null)
     {
         this.m_LengthInSec = base.GetProperty0("lengthInSec");
         this.m_Looping = base.GetProperty0("looping");
         this.m_Prewarm = base.GetProperty0("prewarm");
         this.m_StartDelay = new SerializedMinMaxCurve(this, s_Texts.startDelay, "startDelay", false, true);
         this.m_StartDelay.m_AllowCurves = false;
         this.m_PlayOnAwake = base.GetProperty0("playOnAwake");
         this.m_SimulationSpace = base.GetProperty0("moveWithTransform");
         this.m_CustomSimulationSpace = base.GetProperty0("moveWithCustomTransform");
         this.m_SimulationSpeed = base.GetProperty0("simulationSpeed");
         this.m_ScalingMode = base.GetProperty0("scalingMode");
         this.m_AutoRandomSeed = base.GetProperty0("autoRandomSeed");
         this.m_RandomSeed = base.GetProperty0("randomSeed");
         this.m_LifeTime = new SerializedMinMaxCurve(this, s_Texts.lifetime, "startLifetime");
         this.m_Speed = new SerializedMinMaxCurve(this, s_Texts.speed, "startSpeed", ModuleUI.kUseSignedRange);
         this.m_Color = new SerializedMinMaxGradient(this, "startColor");
         this.m_Color.m_AllowRandomColor = true;
         this.m_Size3D = base.GetProperty("size3D");
         this.m_SizeX = new SerializedMinMaxCurve(this, s_Texts.x, "startSize");
         this.m_SizeY = new SerializedMinMaxCurve(this, s_Texts.y, "startSizeY");
         this.m_SizeZ = new SerializedMinMaxCurve(this, s_Texts.z, "startSizeZ");
         this.m_Rotation3D = base.GetProperty("rotation3D");
         this.m_RotationX = new SerializedMinMaxCurve(this, s_Texts.x, "startRotationX", ModuleUI.kUseSignedRange);
         this.m_RotationY = new SerializedMinMaxCurve(this, s_Texts.y, "startRotationY", ModuleUI.kUseSignedRange);
         this.m_RotationZ = new SerializedMinMaxCurve(this, s_Texts.z, "startRotation", ModuleUI.kUseSignedRange);
         this.m_RotationX.m_RemapValue = 57.29578f;
         this.m_RotationY.m_RemapValue = 57.29578f;
         this.m_RotationZ.m_RemapValue = 57.29578f;
         this.m_RotationX.m_DefaultCurveScalar = 3.141593f;
         this.m_RotationY.m_DefaultCurveScalar = 3.141593f;
         this.m_RotationZ.m_DefaultCurveScalar = 3.141593f;
         this.m_RandomizeRotationDirection = base.GetProperty("randomizeRotationDirection");
         this.m_GravityModifier = new SerializedMinMaxCurve(this, s_Texts.gravity, "gravityModifier", ModuleUI.kUseSignedRange);
         this.m_MaxNumParticles = base.GetProperty("maxNumParticles");
     }
 }
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     EditorGUI.BeginChangeCheck();
     bool flag = ModuleUI.GUIToggle(s_Texts.separateAxes, this.m_SeparateAxes, new GUILayoutOption[0]);
     if (EditorGUI.EndChangeCheck())
     {
         if (flag)
         {
             this.m_Z.RemoveCurveFromEditor();
         }
         else
         {
             this.m_X.RemoveCurveFromEditor();
             this.m_Y.RemoveCurveFromEditor();
             this.m_Z.RemoveCurveFromEditor();
         }
     }
     MinMaxCurveState state = this.m_Z.state;
     this.m_Y.state = state;
     this.m_X.state = state;
     MinMaxCurveState state2 = this.m_Z.state;
     if (flag)
     {
         this.m_Z.m_DisplayName = s_Texts.z;
         base.GUITripleMinMaxCurve(GUIContent.none, s_Texts.x, this.m_X, s_Texts.y, this.m_Y, s_Texts.z, this.m_Z, null, new GUILayoutOption[0]);
     }
     else
     {
         this.m_Z.m_DisplayName = s_Texts.rotation;
         ModuleUI.GUIMinMaxCurve(s_Texts.rotation, this.m_Z, new GUILayoutOption[0]);
     }
     using (new EditorGUI.DisabledScope((state2 == MinMaxCurveState.k_Scalar) || (state2 == MinMaxCurveState.k_TwoScalars)))
     {
         ModuleUI.GUIMinMaxRange(s_Texts.velocityRange, this.m_Range, new GUILayoutOption[0]);
     }
 }
 protected override void Init()
 {
     if (this.m_Ratio == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_Ratio = base.GetProperty("ratio");
         this.m_Lifetime = new SerializedMinMaxCurve(this, s_Texts.lifetime, "lifetime");
         this.m_MinVertexDistance = base.GetProperty("minVertexDistance");
         this.m_TextureMode = base.GetProperty("textureMode");
         this.m_WorldSpace = base.GetProperty("worldSpace");
         this.m_DieWithParticles = base.GetProperty("dieWithParticles");
         this.m_SizeAffectsWidth = base.GetProperty("sizeAffectsWidth");
         this.m_SizeAffectsLifetime = base.GetProperty("sizeAffectsLifetime");
         this.m_InheritParticleColor = base.GetProperty("inheritParticleColor");
         this.m_ColorOverLifetime = new SerializedMinMaxGradient(this, "colorOverLifetime");
         this.m_WidthOverTrail = new SerializedMinMaxCurve(this, s_Texts.widthOverTrail, "widthOverTrail");
         this.m_ColorOverTrail = new SerializedMinMaxGradient(this, "colorOverTrail");
     }
 }
 protected override void Init()
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     List<SerializedProperty> list = new List<SerializedProperty>();
     for (int i = 0; i < this.m_CollisionShapes.Length; i++)
     {
         this.m_CollisionShapes[i] = base.GetProperty("collisionShape" + i);
         if ((i == 0) || (this.m_CollisionShapes[i].objectReferenceValue != null))
         {
             list.Add(this.m_CollisionShapes[i]);
         }
     }
     this.m_ShownCollisionShapes = list.ToArray();
     this.m_Inside = base.GetProperty("inside");
     this.m_Outside = base.GetProperty("outside");
     this.m_Enter = base.GetProperty("enter");
     this.m_Exit = base.GetProperty("exit");
     this.m_RadiusScale = base.GetProperty("radiusScale");
     s_VisualizeBounds = EditorPrefs.GetBool("VisualizeTriggerBounds", false);
 }
        protected override void Init()
        {
            if (s_Texts == null)
            {
                s_Texts = new Texts();
            }
            List <SerializedProperty> list = new List <SerializedProperty>();

            for (int i = 0; i < this.m_CollisionShapes.Length; i++)
            {
                this.m_CollisionShapes[i] = base.GetProperty("collisionShape" + i);
                if ((i == 0) || (this.m_CollisionShapes[i].objectReferenceValue != null))
                {
                    list.Add(this.m_CollisionShapes[i]);
                }
            }
            this.m_ShownCollisionShapes = list.ToArray();
            this.m_Inside      = base.GetProperty("inside");
            this.m_Outside     = base.GetProperty("outside");
            this.m_Enter       = base.GetProperty("enter");
            this.m_Exit        = base.GetProperty("exit");
            this.m_RadiusScale = base.GetProperty("radiusScale");
            s_VisualizeBounds  = EditorPrefs.GetBool("VisualizeTriggerBounds", false);
        }
Example #28
0
        private static void BlackSmithPlace()
        {
            Console.Clear();
            Con.blacksmith.PlaceArround();
            Client.Timer(3);
            Console.Clear();
            if (Steps == 2)
            {
                Con.BlackSmithConv();
                Steps++;
                Town();
            }
            else if (Steps == 5)
            {
                Console.WriteLine("You're ready to go to the king, do it now!!!");
            }

            else
            {
                Texts.FollowTheMentor(Steps);
            }
            Client.Timer(1.5);
            Town();
        }
        //[Test]
        public void GenerateGoldenStandardFiles()
        {
            var stringTableData = string.Join("", from b in new StringTable().GetBytes() select $"{b:X2}");

            File.WriteAllText(@".\StringTableData.txt", stringTableData);

            var stringTableEntries = StringTable.template.ToDictionary(
                x => x.name,
                x => string.Join("", from b in x.bytes select $"{b:X2}")
                );

            File.WriteAllText(@".\StringTableEntries.json", JsonConvert.SerializeObject(stringTableEntries, Formatting.Indented));

            var itemTexts = ItemTypeNames().ToDictionary(
                name => name,
                name => {
                var item  = new Item(Enum.Parse <ItemType>(name));
                var bytes = Dialog.Simple(Texts.ItemTextbox(item));
                return(string.Join("", from b in bytes select $"{b:X2}"));
            }
                );

            File.WriteAllText(@".\ItemTexts.json", JsonConvert.SerializeObject(itemTexts, Formatting.Indented));
        }
        protected override void Init()
        {
            // Already initialized?
            if (m_Inside != null)
            {
                return;
            }
            if (s_Texts == null)
            {
                s_Texts = new Texts();
            }

            List <SerializedProperty> shownCollisionShapes = new List <SerializedProperty>();

            for (int i = 0; i < m_CollisionShapes.Length; ++i)
            {
                m_CollisionShapes[i] = GetProperty("collisionShape" + i); // Keep name in sync with transfer func in TriggerModule.h
                System.Diagnostics.Debug.Assert(m_CollisionShapes[i] != null);

                // Always show the first collision shape
                if (i == 0 || m_CollisionShapes[i].objectReferenceValue != null)
                {
                    shownCollisionShapes.Add(m_CollisionShapes[i]);
                }
            }

            m_ShownCollisionShapes = shownCollisionShapes.ToArray();

            m_Inside      = GetProperty("inside");
            m_Outside     = GetProperty("outside");
            m_Enter       = GetProperty("enter");
            m_Exit        = GetProperty("exit");
            m_RadiusScale = GetProperty("radiusScale");

            s_VisualizeBounds = EditorPrefs.GetBool("VisualizeTriggerBounds", false);
        }
Example #31
0
        public void RemoveTab(int index)
        {
            TabRemoving?.Invoke(this, index);

            lock (_syncRoot)
            {
                Texts.RemoveAt(index);
                TabIds.RemoveAt(index);
                Widths.RemoveAt(index);
                Icons.RemoveAt(index);

                var selectedIndex = SelectedIndex >= index
                                        ? SelectedIndex - 1
                                        : SelectedIndex;

                selectedIndex = getValidIndex(selectedIndex);
                setSelectedIndex(selectedIndex);
            }

            OnLayout(new LayoutEventArgs(this, null));
            Invalidate();

            TabRemoved?.Invoke(this);
        }
Example #32
0
        // Trash this card. Gain a card costing up to Coin 5
        private void ResolveCardFeast(Player activePlayer, Card cardToResolve)
        {
            if (activePlayer.IsCardInPlay(cardToResolve)) // this check is necessary as player can use throne room to play feast twice
            {
                activePlayer.TrashPlayedCard(cardToResolve, trashCards);
            }

            Card cardToGain;

            do
            {
                writer.Write("select a card to gain (up to 5 coins):");
                var cardNameToGain = Texts.Trim(reader.ReadLine());
                var cardInfoToGain = CardCentral.Shared.GetCardInfo(cardNameToGain);
                if (cardInfoToGain == null)
                {
                    writer.WriteLine("unknown card " + cardNameToGain);
                    cardToGain = null;
                }
                else if (cardInfoToGain.Cost > 5)
                {
                    writer.WriteLine("{0} is too expensive to gain", cardInfoToGain.CardName);
                    cardToGain = null;
                }
                else
                {
                    cardToGain = supply.GetCard(cardInfoToGain);
                    if (cardToGain == null)
                    {
                        writer.WriteLine("{0} is not in supply", cardInfoToGain.CardName);
                    }
                }
            } while (cardToGain == null);

            activePlayer.GainCard(cardToGain);
        }
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     ModuleUI.GUIObject(s_Texts.light, this.m_Light, new GUILayoutOption[0]);
     ModuleUI.GUIFloat(s_Texts.ratio, this.m_Ratio, new GUILayoutOption[0]);
     ModuleUI.GUIToggle(s_Texts.randomDistribution, this.m_RandomDistribution, new GUILayoutOption[0]);
     ModuleUI.GUIToggle(s_Texts.color, this.m_UseParticleColor, new GUILayoutOption[0]);
     ModuleUI.GUIToggle(s_Texts.range, this.m_SizeAffectsRange, new GUILayoutOption[0]);
     ModuleUI.GUIToggle(s_Texts.intensity, this.m_AlphaAffectsIntensity, new GUILayoutOption[0]);
     ModuleUI.GUIMinMaxCurve(s_Texts.rangeCurve, this.m_Range, new GUILayoutOption[0]);
     ModuleUI.GUIMinMaxCurve(s_Texts.intensityCurve, this.m_Intensity, new GUILayoutOption[0]);
     ModuleUI.GUIInt(s_Texts.maxLights, this.m_MaxLights, new GUILayoutOption[0]);
     if (this.m_Light.objectReferenceValue != null)
     {
         Light objectReferenceValue = (Light)this.m_Light.objectReferenceValue;
         if ((objectReferenceValue.type != LightType.Point) && (objectReferenceValue.type != LightType.Spot))
         {
             EditorGUILayout.HelpBox(EditorGUIUtility.TextContent("Only point and spot lights are supported on particles.").text, MessageType.Warning, true);
         }
     }
 }
Example #34
0
        protected override void Initialize()
        {
            base.Initialize();

            Window.Title = $"Happy Bot Mess - A game for Ludum Dare 40";

            XmlDocument langXml = new XmlDocument();

            langXml.Load("Content/Language/en.xml");
            Texts.SetTextFile(langXml);

            XmlDocument effectXml = new XmlDocument();

            effectXml.Load("Content/effects.xml");
            Effects.Initialize(effectXml, atlas);

            XmlDocument soundsXml = new XmlDocument();

            soundsXml.Load("Content/Sounds/sounds.xml");
            Sounds.Initialize(Content, soundsXml);

            Window.Position = (new Point(1920, 1080) - Config.Resolution) / new Point(2, 2);
            currentScene.Initialize();
        }
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     ModuleUI.GUIObject(s_Texts.light, this.m_Light, new GUILayoutOption[0]);
     ModuleUI.GUIFloat(s_Texts.ratio, this.m_Ratio, new GUILayoutOption[0]);
     ModuleUI.GUIToggle(s_Texts.randomDistribution, this.m_RandomDistribution, new GUILayoutOption[0]);
     ModuleUI.GUIToggle(s_Texts.color, this.m_UseParticleColor, new GUILayoutOption[0]);
     ModuleUI.GUIToggle(s_Texts.range, this.m_SizeAffectsRange, new GUILayoutOption[0]);
     ModuleUI.GUIToggle(s_Texts.intensity, this.m_AlphaAffectsIntensity, new GUILayoutOption[0]);
     ModuleUI.GUIMinMaxCurve(s_Texts.rangeCurve, this.m_Range, new GUILayoutOption[0]);
     ModuleUI.GUIMinMaxCurve(s_Texts.intensityCurve, this.m_Intensity, new GUILayoutOption[0]);
     ModuleUI.GUIInt(s_Texts.maxLights, this.m_MaxLights, new GUILayoutOption[0]);
     if (this.m_Light.objectReferenceValue != null)
     {
         Light objectReferenceValue = (Light) this.m_Light.objectReferenceValue;
         if ((objectReferenceValue.type != LightType.Point) && (objectReferenceValue.type != LightType.Spot))
         {
             EditorGUILayout.HelpBox(EditorGUIUtility.TextContent("Only point and spot lights are supported on particles.").text, MessageType.Warning, true);
         }
     }
 }
Example #36
0
        protected CatalogPage(IReadOnlyPacket packet)
        {
            Id         = packet.ReadInt();
            Mode       = packet.ReadString();
            LayoutCode = packet.ReadString();

            short n = packet.ReadLegacyShort();

            for (int i = 0; i < n; i++)
            {
                Images.Add(packet.ReadString());
            }

            n = packet.ReadLegacyShort();
            for (int i = 0; i < n; i++)
            {
                Texts.Add(packet.ReadString());
            }

            n = packet.ReadLegacyShort();
            for (int i = 0; i < n; i++)
            {
                Offers.Add(CatalogOffer.Parse(packet));
            }

            UnknownIntA = packet.ReadInt();
            AcceptSeasonCurrencyAsCredits = packet.ReadBool();
            if (packet.Available > 0)
            {
                n = packet.ReadLegacyShort();
                for (int i = 0; i < n; i++)
                {
                    Data.Add(CatalogPageData.Parse(packet));
                }
            }
        }
        public override void OnInspectorGUI(ParticleSystem s)
        {
            if (s_Texts == null)
            {
                s_Texts = new Texts();
            }
            if (s_PreviewTextureDirty)
            {
                base.m_ParticleSystemUI.m_ParticleSystem.GenerateNoisePreviewTexture(s_PreviewTexture);
                s_PreviewTextureDirty = false;
            }
            bool flag = base.m_ParticleSystemUI.m_ParticleEffectUI.m_Owner is ParticleSystemInspector;

            if (flag)
            {
                GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                GUILayout.BeginVertical(new GUILayoutOption[0]);
            }
            EditorGUI.BeginChangeCheck();
            bool flag2 = ModuleUI.GUIToggle(s_Texts.separateAxes, this.m_SeparateAxes, new GUILayoutOption[0]);
            bool flag3 = EditorGUI.EndChangeCheck();

            EditorGUI.BeginChangeCheck();
            if (flag3)
            {
                if (flag2)
                {
                    this.m_StrengthX.RemoveCurveFromEditor();
                    this.m_RemapX.RemoveCurveFromEditor();
                }
                else
                {
                    this.m_StrengthX.RemoveCurveFromEditor();
                    this.m_StrengthY.RemoveCurveFromEditor();
                    this.m_StrengthZ.RemoveCurveFromEditor();
                    this.m_RemapX.RemoveCurveFromEditor();
                    this.m_RemapY.RemoveCurveFromEditor();
                    this.m_RemapZ.RemoveCurveFromEditor();
                }
            }
            MinMaxCurveState state = this.m_StrengthX.state;

            this.m_StrengthY.state = state;
            this.m_StrengthZ.state = state;
            state = this.m_RemapX.state;
            this.m_RemapY.state = state;
            this.m_RemapZ.state = state;
            if (flag2)
            {
                this.m_StrengthX.m_DisplayName = s_Texts.x;
                base.GUITripleMinMaxCurve(GUIContent.none, s_Texts.x, this.m_StrengthX, s_Texts.y, this.m_StrengthY, s_Texts.z, this.m_StrengthZ, null, new GUILayoutOption[0]);
            }
            else
            {
                this.m_StrengthX.m_DisplayName = s_Texts.strength;
                ModuleUI.GUIMinMaxCurve(s_Texts.strength, this.m_StrengthX, new GUILayoutOption[0]);
            }
            ModuleUI.GUIFloat(s_Texts.frequency, this.m_Frequency, new GUILayoutOption[0]);
            ModuleUI.GUIMinMaxCurve(s_Texts.scrollSpeed, this.m_ScrollSpeed, new GUILayoutOption[0]);
            ModuleUI.GUIToggle(s_Texts.damping, this.m_Damping, new GUILayoutOption[0]);
            int num = ModuleUI.GUIInt(s_Texts.octaves, this.m_Octaves, new GUILayoutOption[0]);

            using (new EditorGUI.DisabledScope(num == 1))
            {
                ModuleUI.GUIFloat(s_Texts.octaveMultiplier, this.m_OctaveMultiplier, new GUILayoutOption[0]);
                ModuleUI.GUIFloat(s_Texts.octaveScale, this.m_OctaveScale, new GUILayoutOption[0]);
            }
            ModuleUI.GUIPopup(s_Texts.quality, this.m_Quality, s_Texts.qualityDropdown, new GUILayoutOption[0]);
            bool flag4 = ModuleUI.GUIToggle(s_Texts.remap, this.m_RemapEnabled, new GUILayoutOption[0]);

            using (new EditorGUI.DisabledScope(!flag4))
            {
                if (flag2)
                {
                    this.m_RemapX.m_DisplayName = s_Texts.x;
                    base.GUITripleMinMaxCurve(GUIContent.none, s_Texts.x, this.m_RemapX, s_Texts.y, this.m_RemapY, s_Texts.z, this.m_RemapZ, null, new GUILayoutOption[0]);
                }
                else
                {
                    this.m_RemapX.m_DisplayName = s_Texts.remap;
                    ModuleUI.GUIMinMaxCurve(s_Texts.remapCurve, this.m_RemapX, new GUILayoutOption[0]);
                }
            }
            if (flag)
            {
                GUILayout.EndVertical();
            }
            if ((EditorGUI.EndChangeCheck() || (this.m_ScrollSpeed.scalar.floatValue > 0f)) || (flag4 || flag3))
            {
                s_PreviewTextureDirty = true;
                base.m_ParticleSystemUI.m_ParticleEffectUI.m_Owner.Repaint();
            }
            GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(false) };
            GUILayout.Label(s_Texts.previewTexture, this.previewTextureStyle, options);
            if (flag)
            {
                GUILayout.EndHorizontal();
            }
        }
 public override string ToString()
 {
     return(Texts.Get(Frame.ComboTitle()));
 }
Example #39
0
        static void Main(string[] args)
        {
            Trace.Listeners.Add(new TextWriterTraceListener(errorFileName));
            Trace.AutoFlush = true;

            if (args.Any(c => c.ToLower() == "/armobs"))
            {
                if (args.Length == 1)
                {
                    var obs32List = Process.GetProcessesByName("obs32");
                    var obs64List = Process.GetProcessesByName("obs64");
                    if (obs32List.Length == 0 && obs64List.Length == 0)
                    {
                        //No OBS found. Cancel operation.
                        File.Delete(OBSUtils.obswszip);

                        return;
                    }
                    List <Process> obsProcesses = new List <Process>();
                    obsProcesses.AddRange(obs32List);
                    obsProcesses.AddRange(obs64List);

                    if (obsProcesses.Count != 1)
                    {
                        //Multiple OBS instances found. Cancel operation.
                        File.Delete(OBSUtils.obswszip);

                        return;
                    }
                    var obsProcess = obsProcesses.First();

                    string path = OBSUtils.GetProcessPath(obsProcess.Id);


                    string zipTempPath = Path.GetFileNameWithoutExtension(OBSUtils.obswszip);

                    OBSUtils.ExtractZip(OBSUtils.obswszip, zipTempPath);


                    OBSUtils.DirectoryCopy(zipTempPath, OBSUtils.GetPathFromOBSExecutable(path), true);

                    File.Delete(OBSUtils.obswszip);
                    Directory.Delete(zipTempPath, true);

                    var obsGlobalFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "obs-studio", "global.ini");

                    if (File.Exists(obsGlobalFilePath) && !File.ReadAllText(obsGlobalFilePath).Contains("[WebsocketAPI]"))
                    {
                        Trace.WriteLine("File exist and not contain web socket.");
                        while (!obsProcess.HasExited)
                        {
                            StringBuilder sb = new StringBuilder();
                            sb.AppendLine(Texts.rm.GetString("OBSINTEGRATIONINSTALL", Texts.cultereinfo));
                            sb.AppendLine("");
                            sb.AppendLine(Texts.rm.GetString("OBSINTEGRATIONAPPLY", Texts.cultereinfo));
                            MessageBox.Show(sb.ToString());
                        }

                        using (StreamWriter outputFile = new StreamWriter(obsGlobalFilePath))
                        {
                            outputFile.WriteLine("");
                            outputFile.WriteLine("[WebsocketAPI]");
                            outputFile.WriteLine("ServerPort=4444");
                            outputFile.WriteLine("DebugEnabled=false");
                            outputFile.WriteLine("AlertsEnabled=false");
                            outputFile.WriteLine("AuthRequired=false");
                        }

                        bool shouldRepeat = true;
                        while (shouldRepeat)
                        {
                            var obs32List2 = Process.GetProcessesByName("obs32");
                            var obs64List2 = Process.GetProcessesByName("obs64");

                            shouldRepeat = obs32List2.Length == 0 && obs64List2.Length == 0;
                            if (!shouldRepeat)
                            {
                                break;
                            }

                            StringBuilder sb = new StringBuilder();
                            sb.AppendLine(Texts.rm.GetString("OBSINTEGRATIONINSTALLSUCESSFULL", Texts.cultereinfo));
                            sb.AppendLine("");
                            sb.AppendLine(Texts.rm.GetString("OBSINTEGRATIONCONFIRMOBS", Texts.cultereinfo));
                            MessageBox.Show(sb.ToString());
                        }
                    }

                    return;
                }
            }

#if FORCE_SILENCE
            Silent = true;
#else
            Silent = args.Any(c => c.ToLower() == "/s");
#endif
            const string appName = "DisplayButtons";
            bool         createdNew;

            mutex = new Mutex(true, appName, out createdNew);

            if (!createdNew)
            {
                //app is already running! Exiting the application
                if (MessageBox.Show(Texts.rm.GetString("ALREADYDISPLAYBUTTONISOPEN", Texts.cultereinfo), Texts.rm.GetString("ALREADYDISPLAYBUTTONISOPENTITLE", Texts.cultereinfo), MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    var myapp = Process.GetProcessesByName(Assembly.GetCallingAssembly().GetName().Name);

                    List <Process> obsProcesses = new List <Process>();
                    obsProcesses.AddRange(myapp);


                    if (obsProcesses.Count > 1)
                    {
                        var last = obsProcesses.First();
                        last.Kill();
                    }
                }
                //return;
            }


            Application.ThreadException += Application_ThreadException;
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;


            EventXml.LoadSettings();

            ApplicationSettingsManager.LoadSettings();
            Texts.initilizeLang();
            errorText = String.Format(Texts.rm.GetString("INTEGRATIONERROROCURRED", Texts.cultereinfo), errorFileName);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            OBSUtils.PrepareOBSIntegration();
            if (ApplicationSettingsManager.Settings.FirstRun)
            {
                FirstSetupForm firstRunForm = new FirstSetupForm();
                Application.Run(firstRunForm);
                if (!firstRunForm.FinishedSetup)
                {
                    return;
                }
            }
            //  EnsureBrowserEmulationEnabled("DisplayButtons.exe");

            new WebBrowserInstanceHelper().SetBrowserFeatureControl();

            dynamic form = Activator.CreateInstance(FindType("DisplayButtons.Forms.ActionHelperForms.MainFormMenuOption")) as Form;

            if (form.ShowDialog() == DialogResult.OK)
            {
                Initilizator.mode         = 0;
                Initilizator.ServerThread = new ServerThread();
                Initilizator.ServerThread.Start();


                Debug.WriteLine("MODO SOCKET CLIENT");
            }
            else
            {
                // Silent = true;
                Debug.WriteLine("MODO USB");
                Initilizator.mode = 1;

                Adbserver = new AdbServer();

                Adbserver.StartServer(Path.Combine(Application.StartupPath, @"Data\adb\adb.exe"), restartServerIfNewer: true);

                monitor = new DeviceMonitor(new AdbSocket(new IPEndPoint(IPAddress.Loopback, AdbClient.AdbServerPort)));
                client  = new AdbClient(new IPEndPoint(IPAddress.Loopback, AdbClient.AdbServerPort), Factories.AdbSocketFactory);

                monitor.DeviceConnected    += MainForm.DeviceAdbConnected;
                monitor.DeviceDisconnected += MainForm.DeviceAdbDisconnected;
                monitor.Start();



                if (client.GetDevices().Count == 1)
                {
                    Debug.WriteLine("ONE DEVICE");



                    //   client.ExecuteRemoteCommand("am start -a android.intent.action.VIEW -e mode 1 net.nickac.DisplayButtons/.MainActivity", client.GetDevices().First(), null);

                    DevicePersistManager.PersistUsbMode(client.GetDevices().First());
                    //      client.CreateForward(client.GetDevices().First(), "tcp:5095", "tcp:5095", true);

                    Initilizator.ClientThread = new ClientThread();
                    Initilizator.ClientThread.Start();
                }
                else
                {
                    Initilizator.ClientThread = new ClientThread();
                }
            }
            Application.Run(new MainForm());


            //Application.Run(new MainFormMenuOption());
            OBSUtils.Disconnect();
            if (Initilizator.mode == 1)
            {
                foreach (var device in client.GetDevices().ToList())
                {
                    //   client.ExecuteRemoteCommand("am force-stop net.nickac.DisplayButtons", device, null);
                    // client.ExecuteRemoteCommand("kill-server", device, null);

                    //   client.KillAdb();
                }
            }

            //   client.KillAdb();
            EventXml.SaveSettings();
            ApplicationSettingsManager.SaveSettings();
            DevicePersistManager.SaveDevices();

            NetworkChange.NetworkAddressChanged      -= NetworkChange_NetworkAddressChanged;
            NetworkChange.NetworkAvailabilityChanged -= NetworkChange_NetworkAddressChanged;
            Trace.Flush();
        }
 public void PutTextAtLast(Text aText)
 {
     aText.BodyId = this.Id;
     Texts.Add(aText);
 }
 public void PutTextAt(int position, Text aText)
 {
     aText.BodyId = this.Id;
     Texts.Insert(position, aText);
 }
        protected override void Init()
        {
            if (m_Type != null)
            {
                return;
            }
            if (s_Texts == null)
            {
                s_Texts = new Texts();
            }

            m_Type            = GetProperty("type");
            m_Radius          = MultiModeParameter.GetProperty(this, "radius", s_RadiusTexts.speed);
            m_RadiusThickness = GetProperty("radiusThickness");
            m_Angle           = GetProperty("angle");
            m_Length          = GetProperty("length");
            m_BoxThickness    = GetProperty("boxThickness");
            m_Arc             = MultiModeParameter.GetProperty(this, "arc", s_ArcTexts.speed);
            m_DonutRadius     = GetProperty("donutRadius");

            m_PlacementMode                = GetProperty("placementMode");
            m_Mesh                         = GetProperty("m_Mesh");
            m_MeshRenderer                 = GetProperty("m_MeshRenderer");
            m_SkinnedMeshRenderer          = GetProperty("m_SkinnedMeshRenderer");
            m_Sprite                       = GetProperty("m_Sprite");
            m_SpriteRenderer               = GetProperty("m_SpriteRenderer");
            m_MeshMaterialIndex            = GetProperty("m_MeshMaterialIndex");
            m_UseMeshMaterialIndex         = GetProperty("m_UseMeshMaterialIndex");
            m_UseMeshColors                = GetProperty("m_UseMeshColors");
            m_MeshNormalOffset             = GetProperty("m_MeshNormalOffset");
            m_Texture                      = GetProperty("m_Texture");
            m_TextureClipChannel           = GetProperty("m_TextureClipChannel");
            m_TextureClipThreshold         = GetProperty("m_TextureClipThreshold");
            m_TextureColorAffectsParticles = GetProperty("m_TextureColorAffectsParticles");
            m_TextureAlphaAffectsParticles = GetProperty("m_TextureAlphaAffectsParticles");
            m_TextureBilinearFiltering     = GetProperty("m_TextureBilinearFiltering");
            m_TextureUVChannel             = GetProperty("m_TextureUVChannel");
            m_RandomDirectionAmount        = GetProperty("randomDirectionAmount");
            m_SphericalDirectionAmount     = GetProperty("sphericalDirectionAmount");
            m_RandomPositionAmount         = GetProperty("randomPositionAmount");
            m_AlignToDirection             = GetProperty("alignToDirection");

            m_Position = GetProperty("m_Position");
            m_Scale    = GetProperty("m_Scale");
            m_Rotation = GetProperty("m_Rotation");

            if (!s_Material)
            {
                s_Material = Material.GetDefaultMaterial();
            }
            if (!s_TextureMaterial)
            {
                s_TextureMaterial = new Material((Shader)EditorGUIUtility.Load("SceneView/ParticleShapeGizmo.shader"));
            }
            if (!s_SphereTextureMaterial)
            {
                s_SphereTextureMaterial = new Material((Shader)EditorGUIUtility.Load("SceneView/ParticleShapeGizmoSphere.shader"));
            }
            if (!s_CircleMesh)
            {
                s_CircleMesh = ((GameObject)EditorGUIUtility.Load("SceneView/Circle.fbx")).transform.GetComponent <MeshFilter>().sharedMesh;
            }
            if (!s_QuadMesh)
            {
                s_QuadMesh = Resources.GetBuiltinResource(typeof(Mesh), "Quad.fbx") as Mesh;
            }
            if (!s_SphereMesh)
            {
                s_SphereMesh = Resources.GetBuiltinResource(typeof(Mesh), "New-Sphere.fbx") as Mesh;
            }
            if (!s_HemisphereMesh)
            {
                s_HemisphereMesh = ((GameObject)EditorGUIUtility.Load("SceneView/Hemisphere.fbx")).transform.GetComponent <MeshFilter>().sharedMesh;
            }
        }
        public override EdgarDatasetPresentation Parse(IAnalystEdgarDatasetsRepository repository, List <string> fieldNames, List <string> fields, int lineNumber)
        {
            /*
             * adsh	report	line	stmt	inpth	rfile	tag	version	prole	plabel	negating
             * 0001163302-16-000148	1	4	CP	0	H	DocumentFiscalYearFocus	dei/2014	terseLabel	Document Fiscal Year Focus	0
             * 0001163302-16-000148	1	3	CP	0	H	DocumentPeriodEndDate	dei/2014	terseLabel	Document Period End Date	0
             * 0001125345-17-000041	6	1	CF	0	H	NetCashProvidedByUsedInOperatingActivitiesContinuingOperationsAbstract	us-gaap/2015	terseLabel	Operating activities	0
             * 0001104659-17-016575	111	6		0	H	NetCashProvidedByUsedInOperatingActivitiesContinuingOperationsAbstract	us-gaap/2015	terseLabel	Cash flows from operating activities:	0
             * ...
             */
            try
            {
                EdgarDatasetPresentation pre;
                string adsh   = fields[fieldNames.IndexOf("adsh")];
                string line   = fields[fieldNames.IndexOf("line")];
                string report = fields[fieldNames.IndexOf("report")];
                //select S.ADSH + CAST(p.ReportNumber as varchar) + cast(p.Line as varchar) [key] ...
                //string key = adsh + report + line;

                pre = new EdgarDatasetPresentation();
                pre.SubmissionId       = Subs[adsh];
                pre.ReportNumber       = Convert.ToInt32(report);
                pre.RenderId           = Renders[adsh + report];
                pre.Line               = Convert.ToInt32(line);
                pre.FinancialStatement = fields[fieldNames.IndexOf("stmt")];
                pre.Inpth              = fields[fieldNames.IndexOf("inpth")] == "1";
                int index = fieldNames.IndexOf("rfile");
                if (index >= 0)
                {
                    pre.RenderFile    = fields[fieldNames.IndexOf("rfile")][0];
                    pre.RenderFileStr = fields[fieldNames.IndexOf("rfile")];
                }
                else
                {
                    pre.RenderFileStr = null;
                    pre.RenderFile    = char.MinValue;
                }
                string tag     = fields[fieldNames.IndexOf("tag")];
                string version = fields[fieldNames.IndexOf("version")];
                if (Tags.ContainsKey(tag + version))
                {
                    pre.TagId = Tags[tag + version];
                }
                else
                {
                    string tag2 = Encoding.GetEncoding(1252).GetString(Encoding.GetEncoding("iso-8859-7").GetBytes(tag));
                    if (Tags.ContainsKey(tag + version))
                    {
                        pre.TagId = Tags[tag + version];
                    }
                    else
                    {
                        throw new EdgarLineException(EdgarDatasetPresentation.FILE_NAME, lineNumber, "Error retrieving key: " + tag + version);
                    }
                }
                pre.PreferredLabelXBRLLinkRole = fields[fieldNames.IndexOf("prole")];
                pre.PreferredLabel             = fields[fieldNames.IndexOf("plabel")];
                pre.Negating   = !(fields[fieldNames.IndexOf("negating")] == "0");
                pre.LineNumber = lineNumber;

                string numKey = adsh + tag + version;
                if (Nums.ContainsKey(numKey))
                {
                    pre.NumberId = Nums[numKey];
                }
                else
                {
                    pre.ADSH_Tag_Version = adsh + "|" + tag + "|" + version;
                }

                if (Texts.ContainsKey(numKey))
                {
                    pre.TextId = Texts[numKey];
                }
                else
                {
                    pre.ADSH_Tag_Version = adsh + "|" + tag + "|" + version;
                }

                return(pre);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected override void Init()
        {
            if (m_CastShadows != null)
            {
                return;
            }
            if (s_Texts == null)
            {
                s_Texts = new Texts();
            }

            m_CastShadows        = GetProperty0("m_CastShadows");
            m_ReceiveShadows     = GetProperty0("m_ReceiveShadows");
            m_MotionVectors      = GetProperty0("m_MotionVectors");
            m_Material           = GetProperty0("m_Materials.Array.data[0]");
            m_TrailMaterial      = GetProperty0("m_Materials.Array.data[1]");
            m_SortingOrder       = GetProperty0("m_SortingOrder");
            m_RenderingLayerMask = GetProperty0("m_RenderingLayerMask");
            m_SortingLayerID     = GetProperty0("m_SortingLayerID");

            m_RenderMode          = GetProperty0("m_RenderMode");
            m_MinParticleSize     = GetProperty0("m_MinParticleSize");
            m_MaxParticleSize     = GetProperty0("m_MaxParticleSize");
            m_CameraVelocityScale = GetProperty0("m_CameraVelocityScale");
            m_VelocityScale       = GetProperty0("m_VelocityScale");
            m_LengthScale         = GetProperty0("m_LengthScale");
            m_SortingFudge        = GetProperty0("m_SortingFudge");
            m_SortMode            = GetProperty0("m_SortMode");
            m_NormalDirection     = GetProperty0("m_NormalDirection");

            m_Probes = new RendererEditorBase.Probes();
            m_Probes.Initialize(serializedObject);

            m_RenderAlignment = GetProperty0("m_RenderAlignment");
            m_Pivot           = GetProperty0("m_Pivot");

            m_Meshes[0] = GetProperty0("m_Mesh");
            m_Meshes[1] = GetProperty0("m_Mesh1");
            m_Meshes[2] = GetProperty0("m_Mesh2");
            m_Meshes[3] = GetProperty0("m_Mesh3");
            List <SerializedProperty> shownMeshes = new List <SerializedProperty>();

            for (int i = 0; i < m_Meshes.Length; ++i)
            {
                // Always show the first mesh
                if (i == 0 || m_Meshes[i].objectReferenceValue != null)
                {
                    shownMeshes.Add(m_Meshes[i]);
                }
            }
            m_ShownMeshes = shownMeshes.ToArray();

            m_MaskInteraction = GetProperty0("m_MaskInteraction");

            m_EnableGPUInstancing = GetProperty0("m_EnableGPUInstancing");

            m_UseCustomVertexStreams                  = GetProperty0("m_UseCustomVertexStreams");
            m_VertexStreams                           = GetProperty0("m_VertexStreams");
            m_VertexStreamsList                       = new ReorderableList(serializedObject, m_VertexStreams, true, true, true, true);
            m_VertexStreamsList.elementHeight         = kReorderableListElementHeight;
            m_VertexStreamsList.headerHeight          = 0;
            m_VertexStreamsList.onAddDropdownCallback = OnVertexStreamListAddDropdownCallback;
            m_VertexStreamsList.onCanRemoveCallback   = OnVertexStreamListCanRemoveCallback;
            m_VertexStreamsList.drawElementCallback   = DrawVertexStreamListElementCallback;

            s_VisualizePivot = EditorPrefs.GetBool("VisualizePivot", false);
        }
Example #45
0
 public override string ToString()
 {
     return("_t: " + _t + "Texts: " + Texts.ToJson());
 }
Example #46
0
 public void syncData(Texts texts, TypingSession typingSession)
 {
     this.texts         = texts;
     this.typingSession = typingSession;
     syncData();
 }
Example #47
0
 public void SaveTexts()
 {
     SaveDirectory();
     Texts.SaveLang();
 }
Example #48
0
 public void ClearText()
 {
     Texts.Clear();
 }
 public bool SentenceHasSingleModifierAndPyXuyaoUnit()
 {
     return(Texts.Any(text => text.IsPyXuyao) &&
            Texts.Count(text => text.IsModifier) == 1);
 }
Example #50
0
 protected override void Init()
 {
     if (this.m_Type == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_Type = base.GetProperty("type");
         this.m_Radius = base.GetProperty("radius");
         this.m_Angle = base.GetProperty("angle");
         this.m_Length = base.GetProperty("length");
         this.m_BoxX = base.GetProperty("boxX");
         this.m_BoxY = base.GetProperty("boxY");
         this.m_BoxZ = base.GetProperty("boxZ");
         this.m_Arc = base.GetProperty("arc");
         this.m_PlacementMode = base.GetProperty("placementMode");
         this.m_Mesh = base.GetProperty("m_Mesh");
         this.m_RandomDirection = base.GetProperty("randomDirection");
         this.m_Material = EditorGUIUtility.GetBuiltinExtraResource(typeof(Material), "Default-Material.mat") as Material;
         this.m_BoxEditor.SetAlwaysDisplayHandles(true);
     }
 }
Example #51
0
            //---------------------------------------------------------------------------

            public void Add(TextSegment text, SpriteFont font)
            {
                Texts.Add(text);
                Width += text.GetWidth(font);
            }
Example #52
0
        public bool ScrollText(TextToScroll text)
        {
            if (Texts.Count > 0)
            {
                Texts.Enqueue(text);
                CurrentText = Texts.Dequeue();
                if (IsScrolling)
                {
                    return(true);
                }
            }
            else
            {
                CurrentText = text;
            }
            IsScrolling = true;
            _ledStripTranslation.Image.Clear();
            _ledStripTranslation.Device.Update();
            ColorGrid = new Color[_ledStripTranslation.Height, _ledStripTranslation.Width];

            // adding letters one column at a time
            while (CurrentText.ScrollIterations > 0)
            {
                foreach (char c in CurrentText.Letters)
                {
                    IEnumerable <string> currentLetter = Font[c];
                    foreach (string column in currentLetter)
                    {
                        ShiftColorGrid();
                        // add on new column
                        for (int i = 0; i < column.Length; i++)
                        {
                            if (column[i].Equals('1'))
                            {
                                ColorGrid[i, ColorGrid.GetLength(1) - 1] = CurrentText.Color;
                            }
                            else
                            {
                                ColorGrid[i, ColorGrid.GetLength(1) - 1] = Color.Empty;
                            }
                        }
                        _ledStripTranslation.Image.Clear();
                        _ledStripTranslation.ToImage(ColorGrid);
                        _ledStripTranslation.Device.Update();
                        System.Threading.Thread.Sleep(100);
                    }
                }
                // shift to clear scrolling text
                for (int i = 0; i < _ledStripTranslation.Width; i++)
                {
                    ShiftColorGrid();
                    for (int j = 0; j < _ledStripTranslation.Height; j++)
                    {
                        ColorGrid[j, ColorGrid.GetLength(1) - 1] = Color.Empty;
                    }
                    _ledStripTranslation.Image.Clear();
                    _ledStripTranslation.ToImage(ColorGrid);
                    _ledStripTranslation.Device.Update();
                    System.Threading.Thread.Sleep(100);
                }
                CurrentText.ScrollIterations--;
                if (Texts.Count > 0)
                {
                    CurrentText = Texts.Dequeue();
                }
            }
            IsScrolling = false;
            return(true);
        }
Example #53
0
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     string[] options = new string[] { "Planes", "World" };
     CollisionTypes types = (CollisionTypes) ModuleUI.GUIPopup(string.Empty, this.m_Type, options);
     if (types == CollisionTypes.Plane)
     {
         this.DoListOfPlanesGUI();
         EditorGUI.BeginChangeCheck();
         this.m_PlaneVisualizationType = (PlaneVizType) ModuleUI.GUIPopup(s_Texts.visualization, (int) this.m_PlaneVisualizationType, this.m_PlaneVizTypeNames);
         if (EditorGUI.EndChangeCheck())
         {
             EditorPrefs.SetInt("PlaneColisionVizType", (int) this.m_PlaneVisualizationType);
             if (this.m_PlaneVisualizationType == PlaneVizType.Solid)
             {
                 this.SyncVisualization();
             }
             else
             {
                 ParticleEffectUtils.ClearPlanes();
             }
         }
         EditorGUI.BeginChangeCheck();
         this.m_ScaleGrid = ModuleUI.GUIFloat(s_Texts.scalePlane, this.m_ScaleGrid, "f2");
         if (EditorGUI.EndChangeCheck())
         {
             this.m_ScaleGrid = Mathf.Max(0f, this.m_ScaleGrid);
             EditorPrefs.SetFloat("ScalePlaneColision", this.m_ScaleGrid);
             this.SyncVisualization();
         }
     }
     ModuleUI.GUIFloat(s_Texts.dampen, this.m_Dampen);
     ModuleUI.GUIFloat(s_Texts.bounce, this.m_Bounce);
     ModuleUI.GUIFloat(s_Texts.lifetimeLoss, this.m_LifetimeLossOnCollision);
     ModuleUI.GUIFloat(s_Texts.minKillSpeed, this.m_MinKillSpeed);
     if (types != CollisionTypes.World)
     {
         ModuleUI.GUIFloat(s_Texts.particleRadius, this.m_ParticleRadius);
     }
     if (types == CollisionTypes.World)
     {
         ModuleUI.GUILayerMask(s_Texts.collidesWith, this.m_CollidesWith);
         ModuleUI.GUIPopup(s_Texts.quality, this.m_Quality, s_Texts.qualitySettings);
         if (this.m_Quality.intValue > 0)
         {
             ModuleUI.GUIFloat(s_Texts.voxelSize, this.m_VoxelSize);
         }
     }
     ModuleUI.GUIToggle(s_Texts.collisionMessages, this.m_CollisionMessages);
 }
Example #54
0
        public Data Create(Row row)
        {
            Data data;

            switch (Index)
            {
            case 1:
            {
                data = new Achievements(row, this);
                break;
            }

            case 2:
            {
                data = new Alliance_badges(row, this);
                break;
            }

            case 3:
            {
                data = new Alliance_portal(row, this);
                break;
            }

            case 4:
            {
                data = new Billing_packages(row, this);
                break;
            }

            case 5:
            {
                data = new Building_classes(row, this);
                break;
            }

            case 6:
            {
                data = new Buildings(row, this);
                break;
            }

            case 7:
            {
                data = new Characters(row, this);
                break;
            }

            case 8:
            {
                data = new Decos(row, this);
                break;
            }

            case 9:
            {
                data = new Effects(row, this);
                break;
            }

            case 10:
            {
                data = new Experience_levels(row, this);
                break;
            }

            case 11:
            {
                data = new Faq(row, this);
                break;
            }

            case 12:
            {
                data = new Globals(row, this);
                break;
            }

            case 13:
            {
                data = new Heroes(row, this);
                break;
            }

            case 14:
            {
                data = new Hints(row, this);
                break;
            }

            case 15:
            {
                data = new Leagues(row, this);
                break;
            }

            case 16:
            {
                data = new Locales(row, this);
                break;
            }

            case 17:
            {
                data = new Missions(row, this);
                break;
            }

            case 18:
            {
                data = new News(row, this);
                break;
            }

            case 19:
            {
                data = new Npcs(row, this);
                break;
            }

            case 20:
            {
                data = new Obstacles(row, this);
                break;
            }

            case 21:
            {
                data = new Particle_emitters(row, this);
                break;
            }

            case 22:
            {
                data = new Projectiles(row, this);
                break;
            }

            case 23:
            {
                data = new Resource_packs(row, this);
                break;
            }

            case 24:
            {
                data = new Logic.Resources(row, this);
                break;
            }

            case 25:
            {
                data = new Shields(row, this);
                break;
            }

            case 26:
            {
                data = new Spells(row, this);
                break;
            }

            case 27:
            {
                data = new Texts(row, this);
                break;
            }

            case 28:
            {
                data = new Traps(row, this);
                break;
            }

            default:
            {
                data = new Data(row, this);
                break;
            }
            }

            return(data);
        }
Example #55
0
        public override void OnInspectorGUI(ParticleSystem s)
        {
            if (s_Texts == null)
            {
                s_Texts = new Texts();
            }
            int intValue = this.m_Type.intValue;
            int num2 = this.m_TypeToGuiTypeIndex[intValue];
            bool usesShell = this.GetUsesShell((ShapeTypes) intValue);
            int index = ModuleUI.GUIPopup(s_Texts.shape, num2, this.m_GuiNames);
            ShapeTypes types = this.m_GuiTypes[index];
            if (index != num2)
            {
                intValue = (int) types;
            }
            switch (types)
            {
                case ShapeTypes.Sphere:
                    ModuleUI.GUIFloat(s_Texts.radius, this.m_Radius);
                    intValue = !ModuleUI.GUIToggle(s_Texts.emitFromShell, usesShell) ? 0 : 1;
                    break;

                case ShapeTypes.HemiSphere:
                    ModuleUI.GUIFloat(s_Texts.radius, this.m_Radius);
                    intValue = !ModuleUI.GUIToggle(s_Texts.emitFromShell, usesShell) ? 2 : 3;
                    break;

                case ShapeTypes.Cone:
                {
                    ModuleUI.GUIFloat(s_Texts.coneAngle, this.m_Angle);
                    ModuleUI.GUIFloat(s_Texts.radius, this.m_Radius);
                    bool disabled = (intValue != 8) && (intValue != 9);
                    EditorGUI.BeginDisabledGroup(disabled);
                    ModuleUI.GUIFloat(s_Texts.coneLength, this.m_Length);
                    EditorGUI.EndDisabledGroup();
                    string[] options = new string[] { "Base", "Base Shell", "Volume", "Volume Shell" };
                    int num4 = this.ConvertConeTypeToConeEmitFrom((ShapeTypes) intValue);
                    num4 = ModuleUI.GUIPopup(s_Texts.emitFrom, num4, options);
                    intValue = (int) this.ConvertConeEmitFromToConeType(num4);
                    break;
                }
                case ShapeTypes.Box:
                    ModuleUI.GUIFloat(s_Texts.boxX, this.m_BoxX);
                    ModuleUI.GUIFloat(s_Texts.boxY, this.m_BoxY);
                    ModuleUI.GUIFloat(s_Texts.boxZ, this.m_BoxZ);
                    break;

                case ShapeTypes.Mesh:
                {
                    string[] strArray2 = new string[] { "Vertex", "Edge", "Triangle" };
                    ModuleUI.GUIPopup(string.Empty, this.m_PlacementMode, strArray2);
                    ModuleUI.GUIObject(s_Texts.mesh, this.m_Mesh);
                    break;
                }
                case ShapeTypes.Circle:
                    ModuleUI.GUIFloat(s_Texts.radius, this.m_Radius);
                    ModuleUI.GUIFloat(s_Texts.arc, this.m_Arc);
                    intValue = !ModuleUI.GUIToggle(s_Texts.emitFromEdge, usesShell) ? 10 : 11;
                    break;

                case ShapeTypes.SingleSidedEdge:
                    ModuleUI.GUIFloat(s_Texts.radius, this.m_Radius);
                    break;
            }
            this.m_Type.intValue = intValue;
            ModuleUI.GUIToggle(s_Texts.randomDirection, this.m_RandomDirection);
        }
Example #56
0
        private async void UploadFileAndQueryButton_OnClick(object sender, RoutedEventArgs e)
        {
            using var fileDialog = new CommonOpenFileDialog("选择文件")
                  {
                      Multiselect = false
                  };
            try
            {
                if (fileDialog.ShowDialog() == CommonFileDialogResult.Ok)
                {
                    Searching.Visibility         = Visibility.Visible;
                    UploadFileTextBox.Text       = fileDialog.FileName;
                    await using var memoryStream = new MemoryStream(await File.ReadAllBytesAsync(UploadFileTextBox.Text), false);
                    var sauceResponse = await RestService.For <ISauceNAOProtocol>(ProtocolBase.SauceNAOUrl)
                                        .GetSauce(new StreamPart(memoryStream, Path.GetFileName(fileDialog.FileName), Texts.AssumeImageContentType(fileDialog.FileName)));

                    var content = await sauceResponse.Content.ReadAsStringAsync();

                    if ((await ParseSauce(content)).ToList() is { } sauceResults&& sauceResults.Any())
                    {
                        MainWindow.Instance.OpenIllustBrowser(await PixivHelper.IllustrationInfo(sauceResults[0]));
                    }
                    else
                    {
                        MainWindow.MessageQueue.Enqueue("找不到结果TAT");
                    }
                }
            }
 public IEnumerable <Text> TextsBeforePyXuyao(int PyXuyaoPosition)
 {
     return(Texts.Take(PyXuyaoPosition));
 }
Example #58
0
        /// <summary>
        /// Отслеживает авторские тексты для коррекции IsNew автора
        /// </summary>
        /// <param name="sender">игнорируется</param>
        /// <param name="e">игнорируется</param>
        private void TextsListChanged(object sender, ListChangedEventArgs e)
        {
            bool summaryIsNew = Texts.Any(authorText => authorText.IsNew);

            IsNew = summaryIsNew;
        }
Example #59
0
        /// <summary>
        /// 重设当前可显示的内容,为各项内容间加上空格
        /// </summary>
        protected override void ResetDisplayTexts()
        {
            InitBaseDisplayTexts();

            Texts.Insert(0, new OutputInfoStruct("术后医嘱", OrderOutputTextType.ItemName));
        }
        public override void Parse(List <string> fieldNames, List <string> fields, int lineNumber, DataRow dr, int edgarDatasetId)
        {
            /*
             * adsh	                report	line	stmt	inpth	rfile	tag	version	prole	plabel	negating
             * 0001163302-16-000148	1	    4	    CP	    0	    H	    DocumentFiscalYearFocus	dei/2014	terseLabel	Document Fiscal Year Focus	0
             * 0001163302-16-000148	1	    3	    CP	    0	    H	    DocumentPeriodEndDate	dei/2014	terseLabel	Document Period End Date	0
             * 0001125345-17-000041	6	    1	    CF	    0	    H	    NetCashProvidedByUsedInOperatingActivitiesContinuingOperationsAbstract	us-gaap/2015	terseLabel	Operating activities	0
             * 0001104659-17-016575	111	    6		        0	    H	    NetCashProvidedByUsedInOperatingActivitiesContinuingOperationsAbstract	us-gaap/2015	terseLabel	Cash flows from operating activities:	0
             * ...
             */
            try
            {
                string adsh   = fields[fieldNames.IndexOf("adsh")];
                string line   = fields[fieldNames.IndexOf("line")];
                string report = fields[fieldNames.IndexOf("report")];
                dr["SubmissionId"]       = Subs[adsh];
                dr["ReportNumber"]       = Convert.ToInt32(report);
                dr["RenderId"]           = Renders[adsh + report];
                dr["Line"]               = Convert.ToInt32(line);
                dr["FinancialStatement"] = fields[fieldNames.IndexOf("stmt")];
                dr["Inpth"]              = fields[fieldNames.IndexOf("inpth")] == "1";
                int index = fieldNames.IndexOf("rfile");
                if (index >= 0)
                {
                    dr["RenderFileStr"] = fields[index][0];
                }
                else
                {
                    dr["RenderFileStr"] = DBNull.Value;
                }
                string tag     = fields[fieldNames.IndexOf("tag")];
                string version = fields[fieldNames.IndexOf("version")];
                if (Tags.ContainsKey(tag + version))
                {
                    dr["TagId"] = Tags[tag + version];
                }
                else
                {
                    string tag2 = Encoding.GetEncoding(1252).GetString(Encoding.GetEncoding("iso-8859-7").GetBytes(tag));
                    if (Tags.ContainsKey(tag + version))
                    {
                        dr["TagId"] = Tags[tag + version];
                    }
                    else
                    {
                        throw new EdgarLineException(EdgarDatasetPresentation.FILE_NAME, lineNumber, "Error retrieving key: " + tag + version);
                    }
                }
                dr["PreferredLabelXBRLLinkRole"] = fields[fieldNames.IndexOf("prole")];
                dr["PreferredLabel"]             = fields[fieldNames.IndexOf("plabel")];
                dr["Negating"]   = !(fields[fieldNames.IndexOf("negating")] == "0");
                dr["DatasetId"]  = edgarDatasetId;
                dr["LineNumber"] = lineNumber;


                string numKey = adsh + tag + version;
                if (Nums.ContainsKey(numKey))
                {
                    dr["NumberId"] = Nums[numKey];
                }
                else
                {
                    dr["ADSH_Tag_Version"] = adsh + " | " + tag + "|" + version;
                }

                if (Texts.ContainsKey(numKey))
                {
                    dr["TextId"] = Texts[numKey];
                }
                else
                {
                    dr["ADSH_Tag_Version"] = adsh + " | " + tag + "|" + version;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }