コード例 #1
0
        public static DialogResult ShowDialog(IWin32Window owner,
                                              StylesContainer sc, Group[] groups)
        {
            CodeEditorSettings ces = new CodeEditorSettings
            {
                stylesContainer = sc,
                groupControls   = new GroupControl[groups.Length]
            };
            Color c;
            int   s;

            for (int i = 0; i < groups.Length; i++)
            {
                s = groups[i].Style;
                c = Color.FromArgb(sc.ForeColorRed[s], sc.ForeColorGreen[s],
                                   sc.ForeColorBlue[s]);
                ces.groupControls[i] = new GroupControl(groups[i], c)
                {
                    Dock   = DockStyle.Top,
                    Parent = ces.panelGroup
                };
                ces.groupControls[i].BringToFront();
            }

            return(ces.ShowDialog(owner));
        }
コード例 #2
0
 private void Button1_Click(object sender, EventArgs e)
 {
     CodeEditorSettings.ShowDialog(ParentForm, CodeEditor.StylesContainer,
                                   CodeEditor.Groups);
 }