Example #1
0
        private void CompareAndUpdateShapeObject(GridItem changed, object oldvalue, ShapeObject sho)
        {
            long S = sho.Start, E = sho.End;

            if (S.Equals(oldvalue) & changed.Label.Equals("Start time")) { sho.Start = (long)changed.Value; }
            if (E.Equals(oldvalue) & changed.Label.Equals("End time")) { sho.End = (long)changed.Value; }
            if (sho.GetAngleX(S).Equals(oldvalue) & changed.Label.Equals("Angle X at start")) { sho.SetAngleX(S, (int)changed.Value); }
            if (sho.GetAngleX(E).Equals(oldvalue) & changed.Label.Equals("Angle X at end")) { sho.SetAngleX(E, (int)changed.Value); }
            if (sho.GetAngleY(S).Equals(oldvalue) & changed.Label.Equals("Angle Y at start")) { sho.SetAngleY(S, (int)changed.Value); }
            if (sho.GetAngleY(E).Equals(oldvalue) & changed.Label.Equals("Angle Y at end")) { sho.SetAngleY(E, (int)changed.Value); }
            if (sho.GetAngleZ(S).Equals(oldvalue) & changed.Label.Equals("Angle Z at start")) { sho.SetAngleZ(S, (int)changed.Value); }
            if (sho.GetAngleZ(E).Equals(oldvalue) & changed.Label.Equals("Angle Z at end")) { sho.SetAngleZ(E, (int)changed.Value); }
            if (sho.GetFrontColor(S).Equals(oldvalue) & changed.Label.Equals("Front color at start")) { sho.SetFrontColor(S, (Color)changed.Value); }
            if (sho.GetFrontColor(E).Equals(oldvalue) & changed.Label.Equals("Front color at end")) { sho.SetFrontColor(E, (Color)changed.Value); }
            if (sho.GetBackColor(S).Equals(oldvalue) & changed.Label.Equals("Back color at start")) { sho.SetBackColor(S, (Color)changed.Value); }
            if (sho.GetBackColor(E).Equals(oldvalue) & changed.Label.Equals("Back color at end")) { sho.SetBackColor(E, (Color)changed.Value); }
            if (sho.GetBorderColor(S).Equals(oldvalue) & changed.Label.Equals("Border color at start")) { sho.SetBorderColor(S, (Color)changed.Value); }
            if (sho.GetBorderColor(E).Equals(oldvalue) & changed.Label.Equals("Border color at end")) { sho.SetBorderColor(E, (Color)changed.Value); }
            if (sho.GetShadowColor(S).Equals(oldvalue) & changed.Label.Equals("Shadow color at start")) { sho.SetShadowColor(S, (Color)changed.Value); }
            if (sho.GetShadowColor(E).Equals(oldvalue) & changed.Label.Equals("Shadow color at end")) { sho.SetShadowColor(E, (Color)changed.Value); }
            if (sho.GetRelativePositionX(S).Equals(oldvalue) & changed.Label.Equals("Position X at start")) { sho.SetRelativePositionX(S, (float)changed.Value); }
            if (sho.GetRelativePositionX(E).Equals(oldvalue) & changed.Label.Equals("Position X at end")) { sho.SetRelativePositionX(E, (float)changed.Value); }
            if (sho.GetRelativePositionY(S).Equals(oldvalue) & changed.Label.Equals("Position Y at start")) { sho.SetRelativePositionY(S, (float)changed.Value); }
            if (sho.GetRelativePositionY(E).Equals(oldvalue) & changed.Label.Equals("Position Y at end")) { sho.SetRelativePositionY(E, (float)changed.Value); }
            if (sho.GetQuakeX(S).Equals(oldvalue) & changed.Label.Equals("Quake X at start")) { sho.SetQuakeX(S, (int)changed.Value); }
            if (sho.GetQuakeX(E).Equals(oldvalue) & changed.Label.Equals("Quake X at end")) { sho.SetQuakeX(E, (int)changed.Value); }
            if (sho.GetQuakeY(S).Equals(oldvalue) & changed.Label.Equals("Quake Y at start")) { sho.SetQuakeY(S, (int)changed.Value); }
            if (sho.GetQuakeY(E).Equals(oldvalue) & changed.Label.Equals("Quake Y at end")) { sho.SetQuakeY(E, (int)changed.Value); }
            if (sho.GetScaleX(S).Equals(oldvalue) & changed.Label.Equals("Scale X at start")) { sho.SetScaleX(S, (float)changed.Value); }
            if (sho.GetScaleX(E).Equals(oldvalue) & changed.Label.Equals("Scale X at end")) { sho.SetScaleX(E, (float)changed.Value); }
            if (sho.GetScaleY(S).Equals(oldvalue) & changed.Label.Equals("Scale Y at start")) { sho.SetScaleY(S, (float)changed.Value); }
            if (sho.GetScaleY(E).Equals(oldvalue) & changed.Label.Equals("Scale Y at end")) { sho.SetScaleY(E, (float)changed.Value); }
            if (sho.GetBorderWeight(S).Equals(oldvalue) & changed.Label.Equals("Border weight at start")) { sho.SetBorderWeight(S, (int)changed.Value); }
            if (sho.GetBorderWeight(E).Equals(oldvalue) & changed.Label.Equals("Border weight at end")) { sho.SetBorderWeight(E, (int)changed.Value); }
            if (sho.GetShadowDepth(S).Equals(oldvalue) & changed.Label.Equals("Shadow depth at start")) { sho.SetShadowDepth(S, (int)changed.Value); }
            if (sho.GetShadowDepth(E).Equals(oldvalue) & changed.Label.Equals("Shadow depth at end")) { sho.SetShadowDepth(E, (int)changed.Value); }

            if (changed.Label.Equals("Path"))
            {
                sho.SetPathTreeNode(PathTreeNode.GetFromString(avstn, changed.Value.ToString()));

            }
        }