Esempio n. 1
0
        /// <summary>
        /// Method for Design variable commands
        /// </summary>
        /// <param name="command">Enum for VariableCommands</param>
        private void DesignVariableCommand(VariableCommands command)
        {
            //CommandDesignDialog dlg = null;
            try
            {
                //				if (!(Enum.IsDefined(typeof(Enums.VariableCommands),command)))
                //				{
                //					throw new ArgumentException(Localization.LocalizeString(SharedStrings.NOT_VALID_ENUM_TYPE) + command.GetType().Name.ToString() );
                //				}

                switch (command)
                {
                case VariableCommands.Assign:
                    DesignAndProcessCommand(new AssignDialog(mainForm, true));
                    break;

                case VariableCommands.Define:
                    DesignAndProcessCommand(new DefineVariableDialog(mainForm, true));
                    break;

                case VariableCommands.DefineGroup:
                    DesignAndProcessCommand(new DefineGroupDialog(mainForm));
                    break;

                case VariableCommands.Display:
                    DesignAndProcessCommand(new DisplayDialog(mainForm));
                    break;

                case VariableCommands.Recode:
                    DesignAndProcessCommand(new RecodeDialog(mainForm));
                    break;

                case VariableCommands.Undefine:
                    //DisplayFeatureNotImplementedMessage();
                    DesignAndProcessCommand(new UndefineVariableDialog(mainForm));
                    break;

                default:
                    break;
                } //switch
            }     //try
            finally
            {
                //programEditor.SavePGM(Files.LastPgm);
            }//finally
             //			}
        }
Esempio n. 2
0
        /// <summary>
        /// Method for Design variable commands
        /// </summary>
        /// <param name="command">Enum for VariableCommands</param>
        private void DesignVariableCommand(VariableCommands command)
        {
            //CommandDesignDialog dlg = null;
            try
            {
                //				if (!(Enum.IsDefined(typeof(Enums.VariableCommands),command)))
                //				{
                //					throw new ArgumentException(Localization.LocalizeString(SharedStrings.NOT_VALID_ENUM_TYPE) + command.GetType().Name.ToString() );
                //				}

                switch (command)
                {
                    case VariableCommands.Assign:
                        DesignAndProcessCommand(new AssignDialog(mainForm, true));
                        break;
                    case VariableCommands.Define:
                        DesignAndProcessCommand(new DefineVariableDialog(mainForm, true));
                        break;
                    case VariableCommands.DefineGroup:
                        DesignAndProcessCommand(new DefineGroupDialog(mainForm));
                        break;
                    case VariableCommands.Display:
                        DesignAndProcessCommand(new DisplayDialog(mainForm));
                        break;
                    case VariableCommands.Recode:
                        DesignAndProcessCommand(new RecodeDialog(mainForm));
                        break;
                    case VariableCommands.Undefine:
                        //DisplayFeatureNotImplementedMessage();
                        DesignAndProcessCommand(new UndefineVariableDialog(mainForm));
                        break;
                    default:
                        break;
                } //switch
            } //try
            finally
            {
                //programEditor.SavePGM(Files.LastPgm);
            }//finally
            //			}
        }