Example #1
0
        protected virtual void OnChangeKeyWordEvent(Data_With args)
        {
            ChangeKeyWordEventHandler handler = ChangeKeyWordEvent;

            //イベントのハンドラが割り当てられていない場合はイベントを発生させない
            if (handler != null)
            {
                //イベント発生
                handler(this, args);
            }
        }
Example #2
0
        private void First_Keyword_Close_Click(object sender, Data_With args)
        {
            var st_board = new Storyboard();

            var nums = args.Message.Name;
            int num  = int.Parse((nums.Trim('c')));


            if (num == 0 && key.Count == 1)
            {
                return;
            }
            key[num].keyword[0].Delete();
            key[num].keyword.RemoveAt(0);
            key[num].Delete();
            key.RemoveAt(num);

            for (int i = num; i < key.Count; i++)
            {
                var anime = new DoubleAnimation();
                Storyboard.SetTarget(anime, key[i]);
                Storyboard.SetTargetProperty(anime, new PropertyPath("(Canvas.Top)"));
                anime.To       = key[i].Height * i;
                anime.Duration = TimeSpan.FromSeconds(0.075);
                st_board.Children.Add(anime);
                key[i].Name = "c" + i.ToString();
            }
            var add_up = new DoubleAnimation();

            Storyboard.SetTarget(add_up, key_add);
            Storyboard.SetTargetProperty(add_up, new PropertyPath("(Canvas.Top)"));
            //add_up.To = Canvas.GetTop(key[key.Count - 1]) + key[0].Height + 20;
            Canvas.SetTop(key_add, Canvas.GetTop(key_add) - key[0].Height);
            add_up.Duration = TimeSpan.FromSeconds(0.075);
            st_board.Children.Add(add_up);

            st_board.Begin();
            Change_Size();
        }
Example #3
0
 private void Key_Erea_AddKeyWordEvent(object sender, Data_With args)
 {
     Change_Size();
 }