コード例 #1
0
        void LoadCasesControls(Panel targetPanel, DecliantionNumber amount, AdjectiveLevel level)
        {
            targetPanel.Controls.Clear();

            Array arr = Enum.GetValues(typeof(InflectionCase));

            foreach (InflectionCase aCase in arr)
            {
                if (aCase == InflectionCase._Unknown)
                {
                    continue;
                }

                ControlAdjectiveCaseEdit edit = new ControlAdjectiveCaseEdit();
                edit.Dock              = DockStyle.Bottom;
                edit.Case              = aCase;
                edit.Value             = "";
                edit.DecliantionNumber = amount;
                edit.InflectionCase    = aCase;
                edit.Level             = level;
                // edit.PostfixButtonPressed += new EventHandler(edit_PostfixButtonPressed);
                // edit.IrregularSet += new EventHandler(edit_IrregularSet);

                targetPanel.Controls.Add(edit);
            }
        }
コード例 #2
0
        private void SetEdited(Panel targetPanel, Adjective adj, GrammaticalGender genre)
        {
            foreach (Control ctrl in targetPanel.Controls)
            {
                if (!(ctrl is ControlAdjectiveCaseEdit))
                {
                    continue;
                }

                ControlAdjectiveCaseEdit edit = ctrl as ControlAdjectiveCaseEdit;
                if (adj == null)
                {
                    edit.Value = "";
                }
                else
                {
                    string form = AdjectiveDecliner.Decliner.MakeWord(
                        adj, genre, edit.InflectionCase, edit.DecliantionNumber, edit.Level);
                    edit.Value = form;
                }
            }
        }
コード例 #3
0
        void LoadCasesControls(Panel targetPanel, DecliantionNumber amount, AdjectiveLevel level)
        {
            targetPanel.Controls.Clear();

            Array arr = Enum.GetValues(typeof(InflectionCase));
            foreach (InflectionCase aCase in arr)
            {
                if (aCase == InflectionCase._Unknown)
                    continue;

                ControlAdjectiveCaseEdit edit = new ControlAdjectiveCaseEdit();
                edit.Dock = DockStyle.Bottom;
                edit.Case = aCase;
                edit.Value = "";
                edit.DecliantionNumber = amount;
                edit.InflectionCase = aCase;
                edit.Level = level;
                // edit.PostfixButtonPressed += new EventHandler(edit_PostfixButtonPressed);
                // edit.IrregularSet += new EventHandler(edit_IrregularSet);

                targetPanel.Controls.Add(edit);
            }
        }