private OnePage Page1(string name, string title, Kernel kernel) { var onePage = new OnePage(name, title); //nameTag����|�[�g�ԍ���擾���Z�b�g����i�ύX�s�j var tmp = NameTag.Split(':'); var protocolKind = ProtocolKind.Tcp; var port = 0; var targetServer = ""; var targetPort = 0; if (tmp.Length == 4) { //�l������I�ɐݒ� protocolKind = (tmp[0] == "Tunnel-TCP") ? ProtocolKind.Tcp : ProtocolKind.Udp; port = Convert.ToInt32(tmp[1]); targetServer = tmp[2]; targetPort = Convert.ToInt32(tmp[3]); } onePage.Add(CreateServerOption(protocolKind, port, 60, 10)); //�T�[�o��{�ݒ� var key = "targetPort"; onePage.Add(new OneVal(key, targetPort, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5))); key = "targetServer"; onePage.Add(new OneVal(key, targetServer, Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50))); key = "idleTime"; onePage.Add(new OneVal(key, 1, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5))); return onePage; }
private Kernel _kernel; //����Web�̏d������o���邽�ߕK�v�ƂȂ� public Option(Kernel kernel, string path, string nameTag) : base(kernel.IsJp(), path, nameTag) { _kernel = kernel; var protocol = 0;//HTTP //nameTag����|�[�g�ԍ���擾���Z�b�g����i�ύX�s�j var tmp = NameTag.Split(':'); if (tmp.Length == 2) { int port = Convert.ToInt32(tmp[1]); protocol = (port == 443) ? 1:0; } var key = "useServer"; Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key)))); var pageList = new List <OnePage>(); key = "Basic"; pageList.Add(Page1(key, Lang.Value(key), kernel, protocol)); pageList.Add(Page2("CGI", "CGI", kernel)); pageList.Add(Page3("SSI", "SSI", kernel)); pageList.Add(Page4("WebDAV", "WebDAV", kernel)); key = "Alias"; pageList.Add(Page5(key, Lang.Value(key), kernel)); key = "MimeType"; pageList.Add(Page6(key, Lang.Value(key), kernel)); key = "Certification"; pageList.Add(Page7(key, Lang.Value(key), kernel)); key = "CertUserList"; pageList.Add(Page8(key, Lang.Value(key), kernel)); key = "CertGroupList"; pageList.Add(Page9(key, Lang.Value(key), kernel)); key = "ModelSentence"; pageList.Add(Page10(key, Lang.Value(key), kernel)); key = "AutoACL"; pageList.Add(Page11(key, Lang.Value(key), kernel)); pageList.Add(PageAcl()); Add(new OneVal("tab", null, Crlf.Nextline, new CtrlTabPage("tabPage", pageList))); Read(_kernel.IniDb); //�@���W�X�g������̓ǂݍ��� }
private OnePage Page1(string name, string title, Kernel kernel, int protocol) { var onePage = new OnePage(name, title); var key = "protocol"; onePage.Add(new OneVal(key, protocol, Crlf.Nextline, new CtrlComboBox(Lang.Value(key), new[] { "HTTP", "HTTPS" }, 100))); var port = 80; //nameTag����|�[�g�ԍ���擾���Z�b�g����i�ύX�s�j var tmp = NameTag.Split(':'); if (tmp.Length == 2) { port = Convert.ToInt32(tmp[1]); } onePage.Add(CreateServerOption(ProtocolKind.Tcp, port, 3, 10)); //�T�[�o��{�ݒ� key = "documentRoot"; onePage.Add(new OneVal(key, "", Crlf.Nextline, new CtrlFolder(Lang.Value(key), 50, kernel))); key = "welcomeFileName"; onePage.Add(new OneVal(key, "index.html", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30))); key = "useHidden"; onePage.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key)))); key = "useDot"; onePage.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key)))); key = "useExpansion"; onePage.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key)))); key = "useDirectoryEnum"; onePage.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key)))); key = "serverHeader"; onePage.Add(new OneVal(key, "BlackJumboDog Version $v", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50))); key = "useEtag"; onePage.Add(new OneVal(key, false, Crlf.Contonie, new CtrlCheckBox(Lang.Value(key)))); key = "serverAdmin"; onePage.Add(new OneVal(key, "", Crlf.Contonie, new CtrlTextBox(Lang.Value(key), 30))); return(onePage); }