예제 #1
0
        private void Groupdelete(Object sender, ClassGroupRemoveArgs group)
        {
            ClassChangeGroupEventArgs changeargs = new ClassChangeGroupEventArgs();

            changeargs.rootGroup  = group.rootGroup;
            changeargs.add_delete = 0;
            ChangeGroup?.Invoke(this, changeargs);
            groupbox.Children.Remove(sender as ClassGroupControl);  //상위클래스에서 실제그룹 삭제
        }
예제 #2
0
        /// <summary>
        ///새로운 그룹 추가 버튼
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AddButtonClicked(object sender, RoutedEventArgs e)
        {
            if (ElementAdd != null)
            {
                ElementAdd(this, new EventArgs());
            }
            ClassChangeGroupEventArgs changeargs = new ClassChangeGroupEventArgs();

            changeargs.rootGroup  = new ClassGroup();
            changeargs.add_delete = 1;
            ChangeGroup?.Invoke(this, changeargs);  //info가 추가 되었을 때 추가 : 1
            var GC = new ClassGroupControl(changeargs.rootGroup);

            NewGroupAdder(GC);
        }
예제 #3
0
        public void GroupCheck()
        {
            //дичь со словарем
            if (invertCodeDict == null || invertCodeDict.Count == 0)
            {
                invertCodeDict = new Dictionary <string, string>();

                try
                {
                    foreach (var line in CodeDict.groups)
                    {
                        try
                        {
                            invertCodeDict.Add(line.Value, line.Key);
                        }
                        catch (Exception)
                        {
                        }
                    }
                }
                catch (Exception)
                {
                }
            }

            bool check = true;

            if (invertCodeDict.ContainsKey(Textbox1.Text))
            {
                pictureBox1CheckFail.Visible = false;
            }
            else
            {
                pictureBox1CheckFail.Visible = true;
                check = false;
            }


            if (invertCodeDict.ContainsKey(Textbox3.Text))
            {
                pictureBox2CheckFail.Visible = false;
            }
            else
            {
                pictureBox2CheckFail.Visible = true;
                check = false;
            }

            if (invertCodeDict.ContainsKey(Textbox2.Text))
            {
                pictureBox3CheckFail.Visible = false;
            }
            else
            {
                pictureBox3CheckFail.Visible = true;
                check = false;
            }

            if (check)
            {
                Groups[0] = Textbox1.Text;
                Groups[1] = Textbox3.Text;
                Groups[2] = Textbox2.Text;

                ChangeGroup?.Invoke(Groups);
            }
        }