Example #1
0
        public override sealed void DrawControls()
        {
            int top = 42;

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            MainProcess.CreateLabel("³��������� �����", 10, top, 230,
                MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            currentNomenclatureLabel = MainProcess.CreateLabel(string.Empty, 10, top, 230,
               MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            MainProcess.CreateLabel("��� ������", 10, top, 100,
               MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular);

            currentStickerIdTextBox = MainProcess.CreateTextBox(120, top, 80, string.Empty, ControlsStyle.LabelNormal, palletCodeEntered, false);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS * 3;
            printTaskLabel = MainProcess.CreateLabel(string.Empty, 10, top, 230,
               MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS * 2;
            complateButton = MainProcess.CreateButton("������������     (F4)", 5, top, 230, 35, string.Empty, complateProcess);

            updatePrintTask();
        }
Example #2
0
 private void resetFormToolStripMenuItem_Click(object sender, EventArgs e)
 {
     NameTextbox.Clear();
     EmailTextBox.Clear();
     MobileTextBox.Clear();
     AddressTextBox.Clear();
 }
Example #3
0
        public override sealed void DrawControls()
        {
            int top = 42;


            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            MainProcess.CreateLabel("Відскануйте піддон", 10, top, 230,
                                    MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            currentNomenclatureLabel = MainProcess.CreateLabel(string.Empty, 10, top, 230,
                                                               MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            MainProcess.CreateLabel("Код палети", 10, top, 100,
                                    MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular);

            currentStickerIdTextBox = MainProcess.CreateTextBox(120, top, 80, string.Empty, ControlsStyle.LabelNormal, palletCodeEntered, false);

            top           += VERTICAL_DISTANCE_BETWEEN_CONTROLS * 3;
            printTaskLabel = MainProcess.CreateLabel(string.Empty, 10, top, 230,
                                                     MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            top           += VERTICAL_DISTANCE_BETWEEN_CONTROLS * 2;
            complateButton = MainProcess.CreateButton("Роздрукувати     (F4)", 5, top, 230, 35, string.Empty, complateProcess);

            updatePrintTask();
        }
Example #4
0
        protected override MvcDynamicForms.Fields.Field GetTextBox(FieldAttributes fieldAttributes, double formWidth, double formHeight, string controlValue)
        {
            var textBox = new MobileTextBox(fieldAttributes, formWidth, formHeight)
            {
                Value = controlValue
            };

            return(textBox);
        }
Example #5
0
        public static int GetNumber(this MobileTextBox textBox)
        {
            if (string.IsNullOrEmpty(textBox.Text))
            {
                return(0);
            }

            try
            {
                return(Convert.ToInt32(textBox.Text));
            }
            catch
            {
                return(0);
            }
        }
Example #6
0
        private void DrawForm1Controls()
        {
            MainProcess.CreateLabel("Дата накладной:", 8, 70, 160, ControlsStyle.LabelNormal);
            MainProcess.CreateLabel(".", 57, 95, 8, ControlsStyle.LabelNormal);
            MainProcess.CreateLabel(".", 118, 95, 8, ControlsStyle.LabelNormal);

            dayTextBox        = (MobileTextBox)MainProcess.CreateTextBox(9, 95, 41, string.Empty, ControlsStyle.LabelLarge, false);
            monthTextBox      = (MobileTextBox)MainProcess.CreateTextBox(71, 95, 41, string.Empty, ControlsStyle.LabelLarge, false);
            monthTextBox.Text = DateTime.Now.Month.ToString();
            yearTextBox       = (MobileTextBox)MainProcess.CreateTextBox(132, 95, 71, string.Empty, ControlsStyle.LabelLarge, false);
            yearTextBox.Text  = DateTime.Now.Year.ToString();

            MainProcess.CreateLabel("Количество лет гарантии:", 8, 175, 224, ControlsStyle.LabelNormal);
            warrantyYearsQuantityTextBox      = (MobileTextBox)MainProcess.CreateTextBox(9, 207, 47, string.Empty, ControlsStyle.LabelLarge, false);
            warrantyYearsQuantityTextBox.Text = "0";

            MainProcess.CreateButton("Створити документ", 9, 250, 225, 40, string.Empty, startProcess);
        }
 private void InitializeComponent()
 {
     dotNetLab.Widgets.UIBinding.UIElementBinderInfo uIElementBinderInfo = new dotNetLab.Widgets.UIBinding.UIElementBinderInfo();
     mobileTextBox4  = new dotNetLab.Widgets.MobileTextBox();
     colorDecorator1 = new dotNetLab.Widgets.ColorDecorator();
     card2           = new dotNetLab.Widgets.Card();
     lnk_OpenCurrentProjectFolder = new System.Windows.Forms.LinkLabel();
     lnk_CommunicationWizard      = new System.Windows.Forms.LinkLabel();
     linkLabel1              = new System.Windows.Forms.LinkLabel();
     label3                  = new System.Windows.Forms.Label();
     cbx_ApplyPriority       = new dotNetLab.Widgets.Toggle();
     lnk_UseDataCenter       = new System.Windows.Forms.LinkLabel();
     lnk_ManualRun           = new System.Windows.Forms.LinkLabel();
     label2                  = new System.Windows.Forms.Label();
     label1                  = new System.Windows.Forms.Label();
     lnk_Makeup              = new System.Windows.Forms.LinkLabel();
     lnk_RetriveLogs         = new System.Windows.Forms.LinkLabel();
     lnk_CommunicationConfig = new System.Windows.Forms.LinkLabel();
     textBlock2              = new dotNetLab.Widgets.TextBlock();
     card1 = new dotNetLab.Widgets.Card();
     cmbx_DeleteProject = new System.Windows.Forms.ComboBox();
     cmbx_NewProjectBaseOnWhichProject = new System.Windows.Forms.ComboBox();
     cmbx_CurrentProjectName           = new System.Windows.Forms.ComboBox();
     btn_DeleteProject = new dotNetLab.Widgets.MobileButton();
     textBlock5        = new dotNetLab.Widgets.TextBlock();
     txb_NewProject    = new dotNetLab.Widgets.MobileTextBox();
     textBlock6        = new dotNetLab.Widgets.TextBlock();
     textBlock4        = new dotNetLab.Widgets.TextBlock();
     textBlock3        = new dotNetLab.Widgets.TextBlock();
     textBlock1        = new dotNetLab.Widgets.TextBlock();
     card2.SuspendLayout();
     card1.SuspendLayout();
     SuspendLayout();
     tipper.Location                             = new System.Drawing.Point(297, 446);
     mobileTextBox4.ActiveColor                  = System.Drawing.Color.Cyan;
     mobileTextBox4.BackColor                    = System.Drawing.Color.Transparent;
     uIElementBinderInfo.DBEngineIndex           = 0;
     uIElementBinderInfo.EnableCheckBox_One_Zero = false;
     uIElementBinderInfo.FieldName               = "Val";
     uIElementBinderInfo.Filter                  = "Name='AutoClearTime' ";
     uIElementBinderInfo.Ptr                     = null;
     uIElementBinderInfo.StoreInDB               = true;
     uIElementBinderInfo.StoreIntoDBRealTime     = true;
     uIElementBinderInfo.TableName               = "App_Extension_Data_Table";
     uIElementBinderInfo.ThisControl             = mobileTextBox4;
     mobileTextBox4.DataBindingInfo              = uIElementBinderInfo;
     mobileTextBox4.DoubleValue                  = double.NaN;
     mobileTextBox4.EnableMobileRound            = true;
     mobileTextBox4.EnableNullValue              = false;
     mobileTextBox4.FillColor                    = System.Drawing.Color.Transparent;
     mobileTextBox4.FloatValue                   = float.NaN;
     mobileTextBox4.Font                         = new System.Drawing.Font("微软雅黑", 13f);
     mobileTextBox4.ForeColor                    = System.Drawing.Color.Black;
     mobileTextBox4.GreyPattern                  = false;
     mobileTextBox4.IntValue                     = -2147483648;
     mobileTextBox4.LineThickness                = 2f;
     mobileTextBox4.Location                     = new System.Drawing.Point(86, 259);
     mobileTextBox4.MainBindableProperty         = "";
     mobileTextBox4.Name                         = "mobileTextBox4";
     mobileTextBox4.Radius                       = 29;
     mobileTextBox4.Size                         = new System.Drawing.Size(73, 30);
     mobileTextBox4.StaticColor                  = System.Drawing.Color.Gray;
     mobileTextBox4.TabIndex                     = 3;
     mobileTextBox4.TextAlignment                = System.Windows.Forms.HorizontalAlignment.Center;
     mobileTextBox4.TextBackColor                = System.Drawing.SystemColors.Window;
     mobileTextBox4.TextBoxStyle                 = dotNetLab.Widgets.MobileTextBox.TextBoxStyles.Mobile;
     mobileTextBox4.UIElementBinders             = null;
     mobileTextBox4.WhitePattern                 = false;
     colorDecorator1.BackColor                   = System.Drawing.Color.White;
     colorDecorator1.DataBindingInfo             = null;
     colorDecorator1.Location                    = new System.Drawing.Point(10, 466);
     colorDecorator1.MainBindableProperty        = "";
     colorDecorator1.Name                        = "colorDecorator1";
     colorDecorator1.Size                        = new System.Drawing.Size(150, 53);
     colorDecorator1.TabIndex                    = 1;
     colorDecorator1.UIElementBinders            = null;
     card2.BackColor                             = System.Drawing.Color.Transparent;
     card2.BorderColor                           = System.Drawing.Color.Gray;
     card2.BorderThickness                       = 0;
     card2.Controls.Add(lnk_OpenCurrentProjectFolder);
     card2.Controls.Add(lnk_CommunicationWizard);
     card2.Controls.Add(linkLabel1);
     card2.Controls.Add(label3);
     card2.Controls.Add(cbx_ApplyPriority);
     card2.Controls.Add(lnk_UseDataCenter);
     card2.Controls.Add(lnk_ManualRun);
     card2.Controls.Add(label2);
     card2.Controls.Add(label1);
     card2.Controls.Add(mobileTextBox4);
     card2.Controls.Add(lnk_Makeup);
     card2.Controls.Add(lnk_RetriveLogs);
     card2.Controls.Add(lnk_CommunicationConfig);
     card2.Controls.Add(textBlock2);
     card2.CornerAlignment                     = dotNetLab.Widgets.Alignments.All;
     card2.DataBindingInfo                     = null;
     card2.Font                                = new System.Drawing.Font("微软雅黑", 11f);
     card2.HeadColor                           = System.Drawing.Color.Purple;
     card2.HeaderAlignment                     = dotNetLab.Widgets.Alignments.Right;
     card2.HeadHeight                          = 30;
     card2.ImagePos                            = new System.Drawing.Point(0, 0);
     card2.ImageSize                           = new System.Drawing.Size(0, 0);
     card2.Location                            = new System.Drawing.Point(327, 77);
     card2.MainBindableProperty                = "card1";
     card2.Name                                = "card2";
     card2.NormalColor                         = System.Drawing.Color.Snow;
     card2.Radius                              = 10;
     card2.Size                                = new System.Drawing.Size(247, 383);
     card2.Source                              = null;
     card2.TabIndex                            = 2;
     card2.Text                                = "card1";
     card2.UIElementBinders                    = null;
     lnk_OpenCurrentProjectFolder.AutoSize     = true;
     lnk_OpenCurrentProjectFolder.Location     = new System.Drawing.Point(48, 155);
     lnk_OpenCurrentProjectFolder.Name         = "lnk_OpenCurrentProjectFolder";
     lnk_OpenCurrentProjectFolder.Size         = new System.Drawing.Size(129, 20);
     lnk_OpenCurrentProjectFolder.TabIndex     = 10;
     lnk_OpenCurrentProjectFolder.TabStop      = true;
     lnk_OpenCurrentProjectFolder.Text         = "打开当前作业目录";
     lnk_OpenCurrentProjectFolder.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(lnk_OpenCurrentProjectFolder_LinkClicked);
     lnk_CommunicationWizard.AutoSize          = true;
     lnk_CommunicationWizard.Location          = new System.Drawing.Point(80, 122);
     lnk_CommunicationWizard.Name              = "lnk_CommunicationWizard";
     lnk_CommunicationWizard.Size              = new System.Drawing.Size(54, 20);
     lnk_CommunicationWizard.TabIndex          = 10;
     lnk_CommunicationWizard.TabStop           = true;
     lnk_CommunicationWizard.Text              = "通讯表";
     lnk_CommunicationWizard.LinkClicked      += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(lnk_CommunicationWizard_LinkClicked);
     linkLabel1.AutoSize                       = true;
     linkLabel1.Location                       = new System.Drawing.Point(75, 83);
     linkLabel1.Name                           = "linkLabel1";
     linkLabel1.Size                           = new System.Drawing.Size(69, 20);
     linkLabel1.TabIndex                       = 10;
     linkLabel1.TabStop                        = true;
     linkLabel1.Text                           = "作业管理";
     linkLabel1.LinkClicked                   += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(linkLabel1_LinkClicked);
     label3.AutoSize                           = true;
     label3.Location                           = new System.Drawing.Point(11, 190);
     label3.Name                               = "label3";
     label3.Size                               = new System.Drawing.Size(69, 20);
     label3.TabIndex                           = 9;
     label3.Text                               = "权限管理";
     cbx_ApplyPriority.BackColor               = System.Drawing.Color.Transparent;
     cbx_ApplyPriority.BlockColor              = System.Drawing.Color.DarkGray;
     cbx_ApplyPriority.BorderColor             = System.Drawing.Color.DarkGray;
     cbx_ApplyPriority.BottomColor             = System.Drawing.Color.DodgerBlue;
     cbx_ApplyPriority.Checked                 = false;
     cbx_ApplyPriority.DataBindingInfo         = null;
     cbx_ApplyPriority.Location                = new System.Drawing.Point(99, 189);
     cbx_ApplyPriority.MainBindableProperty    = "";
     cbx_ApplyPriority.Name                    = "cbx_ApplyPriority";
     cbx_ApplyPriority.Size                    = new System.Drawing.Size(45, 22);
     cbx_ApplyPriority.TabIndex                = 8;
     cbx_ApplyPriority.UIElementBinders        = null;
     cbx_ApplyPriority.Click                  += new System.EventHandler(cbx_ApplyPriority_Click);
     lnk_UseDataCenter.AutoSize                = true;
     lnk_UseDataCenter.Location                = new System.Drawing.Point(63, 226);
     lnk_UseDataCenter.Name                    = "lnk_UseDataCenter";
     lnk_UseDataCenter.Size                    = new System.Drawing.Size(99, 20);
     lnk_UseDataCenter.TabIndex                = 5;
     lnk_UseDataCenter.TabStop                 = true;
     lnk_UseDataCenter.Text                    = "使用数据中心";
     lnk_UseDataCenter.LinkClicked            += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(lnk_UseDataCenter_LinkClicked);
     lnk_ManualRun.AutoSize                    = true;
     lnk_ManualRun.Location                    = new System.Drawing.Point(75, 48);
     lnk_ManualRun.Name                        = "lnk_ManualRun";
     lnk_ManualRun.Size                        = new System.Drawing.Size(69, 20);
     lnk_ManualRun.TabIndex                    = 5;
     lnk_ManualRun.TabStop                     = true;
     lnk_ManualRun.Text                        = "手动操作";
     lnk_ManualRun.LinkClicked                += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(lnk_ManualRun_LinkClicked);
     label2.AutoSize                           = true;
     label2.Location                           = new System.Drawing.Point(165, 264);
     label2.Name                               = "label2";
     label2.Size                               = new System.Drawing.Size(24, 20);
     label2.TabIndex                           = 4;
     label2.Text                               = "天";
     label1.AutoSize                           = true;
     label1.Location                           = new System.Drawing.Point(11, 263);
     label1.Name                               = "label1";
     label1.Size                               = new System.Drawing.Size(69, 20);
     label1.TabIndex                           = 4;
     label1.Text                               = "自动清理";
     lnk_Makeup.AutoSize                       = true;
     lnk_Makeup.Location                       = new System.Drawing.Point(75, 331);
     lnk_Makeup.Name                           = "lnk_Makeup";
     lnk_Makeup.Size                           = new System.Drawing.Size(54, 20);
     lnk_Makeup.TabIndex                       = 1;
     lnk_Makeup.TabStop                        = true;
     lnk_Makeup.Text                           = "补偿值";
     lnk_Makeup.LinkClicked                   += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(lnk_Makeup_LinkClicked);
     lnk_RetriveLogs.AutoSize                  = true;
     lnk_RetriveLogs.Location                  = new System.Drawing.Point(62, 304);
     lnk_RetriveLogs.Name                      = "lnk_RetriveLogs";
     lnk_RetriveLogs.Size                      = new System.Drawing.Size(99, 20);
     lnk_RetriveLogs.TabIndex                  = 1;
     lnk_RetriveLogs.TabStop                   = true;
     lnk_RetriveLogs.Text                      = "查询往期日志";
     lnk_RetriveLogs.LinkClicked              += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(lnk_RetriveLogs_LinkClicked);
     lnk_CommunicationConfig.AutoSize          = true;
     lnk_CommunicationConfig.Location          = new System.Drawing.Point(75, 14);
     lnk_CommunicationConfig.Name              = "lnk_CommunicationConfig";
     lnk_CommunicationConfig.Size              = new System.Drawing.Size(69, 20);
     lnk_CommunicationConfig.TabIndex          = 1;
     lnk_CommunicationConfig.TabStop           = true;
     lnk_CommunicationConfig.Text              = "通讯配置";
     lnk_CommunicationConfig.LinkClicked      += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(lnk_CommunicationConfig_LinkClicked);
     textBlock2.BackColor                      = System.Drawing.Color.Transparent;
     textBlock2.BorderColor                    = System.Drawing.Color.Empty;
     textBlock2.BorderThickness                = 0;
     textBlock2.DataBindingInfo                = null;
     textBlock2.EnableFlag                     = false;
     textBlock2.EnableTextRenderHint           = false;
     textBlock2.FlagAlign                      = dotNetLab.Widgets.Alignments.Left;
     textBlock2.FlagColor                      = System.Drawing.Color.DodgerBlue;
     textBlock2.FlagThickness                  = 5;
     textBlock2.Font                           = new System.Drawing.Font("微软雅黑", 12f);
     textBlock2.ForeColor                      = System.Drawing.Color.White;
     textBlock2.GapBetweenTextFlag             = 10;
     textBlock2.LEDStyle                       = false;
     textBlock2.Location                       = new System.Drawing.Point(213, 139);
     textBlock2.MainBindableProperty           = "杂项";
     textBlock2.Name                           = "textBlock2";
     textBlock2.Radius                         = 0;
     textBlock2.Size                           = new System.Drawing.Size(27, 48);
     textBlock2.TabIndex                       = 0;
     textBlock2.Text                           = "杂项";
     textBlock2.UIElementBinders               = null;
     textBlock2.UnderLine                      = false;
     textBlock2.UnderLineColor                 = System.Drawing.Color.DarkGray;
     textBlock2.UnderLineThickness             = 2f;
     textBlock2.Vertical                       = true;
     textBlock2.WhereReturn                    = 0;
     card1.BackColor                           = System.Drawing.Color.Transparent;
     card1.BorderColor                         = System.Drawing.Color.Gray;
     card1.BorderThickness                     = 0;
     card1.Controls.Add(cmbx_DeleteProject);
     card1.Controls.Add(cmbx_NewProjectBaseOnWhichProject);
     card1.Controls.Add(cmbx_CurrentProjectName);
     card1.Controls.Add(btn_DeleteProject);
     card1.Controls.Add(textBlock5);
     card1.Controls.Add(txb_NewProject);
     card1.Controls.Add(textBlock6);
     card1.Controls.Add(textBlock4);
     card1.Controls.Add(textBlock3);
     card1.Controls.Add(textBlock1);
     card1.CornerAlignment                               = dotNetLab.Widgets.Alignments.All;
     card1.DataBindingInfo                               = null;
     card1.Font                                          = new System.Drawing.Font("微软雅黑", 11f);
     card1.HeadColor                                     = System.Drawing.Color.DodgerBlue;
     card1.HeaderAlignment                               = dotNetLab.Widgets.Alignments.Up;
     card1.HeadHeight                                    = 40;
     card1.ImagePos                                      = new System.Drawing.Point(0, 0);
     card1.ImageSize                                     = new System.Drawing.Size(0, 0);
     card1.Location                                      = new System.Drawing.Point(53, 77);
     card1.MainBindableProperty                          = "card1";
     card1.Name                                          = "card1";
     card1.NormalColor                                   = System.Drawing.Color.Snow;
     card1.Radius                                        = 10;
     card1.Size                                          = new System.Drawing.Size(259, 383);
     card1.Source                                        = null;
     card1.TabIndex                                      = 3;
     card1.Text                                          = "card1";
     card1.UIElementBinders                              = null;
     cmbx_DeleteProject.BackColor                        = System.Drawing.Color.DarkGray;
     cmbx_DeleteProject.FlatStyle                        = System.Windows.Forms.FlatStyle.Flat;
     cmbx_DeleteProject.ForeColor                        = System.Drawing.Color.Black;
     cmbx_DeleteProject.FormattingEnabled                = true;
     cmbx_DeleteProject.Location                         = new System.Drawing.Point(24, 282);
     cmbx_DeleteProject.Name                             = "cmbx_DeleteProject";
     cmbx_DeleteProject.Size                             = new System.Drawing.Size(218, 28);
     cmbx_DeleteProject.TabIndex                         = 8;
     cmbx_NewProjectBaseOnWhichProject.BackColor         = System.Drawing.Color.DarkGray;
     cmbx_NewProjectBaseOnWhichProject.FlatStyle         = System.Windows.Forms.FlatStyle.Flat;
     cmbx_NewProjectBaseOnWhichProject.ForeColor         = System.Drawing.Color.Black;
     cmbx_NewProjectBaseOnWhichProject.FormattingEnabled = true;
     cmbx_NewProjectBaseOnWhichProject.Location          = new System.Drawing.Point(24, 203);
     cmbx_NewProjectBaseOnWhichProject.Name              = "cmbx_NewProjectBaseOnWhichProject";
     cmbx_NewProjectBaseOnWhichProject.Size              = new System.Drawing.Size(218, 28);
     cmbx_NewProjectBaseOnWhichProject.TabIndex          = 8;
     cmbx_CurrentProjectName.BackColor                   = System.Drawing.Color.DarkGray;
     cmbx_CurrentProjectName.FlatStyle                   = System.Windows.Forms.FlatStyle.Flat;
     cmbx_CurrentProjectName.ForeColor                   = System.Drawing.Color.Black;
     cmbx_CurrentProjectName.FormattingEnabled           = true;
     cmbx_CurrentProjectName.Location                    = new System.Drawing.Point(24, 75);
     cmbx_CurrentProjectName.Name                        = "cmbx_CurrentProjectName";
     cmbx_CurrentProjectName.Size                        = new System.Drawing.Size(218, 28);
     cmbx_CurrentProjectName.TabIndex                    = 8;
     btn_DeleteProject.BackColor                         = System.Drawing.Color.Transparent;
     btn_DeleteProject.BorderColor                       = System.Drawing.Color.Empty;
     btn_DeleteProject.BorderThickness                   = 0;
     btn_DeleteProject.CornerAligment                    = dotNetLab.Widgets.Alignments.All;
     btn_DeleteProject.DataBindingInfo                   = null;
     btn_DeleteProject.EnableFlag                        = false;
     btn_DeleteProject.EnableMobileRound                 = true;
     btn_DeleteProject.EnableTextRenderHint              = false;
     btn_DeleteProject.FlagAlign                         = dotNetLab.Widgets.Alignments.Left;
     btn_DeleteProject.FlagColor                         = System.Drawing.Color.DodgerBlue;
     btn_DeleteProject.FlagThickness                     = 5;
     btn_DeleteProject.Font                              = new System.Drawing.Font("微软雅黑", 12f);
     btn_DeleteProject.ForeColor                         = System.Drawing.Color.White;
     btn_DeleteProject.GapBetweenTextFlag                = 10;
     btn_DeleteProject.GapBetweenTextImage               = 8;
     btn_DeleteProject.IConAlignment                     = System.Windows.Forms.LeftRightAlignment.Left;
     btn_DeleteProject.ImageSize                         = new System.Drawing.Size(0, 0);
     btn_DeleteProject.LEDStyle                          = false;
     btn_DeleteProject.Location                          = new System.Drawing.Point(12, 331);
     btn_DeleteProject.MainBindableProperty              = "删除";
     btn_DeleteProject.Name                              = "btn_DeleteProject";
     btn_DeleteProject.NeedAnimation                     = true;
     btn_DeleteProject.NormalColor                       = System.Drawing.Color.Red;
     btn_DeleteProject.PressColor                        = System.Drawing.Color.Cyan;
     btn_DeleteProject.Radius                            = 34;
     btn_DeleteProject.Size                              = new System.Drawing.Size(230, 35);
     btn_DeleteProject.Source                            = null;
     btn_DeleteProject.TabIndex                          = 7;
     btn_DeleteProject.Text                              = "删除";
     btn_DeleteProject.UIElementBinders                  = null;
     btn_DeleteProject.UnderLine                         = false;
     btn_DeleteProject.UnderLineColor                    = System.Drawing.Color.DarkGray;
     btn_DeleteProject.UnderLineThickness                = 2f;
     btn_DeleteProject.Vertical                          = false;
     btn_DeleteProject.WhereReturn                       = 0;
     textBlock5.BackColor                                = System.Drawing.Color.Transparent;
     textBlock5.BorderColor                              = System.Drawing.Color.Empty;
     textBlock5.BorderThickness                          = 0;
     textBlock5.DataBindingInfo                          = null;
     textBlock5.EnableFlag                               = true;
     textBlock5.EnableTextRenderHint                     = true;
     textBlock5.FlagAlign                                = dotNetLab.Widgets.Alignments.Left;
     textBlock5.FlagColor                                = System.Drawing.Color.Gold;
     textBlock5.FlagThickness                            = 7;
     textBlock5.Font                                     = new System.Drawing.Font("微软雅黑", 12f);
     textBlock5.GapBetweenTextFlag                       = 10;
     textBlock5.LEDStyle                                 = false;
     textBlock5.Location                                 = new System.Drawing.Point(12, 256);
     textBlock5.MainBindableProperty                     = "删除项目";
     textBlock5.Name                                     = "textBlock5";
     textBlock5.Radius                                   = 0;
     textBlock5.Size                                     = new System.Drawing.Size(96, 20);
     textBlock5.TabIndex                                 = 5;
     textBlock5.Text                                     = "删除项目";
     textBlock5.UIElementBinders                         = null;
     textBlock5.UnderLine                                = false;
     textBlock5.UnderLineColor                           = System.Drawing.Color.DarkGray;
     textBlock5.UnderLineThickness                       = 2f;
     textBlock5.Vertical                                 = false;
     textBlock5.WhereReturn                              = 0;
     txb_NewProject.ActiveColor                          = System.Drawing.Color.Silver;
     txb_NewProject.BackColor                            = System.Drawing.Color.Transparent;
     txb_NewProject.DataBindingInfo                      = null;
     txb_NewProject.DoubleValue                          = double.NaN;
     txb_NewProject.EnableMobileRound                    = true;
     txb_NewProject.EnableNullValue                      = false;
     txb_NewProject.FillColor                            = System.Drawing.Color.Silver;
     txb_NewProject.FloatValue                           = float.NaN;
     txb_NewProject.Font                                 = new System.Drawing.Font("微软雅黑", 13f);
     txb_NewProject.ForeColor                            = System.Drawing.Color.Black;
     txb_NewProject.GreyPattern                          = true;
     txb_NewProject.IntValue                             = -2147483648;
     txb_NewProject.LineThickness                        = 2f;
     txb_NewProject.Location                             = new System.Drawing.Point(12, 135);
     txb_NewProject.MainBindableProperty                 = "";
     txb_NewProject.Name                                 = "txb_NewProject";
     txb_NewProject.Radius                               = 30;
     txb_NewProject.Size                                 = new System.Drawing.Size(230, 31);
     txb_NewProject.StaticColor                          = System.Drawing.Color.Silver;
     txb_NewProject.TabIndex                             = 3;
     txb_NewProject.TextAlignment                        = System.Windows.Forms.HorizontalAlignment.Left;
     txb_NewProject.TextBackColor                        = System.Drawing.Color.Silver;
     txb_NewProject.TextBoxStyle                         = dotNetLab.Widgets.MobileTextBox.TextBoxStyles.Mobile;
     txb_NewProject.UIElementBinders                     = null;
     txb_NewProject.WhitePattern                         = false;
     textBlock6.BackColor                                = System.Drawing.Color.Transparent;
     textBlock6.BorderColor                              = System.Drawing.Color.Empty;
     textBlock6.BorderThickness                          = 0;
     textBlock6.DataBindingInfo                          = null;
     textBlock6.EnableFlag                               = true;
     textBlock6.EnableTextRenderHint                     = true;
     textBlock6.FlagAlign                                = dotNetLab.Widgets.Alignments.Left;
     textBlock6.FlagColor                                = System.Drawing.Color.DeepSkyBlue;
     textBlock6.FlagThickness                            = 7;
     textBlock6.Font                                     = new System.Drawing.Font("微软雅黑", 12f);
     textBlock6.GapBetweenTextFlag                       = 10;
     textBlock6.LEDStyle                                 = false;
     textBlock6.Location                                 = new System.Drawing.Point(12, 175);
     textBlock6.MainBindableProperty                     = "基于此项目创建新项目";
     textBlock6.Name                                     = "textBlock6";
     textBlock6.Radius                                   = 0;
     textBlock6.Size                                     = new System.Drawing.Size(193, 20);
     textBlock6.TabIndex                                 = 1;
     textBlock6.Text                                     = "基于此项目创建新项目";
     textBlock6.UIElementBinders                         = null;
     textBlock6.UnderLine                                = false;
     textBlock6.UnderLineColor                           = System.Drawing.Color.DarkGray;
     textBlock6.UnderLineThickness                       = 2f;
     textBlock6.Vertical                                 = false;
     textBlock6.WhereReturn                              = 0;
     textBlock4.BackColor                                = System.Drawing.Color.Transparent;
     textBlock4.BorderColor                              = System.Drawing.Color.Empty;
     textBlock4.BorderThickness                          = 0;
     textBlock4.DataBindingInfo                          = null;
     textBlock4.EnableFlag                               = true;
     textBlock4.EnableTextRenderHint                     = true;
     textBlock4.FlagAlign                                = dotNetLab.Widgets.Alignments.Left;
     textBlock4.FlagColor                                = System.Drawing.Color.Green;
     textBlock4.FlagThickness                            = 7;
     textBlock4.Font                                     = new System.Drawing.Font("微软雅黑", 12f);
     textBlock4.GapBetweenTextFlag                       = 10;
     textBlock4.LEDStyle                                 = false;
     textBlock4.Location                                 = new System.Drawing.Point(12, 109);
     textBlock4.MainBindableProperty                     = "新建项目";
     textBlock4.Name                                     = "textBlock4";
     textBlock4.Radius                                   = 0;
     textBlock4.Size                                     = new System.Drawing.Size(96, 20);
     textBlock4.TabIndex                                 = 1;
     textBlock4.Text                                     = "新建项目";
     textBlock4.UIElementBinders                         = null;
     textBlock4.UnderLine                                = false;
     textBlock4.UnderLineColor                           = System.Drawing.Color.DarkGray;
     textBlock4.UnderLineThickness                       = 2f;
     textBlock4.Vertical                                 = false;
     textBlock4.WhereReturn                              = 0;
     textBlock3.BackColor                                = System.Drawing.Color.Transparent;
     textBlock3.BorderColor                              = System.Drawing.Color.Empty;
     textBlock3.BorderThickness                          = 0;
     textBlock3.DataBindingInfo                          = null;
     textBlock3.EnableFlag                               = true;
     textBlock3.EnableTextRenderHint                     = true;
     textBlock3.FlagAlign                                = dotNetLab.Widgets.Alignments.Left;
     textBlock3.FlagColor                                = System.Drawing.Color.Crimson;
     textBlock3.FlagThickness                            = 7;
     textBlock3.Font                                     = new System.Drawing.Font("微软雅黑", 12f);
     textBlock3.GapBetweenTextFlag                       = 10;
     textBlock3.LEDStyle                                 = false;
     textBlock3.Location                                 = new System.Drawing.Point(12, 46);
     textBlock3.MainBindableProperty                     = "当前项目";
     textBlock3.Name                                     = "textBlock3";
     textBlock3.Radius                                   = 0;
     textBlock3.Size                                     = new System.Drawing.Size(96, 20);
     textBlock3.TabIndex                                 = 1;
     textBlock3.Text                                     = "当前项目";
     textBlock3.UIElementBinders                         = null;
     textBlock3.UnderLine                                = false;
     textBlock3.UnderLineColor                           = System.Drawing.Color.DarkGray;
     textBlock3.UnderLineThickness                       = 2f;
     textBlock3.Vertical                                 = false;
     textBlock3.WhereReturn                              = 0;
     textBlock1.BackColor                                = System.Drawing.Color.Transparent;
     textBlock1.BorderColor                              = System.Drawing.Color.Empty;
     textBlock1.BorderThickness                          = 0;
     textBlock1.DataBindingInfo                          = null;
     textBlock1.EnableFlag                               = false;
     textBlock1.EnableTextRenderHint                     = false;
     textBlock1.FlagAlign                                = dotNetLab.Widgets.Alignments.Left;
     textBlock1.FlagColor                                = System.Drawing.Color.DodgerBlue;
     textBlock1.FlagThickness                            = 5;
     textBlock1.Font                                     = new System.Drawing.Font("微软雅黑", 12f);
     textBlock1.ForeColor                                = System.Drawing.Color.White;
     textBlock1.GapBetweenTextFlag                       = 10;
     textBlock1.LEDStyle                                 = false;
     textBlock1.Location                                 = new System.Drawing.Point(67, 14);
     textBlock1.MainBindableProperty                     = "项目管理";
     textBlock1.Name                                     = "textBlock1";
     textBlock1.Radius                                   = 0;
     textBlock1.Size                                     = new System.Drawing.Size(109, 17);
     textBlock1.TabIndex                                 = 0;
     textBlock1.Text                                     = "项目管理";
     textBlock1.UIElementBinders                         = null;
     textBlock1.UnderLine                                = false;
     textBlock1.UnderLineColor                           = System.Drawing.Color.DarkGray;
     textBlock1.UnderLineThickness                       = 2f;
     textBlock1.Vertical                                 = false;
     textBlock1.WhereReturn                              = 0;
     base.ClientSize                                     = new System.Drawing.Size(600, 531);
     base.Controls.Add(card2);
     base.Controls.Add(card1);
     base.Controls.Add(colorDecorator1);
     base.Name     = "MenuForm";
     Text          = "控制面板";
     base.TitlePos = new System.Drawing.Point(80, 15);
     base.Controls.SetChildIndex(colorDecorator1, 0);
     base.Controls.SetChildIndex(card1, 0);
     base.Controls.SetChildIndex(card2, 0);
     card2.ResumeLayout(false);
     card2.PerformLayout();
     card1.ResumeLayout(false);
     ResumeLayout(false);
 }
 private bool IsFormValid()
 {
     if (EmployeeNameTextBox.Text.Trim() == string.Empty)
     {
         Messages.ShowErrorMessage("Name is required");
         EmployeeNameTextBox.Focus();
         return(false);
     }
     if (CNICTextBox.Text.Trim() == string.Empty)
     {
         Messages.ShowErrorMessage("CNIC is required");
         CNICTextBox.Focus();
         return(false);
     }
     if ((TelephoneTextBox.Text.Trim() == string.Empty) && (MobileTextBox.Text.Trim() == string.Empty))
     {
         Messages.ShowErrorMessage("Mobile number or Telephone number is required");
         MobileTextBox.Focus();
         return(false);
     }
     if (GenderComboBox.SelectedIndex == -1)
     {
         Messages.ShowErrorMessage("Gender is required");
         GenderComboBox.Focus();
         return(false);
     }
     //if (BranchComboBox.SelectedIndex == -1)
     //{
     //	Messages.ShowErrorMessage("Branch is required");
     //	BranchComboBox.Focus();
     //	return false;
     //}
     if (AddressLineTextBox.Text.Trim() == string.Empty)
     {
         Messages.ShowErrorMessage("Address Line is required");
         AddressLineTextBox.Focus();
         return(false);
     }
     if (CityComboBox.SelectedIndex == -1)
     {
         Messages.ShowErrorMessage("City is required");
         CityComboBox.Focus();
         return(false);
     }
     if (DistrictComboBox.SelectedIndex == -1)
     {
         Messages.ShowErrorMessage("District is required");
         DistrictComboBox.Focus();
         return(false);
     }
     if (PostalCodeTextBox.Text.Trim() == string.Empty)
     {
         Messages.ShowErrorMessage("Postal Code is required");
         PostalCodeTextBox.Focus();
         return(false);
     }
     if (JobTitleComboBox.SelectedIndex == -1)
     {
         Messages.ShowErrorMessage("Job Title is required");
         JobTitleComboBox.Focus();
         return(false);
     }
     if (StartingSalaryTextBox.Text.Trim() == string.Empty)
     {
         Messages.ShowErrorMessage("Starting Salary is required");
         StartingSalaryTextBox.Focus();
         return(false);
     }
     else
     {
         if (Convert.ToDecimal(StartingSalaryTextBox.Text) <= 0)
         {
             Messages.ShowErrorMessage("Starting Salary cannot be zero or less than zero");
             StartingSalaryTextBox.Focus();
             return(false);
         }
     }
     if (CurrentSalaryTextBox.Text.Trim() == string.Empty)
     {
         Messages.ShowErrorMessage("Current Salary is required");
         CurrentSalaryTextBox.Focus();
         return(false);
     }
     else
     {
         if (Convert.ToDecimal(CurrentSalaryTextBox.Text) <= 0)
         {
             Messages.ShowErrorMessage("Current Salary cannot be zero or less than zero");
             CurrentSalaryTextBox.Focus();
             return(false);
         }
     }
     return(true);
 }
Example #9
0
 private void InitializeComponent()
 {
     panel1         = new System.Windows.Forms.Panel();
     label3         = new System.Windows.Forms.Label();
     label1         = new System.Windows.Forms.Label();
     textBlock1     = new dotNetLab.Widgets.TextBlock();
     canvasPanel1   = new dotNetLab.Widgets.Container.CanvasPanel();
     textBlock4     = new dotNetLab.Widgets.TextBlock();
     txb_TableName  = new dotNetLab.Widgets.MobileTextBox();
     cmbx_Kind      = new dotNetLab.Widgets.MobileComboBox();
     textBlock3     = new dotNetLab.Widgets.TextBlock();
     textBlock6     = new dotNetLab.Widgets.TextBlock();
     textBlock2     = new dotNetLab.Widgets.TextBlock();
     btn_DataCenter = new dotNetLab.Widgets.MobileButton();
     lbl_Status     = new dotNetLab.Widgets.TextBlock();
     panel1.SuspendLayout();
     canvasPanel1.SuspendLayout();
     SuspendLayout();
     panel1.BackColor = System.Drawing.Color.BlueViolet;
     panel1.Controls.Add(label3);
     panel1.Controls.Add(label1);
     panel1.Dock                     = System.Windows.Forms.DockStyle.Top;
     panel1.Location                 = new System.Drawing.Point(0, 0);
     panel1.Name                     = "panel1";
     panel1.Size                     = new System.Drawing.Size(611, 100);
     panel1.TabIndex                 = 2;
     label3.AutoSize                 = true;
     label3.Font                     = new System.Drawing.Font("MV Boli", 18f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
     label3.ForeColor                = System.Drawing.Color.White;
     label3.Location                 = new System.Drawing.Point(330, 32);
     label3.Name                     = "label3";
     label3.Size                     = new System.Drawing.Size(269, 31);
     label3.TabIndex                 = 5;
     label3.Text                     = "Communication Wizard";
     label1.AutoSize                 = true;
     label1.Font                     = new System.Drawing.Font("等线 Light", 25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
     label1.ForeColor                = System.Drawing.Color.White;
     label1.Location                 = new System.Drawing.Point(27, 32);
     label1.Name                     = "label1";
     label1.Size                     = new System.Drawing.Size(151, 36);
     label1.TabIndex                 = 0;
     label1.Text                     = "通讯向导";
     textBlock1.BackColor            = System.Drawing.Color.Transparent;
     textBlock1.BorderColor          = System.Drawing.Color.Empty;
     textBlock1.BorderThickness      = -1;
     textBlock1.DataBindingInfo      = null;
     textBlock1.EnableFlag           = true;
     textBlock1.EnableTextRenderHint = true;
     textBlock1.FlagAlign            = dotNetLab.Widgets.Alignments.Left;
     textBlock1.FlagColor            = System.Drawing.Color.DodgerBlue;
     textBlock1.FlagThickness        = 8;
     textBlock1.Font                 = new System.Drawing.Font("微软雅黑", 12f);
     textBlock1.ForeColor            = System.Drawing.Color.DimGray;
     textBlock1.GapBetweenTextFlag   = 10;
     textBlock1.LEDStyle             = false;
     textBlock1.Location             = new System.Drawing.Point(12, 121);
     textBlock1.MainBindableProperty = "新增通讯表";
     textBlock1.Name                 = "textBlock1";
     textBlock1.Radius               = -1;
     textBlock1.Size                 = new System.Drawing.Size(113, 25);
     textBlock1.TabIndex             = 3;
     textBlock1.Text                 = "新增通讯表";
     textBlock1.UIElementBinders     = null;
     textBlock1.UnderLine            = false;
     textBlock1.UnderLineColor       = System.Drawing.Color.DarkGray;
     textBlock1.UnderLineThickness   = 2f;
     textBlock1.Vertical             = false;
     textBlock1.WhereReturn          = 0;
     canvasPanel1.BackColor          = System.Drawing.Color.Transparent;
     canvasPanel1.BorderColor        = System.Drawing.Color.Silver;
     canvasPanel1.BorderThickness    = -1;
     canvasPanel1.Controls.Add(textBlock4);
     canvasPanel1.Controls.Add(txb_TableName);
     canvasPanel1.Controls.Add(cmbx_Kind);
     canvasPanel1.Controls.Add(textBlock3);
     canvasPanel1.Controls.Add(textBlock6);
     canvasPanel1.Controls.Add(textBlock2);
     canvasPanel1.CornerAlignment      = dotNetLab.Widgets.Alignments.All;
     canvasPanel1.DataBindingInfo      = null;
     canvasPanel1.Font                 = new System.Drawing.Font("微软雅黑", 11f);
     canvasPanel1.ImagePos             = new System.Drawing.Point(0, 0);
     canvasPanel1.ImageSize            = new System.Drawing.Size(0, 0);
     canvasPanel1.Location             = new System.Drawing.Point(24, 152);
     canvasPanel1.MainBindableProperty = null;
     canvasPanel1.Name                 = "canvasPanel1";
     canvasPanel1.NormalColor          = System.Drawing.Color.LightSteelBlue;
     canvasPanel1.Radius               = 8;
     canvasPanel1.Size                 = new System.Drawing.Size(565, 253);
     canvasPanel1.Source               = null;
     canvasPanel1.TabIndex             = 4;
     canvasPanel1.Text                 = null;
     canvasPanel1.UIElementBinders     = null;
     textBlock4.BackColor              = System.Drawing.Color.Transparent;
     textBlock4.BorderColor            = System.Drawing.Color.Empty;
     textBlock4.BorderThickness        = -1;
     textBlock4.DataBindingInfo        = null;
     textBlock4.EnableFlag             = false;
     textBlock4.EnableTextRenderHint   = true;
     textBlock4.FlagAlign              = dotNetLab.Widgets.Alignments.Left;
     textBlock4.FlagColor              = System.Drawing.Color.DodgerBlue;
     textBlock4.FlagThickness          = 5;
     textBlock4.Font                    = new System.Drawing.Font("微软雅黑", 12f);
     textBlock4.ForeColor               = System.Drawing.Color.Firebrick;
     textBlock4.GapBetweenTextFlag      = 10;
     textBlock4.LEDStyle                = false;
     textBlock4.Location                = new System.Drawing.Point(0, 146);
     textBlock4.MainBindableProperty    = "向导将在数据中心创建一张用于存储通讯参数的表格,你可以在创建\r\n\r\n后访问数据中心以修改默认值";
     textBlock4.Name                    = "textBlock4";
     textBlock4.Radius                  = -1;
     textBlock4.Size                    = new System.Drawing.Size(552, 83);
     textBlock4.TabIndex                = 3;
     textBlock4.Text                    = "向导将在数据中心创建一张用于存储通讯参数的表格,你可以在创建\r\n\r\n后访问数据中心以修改默认值";
     textBlock4.UIElementBinders        = null;
     textBlock4.UnderLine               = false;
     textBlock4.UnderLineColor          = System.Drawing.Color.DarkGray;
     textBlock4.UnderLineThickness      = 2f;
     textBlock4.Vertical                = false;
     textBlock4.WhereReturn             = 30;
     txb_TableName.ActiveColor          = System.Drawing.Color.White;
     txb_TableName.BackColor            = System.Drawing.Color.Transparent;
     txb_TableName.DataBindingInfo      = null;
     txb_TableName.DoubleValue          = double.NaN;
     txb_TableName.EnableMobileRound    = true;
     txb_TableName.EnableNullValue      = false;
     txb_TableName.FillColor            = System.Drawing.Color.White;
     txb_TableName.FloatValue           = float.NaN;
     txb_TableName.Font                 = new System.Drawing.Font("微软雅黑", 13f);
     txb_TableName.ForeColor            = System.Drawing.Color.Black;
     txb_TableName.GreyPattern          = false;
     txb_TableName.IntValue             = -2147483648;
     txb_TableName.LineThickness        = 2f;
     txb_TableName.Location             = new System.Drawing.Point(112, 100);
     txb_TableName.MainBindableProperty = "";
     txb_TableName.Name                 = "txb_TableName";
     txb_TableName.Radius               = 30;
     txb_TableName.Size                 = new System.Drawing.Size(206, 31);
     txb_TableName.StaticColor          = System.Drawing.Color.White;
     txb_TableName.TabIndex             = 2;
     txb_TableName.TextAlignment        = System.Windows.Forms.HorizontalAlignment.Left;
     txb_TableName.TextBackColor        = System.Drawing.Color.White;
     txb_TableName.TextBoxStyle         = dotNetLab.Widgets.MobileTextBox.TextBoxStyles.Mobile;
     txb_TableName.UIElementBinders     = null;
     txb_TableName.WhitePattern         = true;
     txb_TableName.KeyUp               += new System.Windows.Forms.KeyEventHandler(txb_TableName_KeyUp);
     cmbx_Kind.BackColor                = System.Drawing.Color.White;
     cmbx_Kind.BorderColor              = System.Drawing.Color.Gray;
     cmbx_Kind.DataBindingInfo          = null;
     cmbx_Kind.DisplayItems             = 0;
     cmbx_Kind.EnableAnimation          = false;
     cmbx_Kind.Items                    = new string[2]
     {
         "TCP/IP",
         "串口"
     };
     cmbx_Kind.Location             = new System.Drawing.Point(116, 39);
     cmbx_Kind.MainBindableProperty = "";
     cmbx_Kind.Name                      = "cmbx_Kind";
     cmbx_Kind.SelectedItem              = "TCP/IP";
     cmbx_Kind.Size                      = new System.Drawing.Size(353, 35);
     cmbx_Kind.TabIndex                  = 1;
     cmbx_Kind.UIElementBinders          = null;
     textBlock3.BackColor                = System.Drawing.Color.Transparent;
     textBlock3.BorderColor              = System.Drawing.Color.Empty;
     textBlock3.BorderThickness          = -1;
     textBlock3.DataBindingInfo          = null;
     textBlock3.EnableFlag               = false;
     textBlock3.EnableTextRenderHint     = true;
     textBlock3.FlagAlign                = dotNetLab.Widgets.Alignments.Left;
     textBlock3.FlagColor                = System.Drawing.Color.DodgerBlue;
     textBlock3.FlagThickness            = 5;
     textBlock3.Font                     = new System.Drawing.Font("微软雅黑", 12f);
     textBlock3.GapBetweenTextFlag       = 10;
     textBlock3.LEDStyle                 = false;
     textBlock3.Location                 = new System.Drawing.Point(54, 102);
     textBlock3.MainBindableProperty     = "表名";
     textBlock3.Name                     = "textBlock3";
     textBlock3.Radius                   = -1;
     textBlock3.Size                     = new System.Drawing.Size(57, 25);
     textBlock3.TabIndex                 = 0;
     textBlock3.Text                     = "表名";
     textBlock3.UIElementBinders         = null;
     textBlock3.UnderLine                = false;
     textBlock3.UnderLineColor           = System.Drawing.Color.DarkGray;
     textBlock3.UnderLineThickness       = 2f;
     textBlock3.Vertical                 = false;
     textBlock3.WhereReturn              = 0;
     textBlock6.BackColor                = System.Drawing.Color.Transparent;
     textBlock6.BorderColor              = System.Drawing.Color.Empty;
     textBlock6.BorderThickness          = -1;
     textBlock6.DataBindingInfo          = null;
     textBlock6.EnableFlag               = false;
     textBlock6.EnableTextRenderHint     = true;
     textBlock6.FlagAlign                = dotNetLab.Widgets.Alignments.Left;
     textBlock6.FlagColor                = System.Drawing.Color.DodgerBlue;
     textBlock6.FlagThickness            = 5;
     textBlock6.Font                     = new System.Drawing.Font("微软雅黑", 10f);
     textBlock6.ForeColor                = System.Drawing.Color.Crimson;
     textBlock6.GapBetweenTextFlag       = 10;
     textBlock6.LEDStyle                 = false;
     textBlock6.Location                 = new System.Drawing.Point(337, 102);
     textBlock6.MainBindableProperty     = "输完表名后请回车以创建表";
     textBlock6.Name                     = "textBlock6";
     textBlock6.Radius                   = -1;
     textBlock6.Size                     = new System.Drawing.Size(183, 25);
     textBlock6.TabIndex                 = 0;
     textBlock6.Text                     = "输完表名后请回车以创建表";
     textBlock6.UIElementBinders         = null;
     textBlock6.UnderLine                = false;
     textBlock6.UnderLineColor           = System.Drawing.Color.DarkGray;
     textBlock6.UnderLineThickness       = 2f;
     textBlock6.Vertical                 = false;
     textBlock6.WhereReturn              = 0;
     textBlock2.BackColor                = System.Drawing.Color.Transparent;
     textBlock2.BorderColor              = System.Drawing.Color.Empty;
     textBlock2.BorderThickness          = -1;
     textBlock2.DataBindingInfo          = null;
     textBlock2.EnableFlag               = false;
     textBlock2.EnableTextRenderHint     = true;
     textBlock2.FlagAlign                = dotNetLab.Widgets.Alignments.Left;
     textBlock2.FlagColor                = System.Drawing.Color.DodgerBlue;
     textBlock2.FlagThickness            = 5;
     textBlock2.Font                     = new System.Drawing.Font("微软雅黑", 12f);
     textBlock2.GapBetweenTextFlag       = 10;
     textBlock2.LEDStyle                 = false;
     textBlock2.Location                 = new System.Drawing.Point(29, 45);
     textBlock2.MainBindableProperty     = "何种类型";
     textBlock2.Name                     = "textBlock2";
     textBlock2.Radius                   = -1;
     textBlock2.Size                     = new System.Drawing.Size(82, 25);
     textBlock2.TabIndex                 = 0;
     textBlock2.Text                     = "何种类型";
     textBlock2.UIElementBinders         = null;
     textBlock2.UnderLine                = false;
     textBlock2.UnderLineColor           = System.Drawing.Color.DarkGray;
     textBlock2.UnderLineThickness       = 2f;
     textBlock2.Vertical                 = false;
     textBlock2.WhereReturn              = 0;
     btn_DataCenter.Anchor               = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
     btn_DataCenter.BackColor            = System.Drawing.Color.Transparent;
     btn_DataCenter.BorderColor          = System.Drawing.Color.Empty;
     btn_DataCenter.BorderThickness      = -1;
     btn_DataCenter.CornerAligment       = dotNetLab.Widgets.Alignments.All;
     btn_DataCenter.DataBindingInfo      = null;
     btn_DataCenter.EnableFlag           = false;
     btn_DataCenter.EnableMobileRound    = false;
     btn_DataCenter.EnableTextRenderHint = false;
     btn_DataCenter.FlagAlign            = dotNetLab.Widgets.Alignments.Left;
     btn_DataCenter.FlagColor            = System.Drawing.Color.DodgerBlue;
     btn_DataCenter.FlagThickness        = 5;
     btn_DataCenter.Font                 = new System.Drawing.Font("微软雅黑", 12f);
     btn_DataCenter.ForeColor            = System.Drawing.Color.White;
     btn_DataCenter.GapBetweenTextFlag   = 10;
     btn_DataCenter.GapBetweenTextImage  = 8;
     btn_DataCenter.IConAlignment        = System.Windows.Forms.LeftRightAlignment.Left;
     btn_DataCenter.ImageSize            = new System.Drawing.Size(0, 0);
     btn_DataCenter.LEDStyle             = false;
     btn_DataCenter.Location             = new System.Drawing.Point(462, 411);
     btn_DataCenter.MainBindableProperty = "数据中心";
     btn_DataCenter.Name                 = "btn_DataCenter";
     btn_DataCenter.NeedAnimation        = false;
     btn_DataCenter.NormalColor          = System.Drawing.Color.Gray;
     btn_DataCenter.PressColor           = System.Drawing.Color.DimGray;
     btn_DataCenter.Radius               = 25;
     btn_DataCenter.Size                 = new System.Drawing.Size(127, 46);
     btn_DataCenter.Source               = null;
     btn_DataCenter.TabIndex             = 5;
     btn_DataCenter.Text                 = "数据中心";
     btn_DataCenter.UIElementBinders     = null;
     btn_DataCenter.UnderLine            = false;
     btn_DataCenter.UnderLineColor       = System.Drawing.Color.DarkGray;
     btn_DataCenter.UnderLineThickness   = 2f;
     btn_DataCenter.Vertical             = false;
     btn_DataCenter.WhereReturn          = 0;
     btn_DataCenter.Click               += new System.EventHandler(btn_DataCenter_Click);
     lbl_Status.Anchor                   = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left);
     lbl_Status.BackColor                = System.Drawing.Color.Transparent;
     lbl_Status.BorderColor              = System.Drawing.Color.Empty;
     lbl_Status.BorderThickness          = -1;
     lbl_Status.DataBindingInfo          = null;
     lbl_Status.EnableFlag               = false;
     lbl_Status.EnableTextRenderHint     = false;
     lbl_Status.FlagAlign                = dotNetLab.Widgets.Alignments.Left;
     lbl_Status.FlagColor                = System.Drawing.Color.DodgerBlue;
     lbl_Status.FlagThickness            = 5;
     lbl_Status.Font                     = new System.Drawing.Font("微软雅黑", 10f);
     lbl_Status.GapBetweenTextFlag       = 10;
     lbl_Status.LEDStyle                 = false;
     lbl_Status.Location                 = new System.Drawing.Point(4, 443);
     lbl_Status.MainBindableProperty     = "就绪";
     lbl_Status.Name                     = "lbl_Status";
     lbl_Status.Radius                   = -1;
     lbl_Status.Size                     = new System.Drawing.Size(79, 23);
     lbl_Status.TabIndex                 = 6;
     lbl_Status.Text                     = "就绪";
     lbl_Status.UIElementBinders         = null;
     lbl_Status.UnderLine                = false;
     lbl_Status.UnderLineColor           = System.Drawing.Color.DarkGray;
     lbl_Status.UnderLineThickness       = 2f;
     lbl_Status.Vertical                 = false;
     lbl_Status.WhereReturn              = 0;
     BackColor       = System.Drawing.Color.White;
     base.ClientSize = new System.Drawing.Size(611, 469);
     base.Controls.Add(lbl_Status);
     base.Controls.Add(btn_DataCenter);
     base.Controls.Add(canvasPanel1);
     base.Controls.Add(textBlock1);
     base.Controls.Add(panel1);
     base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
     base.Name            = "CommunicationWizard";
     Text = "通讯向导";
     panel1.ResumeLayout(false);
     panel1.PerformLayout();
     canvasPanel1.ResumeLayout(false);
     ResumeLayout(false);
 }
Example #10
0
        private bool IsFormValidate()
        {
            if (FullNameTextBox.Text.Trim() == "")
            {
                MessageBox.Show("Full Name is required", "Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
                FullNameTextBox.Clear();
                FullNameTextBox.Focus();
                return(false);
            }
            if (FatherNameTextBox.Text.Trim() == "")
            {
                MessageBox.Show("Father Name is required", "Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
                FatherNameTextBox.Clear();
                FatherNameTextBox.Focus();
                return(false);
            }
            if (MotherNameTextBox.Text.Trim() == "")
            {
                MessageBox.Show("Mother Name is required", "Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
                MotherNameTextBox.Clear();
                MotherNameTextBox.Focus();
                return(false);
            }
            if (AddressTextBox.Text.Trim() == "")
            {
                MessageBox.Show("Address is required", "Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
                AddressTextBox.Clear();
                AddressTextBox.Focus();
                return(false);
            }
            if (EmailTextBox.Text.Trim() == "")
            {
                MessageBox.Show("Email Name is required", "Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
                EmailTextBox.Clear();
                EmailTextBox.Focus();
                return(false);
            }
            if (MobileTextBox.Text.Trim() == "")
            {
                MessageBox.Show("Mobile number is required", "Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
                MobileTextBox.Clear();
                MobileTextBox.Focus();
                return(false);
            }
            if (BloodGroupTextBox.Text.Trim() == "")
            {
                MessageBox.Show("Blood Group is required", "Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
                BloodGroupTextBox.Clear();
                BloodGroupTextBox.Focus();
                return(false);
            }

            if (GenderComboBox.SelectedIndex == -1)
            {
                MessageBox.Show("Gender is required", "Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return(false);
            }
            if (BranchComboBox.SelectedIndex == -1)
            {
                MessageBox.Show("Branch is required", "Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return(false);
            }

            return(true);
        }
Example #11
0
 private void Page_Loaded(object sender, RoutedEventArgs e)
 {
     MobileTextBox.Focus(FocusState.Programmatic);
     ViewModel.Frame = Frame;
 }
Example #12
0
        private void DrawForm1Controls()
        {
            MainProcess.CreateLabel("Дата накладной:", 8, 70, 160, ControlsStyle.LabelNormal);
            MainProcess.CreateLabel(".", 57, 95, 8, ControlsStyle.LabelNormal);
            MainProcess.CreateLabel(".", 118, 95, 8, ControlsStyle.LabelNormal);

            dayTextBox = (MobileTextBox)MainProcess.CreateTextBox(9, 95, 41, string.Empty, ControlsStyle.LabelLarge, false);
            monthTextBox = (MobileTextBox)MainProcess.CreateTextBox(71, 95, 41, string.Empty, ControlsStyle.LabelLarge, false);
            monthTextBox.Text = DateTime.Now.Month.ToString();
            yearTextBox = (MobileTextBox)MainProcess.CreateTextBox(132, 95, 71, string.Empty, ControlsStyle.LabelLarge, false);
            yearTextBox.Text = DateTime.Now.Year.ToString();

            MainProcess.CreateLabel("Количество лет гарантии:", 8, 175, 224, ControlsStyle.LabelNormal);
            warrantyYearsQuantityTextBox = (MobileTextBox)MainProcess.CreateTextBox(9, 207, 47, string.Empty, ControlsStyle.LabelLarge, false);
            warrantyYearsQuantityTextBox.Text = "0";

            MainProcess.CreateButton("Створити документ", 9, 250, 225, 40, string.Empty, startProcess);
        }
Example #13
0
 public static void SetNumber(this MobileTextBox textBox, int value)
 {
     textBox.Text = (value == 0) ? string.Empty : value.ToString();
 }
Example #14
0
        public static int GetNumber(this MobileTextBox textBox, int maxValue, int defaultValue)
        {
            var result = textBox.GetNumber();

            return(result <= maxValue ? result : defaultValue);
        }
Example #15
0
        private bool isFormValid()
        {
            if (FullNameTextBox.Text.Trim() == string.Empty)
            {
                SMSMessageBox.ShowErrorMessage("Full Name is required");
                FullNameTextBox.Focus();
                return(false);
            }

            if (DateOfBirthDateTimePicker.Text.Trim() == string.Empty)
            {
                SMSMessageBox.ShowErrorMessage("Date of Birth is required");
                DateOfBirthDateTimePicker.Focus();
                return(false);
            }

            if (CNICTextBox.Text.Trim() == string.Empty)
            {
                SMSMessageBox.ShowErrorMessage("CNIC is required");
                FullNameTextBox.Focus();
                return(false);
            }

            if ((MobileTextBox.Text.Trim() == string.Empty) && (TelephoneTextBox.Text.Trim() == string.Empty))
            {
                SMSMessageBox.ShowErrorMessage("Mobile or Telephone number is required");
                MobileTextBox.Focus();
                return(false);
            }

            if (GenderComboBox.SelectedIndex == -1)
            {
                SMSMessageBox.ShowErrorMessage("Gender is required");
                return(false);
            }

            if (EmploymentDateDateTimePicker.Text.Trim() == string.Empty)
            {
                SMSMessageBox.ShowErrorMessage("Employment Date is required");
                EmploymentDateDateTimePicker.Focus();
                return(false);
            }

            if (AddressLineTextBox.Text.Trim() == string.Empty)
            {
                SMSMessageBox.ShowErrorMessage("Address Line is required");
                AddressLineTextBox.Focus();
                return(false);
            }

            if (CityComboBox.SelectedIndex == -1)
            {
                SMSMessageBox.ShowErrorMessage("City is required");
                return(false);
            }

            if (DistrictComboBox.SelectedIndex == -1)
            {
                SMSMessageBox.ShowErrorMessage("District is required");
                return(false);
            }

            if (PostralCodeTextBox.Text.Trim() == string.Empty)
            {
                SMSMessageBox.ShowErrorMessage("Postral code is required");
                PostralCodeTextBox.Focus();
                return(false);
            }

            if (JobTitleComboBox.Text.Trim() == string.Empty)
            {
                SMSMessageBox.ShowErrorMessage("Job Title is required");
                JobTitleComboBox.Focus();
                return(false);
            }

            if (CurrentSalaryTextBox.Text.Trim() == string.Empty)
            {
                SMSMessageBox.ShowErrorMessage("Current Salary is required");
                CurrentSalaryTextBox.Focus();
                return(false);
            }
            else
            {
                if (Convert.ToDecimal(CurrentSalaryTextBox.Text.Trim()) < 1)
                {
                    SMSMessageBox.ShowErrorMessage("Current Salary can not be zero or less than zero");
                    CurrentSalaryTextBox.Focus();
                    return(false);
                }
            }

            if (StartingSalaryTextBox.Text.Trim() == string.Empty)
            {
                SMSMessageBox.ShowErrorMessage("Starting Salary is required");
                StartingSalaryTextBox.Focus();
                return(false);
            }
            else
            {
                if (Convert.ToDecimal(StartingSalaryTextBox.Text.Trim()) < 1)
                {
                    SMSMessageBox.ShowErrorMessage("Starting Salary can not be zero or less than zero");
                    StartingSalaryTextBox.Focus();
                    return(false);
                }
            }

            if (HasLeftComboBox.Text == "Yes")
            {
                if (DateLeftDateTimePicker.Text.Trim() == string.Empty)
                {
                    SMSMessageBox.ShowErrorMessage("Date Left is required");
                    DateLeftDateTimePicker.Focus();
                    return(false);
                }

                if (ReasonLeftComboBox.Text.Trim() == string.Empty)
                {
                    SMSMessageBox.ShowErrorMessage("Leaving reason is required");
                    ReasonLeftComboBox.Focus();
                    return(false);
                }

                if (CommentsTextBox.Text.Trim() == string.Empty)
                {
                    SMSMessageBox.ShowErrorMessage("Leaving Comments are required");
                    CommentsTextBox.Focus();
                    return(false);
                }
            }
            return(true);
        }