コード例 #1
0
        public void データの無いDATの保存()
        {
            //setUp
            string fileName = "iniDbTestTmp"; //テンポラリファイル名
            string progDir  = Directory.GetCurrentDirectory();
            string path     = string.Format("{0}\\{1}.ini", progDir, fileName);
            IniDb  sut      = new IniDb(progDir, fileName);

            ListVal listVal = new ListVal();
            var     l       = new ListVal();

            l.Add(new OneVal("mimeExtension", "", Crlf.Nextline, new CtrlTextBox("Extension", 10)));
            l.Add(new OneVal("mimeType", "", Crlf.Nextline, new CtrlTextBox("MIME Type", 50)));
            var oneVal = new OneVal("mime", null, Crlf.Nextline, new CtrlDat("comment", l, 350, LangKind.Jp));

            listVal.Add(oneVal);

            sut.Save("Basic", listVal); // nameTagは"Basic"で決め打ちされている

            //exercise
            var    lines  = File.ReadAllLines(path);
            string actual = lines[0];

            //verify
            Assert.That(actual, Is.EqualTo("DAT=Basic\bmime="));
            //tearDown
            sut.Delete();
        }
コード例 #2
0
ファイル: Option.cs プロジェクト: schifflee/bjd5
        private OnePage Page2(string name, string title)
        {
            var onePage = new OnePage(name, title);
            var key     = "useChps";

            onePage.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
            key = "minimumLength";
            onePage.Add(new OneVal(key, 8, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "disableJoe";
            onePage.Add(new OneVal(key, true, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));

            var list = new ListVal();

            key = "useNum";
            list.Add(new OneVal(key, true, Crlf.Contonie, new CtrlCheckBox(Lang.Value(key))));
            key = "useSmall";
            list.Add(new OneVal(key, true, Crlf.Contonie, new CtrlCheckBox(Lang.Value(key))));
            key = "useLarge";
            list.Add(new OneVal(key, true, Crlf.Contonie, new CtrlCheckBox(Lang.Value(key))));
            key = "useSign";
            list.Add(new OneVal(key, true, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
            key = "groupNeed";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlGroup(Lang.Value(key), list)));
            return(onePage);
        }
コード例 #3
0
        private OnePage Page2(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var key     = "useCgi";

            onePage.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
            {    //DAT
                var l = new ListVal();
                key = "cgiExtension";
                l.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 10)));
                key = "Program";
                l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlFile(Lang.Value(key), 50, kernel)));
                onePage.Add(new OneVal("cgiCmd", null, Crlf.Nextline, new CtrlDat("", l, 142, Lang.LangKind)));
            }    //DAT
            key = "cgiTimeout";
            onePage.Add(new OneVal(key, 10, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            {    //DAT
                var l = new ListVal();
                key = "CgiPath";
                l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50)));
                key = "cgiDirectory";
                l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlFolder(Lang.Value(key), 60, kernel)));
                key = "cgiPath";
                onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), l, 155, Lang.LangKind)));
            }    //DAT
            return(onePage);
        }
コード例 #4
0
ファイル: IniDbTest.cs プロジェクト: jsakamoto/bjd5
        public void データの無いDATの保存()
        {
            //setUp
            string fileName = "iniDbTestTmp"; //テンポラリファイル名
            string progDir = Directory.GetCurrentDirectory();
            string path = string.Format("{0}\\{1}.ini", progDir, fileName);
            IniDb sut = new IniDb(progDir, fileName);

            ListVal listVal = new ListVal();
            var l = new ListVal();
            l.Add(new OneVal("mimeExtension", "", Crlf.Nextline, new CtrlTextBox("Extension", 10)));
            l.Add(new OneVal("mimeType", "", Crlf.Nextline, new CtrlTextBox("MIME Type", 50)));
            var oneVal = new OneVal("mime", null, Crlf.Nextline, new CtrlDat("comment", l, 350, LangKind.Jp));
            listVal.Add(oneVal);

            sut.Save("Basic", listVal); // nameTagは"Basic"で決め打ちされている

            //exercise
            var lines = File.ReadAllLines(path);
            string actual = lines[0];
            //verify
            Assert.That(actual, Is.EqualTo("DAT=Basic\bmime="));
            //tearDown
            sut.Delete();
        }
コード例 #5
0
ファイル: Option.cs プロジェクト: deton/bjd5
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);

            onePage.Add(CreateServerOption(ProtocolKind.Tcp, 8080, 60, 300)); //サーバ基本設定

            var key = "useRequestLog";

            onePage.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));

            var list1 = new ListVal();

            key = "anonymousAddress";
            list1.Add(new OneVal(key, "BlackJumboDog@", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 70)));
            key = "serverHeader";
            list1.Add(new OneVal(key, "BlackJumboDog Version $v", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 70)));
            key = "anonymousFtp";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlGroup(Lang.Value(key), list1)));

            key = "useBrowserHedaer";
            onePage.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));

            var list2 = new ListVal();

            list2.Add(new OneVal("addHeaderRemoteHost", false, Crlf.Contonie, new CtrlCheckBox("Remote-Host:")));
            list2.Add(new OneVal("addHeaderXForwardedFor", false, Crlf.Contonie, new CtrlCheckBox("X-Forwarded-For:")));
            list2.Add(new OneVal("addHeaderForwarded", false, Crlf.Nextline, new CtrlCheckBox("Forwarded:")));
            key = "groupAddHeader";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlGroup(Lang.Value(key), list2)));

            return(onePage);
        }
コード例 #6
0
ファイル: OptionDnsDomain.cs プロジェクト: jsakamoto/bjd5
 private OnePage Page1(string name, string title,Kernel kernel)
 {
     var onePage = new OnePage(name, title);
     var list = new ListVal();
     var key = "name";
     list.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 80)));
     key = "authority";
     list.Add(new OneVal(key, true, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
     onePage.Add(new OneVal("domainList", null, Crlf.Nextline, new CtrlDat("", list, 400, Lang.LangKind)));
     return onePage;
 }
コード例 #7
0
ファイル: Option.cs プロジェクト: jsakamoto/bjd5
 private OnePage Page2(string name, string title, Kernel kernel)
 {
     var onePage = new OnePage(name, title);
     var listVal = new ListVal();
     var key = "fromFolder";
     listVal.Add(new OneVal(key, "", Crlf.Nextline, new CtrlFolder(Lang.Value(key), 70, kernel)));
     key = "toFolder";
     listVal.Add(new OneVal(key, "", Crlf.Nextline, new CtrlFolder(Lang.Value(key), 70, kernel)));
     key = "mountList";
     onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), listVal, 360, Lang.LangKind)));
     return onePage;
 }
コード例 #8
0
ファイル: OptionMailBox.cs プロジェクト: jsakamoto/bjd5
 private OnePage Page2(string name, string title)
 {
     var onePage = new OnePage(name, title);
     var listVal = new ListVal();
     var key = "userName";
     listVal.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
     key = "password";
     listVal.Add(new OneVal(key, "", Crlf.Nextline, new CtrlHidden(Lang.Value(key), 30)));
     key = "user";
     onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), listVal, 250, Lang.LangKind)));
     return onePage;
 }
コード例 #9
0
ファイル: OptionDnsResource.cs プロジェクト: jsakamoto/bjd5
 private OnePage Page1(string name, string title,Kernel kernel)
 {
     var onePage = new OnePage(name, title);
     var list = new ListVal();
     list.Add(new OneVal("type", 0, Crlf.Nextline, new CtrlComboBox("Type", new [] { "A(PTR)", "NS", "MX", "CNAME", "AAAA" },80)));
     list.Add(new OneVal("name", "", Crlf.Contonie, new CtrlTextBox("Name", 30)));
     list.Add(new OneVal("alias", "", Crlf.Nextline, new CtrlTextBox("Alias", 30)));
     list.Add(new OneVal("address", "", Crlf.Contonie, new CtrlTextBox("Address", 30)));
     list.Add(new OneVal("priority", 10, Crlf.Nextline, new CtrlInt("Priority", 5)));
     onePage.Add(new OneVal("resourceList", null, Crlf.Nextline, new CtrlOrgDat("", list, 350, Lang.LangKind)));
     return onePage;
 }
コード例 #10
0
ファイル: OptionDnsDomain.cs プロジェクト: schifflee/bjd5
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var list    = new ListVal();
            var key     = "name";

            list.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 80)));
            key = "authority";
            list.Add(new OneVal(key, true, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
            onePage.Add(new OneVal("domainList", null, Crlf.Nextline, new CtrlDat("", list, 400, Lang.LangKind)));
            return(onePage);
        }
コード例 #11
0
        private OnePage Page6(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var l       = new ListVal();
            var key     = "mimeExtension";

            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 10)));
            key = "mimeType";
            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50)));
            key = "mime";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), l, 350, Lang.LangKind)));
            return(onePage);
        }
コード例 #12
0
ファイル: Option.cs プロジェクト: schifflee/bjd5
        private OnePage Page7(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var l       = new ListVal();
            var key     = "aliasUser";

            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
            key = "aliasName";
            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 80)));
            key = "aliasList";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), l, 250, Lang.LangKind)));
            return(onePage);
        }
コード例 #13
0
        private OnePage Page9(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var l       = new ListVal();
            var key     = "group";

            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 20)));
            key = "userName";
            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 40)));
            key = "groupList";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), l, 350, Lang.LangKind)));
            return(onePage);
        }
コード例 #14
0
ファイル: OptionDnsResource.cs プロジェクト: schifflee/bjd5
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var list    = new ListVal();

            list.Add(new OneVal("type", 0, Crlf.Nextline, new CtrlComboBox("Type", new [] { "A(PTR)", "NS", "MX", "CNAME", "AAAA" }, 80)));
            list.Add(new OneVal("name", "", Crlf.Contonie, new CtrlTextBox("Name", 30)));
            list.Add(new OneVal("alias", "", Crlf.Nextline, new CtrlTextBox("Alias", 30)));
            list.Add(new OneVal("address", "", Crlf.Contonie, new CtrlTextBox("Address", 30)));
            list.Add(new OneVal("priority", 10, Crlf.Nextline, new CtrlInt("Priority", 5)));
            onePage.Add(new OneVal("resourceList", null, Crlf.Nextline, new CtrlOrgDat("", list, 350, Lang.LangKind)));
            return(onePage);
        }
コード例 #15
0
        private OnePage Page2(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var listVal = new ListVal();
            var key     = "fromFolder";

            listVal.Add(new OneVal(key, "", Crlf.Nextline, new CtrlFolder(Lang.Value(key), 70, kernel)));
            key = "toFolder";
            listVal.Add(new OneVal(key, "", Crlf.Nextline, new CtrlFolder(Lang.Value(key), 70, kernel)));
            key = "mountList";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), listVal, 360, Lang.LangKind)));
            return(onePage);
        }
コード例 #16
0
        private OnePage Page7(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var l       = new ListVal();
            var key     = "authDirectory";

            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50)));
            key = "AuthName";
            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 20)));
            key = "Require";
            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
            key = "authList";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), l, 350, Lang.LangKind)));
            return(onePage);
        }
コード例 #17
0
ファイル: Option.cs プロジェクト: deton/bjd5
        private OnePage Page2(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var key     = "useUpperProxy";

            onePage.Add(new OneVal(key, false, Crlf.Nextline,
                                   new CtrlCheckBox(Lang.Value(key))));
            key = "upperProxyServer";
            onePage.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 30)));
            key = "upperProxyPort";
            onePage.Add(new OneVal(key, 8080, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "upperProxyUseAuth";
            onePage.Add(new OneVal(key, false, Crlf.Contonie,
                                   new CtrlCheckBox(Lang.Value(key))));
            key = "upperProxyAuthName";
            onePage.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 20)));
            key = "upperProxyAuthPass";
            onePage.Add(new OneVal(key, "", Crlf.Nextline, new CtrlHidden(Lang.Value(key), 20)));

            var list2 = new ListVal();

            key = "address";
            list2.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));

            key = "disableAddress";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), list2, 200, Lang.LangKind)));
            return(onePage);
        }
コード例 #18
0
        private OnePage Page3(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var listVal = new ListVal();
            var key     = "accessControl";

            listVal.Add(new OneVal(key, 0, Crlf.Nextline, new CtrlComboBox(Lang.Value(key), new [] { "FULL", "DOWN", "UP" }, 100)));
            key = "homeDirectory";
            listVal.Add(new OneVal(key, "", Crlf.Nextline, new CtrlFolder(Lang.Value(key), 60, kernel)));
            key = "userName";
            listVal.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 20)));
            key = "password";
            listVal.Add(new OneVal(key, "", Crlf.Nextline, new CtrlHidden(Lang.Value(key), 20)));
            key = "user";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), listVal, 360, Lang.LangKind)));
            return(onePage);
        }
コード例 #19
0
ファイル: Option.cs プロジェクト: jsakamoto/bjd5
        private OnePage Page2(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var l = new ListVal();
            var key = "mail";
            l.Add(new OneVal(key, "", Crlf.Nextline,new CtrlTextBox(Lang.Value(key), 30)));
            key = "server";
            l.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 30)));
            key = "dstPort";
            l.Add(new OneVal(key, 25, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "address";
            l.Add(new OneVal(key, "", Crlf.Nextline,new CtrlTextBox(Lang.Value(key), 30)));
            key = "specialUser";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), l, 360, Lang.LangKind)));

            return onePage;
        }
コード例 #20
0
ファイル: OptionTunnel.cs プロジェクト: jsakamoto/bjd5
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);

            var l = new ListVal();
            var key = "protocol";
            l.Add(new OneVal(key, 0, Crlf.Nextline, new CtrlComboBox(Lang.Value(key), new[] { "TCP", "UDP" }, 100)));
            key = "srcPort";
            l.Add(new OneVal(key, 0, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "server";
            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
            key = "dstPort";
            l.Add(new OneVal(key, 0, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            onePage.Add(new OneVal("tunnelList", null, Crlf.Nextline, new CtrlDat("", l, 380, Lang.LangKind)));

            return onePage;
        }
コード例 #21
0
        private OnePage Page4(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var key     = "useWebDav";

            onePage.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
            var l = new ListVal();

            key = "WebDAV Path";
            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50)));
            key = "Writing permission";
            l.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
            key = "webDAVDirectory";
            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlFolder(Lang.Value(key), 50, kernel)));
            key = "webDavPath";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), l, 280, Lang.LangKind)));
            return(onePage);
        }
コード例 #22
0
ファイル: Option.cs プロジェクト: schifflee/bjd5
        private OnePage Page2(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var l       = new ListVal();
            var key     = "mail";

            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
            key = "server";
            l.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 30)));
            key = "dstPort";
            l.Add(new OneVal(key, 25, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "address";
            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
            key = "specialUser";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), l, 360, Lang.LangKind)));

            return(onePage);
        }
コード例 #23
0
ファイル: OptionTunnel.cs プロジェクト: schifflee/bjd5
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);

            var l   = new ListVal();
            var key = "protocol";

            l.Add(new OneVal(key, 0, Crlf.Nextline, new CtrlComboBox(Lang.Value(key), new[] { "TCP", "UDP" }, 100)));
            key = "srcPort";
            l.Add(new OneVal(key, 0, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "server";
            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
            key = "dstPort";
            l.Add(new OneVal(key, 0, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            onePage.Add(new OneVal("tunnelList", null, Crlf.Nextline, new CtrlDat("", l, 380, Lang.LangKind)));

            return(onePage);
        }
コード例 #24
0
        //テスト用のListVal作成(パターン1)
        private ListVal CreateListVal1()
        {
            var listVal = new ListVal();

            listVal.Add(new OneVal("n1", 1, Crlf.Nextline, new CtrlInt("help", 10)));
            listVal.Add(new OneVal("n2", 1, Crlf.Nextline, new CtrlInt("help", 10)));

            var datList = new ListVal();

            datList.Add(new OneVal("n3", 1, Crlf.Nextline, new CtrlInt("help", 10)));
            datList.Add(new OneVal("n4", 1, Crlf.Nextline, new CtrlInt("help", 10)));
            listVal.Add(new OneVal("n5", 1, Crlf.Nextline, new CtrlDat("help", datList, 10, LangKind.Jp)));

            datList = new ListVal();
            datList.Add(new OneVal("n6", 1, Crlf.Nextline, new CtrlInt("help", 10)));
            datList.Add(new OneVal("n7", 1, Crlf.Nextline, new CtrlInt("help", 10)));
            listVal.Add(new OneVal("n8", 1, Crlf.Nextline, new CtrlDat("help", datList, 10, LangKind.Jp)));

            return(listVal);
        }
コード例 #25
0
ファイル: OptionMl.cs プロジェクト: jsakamoto/bjd5
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);

            var list = new ListVal();
            var key = "user";
            list.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 250)));
            key = "mlList";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), list, 250, Lang.LangKind)));

            return onePage;
        }
コード例 #26
0
ファイル: Option.cs プロジェクト: schifflee/bjd5
        private OnePage Page2(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);

            var key = "useMacAcl";

            onePage.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));

            var l = new ListVal();

            key = "macAddress";
            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50)));
            key = "v4Address";
            l.Add(new OneVal(key, new Ip(IpKind.V4_0), Crlf.Nextline, new CtrlAddress(Lang.Value(key))));
            key = "macName";
            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50)));
            key = "macAcl";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), l, 250, Lang.LangKind)));

            return(onePage);
        }
コード例 #27
0
ファイル: OptionVirtualHost.cs プロジェクト: jsakamoto/bjd5
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var list1 = new ListVal();
            var key = "protocol";
            list1.Add(new OneVal(key, 0, Crlf.Nextline,new CtrlComboBox(Lang.Value(key), new[]{"HTTP", "HTTPS"}, 100)));
            key = "host";
            list1.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 30)));
            key = "port";
            list1.Add(new OneVal(key, 80, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            onePage.Add(new OneVal("hostList", null, Crlf.Nextline, new CtrlOrgDat("", list1, 600, 270, Lang.LangKind)));
            var list2 = new ListVal();
            key = "certificate";
            list2.Add(new OneVal(key, "", Crlf.Nextline,new CtrlFile(Lang.Value(key), 50, kernel)));
            key = "privateKeyPassword";
            list2.Add(new OneVal(key, "", Crlf.Nextline,new CtrlHidden(Lang.Value(key), 20)));
            key = "groupHttps";
            onePage.Add(new OneVal(key, null, Crlf.Nextline,new CtrlGroup(Lang.Value(key), list2)));

            return onePage;
        }
コード例 #28
0
ファイル: Option.cs プロジェクト: schifflee/bjd5
        private OnePage Page6(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var list1   = new ListVal();
            var key     = "pattern";

            list1.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 70)));
            key = "Substitution";
            list1.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 70)));
            key = "patternList";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), list1, 185, Lang.LangKind)));
            var list2 = new ListVal();

            key = "tag";
            list2.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
            key = "string";
            list2.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 80)));
            key = "appendList";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), list2, 185, Lang.LangKind)));
            return(onePage);
        }
コード例 #29
0
ファイル: Option.cs プロジェクト: deton/bjd5
        private OnePage Page5(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var list1   = new ListVal();

            list1.Add(new OneVal("allowUrl", "", Crlf.Contonie, new CtrlTextBox("URL", 30)));
            var key = "allowMatching";

            list1.Add(new OneVal(key, 0, Crlf.Nextline, new CtrlComboBox(Lang.Value(key), new[] { Lang.Value(key + "1"), Lang.Value(key + "2"), Lang.Value(key + "3"), Lang.Value(key + "4") }, 100)));
            key = "limitUrlAllow";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), list1, 185, Lang.LangKind)));
            var list2 = new ListVal();

            list2.Add(new OneVal("denyUrl", "", Crlf.Contonie, new CtrlTextBox("URL", 30)));
            key = "denyMatching";
            list2.Add(new OneVal(key, 0, Crlf.Nextline, new CtrlComboBox(Lang.Value(key), new[] { Lang.Value(key + "1"), Lang.Value(key + "2"), Lang.Value(key + "3"), Lang.Value(key + "4") }, 100)));
            key = "limitUrlDeny";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), list2, 185, Lang.LangKind)));

            return(onePage);
        }
コード例 #30
0
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);

            onePage.Add(CreateServerOption(ProtocolKind.Udp, 53, 10, 30)); //サーバ基本設定

            var key = "rootCache";

            onePage.Add(new OneVal(key, "named.ca", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
            key = "useRD";
            onePage.Add(new OneVal(key, true, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));

            var list = new ListVal();

            key = "soaMail";
            list.Add(new OneVal(key, "postmaster", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
            key = "soaSerial";
            list.Add(new OneVal(key, 1, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "soaRefresh";
            list.Add(new OneVal(key, 3600, Crlf.Contonie, new CtrlInt(Lang.Value(key), 5)));
            key = "soaRetry";
            list.Add(new OneVal(key, 300, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "soaExpire";
            list.Add(new OneVal(key, 360000, Crlf.Contonie, new CtrlInt(Lang.Value(key), 5)));
            key = "soaMinimum";
            list.Add(new OneVal(key, 3600, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "GroupSoa";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlGroup(Lang.Value(key), list)));

            return(onePage);
        }
コード例 #31
0
ファイル: CtrlDatTest.cs プロジェクト: schifflee/bjd5
        public void PrivateメンバのimportDatとexportDatの整合性を確認する()
        {
            //const bool isJp = true;

            var list = new ListVal();

            list.Add(new OneVal("combo", 0, Crlf.Nextline,
                                new CtrlComboBox("コンボボックス", new[] { "DOWN", "PU", "FULL" }, 200)));
            list.Add(new OneVal("fileName2", "c:\\work", Crlf.Nextline,
                                new CtrlFolder("フォルダ", 30, new Kernel())));
            list.Add(new OneVal("text", "user1", Crlf.Nextline, new CtrlTextBox("テキスト入力", 30)));
            list.Add(new OneVal("hidden", "123", Crlf.Nextline, new CtrlHidden("パスワード", 30)));
            var sut      = new CtrlDat("help", list, 100, LangKind.Jp);
            var tabindex = 0;

            sut.Create(null, 0, 0, null, ref tabindex);

            var input = new List <String>();

            input.Add("#	0	c:\\work	user1	c3a5e1369325e2ca");
            input.Add(" 	1	c:\\work	user2	b867684066caf9dc");
            input.Add(" 	2	c:\\work	user3	4911d0d49c8911ed");

            try{
                //リフレクションによるprivateメンバへのアクセス
                var cls       = sut;
                var type      = cls.GetType();
                var exportDat = type.GetMethod("ExportDat", BindingFlags.NonPublic | BindingFlags.Instance);
                var importDat = type.GetMethod("ImportDat", BindingFlags.NonPublic | BindingFlags.Instance);
                importDat.Invoke(cls, new object[] { input });
                var output = (List <String>)exportDat.Invoke(cls, new object[] {});
                for (var i = 0; i < input.Count; i++)
                {
                    Assert.That(input[i], Is.EqualTo(output[i]));
                }
            }
            catch (Exception e) {
                Assert.Fail(e.Message);
            }
        }
コード例 #32
0
ファイル: Option.cs プロジェクト: jsakamoto/bjd5
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);

            onePage.Add(CreateServerOption(ProtocolKind.Udp, 53, 10, 30)); //サーバ基本設定

            var key = "rootCache";
            onePage.Add(new OneVal(key, "named.ca", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
            key = "useRD";
            onePage.Add(new OneVal(key, true, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));

            var list = new ListVal();
            key = "soaMail";
            list.Add(new OneVal(key, "postmaster", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
            key = "soaSerial";
            list.Add(new OneVal(key, 1, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "soaRefresh";
            list.Add(new OneVal(key, 3600, Crlf.Contonie, new CtrlInt(Lang.Value(key), 5)));
            key = "soaRetry";
            list.Add(new OneVal(key, 300, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "soaExpire";
            list.Add(new OneVal(key, 360000, Crlf.Contonie, new CtrlInt(Lang.Value(key), 5)));
            key = "soaMinimum";
            list.Add(new OneVal(key, 3600, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "GroupSoa";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlGroup(Lang.Value(key), list)));

            return onePage;
        }
コード例 #33
0
ファイル: Option.cs プロジェクト: schifflee/bjd5
        private OnePage Page2(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var key     = "useEsmtp";

            onePage.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
            var list1 = new ListVal();

            list1.Add(new OneVal("useAuthCramMD5", true, Crlf.Contonie, new CtrlCheckBox("CRAM-MD5")));
            list1.Add(new OneVal("useAuthPlain", true, Crlf.Contonie, new CtrlCheckBox("PLAIN")));
            list1.Add(new OneVal("useAuthLogin", true, Crlf.Nextline, new CtrlCheckBox("LOGIN")));
            key = "groupAuthKind";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlGroup(Lang.Value(key), list1)));
            key = "usePopAcount";
            onePage.Add(new OneVal(key, false, Crlf.Nextline,
                                   new CtrlCheckBox(Lang.Value(key))));
            var list2 = new ListVal();

            key = "user";
            list2.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 15)));
            key = "pass";
            list2.Add(new OneVal(key, "", Crlf.Contonie, new CtrlHidden(Lang.Value(key), 15)));
            key = "comment";
            list2.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 20)));
            key = "esmtpUserList";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), list2, 115, Lang.LangKind)));
            key = "enableEsmtp";
            onePage.Add(new OneVal(key, 0, Crlf.Nextline, new CtrlRadio(Lang.Value(key), new[] { Lang.Value(key + "1"), Lang.Value(key + "2") }, OptionDlg.Width() - 15, 2)));

            var list3 = new ListVal();

            key = "rangeName";
            list3.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 20)));
            key = "rangeAddress";
            list3.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 20)));
            onePage.Add(new OneVal("range", null, Crlf.Nextline, new CtrlDat("", list3, 115, Lang.LangKind)));
            return(onePage);
        }
コード例 #34
0
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var list1   = new ListVal();
            var key     = "protocol";

            list1.Add(new OneVal(key, 0, Crlf.Nextline, new CtrlComboBox(Lang.Value(key), new[] { "HTTP", "HTTPS" }, 100)));
            key = "host";
            list1.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 30)));
            key = "port";
            list1.Add(new OneVal(key, 80, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            onePage.Add(new OneVal("hostList", null, Crlf.Nextline, new CtrlOrgDat("", list1, 600, 270, Lang.LangKind)));
            var list2 = new ListVal();

            key = "certificate";
            list2.Add(new OneVal(key, "", Crlf.Nextline, new CtrlFile(Lang.Value(key), 50, kernel)));
            key = "privateKeyPassword";
            list2.Add(new OneVal(key, "", Crlf.Nextline, new CtrlHidden(Lang.Value(key), 20)));
            key = "groupHttps";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlGroup(Lang.Value(key), list2)));

            return(onePage);
        }
コード例 #35
0
ファイル: OptionMl.cs プロジェクト: schifflee/bjd5
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);

            var list = new ListVal();
            var key  = "user";

            list.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 250)));
            key = "mlList";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), list, 250, Lang.LangKind)));


            return(onePage);
        }
コード例 #36
0
ファイル: OptionLog.cs プロジェクト: jsakamoto/bjd5
        private OnePage Page2(string name, string title)
        {
            var onePage = new OnePage(name, title);
            var key = "isDisplay";
            onePage.Add(new OneVal(key, 1, Crlf.Nextline, new CtrlRadio(Lang.Value(key), new[] { Lang.Value(key + "1"), Lang.Value(key + "2") }, OptionDlg.Width() - 15, 2)));
            var list = new ListVal();

            key = "Character";
            list.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50)));
            key = "limitString";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), list, 230, Lang.LangKind)));
            key = "useLimitString";
            onePage.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
            return onePage;
        }
コード例 #37
0
ファイル: CtrlDatTest.cs プロジェクト: jsakamoto/bjd5
        public void PrivateメンバのimportDatとexportDatの整合性を確認する()
        {
            //const bool isJp = true;

            var list = new ListVal();
            list.Add(new OneVal("combo", 0, Crlf.Nextline,
                                new CtrlComboBox("コンボボックス", new[]{"DOWN", "PU", "FULL"}, 200)));
            list.Add(new OneVal("fileName2", "c:\\work", Crlf.Nextline,
                                new CtrlFolder("フォルダ", 30, new Kernel())));
            list.Add(new OneVal("text", "user1", Crlf.Nextline, new CtrlTextBox("テキスト入力", 30)));
            list.Add(new OneVal("hidden", "123", Crlf.Nextline, new CtrlHidden("パスワード", 30)));
            var sut = new CtrlDat("help", list, 100, LangKind.Jp);
            var tabindex = 0;
            sut.Create(null, 0, 0, null,ref tabindex);

            var input = new List<String>();
            input.Add("#	0	c:\\work	user1	c3a5e1369325e2ca");
            input.Add(" 	1	c:\\work	user2	b867684066caf9dc");
            input.Add(" 	2	c:\\work	user3	4911d0d49c8911ed");

            try{
                //リフレクションによるprivateメンバへのアクセス
                var cls = sut;
                var type = cls.GetType();
                var exportDat = type.GetMethod("ExportDat", BindingFlags.NonPublic | BindingFlags.Instance);
                var importDat = type.GetMethod("ImportDat", BindingFlags.NonPublic | BindingFlags.Instance);
                importDat.Invoke(cls, new object[]{input});
                var output = (List<String>) exportDat.Invoke(cls, new object[]{});
                for (var i = 0; i < input.Count; i++){
                    Assert.That(input[i], Is.EqualTo(output[i]));
                }
            }
            catch (Exception e){
                Assert.Fail(e.Message);
            }
        }
コード例 #38
0
        private OnePage Page11(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var key     = "useAutoAcl";

            onePage.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
            key = "autoAclLabel";
            onePage.Add(new OneVal(key, Lang.Value(key + "1"), Crlf.Nextline, new CtrlLabel(Lang.Value(key + "2"))));
            var l = new ListVal();

            key = "AutoAclApacheKiller";
            l.Add(new OneVal(key, false, Crlf.Nextline,
                             new CtrlCheckBox(Lang.Value(key))));
            key = "autoAclGroup";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlGroup(Lang.Value(key), l)));
            return(onePage);
        }
コード例 #39
0
        //テスト用のListVal作成(パターン2)
        private ListVal CreateListVal2()
        {
            var listVal = new ListVal();

            var pageList = new List <OnePage>();

            var onePage = new OnePage("page1", "ページ1");

            onePage.Add(new OneVal("n0", 1, Crlf.Nextline, new CtrlInt("help", 10)));
            pageList.Add(onePage);

            onePage = new OnePage("page2", "ページ2");
            onePage.Add(new OneVal("n1", 1, Crlf.Nextline, new CtrlInt("help", 10)));
            pageList.Add(onePage);

            listVal.Add(new OneVal("n2", null, Crlf.Nextline, new CtrlTabPage("help", pageList)));
            return(listVal);
        }
コード例 #40
0
ファイル: Option.cs プロジェクト: deton/bjd5
        private OnePage Page7(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var list1   = new ListVal();
            var key     = "allowProg";

            list1.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50)));
            key = "limitSrcProgAllow";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), list1, 185, Lang.LangKind)));
            var list2 = new ListVal();

            key = "denyProg";
            list2.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50)));
            key = "limitSrcProgDeny";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), list2, 185, Lang.LangKind)));

            return(onePage);
        }
コード例 #41
0
ファイル: Option.cs プロジェクト: schifflee/bjd5
        private OnePage Page3(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var key     = "order";

            onePage.Add(new OneVal(key, 0, Crlf.Nextline, new CtrlRadio(Lang.Value(key), new[] { Lang.Value(key + "1"), Lang.Value(key + "2") }, 600, 2)));
            var list1 = new ListVal();

            key = "allowAddress";
            list1.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
            key = "allowList";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), list1, 170, Lang.LangKind)));
            var list2 = new ListVal();

            key = "denyAddress";
            list2.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
            key = "denyList";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), list2, 170, Lang.LangKind)));
            return(onePage);
        }
コード例 #42
0
ファイル: IniDbTest.cs プロジェクト: jsakamoto/bjd5
        public void listVal_add_OneVal_で初期化後saveして当該設定が保存されているかどうか(CtrlType ctrlType, Object value, string expected)
        {
            //setUp
            string fileName = "iniDbTestTmp"; //テンポラリファイル名
            //string progDir = new File(".").getAbsoluteFile().getParent(); //カレントディレクトリ
            string progDir = Directory.GetCurrentDirectory();
            string path = string.Format("{0}\\{1}.ini", progDir, fileName);
            IniDb sut = new IniDb(progDir, fileName);

            ListVal listVal = new ListVal();
            listVal.Add(Assistance.createOneVal(ctrlType,value));
            sut.Save("Basic", listVal); // nameTagは"Basic"で決め打ちされている

            //exercise
            var lines = File.ReadAllLines(path);
            string actual = lines[0];
            //verify
            Assert.That(actual, Is.EqualTo(expected));
            //tearDown
            sut.Delete();
        }
コード例 #43
0
ファイル: Option.cs プロジェクト: schifflee/bjd5
        private OnePage Page8(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var l       = new ListVal();
            var key     = "fetchReceptionInterval";

            l.Add(new OneVal(key, 60, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "fetchServer";
            l.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 30)));
            key = "fetchPort";
            l.Add(new OneVal(key, 110, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "fetchUser";
            l.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 20)));
            key = "fetchPass";
            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlHidden(Lang.Value(key), 20)));
            key = "fetchLocalUser";
            l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
            key = "fetchSynchronize";
            l.Add(new OneVal(key, 0, Crlf.Contonie, new CtrlComboBox(Lang.Value(key), new[] { Lang.Value(key + "1"), Lang.Value(key + "2"), Lang.Value(key + "3") }, 180)));
            key = "fetchTime";
            l.Add(new OneVal(key, 0, Crlf.Nextline, new CtrlInt(Lang.Value(key), 6)));
            onePage.Add(new OneVal("fetchList", null, Crlf.Nextline, new CtrlOrgAutoReceptionDat("", l, 370, Lang.LangKind)));
            return(onePage);
        }
コード例 #44
0
ファイル: OptionOneMl.cs プロジェクト: jsakamoto/bjd5
 private OnePage Page2(string name, string title, Kernel kernel)
 {
     var onePage = new OnePage(name, title);
     var l = new ListVal();
     var key = "name";
     l.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 20)));
     key = "address";
     l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 20)));
     key = "manager";
     l.Add(new OneVal(key, false, Crlf.Contonie, new CtrlCheckBox(Lang.Value(key))));
     key = "reacer";
     l.Add(new OneVal(key, true, Crlf.Contonie, new CtrlCheckBox(Lang.Value(key))));
     key = "contributor";
     l.Add(new OneVal(key, true, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
     key = "pass";
     l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlHidden(Lang.Value(key), 10)));
     key = "memberList";
     onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlOrgMemberDat(Lang.Value(key), l, 390,Lang.LangKind)));
     return onePage;
 }
コード例 #45
0
ファイル: Option.cs プロジェクト: jsakamoto/bjd5
 private OnePage Page8(string name, string title,Kernel kernel)
 {
     var onePage = new OnePage(name, title);
     var l = new ListVal();
     var key = "fetchReceptionInterval";
     l.Add(new OneVal(key, 60, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
     key = "fetchServer";
     l.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 30)));
     key = "fetchPort";
     l.Add(new OneVal(key, 110, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
     key = "fetchUser";
     l.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 20)));
     key = "fetchPass";
     l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlHidden(Lang.Value(key), 20)));
     key = "fetchLocalUser";
     l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
     key = "fetchSynchronize";
     l.Add(new OneVal(key, 0, Crlf.Contonie, new CtrlComboBox(Lang.Value(key), new[] { Lang.Value(key + "1"), Lang.Value(key + "2"), Lang.Value(key + "3") }, 180)));
     key = "fetchTime";
     l.Add(new OneVal(key, 0, Crlf.Nextline, new CtrlInt(Lang.Value(key), 6)));
     onePage.Add(new OneVal("fetchList", null, Crlf.Nextline, new CtrlOrgAutoReceptionDat("", l, 370, Lang.LangKind)));
     return onePage;
 }
コード例 #46
0
ファイル: Option.cs プロジェクト: jsakamoto/bjd5
        private OnePage Page2(string name, string title,Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            var key = "useEsmtp";
            onePage.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
            var list1 = new ListVal();
            list1.Add(new OneVal("useAuthCramMD5", true, Crlf.Contonie, new CtrlCheckBox("CRAM-MD5")));
            list1.Add(new OneVal("useAuthPlain", true, Crlf.Contonie, new CtrlCheckBox("PLAIN")));
            list1.Add(new OneVal("useAuthLogin", true, Crlf.Nextline, new CtrlCheckBox("LOGIN")));
            key = "groupAuthKind";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlGroup(Lang.Value(key), list1)));
            key = "usePopAcount";
            onePage.Add(new OneVal(key, false, Crlf.Nextline,
                               new CtrlCheckBox(Lang.Value(key))));
            var list2 = new ListVal();
            key = "user";
            list2.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 15)));
            key = "pass";
            list2.Add(new OneVal(key, "", Crlf.Contonie, new CtrlHidden(Lang.Value(key), 15)));
            key = "comment";
            list2.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 20)));
            key = "esmtpUserList";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), list2, 115, Lang.LangKind)));
            key = "enableEsmtp";
            onePage.Add(new OneVal(key, 0, Crlf.Nextline, new CtrlRadio(Lang.Value(key), new[] { Lang.Value(key + "1"), Lang.Value(key + "2") }, OptionDlg.Width() - 15, 2)));

            var list3 = new ListVal();
            key = "rangeName";
            list3.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 20)));
            key = "rangeAddress";
            list3.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 20)));
            onePage.Add(new OneVal("range", null, Crlf.Nextline, new CtrlDat("", list3, 115, Lang.LangKind)));
            return onePage;
        }
コード例 #47
0
ファイル: Option.cs プロジェクト: jsakamoto/bjd5
 private OnePage Page3(string name, string title,Kernel kernel)
 {
     var onePage = new OnePage(name, title);
     var key = "order";
     onePage.Add(new OneVal(key, 0, Crlf.Nextline,new CtrlRadio(Lang.Value(key),new[] { Lang.Value(key+"1"),Lang.Value(key+"2") } , 600, 2)));
     var list1 = new ListVal();
     key = "allowAddress";
     list1.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
     key = "allowList";
     onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), list1, 170, Lang.LangKind)));
     var list2 = new ListVal();
     key = "denyAddress";
     list2.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
     key = "denyList";
     onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), list2, 170, Lang.LangKind)));
     return onePage;
 }
コード例 #48
0
ファイル: Option.cs プロジェクト: jsakamoto/bjd5
 private OnePage Page5(string name, string title, Kernel kernel)
 {
     var onePage = new OnePage(name, title);
             var l = new ListVal();
             var key = "aliasName";
             l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
             key = "aliasDirectory";
             l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlFolder(Lang.Value(key), 50, kernel)));
             key = "aliaseList";
             onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), l, 250, Lang.LangKind)));
     return onePage;
 }
コード例 #49
0
ファイル: Option.cs プロジェクト: jsakamoto/bjd5
        private OnePage Page2(string name, string title)
        {
            var onePage = new OnePage(name, title);
            var key = "useChps";
                onePage.Add(new OneVal(key, false,Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
                key = "minimumLength";
                onePage.Add(new OneVal(key, 8, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
                key = "disableJoe";
                onePage.Add(new OneVal(key, true, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));

                var list = new ListVal();
                key = "useNum";
                list.Add(new OneVal(key, true, Crlf.Contonie, new CtrlCheckBox(Lang.Value(key))));
                key = "useSmall";
                list.Add(new OneVal(key, true, Crlf.Contonie, new CtrlCheckBox(Lang.Value(key))));
                key = "useLarge";
                list.Add(new OneVal(key, true, Crlf.Contonie, new CtrlCheckBox(Lang.Value(key))));
                key = "useSign";
                list.Add(new OneVal(key, true, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
                key = "groupNeed";
                onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlGroup(Lang.Value(key), list)));
            return onePage;
        }
コード例 #50
0
ファイル: Option.cs プロジェクト: jsakamoto/bjd5
 private OnePage Page5(string name, string title,Kernel kernel)
 {
     var onePage = new OnePage(name, title);
     var l = new ListVal();
     var key = "transferTarget";
     l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
     key = "transferServer";
     l.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 30)));
     key = "transferPort";
     l.Add(new OneVal(key, 25, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
     key = "transferSmtpAuth";
     l.Add(new OneVal(key, false, Crlf.Contonie, new CtrlCheckBox(Lang.Value(key))));
     key = "transferUser";
     l.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 25)));
     key = "transferPass";
     l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlHidden(Lang.Value(key), 25)));
     key = "transferSsl";
     l.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
     onePage.Add(new OneVal("hostList", null, Crlf.Nextline, new CtrlOrgHostDat("", l, 370, Lang.LangKind)));
     return onePage;
 }
コード例 #51
0
ファイル: Option.cs プロジェクト: jsakamoto/bjd5
 private OnePage Page6(string name, string title,Kernel kernel)
 {
     var onePage = new OnePage(name, title);
     var list1 = new ListVal();
     var key = "pattern";
     list1.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 70)));
     key = "Substitution";
     list1.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 70)));
     key = "patternList";
     onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), list1, 185, Lang.LangKind)));
     var list2 = new ListVal();
     key = "tag";
     list2.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
     key = "string";
     list2.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 80)));
     key = "appendList";
     onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), list2, 185, Lang.LangKind)));
     return onePage;
 }
コード例 #52
0
ファイル: Option.cs プロジェクト: jsakamoto/bjd5
 private OnePage Page4(string name, string title, Kernel kernel)
 {
     var onePage = new OnePage(name, title);
     var key = "useWebDav";
     onePage.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
         var l = new ListVal();
         key = "WebDAV Path";
         l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50)));
         key = "Writing permission";
         l.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
         key = "webDAVDirectory";
         l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlFolder(Lang.Value(key), 50, kernel)));
         key = "webDavPath";
         onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), l, 280, Lang.LangKind)));
     return onePage;
 }
コード例 #53
0
ファイル: ListValTest.cs プロジェクト: jsakamoto/bjd5
        //テスト用のListVal作成(パターン1)
        private ListVal CreateListVal1()
        {
            var listVal = new ListVal();
            listVal.Add(new OneVal("n1", 1, Crlf.Nextline, new CtrlInt("help", 10)));
            listVal.Add(new OneVal("n2", 1, Crlf.Nextline, new CtrlInt("help", 10)));

            var datList = new ListVal();
            datList.Add(new OneVal("n3", 1, Crlf.Nextline, new CtrlInt("help", 10)));
            datList.Add(new OneVal("n4", 1, Crlf.Nextline, new CtrlInt("help", 10)));
            listVal.Add(new OneVal("n5", 1, Crlf.Nextline, new CtrlDat("help", datList, 10, LangKind.Jp)));

            datList = new ListVal();
            datList.Add(new OneVal("n6", 1, Crlf.Nextline, new CtrlInt("help", 10)));
            datList.Add(new OneVal("n7", 1, Crlf.Nextline, new CtrlInt("help", 10)));
            listVal.Add(new OneVal("n8", 1, Crlf.Nextline, new CtrlDat("help", datList, 10, LangKind.Jp)));

            return listVal;
        }
コード例 #54
0
ファイル: OneOption.cs プロジェクト: jsakamoto/bjd5
 //OneValとしてサーバ基本設定を作成する
 protected OneVal CreateServerOption(ProtocolKind protocolKind, int port, int timeout, int multiple)
 {
     var list = new ListVal();
     list.Add(new OneVal("protocolKind", protocolKind, Crlf.Contonie, new CtrlComboBox(_isJp ? "プロトコル"
         : "Protocol", new [] { "TCP", "UDP" }, 60)));
     list.Add(new OneVal("port", port, Crlf.Nextline, new CtrlInt(_isJp ? "クライアントから見たポート" : "Port (from client side)", 5)));
     var localAddress = LocalAddress.GetInstance();
     var v4 = localAddress.V4;
     var v6 = localAddress.V6;
     list.Add(new OneVal("bindAddress2", new BindAddr(), Crlf.Nextline, new CtrlBindAddr(_isJp ? "待ち受けるネットワーク": "Bind Address", v4, v6)));
     list.Add(new OneVal("useResolve", false, Crlf.Nextline, new CtrlCheckBox((_isJp ? "クライアントのホスト名を逆引きする": "Reverse pull of host name from IP address"))));
     list.Add(new OneVal("useDetailsLog", true, Crlf.Contonie, new CtrlCheckBox(_isJp ? "詳細ログを出力する": "Use Details Log")));
     list.Add(new OneVal("multiple", multiple, Crlf.Contonie, new CtrlInt(_isJp ? "同時接続数" : "A repetition thread", 5)));
     list.Add(new OneVal("timeOut", timeout, Crlf.Nextline, new CtrlInt(_isJp ? "タイムアウト(秒)" : "Timeout", 6)));
     return new OneVal("GroupServer", null, Crlf.Nextline, new CtrlGroup(_isJp ? "サーバ基本設定" : "Server Basic Option",list));
 }
コード例 #55
0
ファイル: Option.cs プロジェクト: jsakamoto/bjd5
 private OnePage Page11(string name, string title, Kernel kernel)
 {
     var onePage = new OnePage(name, title);
     var key = "useAutoAcl";
     onePage.Add(new OneVal(key, false, Crlf.Nextline,new CtrlCheckBox(Lang.Value(key))));
     key = "autoAclLabel";
     onePage.Add(new OneVal(key,Lang.Value(key+"1"),Crlf.Nextline,new CtrlLabel(Lang.Value(key+"2"))));
     var l = new ListVal();
     key = "AutoAclApacheKiller";
     l.Add(new OneVal(key, false, Crlf.Nextline,
                      new CtrlCheckBox(Lang.Value(key))));
     key = "autoAclGroup";
     onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlGroup(Lang.Value(key), l)));
     return onePage;
 }
コード例 #56
0
ファイル: Option.cs プロジェクト: jsakamoto/bjd5
 private OnePage Page9(string name, string title, Kernel kernel)
 {
     var onePage = new OnePage(name, title);
             var l = new ListVal();
             var key = "group";
             l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 20)));
             key = "userName";
             l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 40)));
             key = "groupList";
             onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), l, 350, Lang.LangKind)));
     return onePage;
 }
コード例 #57
0
ファイル: Option.cs プロジェクト: jsakamoto/bjd5
 private OnePage Page7(string name, string title, Kernel kernel)
 {
     var onePage = new OnePage(name, title);
             var l = new ListVal();
             var key = "authDirectory";
             l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50)));
             key = "AuthName";
             l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 20)));
             key = "Require";
             l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
             key = "authList";
             onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), l, 350, Lang.LangKind)));
     return onePage;
 }
コード例 #58
0
ファイル: Option.cs プロジェクト: jsakamoto/bjd5
 private OnePage Page6(string name, string title, Kernel kernel)
 {
     var onePage = new OnePage(name, title);
             var l = new ListVal();
             var key = "mimeExtension";
             l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 10)));
             key = "mimeType";
             l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50)));
             key = "mime";
             onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), l, 350, Lang.LangKind)));
     return onePage;
 }
コード例 #59
0
ファイル: OneOption.cs プロジェクト: jsakamoto/bjd5
        //listValの初期化
        //        protected void Init() {
        //
        //
        //            //「ACL」タブの追加
        //            if (_useAcl) {
        //                var list = new ListVal();
        //                list.Add(new OneVal("enableAcl", 0, Crlf.Nextline, new CtrlRadio((Kernel.IsJp()) ? "指定したアドレスからのアクセスのみを" : "Access of ths user who appoint it", new List<string> { (Kernel.IsJp()) ? "許可する" : "Allow", (Kernel.IsJp()) ? "禁止する" : "Deny" }, OptionDlg.Width() - 15, 2)));
        //                {//DAT
        //                    var l = new ListVal();
        //                    l.Add(new OneVal("aclName", "", Crlf.Nextline, new CtrlTextBox((Kernel.IsJp()) ? "名前(表示名)" : "Name(Display)", 200)));
        //                    l.Add(new OneVal("aclAddress", "", Crlf.Nextline, new CtrlTextBox((Kernel.IsJp()) ? "アドレス" : "Address", 300)));
        //                    list.Add(new OneVal("acl", null, Crlf.Nextline, new CtrlDat((Kernel.IsJp()) ? "利用者(アドレス)の指定" : "Access Control List", l, 600, 340, Kernel.IsJp())));
        //                }//DAT
        //                Add(new OneVal("ACL", list, Crlf.Nextline, new CtrlTabPage("ACL")));
        //            }
        //
        //            //名前重複の確認 + ar.Valsの初期化
        //            foreach (var a in ListVal.Vals) {
        //                if (1 != ListVal.Vals.Count(o => o.Name == a.Name)) {
        //                    throw new Exception(string.Format("Name repetition {0}-{1}\r\n", this, a.Name));
        //                }
        //            }
        //
        //            //レジストリからの読み込み
        //            _iniDb.Read(NameTag, ListVal);
        //        }
        //
        protected OnePage PageAcl()
        {
            var onePage = new OnePage("ACL", "ACL");
            onePage.Add(new OneVal("enableAcl", 0, Crlf.Nextline, new CtrlRadio(_isJp ? "指定したアドレスからのアクセスのみを": "Access of ths user who appoint it",
                new[] { _isJp ? "許可する" : "Allow", _isJp ? "禁止する" : "Deny" }, OptionDlg.Width() - 15, 2)));

            var list = new ListVal();
            list.Add(new OneVal("aclName", "", Crlf.Nextline, new CtrlTextBox(_isJp ? "名前(表示名)" : "Name(Display)", 20)));
            list.Add(new OneVal("aclAddress", "", Crlf.Nextline, new CtrlTextBox(_isJp ? "アドレス" : "Address", 20)));
            onePage.Add(new OneVal("acl", null, Crlf.Nextline, new CtrlDat(_isJp ? "利用者(アドレス)の指定" : "Access Control List",list, 310, Lang.LangKind)));

            return onePage;
        }
コード例 #60
0
ファイル: Option.cs プロジェクト: jsakamoto/bjd5
 private OnePage Page2(string name, string title, Kernel kernel)
 {
     var onePage = new OnePage(name, title);
     var key = "useCgi";
     onePage.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
         {//DAT
             var l = new ListVal();
             key = "cgiExtension";
             l.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 10)));
             key = "Program";
             l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlFile(Lang.Value(key), 50, kernel)));
             onePage.Add(new OneVal("cgiCmd",null,Crlf.Nextline,new CtrlDat("",l,142,Lang.LangKind)));
         }//DAT
         key = "cgiTimeout";
         onePage.Add(new OneVal(key, 10, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
         {//DAT
             var l = new ListVal();
             key = "CgiPath";
             l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50)));
             key = "cgiDirectory";
             l.Add(new OneVal(key, "", Crlf.Nextline, new CtrlFolder(Lang.Value(key), 60, kernel)));
             key = "cgiPath";
             onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlDat(Lang.Value(key), l, 155, Lang.LangKind)));
         }//DAT
     return onePage;
 }