コード例 #1
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            #region Controls
            var defVisStyleBackCol = true;

            connTxtBox             = new BaseTextBox(_res, "connTxtBox", 1, new Point(30, 52), new Size(120, 20), padding: new Padding(30, 5, 3, 3));
            addressTxtBox          = new BaseTextBox(_res, "addressTxtBox", 3, new Point(30, 112), new Size(120, 20), padding: new Padding(30, 5, 3, 3));
            portTxtBox             = new BaseTextBox(_res, "portTxtBox", 5, new Point(30, 172), new Size(120, 20), padding: new Padding(30, 5, 3, 3));
            gatewayTxtBox          = new BaseTextBox(_res, "gatewayTxtBox", 7, new Point(30, 232), new Size(120, 20), padding: new Padding(30, 5, 3, 3));
            screenWidthTxtBox      = new BaseTextBox(_res, "screenWidthTxtBox", 23, new Point(20, 124), new Size(105, 20), padding: new Padding(20, 5, 3, 3));
            screenHeightTxtBox     = new BaseTextBox(_res, "screenHeightTxtBox", 25, new Point(20, 184), new Size(105, 20), padding: new Padding(20, 5, 3, 3));
            connLbl                = new BaseLabel(_res, "connLbl", 0, new Point(30, 30), new Size(124, 17), "Connection Name:", autoSize: true, padding: new Padding(30, 30, 3, 0));
            addressLbl             = new BaseLabel(_res, "addressLbl", 2, new Point(30, 90), new Size(110, 17), "Server Address:", autoSize: true, padding: new Padding(30, 15, 3, 0));
            portLbl                = new BaseLabel(_res, "portLbl", 4, new Point(30, 150), new Size(84, 17), "Server Port:", autoSize: true, padding: new Padding(30, 15, 3, 0));
            gatewayLbl             = new BaseLabel(_res, "gatewayLbl", 6, new Point(30, 120), new Size(67, 17), "Gateway:", autoSize: true, padding: new Padding(30, 15, 3, 0));
            connStatusLbl          = new BaseLabel(_res, "connStatusLbl", 8, new Point(175, 129), new Size(127, 17), "Connection Status", autoSize: true);
            savedRdpsLbl           = new BaseLabel(_res, "savedRdpsLbl", 1, new Point(31, 28), new Size(97, 18), "Saved RDPs:", autoSize: true);
            screenWidthLbl         = new BaseLabel(_res, "screenWidthLbl", 22, new Point(20, 102), new Size(97, 17), "Screen Width:", autoSize: true, padding: new Padding(20, 15, 3, 0));
            screenHeightLbl        = new BaseLabel(_res, "screenHeightLbl", 24, new Point(20, 162), new Size(102, 17), "Screen Height:", autoSize: true, padding: new Padding(20, 15, 3, 0));
            useGatewayChckBox      = new BaseCheckBox(_res, "useGatewayChckBox", 8, defVisStyleBackCol, "Use Gateway", new Point(30, 285), new Size(98, 19), margin: new Padding(30, 30, 3, 3));
            asAdminChckBox         = new BaseCheckBox(_res, "asAdminChckBox", 9, defVisStyleBackCol, "As Admin", new Point(30, 317), new Size(77, 19), margin: new Padding(30, 10, 3, 3));
            remGuardChckBox        = new BaseCheckBox(_res, "remGuardChckBox", 10, defVisStyleBackCol, "Remote Guard", new Point(30, 349), new Size(107, 19), margin: new Padding(30, 10, 3, 3));
            restrictedAdminChckBox = new BaseCheckBox(_res, "restrictedAdminChckBox", 15, defVisStyleBackCol, "As Restricted Admin", new Point(30, 381), new Size(135, 19), margin: new Padding(30, 10, 3, 3));
            fullScreenChckBox      = new BaseCheckBox(_res, "fullScreenChckBox", 19, defVisStyleBackCol, "Start Fullscreen", new Point(10, 15), new Size(111, 19), margin: new Padding(10, 15, 3, 3));
            multiMonitorChckBox    = new BaseCheckBox(_res, "multiMonitorChckBox", 20, defVisStyleBackCol, "Multi Monitor Mode", new Point(10, 40), new Size(133, 19), margin: new Padding(10, 3, 3, 3));
            spanMonitorsChckBox    = new BaseCheckBox(_res, "spanMonitorsChckBox", 21, defVisStyleBackCol, "Span Monitors Mode", new Point(10, 65), new Size(141, 19), margin: new Padding(10, 3, 3, 3));
            rdpCredsHelpBtn        = new BaseButton(_res, "rdpCredsHelpBtn", 16, visStyleBackColor: defVisStyleBackCol, point: new Point(174, 458), margin: new Padding(174, 55, 3, 3), size: new Size(40, 23));
            recheckConnBtn         = new BaseButton(_res, "recheckConnBtn", 9, visStyleBackColor: defVisStyleBackCol, point: new Point(33, 228), size: new Size(120, 23), text: "Recheck Connection");
            editCrntBtn            = new BaseButton(_res, "editCrntBtn", 6, visStyleBackColor: defVisStyleBackCol, point: new Point(33, 190), size: new Size(75, 23), text: "Edit");
            delCrntBtn             = new BaseButton(_res, "delCrntBtn", 5, visStyleBackColor: defVisStyleBackCol, point: new Point(33, 161), size: new Size(75, 23), text: "Delete");
            connectCrntBtn         = new BaseButton(_res, "connectCrntBtn", 4, visStyleBackColor: defVisStyleBackCol, point: new Point(33, 129), size: new Size(75, 23), text: "Connect To");
            refreshRdpsBtn         = new BaseButton(_res, "refreshRdpBtn", 3, visStyleBackColor: defVisStyleBackCol, point: new Point(237, 57), size: new Size(60, 23), text: "Refresh");
            saveNUpdtBtn           = new BaseButton(_res, "saveNUpdtBtn", visStyleBackColor: defVisStyleBackCol, point: new Point(19, 10), margin: new Padding(19, 10, 3, 3), size: new Size(110, 23), text: "Save / Update");
            saveToRdpFileBtn       = new BaseButton(_res, "saveToRdpFileBtn", 5, visStyleBackColor: defVisStyleBackCol, point: new Point(19, 46), margin: new Padding(19, 10, 3, 3), size: new Size(110, 23), text: "Save as .RDP");
            saveToXmlBtn           = new BaseButton(_res, "saveToXmlBtn", 4, visStyleBackColor: defVisStyleBackCol, point: new Point(19, 82), margin: new Padding(19, 10, 3, 3), size: new Size(110, 23), text: "Save as .XML");
            connGivenBtn           = new BaseButton(_res, "connGivenBtn", 2, visStyleBackColor: defVisStyleBackCol, point: new Point(19, 118), margin: new Padding(19, 10, 3, 3), size: new Size(110, 23), text: "Quick Connect");
            resetBtn               = new BaseButton(_res, "resetBtn", 1, visStyleBackColor: defVisStyleBackCol, point: new Point(19, 154), margin: new Padding(19, 10, 3, 3), size: new Size(110, 23), text: "Reset To Defaults");
            screenSettingsHelpBtn  = new BaseButton(_res, "screenSettingsHelpBtn", 3, visStyleBackColor: defVisStyleBackCol, point: new Point(88, 185), margin: new Padding(88, 5, 3, 3), size: new Size(40, 23), text: "Help!");
            isMstcRunningImgBox    = new BasePicBox(_res, "isMstcRunningImgBox", 7, new Point(191, 161), new Size(106, 90));
            savedRdpsResults       = new BaseComboBox(_res, "savedRdpsResults", 2, new Point(33, 59), new Size(181, 21));
            onlyRdpFilesRdio       = new BaseRadioButton(_res, "onlyRdpFilesRdio", text: "Only .RDP Files", autoSize: true, point: new Point(173, 25), size: new Size(125, 21), tabStop: true, visualStyleCol: true);
            #endregion

            #region Panels
            currentRdpsPnl = new BaseFlowPanel(_res, "currentRdpsPnl", 3, new Control[] { recheckConnBtn, connStatusLbl, isMstcRunningImgBox, editCrntBtn, delCrntBtn, connectCrntBtn, refreshRdpsBtn, savedRdpsResults, savedRdpsLbl, saveToRdpFileBtn, onlyRdpFilesRdio },
                                               new Point(276, 12), new Size(327, 264), borderStyle: BorderStyle.Fixed3D);
            screenSettingsHolderPnl = new BaseFlowPanel(_res, "screenSettingsHolderPnl", 4, new Control[] { rdpButtonsPnl, screenSettingsPnl }, new Point(276, 285), new Size(328, 225), borderStyle: BorderStyle.Fixed3D);
            connectionSettingsPnl   = new BaseFlowPanel(_res, "connectionSettingsPnl", controls: new Control[] { connLbl, connTxtBox, addressLbl, addressTxtBox, portLbl, portTxtBox, gatewayLbl, gatewayTxtBox, useGatewayChckBox, asAdminChckBox, remGuardChckBox, restrictedAdminChckBox, rdpCredsHelpBtn },
                                                        point: new Point(12, 12), size: new Size(244, 498), borderStyle: BorderStyle.Fixed3D, flow: FlowDirection.TopDown);
            rdpButtonsPnl     = new BaseFlowPanel(_res, "rdpButtonsPnl", 1, new Control[] { saveNUpdtBtn, saveToRdpFileBtn, saveToXmlBtn, connGivenBtn, resetBtn, screenSettingsHelpBtn }, new Point(173, 3), new Size(148, 215));
            screenSettingsPnl = new BaseFlowPanel(_res, "screenSettingsPnl", controls: new Control[] { fullScreenChckBox, multiMonitorChckBox, spanMonitorsChckBox, screenWidthLbl, screenWidthTxtBox, screenHeightLbl, screenHeightTxtBox }, point: new Point(3, 3), size: new Size(164, 215));
            #endregion

            ((System.ComponentModel.ISupportInitialize)(isMstcRunningImgBox)).BeginInit();
            SuspendLayout();
            InitRdp();
        }
コード例 #2
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>

        private void InitializeComponent()
        {
            #region Controls
            var regularBtnSize       = new Size(80, 23);
            var largeBtnSize         = new Size(120, 23);
            var defaultButtonPadding = new Padding(60, 10, 0, 5);
            var defTxtBoxPoint       = new Point(6, 57);
            var defTxtBoxSize        = new Size(135, 21);
            var defLblPoint          = new Point(3, 29);
            var defComboPoint        = new Point(6, 57);
            var defComboSize         = new Size(135, 21);
            var defPanelSize         = new Size(150, 100);

            selectConnBtn       = new BaseButton(_res, "selectConnBtn", visStyleBackColor: true, point: new Point(60, 20), margin: new Padding(60, 20, 0, 5), size: regularBtnSize, text: "Connect to Selected");
            selectEditBtn       = new BaseButton(_res, "selectEditBtn", visStyleBackColor: true, point: new Point(60, 58), margin: defaultButtonPadding, size: regularBtnSize, text: "Edit");
            selectRmvBtn        = new BaseButton(_res, "selectRmvBtn", visStyleBackColor: true, point: new Point(60, 96), margin: defaultButtonPadding, size: regularBtnSize, text: "Remove");
            vpnHelpBtn          = new BaseButton(_res, "vpnHelpBtn", 3, visStyleBackColor: true, point: new Point(100, 139), margin: new Padding(100, 15, 0, 5), size: regularBtnSize, text: "Help!");
            clearValsBtn        = new BaseButton(_res, "clearValsBtn", 5, visStyleBackColor: true, point: new Point(132, 96), size: new Size(120, 23), text: "Clear Values");
            saveConnBtn         = new BaseButton(_res, "saveConnBtn", 3, visStyleBackColor: true, point: new Point(74, 136), size: largeBtnSize, text: "Save and Connect");
            saveVpnNewBtn       = new BaseButton(_res, "saveVpnNewBtn", visStyleBackColor: true, point: new Point(6, 96), size: largeBtnSize, text: "Save New / Edited");
            vpnsTxtBox          = new BaseTextBox(_res, "vpnsTxtBox", 1, defTxtBoxPoint, defTxtBoxSize);
            vpnNameTxtBox       = new BaseTextBox(_res, "vpnNameTxtBox", 1, defTxtBoxPoint, defTxtBoxSize);
            selectedInfoTxtBox  = new BaseRichTextBox(_res, "selectedInfoTxtBox", 1, SystemColors.MenuText, Color.YellowGreen, new Point(6, 31), new Size(212, 134));
            selectedsLbl        = new BaseLabel(_res, "selectedsLbl", point: new Point(3, 10), size: new Size(108, 18), text: "Selected\'s Info:");
            currentVpnsLbl      = new BaseLabel(_res, "currentVpnsLbl", point: defLblPoint, size: new Size(103, 18), text: "Current VPNs:");
            nameVpnLbl          = new BaseLabel(_res, "nameVpnLbl", point: defLblPoint, size: new Size(52, 18), text: "Name:");
            addressVpnLbl       = new BaseLabel(_res, "addressVpnLbl", point: defLblPoint, size: new Size(66, 18), text: "Address:");
            ttypeVpnLbl         = new BaseLabel(_res, "tTypeVpnLbl", point: defLblPoint, size: new Size(92, 18), text: "Tunnel Type:");
            encryptLvlVpnLbl    = new BaseLabel(_res, "encryptLvlVpnLbl", point: defLblPoint, size: new Size(120, 18), text: "Encryption LEvel:");
            authMetLbl          = new BaseLabel(_res, "authMetLbl", point: defLblPoint, size: new Size(99, 18), text: "Auth. Method:");
            currentVpnsComBox   = new BaseComboBox(_res, "currentVpnsCombox", 2, defComboPoint, defComboSize);
            tTypeSelectCombBox  = new BaseComboBox(_res, "tTypeSelectComBox", 1, defComboPoint, defComboSize);
            encryLvlCombBox     = new BaseComboBox(_res, "encrLvlComBox", 2, defComboPoint, defComboSize);
            authMetCombBox      = new BaseComboBox(_res, "authMetComBox", 2, defComboPoint, defComboSize);
            availForAllCheckBox = new BaseCheckBox(_res, "availForAllCheckBox", visStyleBackColor: true, text: "Available for All Users", point: new Point(5, 67), size: new Size(169, 22));
            splitTunCheckBox    = new BaseCheckBox(_res, "splitTunCheckBox", visStyleBackColor: true, text: "Split Tunnel:", point: new Point(6, 17), size: new Size(103, 22));
            #endregion

            #region Panels
            bottomInfosPnl = new BaseFlowPanel(_res, "bottomInfosPnl", 2, new Control[] { currOpersPnl, currInfoPnl, currPnl }, new Point(12, 335), new Size(590, 175), borderStyle: BorderStyle.Fixed3D);
            currOpersPnl   = new BaseFlowPanel(_res, "currOpersPnl", 6, new Control[] { selectConnBtn, selectEditBtn, selectRmvBtn, vpnHelpBtn }, new Point(383, 3), new Size(200, 170), flow: FlowDirection.TopDown);
            vpnSettingsPnl = new BaseFlowPanel(_res, "vpnSettingsPnl", 3, new Control[] { namePnl, addressPnl, tunnelPnl, encryptionPnl, authPnl, btnsTopPnl }, new Point(12, 12), new Size(590, 306));
            currInfoPnl    = new BasePanel(_res, "currInfoPnl", 5, new Control[] { selectedInfoTxtBox, selectedsLbl }, new Point(150, 3), new Size(231, 170));
            currPnl        = new BasePanel(_res, "currPnl", 4, new Control[] { currentVpnsComBox, currentVpnsLbl }, new Point(3, 3), new Size(150, 170));
            namePnl        = new BasePanel(_res, "namePnl", 2, new Control[] { vpnsTxtBox, nameVpnLbl }, new Point(3, 3), defPanelSize);
            addressPnl     = new BasePanel(_res, "addressPnl", 0, new Control[] { vpnNameTxtBox, addressVpnLbl }, new Point(159, 3), defPanelSize);
            tunnelPnl      = new BasePanel(_res, "tunnelPnl", 2, new Control[] { tTypeSelectCombBox, ttypeVpnLbl }, new Point(315, 3), defPanelSize);
            encryptionPnl  = new BasePanel(_res, "encryptionPnl", 3, new Control[] { encryLvlCombBox, encryptLvlVpnLbl }, new Point(3, 109), defPanelSize);
            authPnl        = new BasePanel(_res, "authPnl", 4, new Control[] { authMetCombBox, authMetLbl }, new Point(159, 109), defPanelSize);
            btnsTopPnl     = new BasePanel(_res, "btnSopPnl", 5, new Control[] { clearValsBtn, saveConnBtn, saveVpnNewBtn, availForAllCheckBox, splitTunCheckBox }, new Point(315, 109), new Size(270, 197));
            #endregion

            SuspendLayout();
            InitVpnElements();
        }
コード例 #3
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            #region Controls
            var anchorForBtn = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                     | System.Windows.Forms.AnchorStyles.Right)));
            var defVisStlye        = true;
            var defButtonPadding   = new Padding(3, 10, 0, 0);
            var defButtonSize      = new Size(120, 30);
            var defTextBoxSize     = new Size(194, 20);
            var defCheckBoxPadding = new Padding(5, 25, 0, 0);

            passwordTxtBox     = new BaseTextBox(_res, "passwordTxtBox", 7, new Point(3, 111), defTextBoxSize);
            usernameTxtBox     = new BaseTextBox(_res, "usernameTxtBox", 5, new Point(3, 90), defTextBoxSize);
            emailAddConfTxtBox = new BaseTextBox(_res, "emailAddConfTxtBox", 12, new Point(3, 113), defTextBoxSize);
            emailAddTxtBox     = new BaseTextBox(_res, "emailAddTxtBox", 10, new Point(6, 33), defTextBoxSize);
            gpgTxtBox          = new BaseTextBox(_res, "gpgTxtBox", 9, new Point(3, 191), new Size(194, 20));
            usernameLbl        = new BaseLabel(_res, "usernameLbl", 4, new Point(3, 10), new Size(81, 18), "Username", autoSize: true);
            gpgLbl             = new BaseLabel(_res, "gpgLbl", 8, new Point(5, 170), new Size(73, 18), "PGP Key:", autoSize: true);
            passwordLbl        = new BaseLabel(_res, "passwordLbl", 6, new Point(3, 90), new Size(79, 18), "Password:"******"emailAddConfLbl", 11, new Point(2, 92), new Size(65, 18), "Confirm:", autoSize: true);
            emailAddLbl        = new BaseLabel(_res, "emailAddLbl", 10, new Point(3, 12), new Size(147, 18), "Your E-Mail Address:", autoSize: true);
            helpBtn            = new BaseButton(_res, "helpBtn", 15, visStyleBackColor: defVisStlye, point: new Point(494, 113), margin: defButtonPadding, size: new Size(70, 30), text: "Help!");
            setEmailBtn        = new BaseButton(_res, "setEmailBtn", 14, visStyleBackColor: defVisStlye, point: new Point(494, 24), margin: defButtonPadding, size: new Size(70, 29), text: "Set Email");
            reloadStngsBtn     = new BaseButton(_res, "reloadStngsBtn", 5, visStyleBackColor: defVisStlye, point: new Point(3, 90), margin: defButtonPadding, size: defButtonSize, text: "Reload Settings");
            saveStngsBtn       = new BaseButton(_res, "saveStngsBtn", 6, visStyleBackColor: defVisStlye, point: new Point(3, 50), margin: defButtonPadding, size: defButtonSize, text: "Save Settings");
            loadStngsBtn       = new BaseButton(_res, "loadStngsBtn", 7, visStyleBackColor: defVisStlye, point: new Point(3, 10), margin: defButtonPadding, size: defButtonSize, text: "Load Settings", anchor: anchorForBtn);
            setUserinfoBtn     = new BaseButton(_res, "setUserinfoBtn", 15, visStyleBackColor: defVisStlye, point: new Point(114, 251), margin: defButtonPadding, size: new Size(83, 29), text: "Set User Info");
            useRecommBtn       = new BaseButton(_res, "useRecommBtn", 8, visStyleBackColor: defVisStlye, point: new Point(3, 130), margin: defButtonPadding, size: defButtonSize, text: "Use Recommended");
            addUserBtn         = new BaseButton(_res, "addUserBtn", 9, visStyleBackColor: defVisStlye, point: new Point(3, 170), margin: defButtonPadding, size: defButtonSize, text: "Add User");
            removeUserBtn      = new BaseButton(_res, "removeUserBtn", 10, visStyleBackColor: defVisStlye, point: new Point(3, 210), margin: defButtonPadding, size: defButtonSize, text: "Remove User");
            wipeAllnRemoveBtn  = new BaseButton(_res, "wipeAllnRemoveBtn", 11, visStyleBackColor: defVisStlye, point: new Point(3, 250), margin: defButtonPadding, size: defButtonSize, text: "Wipe Everything");
            autoLoginCheck     = new BaseCheckBox(_res, "autoLoginCheck", 1, defVisStlye, "Log In Automatically", new Point(5, 25), new Size(135, 19), margin: defCheckBoxPadding);
            doNotSaveCheck     = new BaseCheckBox(_res, "doNotSaveCheck", 2, defVisStlye, "Do Not Save Data", new Point(5, 69), new Size(123, 19), margin: defCheckBoxPadding);
            wipeDataQuitCheck  = new BaseCheckBox(_res, "wipeDataQuitCheck", visStyleBackColor: defVisStlye, text: "Wipe Data on Quit", point: new Point(5, 113), size: new Size(125, 19), margin: defCheckBoxPadding);
            resetSysDefsCheck  = new BaseCheckBox(_res, "resetSysDefsCheck", 3, defVisStlye, "Reset To Sys Defaults on Quit", new Point(5, 157), new Size(187, 19), margin: defCheckBoxPadding);
            alwaysPGPCheck     = new BaseCheckBox(_res, "alwaysPGPCheck", 4, defVisStlye, "Always Use PGP", new Point(5, 201), new Size(116, 19), margin: defCheckBoxPadding);
            sendRepEmailCheck  = new BaseCheckBox(_res, "sendRepEmailCheck", 5, defVisStlye, "Send Reports to Email", new Point(5, 245), new Size(149, 19), margin: defCheckBoxPadding);
            forcePGPEmailCheck = new BaseCheckBox(_res, "forcePGPEmailCheck", 13, defVisStlye, "Force PGP in Email", new Point(277, 72), new Size(133, 19), margin: defCheckBoxPadding);
            #endregion

            #region Panels
            emailPnl          = new BasePanel(_res, "emailPnl", 13, new Control[] { helpBtn, setEmailBtn, forcePGPEmailCheck, emailAddConfTxtBox, emailAddConfLbl, emailAddTxtBox, emailAddLbl }, new Point(12, 342), new Size(573, 168));
            userinfoPnl       = new BasePanel(_res, "userinfoPnl", 1, new Control[] { setUserinfoBtn, gpgTxtBox, gpgLbl, passwordTxtBox, passwordLbl, usernameTxtBox, usernameLbl }, new Point(255, 12), new Size(207, 300));
            settingsBtnsPnl   = new BaseFlowPanel(_res, "settingsBtnsPnl", 6, new Control[] { loadStngsBtn, saveStngsBtn, reloadStngsBtn, useRecommBtn, addUserBtn, removeUserBtn, wipeAllnRemoveBtn }, new Point(453, 12), new Size(132, 300), BorderStyle.Fixed3D, anchor: AnchorStyles.Top);
            checkBoxLayoutPnl = new BaseFlowPanel(_res, "checkBoxLayoutPnl", 12, new Control[] { autoLoginCheck, doNotSaveCheck, wipeDataQuitCheck, resetSysDefsCheck, alwaysPGPCheck, sendRepEmailCheck }, new Point(12, 12), new Size(192, 300), BorderStyle.Fixed3D, anchor: AnchorStyles.Top);
            #endregion

            SuspendLayout();
            InitSettings();
        }
コード例 #4
0
        private void ChkErledigt_CheckedChanged(object sender, EventArgs e)
        {
            BaseCheckBox chk        = (BaseCheckBox)sender;
            ToDos4Grid   toDos4Grid = (ToDos4Grid)((GridExtended)chk.Parent).DataObject;

            if (chk.IsChecked)
            {
                this.core.SaveToDo(null, toDos4Grid.Cosplan_Nr, 100, null, null, toDos4Grid.Nummer);
            }
            else
            {
                this.core.SaveToDo(null, toDos4Grid.Cosplan_Nr, 0, null, null, toDos4Grid.Nummer);
            }
        }
コード例 #5
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        void InitializeComponent()
        {
            #region Controls
            loginButton         = new BaseButton(_res, "loginButton", backColor: Color.YellowGreen);
            registerButton      = new BaseButton(_res, "registerButton", backColor: Color.DarkTurquoise);
            quitButton          = new BaseButton(_res, "quitButton", backColor: Color.Violet);
            saveUserInfoChckBox = new BaseCheckBox(_res, "saveUserInfoChkBox", visStyleBackColor: true, text: "Save User Info", alignText: ContentAlignment.MiddleCenter, alignBox: ContentAlignment.MiddleLeft);
            usersSavedBox       = new BaseComboBox(_res, "usersSavedBox");
            passwordTxtBox      = new BaseTextBox(_res, "passwordTxtBox");
            usernameTxtBox      = new BaseTextBox(_res, "usernameTxtBox");
            #endregion

            #region Panels
            loginBottomPanel = new BasePanel(_res, "loginBottomPanel", controls: new Control[] { loginButton, quitButton, registerButton });
            loginTopPanel    = new BasePanel(_res, "loginTopPanel", controls: new Control[] { saveUserInfoChckBox, passwordTxtBox, usernameTxtBox, usersSavedBox });
            #endregion

            InitLoginWin();
        }
コード例 #6
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            #region Controls
            var defButtonSize     = new Size(80, 23);
            var defTextBoxSize    = new Size(140, 20);
            var defTextBoxPadding = new Padding(40, 5, 3, 3);
            var defLabelPadding   = new Padding(40, 20, 3, 0);

            saveProxyBtn         = new BaseButton(_res, "saveProxyBtn", 8, visStyleBackColor: true, point: new Point(50, 336), margin: new Padding(50, 30, 3, 3), size: new Size(120, 23), text: "Save to File");
            saveNConnectProxyBtn = new BaseButton(_res, "saveNConnectProxyBtn", 9, visStyleBackColor: true, point: new Point(50, 382), margin: new Padding(50, 20, 3, 3), size: new Size(120, 23), text: "Save and Connect");
            proxyHelpBtn         = new BaseButton(_res, "proxyHelpBtn", 13, visStyleBackColor: true, point: new Point(140, 458), margin: new Padding(140, 50, 3, 3), size: new Size(60, 23), text: "Help!");
            connectToSavedBtn    = new BaseButton(_res, "connectToSavedBtn", 2, visStyleBackColor: true, point: new Point(70, 320), margin: new Padding(70, 20, 70, 3), size: new Size(80, 23), text: "Connect To");
            editSavedBtn         = new BaseButton(_res, "editSavedBtn", 3, visStyleBackColor: true, point: new Point(70, 361), margin: new Padding(70, 15, 70, 3), size: new Size(80, 23), text: "Edit");
            deleteSavedBtn       = new BaseButton(_res, "deleteSavedBtn", 4, visStyleBackColor: true, point: new Point(70, 402), margin: new Padding(70, 15, 70, 3), size: new Size(80, 23), text: "Delete");
            selectTextFileBtn    = new BaseButton(_res, "selectTextFileBtn", visStyleBackColor: true, point: new Point(20, 78), margin: new Padding(20, 40, 20, 3), size: new Size(100, 23), text: "Select Text File");
            helpImportBtn        = new BaseButton(_res, "helpImportBtn", 2, visStyleBackColor: true, point: new Point(30, 119), margin: new Padding(30, 15, 30, 3), size: new Size(80, 23), text: "Help!");
            ipAddyLbl            = new BaseLabel(_res, "ipAddyLbl", 0, new Point(40, 20), new Size(83, 18), "IP Address:", autoSize: true, padding: defLabelPadding);
            portLbl             = new BaseLabel(_res, "portLbl", 11, new Point(40, 86), new Size(40, 18), "Port:", autoSize: true, padding: defLabelPadding);
            passLbl             = new BaseLabel(_res, "passLbl", 4, new Point(40, 218), new Size(79, 18), "Password:"******"uNameLbl", 2, new Point(40, 152), new Size(81, 18), "Username:"******"proxyInfoLbl", 6, new Point(10, 92), new Size(114, 18), "Info of Selected:", autoSize: true, padding: new Padding(10, 20, 10, 0));
            savedProxiesLbl     = new BaseLabel(_res, "savedProxiesLbl", 5, new Point(10, 20), new Size(107, 18), "Saved Proxies:", autoSize: true, padding: new Padding(10, 20, 3, 0));
            importProxiesLbl    = new BaseLabel(_res, "importProxiesLbl", 1, new Point(18, 20), new Size(104, 18), "Import Proxies", autoSize: true, padding: new Padding(18, 20, 0, 0));
            ipAddyTxtBox        = new BaseTextBox(_res, "ipAddyTxtBox", 1, new Point(40, 43), defTextBoxSize, padding: defTextBoxPadding);
            portTxtBox          = new BaseTextBox(_res, "portTxtBox", 12, new Point(40, 109), defTextBoxSize, padding: defTextBoxPadding);
            uNameTxtBox         = new BaseTextBox(_res, "uNameTxtBox", 3, new Point(40, 175), defTextBoxSize, padding: defTextBoxPadding);
            passTextBox         = new BaseTextBox(_res, "passTextBox", 5, new Point(40, 241), defTextBoxSize, padding: defTextBoxPadding);
            authReqChckBox      = new BaseCheckBox(_res, "authReqChckBox", 10, true, "Authorization Required", new Point(40, 284), new Size(151, 19), margin: new Padding(40, 20, 3, 3));
            savedProxiesCombBox = new BaseComboBox(_res, "savedProxiesCombBox", 1, new Point(10, 48), new Size(180, 21), new Padding(10, 10, 3, 3));
            proxyInfoTxtBox     = new BaseRichTextBox(_res, "proxyInfoTxtBox", 0, SystemColors.MenuText, Color.GreenYellow, new Point(10, 120), new Size(200, 177), margin: new Padding(10, 10, 10, 3));
            #endregion

            #region Panels
            importProxiesPnl = new BaseFlowPanel(_res, "importProxiesPnl", 1, new Control[] { importProxiesLbl, selectTextFileBtn, helpImportBtn }, new Point(12, 12), new Size(140, 498), borderStyle: BorderStyle.Fixed3D, flow: FlowDirection.TopDown);
            savedProxiesPnl  = new BaseFlowPanel(_res, "savedProxiesPnl", 1, new Control[] { savedProxiesLbl, savedProxiesCombBox, proxyInfoLbl, proxyInfoTxtBox, connectToSavedBtn, editSavedBtn, deleteSavedBtn }, new Point(158, 12), new Size(220, 498), borderStyle: BorderStyle.Fixed3D, flow: FlowDirection.TopDown);
            addNewProxyPnl   = new BaseFlowPanel(_res, "addNewProxyPnl", 0, new Control[] { ipAddyLbl, ipAddyTxtBox, portLbl, portTxtBox, uNameLbl, uNameTxtBox, passLbl, passTextBox, authReqChckBox, saveProxyBtn, saveNConnectProxyBtn, proxyHelpBtn },
                                                 new Point(384, 12), new Size(220, 498), borderStyle: BorderStyle.Fixed3D, flow: FlowDirection.TopDown);
            #endregion

            SuspendLayout();
            InitProxy();
        }
コード例 #7
0
 /// <summary>
 /// 設定変更確定ボタン
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void SettingCheckBox_CheckedChanged(object sender, EventArgs e)
 {
     try
     {
         BaseCheckBox checkBox = (BaseCheckBox)sender;
         if (checkBox.Checked)
         {
             checkBox.ForeColor = Color.White;
             checkBox.Text      = "ON";
         }
         else
         {
             checkBox.ForeColor = Color.Black;
             checkBox.Text      = "OFF";
         }
     }
     catch (Exception ex)
     {
         throw Program.ThrowException(ex);
     }
 }
コード例 #8
0
        protected virtual void RenderGroupItem(HtmlTextWriter writer, ListControlItem item, BaseListDataBoundRenderEventArgs args)
        {
            if (RenderOnlyText)
            {
                RenderItems(writer, item, args);
            }
            else
            {
                var clientID = item.Value;
                writer.RenderBeginTag(HtmlTextWriterTag.Tr);       //tr
                writer.RenderBeginTag(HtmlTextWriterTag.Td);       //Td
                writer.RenderBeginTag(HtmlTextWriterTag.Div);      //outer DIV
                writer.RenderBeginTag(HtmlTextWriterTag.Fieldset); //Fieldset

                #region Legend

                writer.RenderBeginTag(HtmlTextWriterTag.Legend);

                if (item.Selectable && item.ChildrenCount() > 1)
                {
                    var checkBox = new BaseCheckBox
                    {
                        Checked = item.AllSelected(),
                        OnClick = "CheckInInnerGroup(this);",
                    };
                    checkBox.Render(writer, ExtenderAjaxControl);
                }

                writer.AddStyleAttribute(HtmlTextWriterStyle.Cursor, "pointer");
                writer.AddAttribute(HtmlTextWriterAttribute.Id, clientID + "_Legend");
                writer.AddAttribute(HtmlTextWriterAttribute.Title, Resources.PressToOpenCloseGroup);
                writer.AddAttribute("ondblclick", "ClickInnerGroup(this);");
                writer.AddAttribute("clickOnDblClickInParent", "on");
                writer.RenderBeginTag(HtmlTextWriterTag.Span);
                writer.Write(item.Text);
                writer.RenderEndTag(); //Span

                writer.RenderEndTag(); //Legend

                #endregion

                writer.AddAttribute(HtmlTextWriterAttribute.Id, clientID);
                writer.RenderBeginTag(HtmlTextWriterTag.Div); //inner DIV

                #region Table

                writer.AddAttribute(HtmlTextWriterAttribute.Border, "0");
                writer.AddStyleAttribute(HtmlTextWriterStyle.Width, "100%");
                writer.RenderBeginTag(HtmlTextWriterTag.Table);

                RenderItems(writer, item, args);

                writer.RenderEndTag(); //table

                #endregion

                writer.RenderEndTag(); //inner DIV

                writer.RenderEndTag(); //Fieldset
                writer.RenderEndTag(); //outer DIV
                writer.RenderEndTag(); //td
                writer.RenderEndTag(); //tr
            }
        }
コード例 #9
0
        private void ActualizeSingleToDoRow(GridExtended grid, ToDos toDos)
        {
            grid.Children.Clear();
            grid.DataObject             = new ToDos4Grid(toDos);
            grid.FocusElementInEditMode = 2;

            TextBlock labelNummer = new TextBlock
            {
                Text       = toDos.Nummer.ToString(),
                Visibility = Visibility.Collapsed
            };

            grid.Add2Children(labelNummer, true);

            TextBlock labelBezeichnung = new TextBlock
            {
                Text = toDos.Bezeichnung,
                HorizontalAlignment = HorizontalAlignment.Stretch,
                VerticalAlignment   = VerticalAlignment.Center,
                Foreground          = Layout.WindowForeground
            };

            Grid.SetColumn(labelBezeichnung, 0);
            Grid.SetColumnSpan(labelBezeichnung, 5);
            grid.Add2Children(labelBezeichnung);

            if (this.core.GetKategorie(toDos.Kategorie_Nr) == "Kaufen")
            {
                TextBlock labelKosten = new TextBlock
                {
                    Text = toDos.Kosten.ToString("C"),
                    HorizontalAlignment = HorizontalAlignment.Stretch,
                    VerticalAlignment   = VerticalAlignment.Center,
                    Foreground          = Layout.WindowForeground
                };

                Grid.SetColumn(labelKosten, 5);
                Grid.SetColumnSpan(labelKosten, 2);
                grid.Add2Children(labelKosten);

                BaseCheckBox chkErledigt = new BaseCheckBox
                {
                    IsChecked           = toDos.ProzentErledigt == 100,
                    HorizontalAlignment = HorizontalAlignment.Center,
                    VerticalAlignment   = VerticalAlignment.Center
                };
                chkErledigt.CheckedChanged += ChkErledigt_CheckedChanged;

                Grid.SetColumn(chkErledigt, 7);
                Grid.SetColumnSpan(chkErledigt, 2);
                grid.Add2Children(chkErledigt);
            }
            else if (this.core.GetKategorie(toDos.Kategorie_Nr) == "Machen")
            {
                //TODO: create custom user control to handle custom type Time properly
                TextBlock labelZeit = new TextBlock
                {
                    Text = toDos.Zeit.ToString(),
                    HorizontalAlignment = HorizontalAlignment.Stretch,
                    VerticalAlignment   = VerticalAlignment.Center,
                    Foreground          = Layout.WindowForeground
                };

                Grid.SetColumn(labelZeit, 5);
                Grid.SetColumnSpan(labelZeit, 2);
                grid.Add2Children(labelZeit);

                ComboBox comboProzentErledigt = new ComboBox
                {
                    HorizontalAlignment = HorizontalAlignment.Stretch,
                    VerticalAlignment   = VerticalAlignment.Center,
                    Foreground          = Layout.WindowForeground
                };
                comboProzentErledigt.SelectionChanged += ComboProzentErledigt_SelectionChanged;

                for (int i = 0; i <= 100; i = i + 5)
                {
                    comboProzentErledigt.Items.Add(new ComboBoxItem {
                        Content = i + "%"
                    });
                    if (i == toDos.ProzentErledigt)
                    {
                        comboProzentErledigt.SelectedIndex = comboProzentErledigt.Items.Count - 1;
                    }
                }

                Grid.SetColumn(comboProzentErledigt, 7);
                Grid.SetColumnSpan(comboProzentErledigt, 2);
                grid.Add2Children(comboProzentErledigt);
            }

            CustomButton buttonDelToDo = new CustomButton
            {
                Text                = "",
                ImageSource         = ResourceConstants.DelIcon,
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment   = VerticalAlignment.Center
            };

            buttonDelToDo.Click += DelTodo_Click;
            Grid.SetColumn(buttonDelToDo, 9);
            grid.Children.Add(buttonDelToDo);
        }