예제 #1
0
파일: SaveAction.cs 프로젝트: bartkkon/SAT
        private bool CheckNameNewAction()
        {
            var Action = MainProgram.Self.actionView.nameView;

            if (ActionID.Singleton.ID == 0)
            {
                if (Action.GetActionName() == string.Empty)
                {
                    MessageBox.Show("Action Name can't be EMPTY!", "Warning!");
                    return(false);
                }
                if (Action.GetActionName().Length <= 10)
                {
                    MessageBox.Show("Action Name can't be shorter than 10 characters.", "Warning!");
                    return(false);
                }
                if (!ActionController.CheckIfNameExist(Action.GetActionName()))
                {
                    MessageBox.Show("Action Name exist, Please change!", "Warning!");
                    return(false);
                }
            }
            return(true);
        }