Пример #1
0
        private void action_OnEditThis(object sender, EventArgs e)
        {
            Business.UserAction actionToEdit = (sender  as  UserAction).MyAction;
            ActionSetting       setting      = new ActionSetting();

            setting.Action_name = (sender as UserAction).MyAction.Name;
            setting.ActionCode  = (sender as UserAction).MyAction.ReceiveCommand;

            if (setting.ShowDialog() == true)
            {
                actionToEdit.Name           = setting.Action_name;
                actionToEdit.ReceiveCommand = setting.ActionCode;
                Refresh();
            }
        }
        private void AddAreaAction(object sender, RoutedEventArgs e)
        {
            if (_actionList == null)
                _actionList = new List<Business.UserAction>();
            ActionSetting setting = new ActionSetting();

            if (setting.ShowDialog() == true)
            {
                string name = setting.Action_name;
                string recveCommand = setting.ActionCode;
               Business.UserAction temp = new Business.UserAction(name,recveCommand);
                _actionList.Add(temp);
                Refresh();
            }

        }
Пример #3
0
        private void AddAreaAction(object sender, RoutedEventArgs e)
        {
            if (_actionList == null)
            {
                _actionList = new List <Business.UserAction>();
            }
            ActionSetting setting = new ActionSetting();

            if (setting.ShowDialog() == true)
            {
                string name              = setting.Action_name;
                string recveCommand      = setting.ActionCode;
                Business.UserAction temp = new Business.UserAction(name, recveCommand);
                _actionList.Add(temp);
                Refresh();
            }
        }
        private void action_OnEditThis(object sender, EventArgs e)
        {
           Business.UserAction actionToEdit=(sender  as  UserAction).MyAction;
           ActionSetting setting = new ActionSetting();
           setting.Action_name = (sender as UserAction).MyAction.Name;
           setting.ActionCode=(sender as UserAction ).MyAction.ReceiveCommand;

           if (setting.ShowDialog() == true)
           {
               actionToEdit.Name = setting.Action_name;
               actionToEdit.ReceiveCommand = setting.ActionCode;
               Refresh();
           }

        }