コード例 #1
0
        void RechnermodulBibliothek.FunctionInterface.buildUI(UIBuilderInterface builder)
        {
            ModifierChain mc = new ModifierChain(Modifiers.NotEmptyModifier).Add(Modifiers.DoubleModifier);

            builder.addStringInput("baseVal", "Grundwert für die Rechnung", mc);
            builder.addStringInput("percentVal", "Prozentwert für die Rechnung", mc);
        }
コード例 #2
0
        public UserDataInterface getUserData(UIBuilderInterface uiBuilder)
        {
            Dictionary <string, string>         stringValues = new Dictionary <string, string>();
            Dictionary <string, List <string> > arrayValues  = new Dictionary <string, List <string> >();

            UIElement[] uiElements    = uiBuilder.getUIElements();
            int         element_count = uiElements.Length;
            int         current_param = 0;

            foreach (UIElement element in uiElements)
            {
                if (element.getType() == UIElement.TYPE_SINGLE)
                {
                    stringValues[element.getKey()] = "";
                }
                else
                {
                    arrayValues[element.getKey()] = new List <string>();
                }
            }

            while (current_param < element_count)
            {
                UIElement current_element = uiElements[current_param];

                universelleseingabemodul uem = new universelleseingabemodul();
                uem.buildUi(uiElements[current_param]);
                uem.ShowDialog();

                if (current_element.getType() == UIElement.TYPE_SINGLE)
                {
                    stringValues[current_element.getKey()] = uem.getData();
                }
                else
                {
                    arrayValues[current_element.getKey()].Add(uem.getData());
                }

                if (uem.state == universelleseingabemodul.STATE_NEXT_PARAM)
                {
                    current_param++;
                }
                else if (uem.state != universelleseingabemodul.STATE_NEXT_VALUE)
                {
                    return(null);
                }
            }


            Dictionary <string, string[]> arrayDict = new Dictionary <string, string[]>();

            foreach (string key in arrayValues.Keys)
            {
                arrayDict[key] = arrayValues[key].ToArray <string>();
            }

            return(new UserData(stringValues, arrayDict));
        }
コード例 #3
0
ファイル: Class1.cs プロジェクト: kalehmann/Rechnermodul
        void RechnermodulBibliothek.FunctionInterface.buildUI(UIBuilderInterface builder)
        {
            ModifierChain mc = new ModifierChain(Modifiers.NotEmptyModifier).
                               Add(Modifiers.CalculateModifier);

            builder.addStringInput("s1", "Summand1", mc);
            builder.addStringInput("s2", "Summand2", mc);
            builder.addStringArrayInput("s3", "restlichen Summanden", mc);
            builder.addStringArrayInput("s4", "weitere Summanden", mc);
            builder.addStringArrayInput("s5", "mehr Summanden", mc);
        }
コード例 #4
0
        void RechnermodulBibliothek.FunctionInterface.buildUI(UIBuilderInterface builder)
        {
            ModifierChain mc = new ModifierChain(Modifiers.NotEmptyModifier).Add(Modifiers.CalculateModifier);

            builder.addStringInput("baseVal", "Nettowert für die Rechnung", mc);
        }