示例#1
0
        private void CompareAndUpdateSentence(GridItem changed, object oldvalue, Sentence sen)
        {
            long S = sen.SentenceStart, E = sen.SentenceEnd;

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

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

            //}
        }