Exemple #1
0
        private void InitUC(ArrayList al_in)
        {
            int  num  = 0;
            int  num2 = 0;
            int  num3 = 0;
            bool flag = true;

            this.i_all           = al_in.Count;
            this.utEditor        = new UltraTextEditor[this.i_all];
            this.active_utEditor = new UltraTextEditor();
            foreach (ArrayList list in al_in)
            {
                if (list[4] != null)
                {
                    this.str_field = this.str_field + "{" + ((DEMetaAttribute)list[4]).Combination + "}";
                    this.al_pos.Add(num2);
                }
                num2++;
            }
            foreach (ArrayList list2 in al_in)
            {
                if ((num + 1) == al_in.Count)
                {
                    flag = false;
                }
                this.InitControl(list2, num3, num, flag);
                num3 += ((int)list2[2]) + 4;
                list2.Add(num3 + 1);
                num++;
            }
        }
Exemple #2
0
        //Set grid cell text edito for lookup
        public static void SetCellLookupEditor
        (
            UltraGridColumn col,
            EditorButtonEventHandler Event)
        {
            //Set part lookup editor for column
            var txtAssemblyPart = new UltraTextEditor
            {
                UseAppStyling = false
            };
            var btnEditor = new EditorButton
            {
                Text       = "..",
                Width      = 17,
                Appearance =
                {
                    TextHAlign = HAlign.Center
                }
            };

            txtAssemblyPart.EditorButtonClick += Event;
            txtAssemblyPart.ButtonsRight.Add(btnEditor);
            col.ButtonDisplayStyle = ButtonDisplayStyle.Always;
            col.EditorComponent    = txtAssemblyPart;
        }
Exemple #3
0
        private void ActiveDropDownUC(UltraTextEditor txtEditor, string str_clsname, bool b_isTree, int i_pos)
        {
            DEMetaAttribute metaAttr = new DEMetaAttribute();
            DEBoxObject     obj2     = (DEBoxObject)this.al_all[i_pos];

            metaAttr = (DEMetaAttribute)obj2.MetaObject;
            if (b_isTree)
            {
                ArrayList list  = new ArrayList();
                Guid      empty = Guid.Empty;
                list.Add(empty);
                string refTableName = this.GetRefTableName(obj2, i_pos);
                list.Add(refTableName);
                DEMetaClass class2 = ModelContext.MetaModel.GetClass(metaAttr.LinkedResClass);
                list.Add(class2.Name);
                UCResTree tree = new UCResTree(list, i_pos);
                this.al_control.Add(tree);
                DropDownEditorButton button = txtEditor.ButtonsRight["SelectRes"] as DropDownEditorButton;
                button.Control    = tree;
                this.handler      = new SelectResHandler(this.ucUser_ResSelected);
                tree.ResSelected += this.handler;
            }
            else
            {
                this.ucUser = new UCResGrid(str_clsname, metaAttr, i_pos);
                this.al_control.Add(this.ucUser);
                DropDownEditorButton button2 = txtEditor.ButtonsRight["SelectRes"] as DropDownEditorButton;
                button2.Control          = this.ucUser;
                this.handler             = new SelectResHandler(this.ucUser_ResSelected);
                this.ucUser.ResSelected += this.handler;
            }
        }
Exemple #4
0
        public static void SetTextBox(UltraTextEditor textBox, string strType)
        {
            switch (strType)
            {
            case "MemberCardNo":
                textBox.MaxLength = 6;
                textBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(textBox_KeyPress);
                break;

            case "Discount":
                textBox.MaxLength = 2;
                textBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(textBox_KeyPress);
                break;

            case "Prepay":
                textBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(textBox_KeyPress);
                break;

//				case "":
//					break;
//				case "":
//					break;
//				case "":
//					break;
//				case "":
//					break;
//				case "":
//					break;
            default:
                break;
            }
        }
Exemple #5
0
        public SceltaSegnaposto(UltraTextEditor inputControl, UltraGrid grid, Dictionary<string, string> listaValori)
        { 
            _inputControl = inputControl;
            _grid = grid;

            _listaSegnaPosto = new Infragistics.Win.UltraWinListView.UltraListView
            {
                Name = "segnaPosto",
                View = Infragistics.Win.UltraWinListView.UltraListViewStyle.List
            };
            _listaSegnaPosto.ItemSettings.Appearance.Image = Properties.Resources.check_small;
            _listaSegnaPosto.Size = new System.Drawing.Size(231, 97);
            _listaSegnaPosto.ItemDoubleClick += listaSegnaPostoItemDoubleClick;

            foreach (var kvp in listaValori)
            {
                var item = new Infragistics.Win.UltraWinListView.UltraListViewItem(kvp.Value, null, null) {Key = kvp.Key};
                _listaSegnaPosto.Items.Add(item);
            }

            _button = new DropDownEditorButton("SceltaSegnaposto") {RightAlignDropDown = DefaultableBoolean.True, Control = _listaSegnaPosto};
            _inputControl.ButtonsRight.Add(_button);
            _listaSegnaPosto.Height = 200;

            if(_grid != null)
                _grid.ClickCell += gridClickCell;
        }
        public SPR_report_UserControl()
        {
            this.InitializeComponent();
            if (Utility.Is_DWRIN_admin())
            {
                this.upload_button.Visible = true;
            }

            UltraGrid_helper.InitGrid(this.main_ultraGrid);

            UltraTextEditor_setting setting_pending = new UltraTextEditor_setting();

            setting_pending.AddButton("Approve", "OK");
            setting_pending.AddButton("Reject", "Cancel");
            setting_pending.AddButton("ViewData");
            this.pending_textEditor = UltraTextEditor_helper.CreateTextEditorButtons(setting_pending);
            this.pending_textEditor.EditorButtonClick += this.ActionButtonEvent_textEditor;

            UltraTextEditor_setting setting_appr = new UltraTextEditor_setting();

            setting_appr.AddButton("Restore", "Restore");
            setting_appr.AddButton("ViewData");
            this.appr_textEditor = UltraTextEditor_helper.CreateTextEditorButtons(setting_appr);
            this.appr_textEditor.EditorButtonClick += this.ActionButtonEvent_textEditor;

            UltraTextEditor_setting setting_reject = new UltraTextEditor_setting();

            setting_reject.AddButton("Restore", "Restore");
            setting_reject.AddButton("ViewData");
            this.rej_textEditor = UltraTextEditor_helper.CreateTextEditorButtons(setting_reject);
            this.rej_textEditor.EditorButtonClick += this.ActionButtonEvent_textEditor;
        }
        public static void ReadOnly_Control(Control ctr)
        {
            try
            {
                foreach (Control txt in ctr.Controls)
                {
                    ReadOnly_Control(txt);
                    switch (txt.GetType().Name)
                    {
                    case "UltraTextEditor":
                    {
                        UltraTextEditor Ultratxt = txt as UltraTextEditor;
                        Ultratxt.ReadOnly = true;
                        break;
                    }

                    case "TextBox":
                    {
                        TextBox textboxtxt = txt as TextBox;
                        textboxtxt.ReadOnly = true;
                        break;
                    }

                    case "UltraCombo":
                    {
                        UltraCombo textboxtxt = txt as UltraCombo;
                        textboxtxt.ReadOnly = true;
                        break;
                    }

                    case "UltraComboEditor":
                    {
                        UltraComboEditor textboxtxt = txt as UltraComboEditor;
                        textboxtxt.ReadOnly = true;
                        break;
                    }

                    case "UltraDateTimeEditor":
                    {
                        UltraDateTimeEditor textboxtxt = txt as UltraDateTimeEditor;
                        textboxtxt.ReadOnly = true;
                        break;
                    }

                    case "UltraNumericEditor":
                    {
                        UltraNumericEditor textboxtxt = txt as UltraNumericEditor;
                        textboxtxt.ReadOnly = true;
                        break;
                    }
                    }
                }
            }
            catch (Exception)
            {
            }
        }
Exemple #8
0
        private void DrawDropDownTBtn(UltraTextEditor txtEditor, int i_dpindex)
        {
            DropDownEditorButton button = new DropDownEditorButton("SelectRes")
            {
                Key = "SelectRes",
                RightAlignDropDown = DefaultableBoolean.False
            };

            txtEditor.ButtonsRight.Add(button);
            txtEditor.NullText = "(无)";
            txtEditor.Tag      = this.al_all[i_dpindex];
            this.ActiveDropDownUC(txtEditor);
        }
Exemple #9
0
 public void GTRSelectText(ref UltraTextEditor txt)
 {
     if (!String.IsNullOrEmpty(txt.Text))
     {
         double dblOut;
         if (double.TryParse(txt.Text.ToString(), out dblOut) == true)
         {
             txt.Text = double.Parse(txt.Text.ToString()).ToString();
         }
         txt.SelectionStart  = 0;
         txt.SelectionLength = txt.Text.Length;
     }
 }
        public static void ReserAll(Control ctr)
        {
            try
            {
                foreach (Control txt in ctr.Controls)
                {
                    ReserAll(txt);
                    switch (txt.GetType().Name)
                    {
                    case "UltraTextEditor":
                    {
                        UltraTextEditor Ultratxt = txt as UltraTextEditor;
                        Ultratxt.Text = string.Empty;
                        break;
                    }

                    case "TextBox":
                    {
                        TextBox textboxtxt = txt as TextBox;
                        textboxtxt.Text = string.Empty;
                        break;
                    }

                    case "UltraCombo":
                    {
                        UltraCombo textboxtxt = txt as UltraCombo;
                        textboxtxt.Text = string.Empty;
                        break;
                    }

                    case "UltraComboEditor":
                    {
                        UltraComboEditor textboxtxt = txt as UltraComboEditor;
                        textboxtxt.Text = string.Empty;
                        break;
                    }

                    case "UltraNumericEditor":
                    {
                        UltraNumericEditor textboxtxt = txt as UltraNumericEditor;
                        textboxtxt.Value = 0;
                        break;
                    }
                    }
                }
            }
            catch (Exception)
            {
            }
        }
Exemple #11
0
        private void ActiveDropDownUC(UltraTextEditor txtEditor)
        {
            DEMetaAttribute metaAttr = new DEMetaAttribute {
                LinkType    = 1,
                Combination = this.str_field
            };

            this.ucUser = new UCRes(this.clsName, metaAttr);
            DropDownEditorButton button = txtEditor.ButtonsRight["SelectRes"] as DropDownEditorButton;

            button.Control           = this.ucUser;
            this.handler             = new SelectResHandler(this.ucUser_ResSelected);
            this.ucUser.ResSelected += this.handler;
        }
        public static bool CheckValueIsNumeric(ArrayList clt, ErrorProvider error)
        {
            try
            {
                for (int i = 0; i < clt.Count; i++)
                {
                    Control txt = (Control)clt[i];
                    switch (txt.GetType().Name)
                    {
                    case "UltraTextEditor":
                    {
                        UltraTextEditor Ultratxt = txt as UltraTextEditor;
                        if (!isNumeric(Ultratxt.Text) && Ultratxt.Text.Length > 0)
                        {
                            error.SetError(Ultratxt, "loi");
                            Ultratxt.SelectAll();
                            return(false);
                        }
                        else
                        {
                            error.Clear();
                        }
                        break;
                    }

                    case "TextBox":
                    {
                        TextBox textboxtxt = txt as TextBox;
                        if (!isNumeric(textboxtxt.Text) && textboxtxt.Text.Length > 0)
                        {
                            error.SetError(textboxtxt, "loi");
                            textboxtxt.Focus();
                            return(false);
                        }
                        else
                        {
                            error.Clear();
                        }
                        break;
                    }
                    }
                }
            }
            catch (Exception)
            {
                return(false);
            }
            return(true);
        }
Exemple #13
0
        private void LinkUltraLabelPrompt_Load(object sender, EventArgs e)
        {
            this.ultraTextEditor1 = new UltraTextEditor();
            AppearanceData      appearance     = new AppearanceData();
            AppearancePropFlags requestedProps = AppearancePropFlags.BackColor | AppearancePropFlags.ForeColor | AppearancePropFlags.BackColorDisabled | AppearancePropFlags.ForeColorDisabled;

            this.ultraTextEditor1.ResolveAppearance(ref appearance, ref requestedProps);
            this.ultraLabel1.Appearance.ForeColor         = appearance.ForeColor;
            this.ultraLabel1.Appearance.ForeColorDisabled = appearance.ForeColorDisabled;
            if (this.Enabled)
            {
                this.panel1.BackColor = appearance.BackColor;
            }
            else
            {
                this.panel1.BackColor = appearance.BackColorDisabled;
            }
        }
Exemple #14
0
        /// <summary>
        /// Refresh data on Grid
        /// </summary>
        public void RefreshData(SQL_condition cond)
        {
            if (this.StopRefresh_flag)
            {
                return;
            }

            if ((DateTime.Now - this.lastRefreshAt).TotalSeconds < 5)
            {
                Console.WriteLine("---> XBRL_UserControl_func info 0: no refresh within 5 seconds, last at " + this.lastRefreshAt);
                return;
            }
            else
            {
                this.lastRefreshAt = DateTime.Now;
            }

            Console.WriteLine("---> XBRL_UserControl_func info 1: LastRefreshAt: " + this.lastRefreshAt);
            //get display data table
            this.sf_master.Get_viewDT_async(this.shown_processState, cond);

            //Get action textEditor
            UltraTextEditor curr_textEditor = null;

            if (this.approved_radioButton.Checked)
            {
                curr_textEditor = this.appr_textEditor;
            }
            else if (this.rejected_radioButton.Checked)
            {
                curr_textEditor = this.rej_textEditor;
            }
            else
            {
                curr_textEditor = this.pending_textEditor;
            }
            this.main_ultraGrid.DisplayLayout.Bands[0].Columns[UltraGrid_helper.ActionColumnName].EditorComponent = curr_textEditor;

            //Display setting in Grid
            this.SetGird_sortFilter(this.sf_master.ViewData_match_flag);
            UltraGrid_helper.AutoResize(this.main_ultraGrid);
            UltraGrid_helper.ClearCurrentFilters(this.main_ultraGrid);
            this.main_ultraGrid.ActiveRowScrollRegion.Scroll(RowScrollAction.Top);
        }
 /// <summary>
 /// Hàm Set ToolTip cho các control khi Validate giá trị nhập vào
 /// </summary>
 /// <param name="control"></param>
 protected void ControlTextEditor_Validate(UltraTextEditor control)
 {
     try
     {
         if (string.IsNullOrEmpty(control.Text.Trim()))
         {
             control.Appearance.BorderColor = Color.Red;
             ttpManager.SetUltraToolTip(control, new UltraToolTipInfo(String.Format(Properties.Resources.Message_Validate_Control, control.Tag), ToolTipImage.None, null, DefaultableBoolean.False));
         }
         else
         {
             control.Appearance.BorderColor = Color.FromArgb(125, 162, 206);
             ttpManager.SetUltraToolTip(control, null);
         }
     }
     catch (Exception ex)
     {
         MessageBoxCommon.ShowException(ex);
     }
 }
        public void RefreshData()
        {
            HssStatus status = HssStatus.None;

            if (this.appr_radioButton.Checked)
            {
                status = HssStatus.Approved;
            }
            else if (this.reject_radioButton.Checked)
            {
                status = HssStatus.Rejected;
            }
            else
            {
                status = HssStatus.Pending;
            }

            this.main_ultraGrid.DataSource = this.sf_control.Get_viewDT(status);

            UltraTextEditor curr_textEditor = null;

            if (this.appr_radioButton.Checked)
            {
                curr_textEditor = this.appr_textEditor;
            }
            else if (this.reject_radioButton.Checked)
            {
                curr_textEditor = this.rej_textEditor;
            }
            else
            {
                curr_textEditor = this.pending_textEditor;
            }

            this.main_ultraGrid.DisplayLayout.Bands[0].Columns["Action"].EditorComponent    = curr_textEditor;
            this.main_ultraGrid.DisplayLayout.Bands[0].Columns["Action"].ButtonDisplayStyle = ButtonDisplayStyle.Always;
            this.main_ultraGrid.DisplayLayout.Bands[0].Columns["CreateTime"].Format         = UltraGrid_helper.DateTime_format_full;
            this.main_ultraGrid.DisplayLayout.Bands[0].Columns["LastModifyAt"].Format       = UltraGrid_helper.DateTime_format_full;

            UltraGrid_helper.AutoResize(this.main_ultraGrid);
        }
Exemple #17
0
        private void InitUC(ArrayList al_in)
        {
            int  num  = 0;
            int  num2 = 0;
            bool flag = true;

            this.i_all           = al_in.Count;
            this.utEditor        = new UltraTextEditor[this.i_all];
            this.active_utEditor = new UltraTextEditor();
            foreach (DEBoxObject obj2 in al_in)
            {
                if ((num + 1) == al_in.Count)
                {
                    flag = false;
                }
                this.InitControl(obj2, num2, num, flag);
                num2 += obj2.Width + 4;
                this.al_line.Add(num2 + 1);
                num++;
            }
        }
Exemple #18
0
        public static void MemberCardNoValidated(UltraTextEditor txtMemberCardNo, ErrorProvider errorProvide, string strType)
        {
            if (txtMemberCardNo.Text.Trim().Length < 8)
            {
                errorProvide.SetError(txtMemberCardNo, "会员卡号必须是8位!");
            }
            else
            {
                string strMemberCardNo = txtMemberCardNo.Text.Trim();
                if (strMemberCardNo.Equals("00000000"))
                {
                    errorProvide.SetError(txtMemberCardNo, "会员卡号不能都为零");
                }
                else
                {
                    //判断卡号是否存在
                    if (strType == "new")
                    {
                        DataTable dtMember = Query("select * from tbMember where cnvcMemberCardNo = '" + strMemberCardNo + "'");

                        Member member = new Member();
                        member.cnvcMemberCardNo = strMemberCardNo;
                        MemberManageFacade memberManage = new MemberManageFacade();
                        Member             oldMember    = memberManage.GetMemberbyCardNo(member);
                        if (dtMember.Rows.Count > 0)
                        {
                            errorProvide.SetError(txtMemberCardNo, "会员卡号已存在");
                        }
                        else
                        {
                            errorProvide.SetError(txtMemberCardNo, "");
                        }
                    }
                    else
                    {
                        errorProvide.SetError(txtMemberCardNo, "");
                    }
                }
            }
        }
Exemple #19
0
        private void DrawDropDownTBtn(UltraTextEditor txtEditor, string str_clsname, int i_dpindex)
        {
            DropDownEditorButton button = new DropDownEditorButton("SelectRes")
            {
                Key = "SelectRes",
                RightAlignDropDown = DefaultableBoolean.False
            };

            txtEditor.ButtonsRight.Add(button);
            txtEditor.NullText = "(无)";
            txtEditor.Tag      = this.al_all[i_dpindex];
            DEBoxObject obj2 = (DEBoxObject)this.al_all[i_dpindex];

            if (obj2.ShowType.Equals("UCTree"))
            {
                this.ActiveDropDownUC(txtEditor, str_clsname, true, i_dpindex);
            }
            else
            {
                this.ActiveDropDownUC(txtEditor, str_clsname, false, i_dpindex);
            }
        }
Exemple #20
0
        private void SetTreeViewID(object sender, BeforeEditorButtonDropDownEventArgs e)
        {
            string currID = "";

            //   Set the value
            if (ActiveControl.Parent.GetType() == typeof(UltraTextEditor))
            {
                UltraTextEditor te = this.ActiveControl.Parent as UltraTextEditor;
                if (te.Value != null && te.Value.ToString() != "")
                {
                    if (te.Name == "ultraOriginalType")
                    {
                        currID = _RemapID;
                    }
                    else
                    {
                        currID = ((RemapItem)_RemapList[GetActiveControdIndex()]).TypeID;
                    }
                }
            }
            ucTreeView1.ID = currID;
        }
        public static UltraTextEditor CreateTextEditorButtons(UltraTextEditor_setting setting)
        {
            UltraTextEditor ute = new UltraTextEditor();

            if (setting == null)
            {
                return(ute);
            }

            int count = setting.Count;

            for (int i = 0; i < count; ++i)
            {
                EditorButton btn = new EditorButton();
                btn.Text                   = setting.GetButtonName(i);
                btn.Key                    = setting.GetButtonName(i);
                btn.Appearance.Image       = UltraTextEditor_helper.img_dic[setting.GetImageName(i)];
                btn.Appearance.ImageHAlign = Infragistics.Win.HAlign.Left;
                ute.ButtonsLeft.Add(btn);
            }

            return(ute);
        }
Exemple #22
0
 private void InitializeComponent()
 {
     Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
     Infragistics.Win.Appearance appearance  = new Infragistics.Win.Appearance();
     Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
     Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
     this.Panel2 = new System.Windows.Forms.Panel();
     this.ButtonDatotekaUniverzalna = new System.Windows.Forms.Button();
     this.Button1              = new System.Windows.Forms.Button();
     this.GroupBox1            = new System.Windows.Forms.GroupBox();
     this.PozivNaBrojZaduzenja = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
     this.UltraLabel2          = new Infragistics.Win.Misc.UltraLabel();
     this.ModelZaduzenja       = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
     this.ultraLabel4          = new Infragistics.Win.Misc.UltraLabel();
     this.ultratxtSifra        = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
     this.UltraLabel3          = new Infragistics.Win.Misc.UltraLabel();
     this.ultraDTDatum         = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
     this.UltraLabel1          = new Infragistics.Win.Misc.UltraLabel();
     this.Panel2.SuspendLayout();
     this.GroupBox1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.PozivNaBrojZaduzenja)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.ModelZaduzenja)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.ultratxtSifra)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.ultraDTDatum)).BeginInit();
     this.SuspendLayout();
     //
     // Panel2
     //
     this.Panel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
     this.Panel2.BackColor = System.Drawing.Color.SteelBlue;
     this.Panel2.Controls.Add(this.ButtonDatotekaUniverzalna);
     this.Panel2.Controls.Add(this.Button1);
     this.Panel2.Location = new System.Drawing.Point(8, 140);
     this.Panel2.Name     = "Panel2";
     this.Panel2.Size     = new System.Drawing.Size(392, 24);
     this.Panel2.TabIndex = 1;
     //
     // ButtonDatotekaUniverzalna
     //
     this.ButtonDatotekaUniverzalna.Location = new System.Drawing.Point(206, 1);
     this.ButtonDatotekaUniverzalna.Name     = "ButtonDatotekaUniverzalna";
     this.ButtonDatotekaUniverzalna.Size     = new System.Drawing.Size(153, 23);
     this.ButtonDatotekaUniverzalna.TabIndex = 7;
     this.ButtonDatotekaUniverzalna.Text     = "Kreiraj univerzalnu datoteku";
     this.ButtonDatotekaUniverzalna.UseVisualStyleBackColor = true;
     this.ButtonDatotekaUniverzalna.Click += new System.EventHandler(this.ButtonDatotekaUniverzalna_Click);
     //
     // Button1
     //
     this.Button1.Location = new System.Drawing.Point(28, 1);
     this.Button1.Name     = "Button1";
     this.Button1.Size     = new System.Drawing.Size(153, 23);
     this.Button1.TabIndex = 3;
     this.Button1.Text     = "Kreiraj ";
     this.Button1.UseVisualStyleBackColor = true;
     this.Button1.Visible = false;
     this.Button1.Click  += new System.EventHandler(this.Button1_Click);
     //
     // GroupBox1
     //
     this.GroupBox1.Controls.Add(this.PozivNaBrojZaduzenja);
     this.GroupBox1.Controls.Add(this.UltraLabel2);
     this.GroupBox1.Controls.Add(this.ModelZaduzenja);
     this.GroupBox1.Controls.Add(this.ultraLabel4);
     this.GroupBox1.Controls.Add(this.ultratxtSifra);
     this.GroupBox1.Controls.Add(this.UltraLabel3);
     this.GroupBox1.Controls.Add(this.ultraDTDatum);
     this.GroupBox1.Controls.Add(this.UltraLabel1);
     this.GroupBox1.Location = new System.Drawing.Point(8, 8);
     this.GroupBox1.Name     = "GroupBox1";
     this.GroupBox1.Size     = new System.Drawing.Size(392, 127);
     this.GroupBox1.TabIndex = 0;
     this.GroupBox1.TabStop  = false;
     //
     // PozivNaBrojZaduzenja
     //
     this.PozivNaBrojZaduzenja.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2007;
     this.PozivNaBrojZaduzenja.Location     = new System.Drawing.Point(167, 90);
     this.PozivNaBrojZaduzenja.MaxLength    = 22;
     this.PozivNaBrojZaduzenja.Name         = "PozivNaBrojZaduzenja";
     this.PozivNaBrojZaduzenja.Size         = new System.Drawing.Size(184, 21);
     this.PozivNaBrojZaduzenja.TabIndex     = 11;
     //
     // UltraLabel2
     //
     appearance3.ForeColor              = System.Drawing.Color.Black;
     appearance3.TextVAlignAsString     = "Middle";
     this.UltraLabel2.Appearance        = appearance3;
     this.UltraLabel2.BackColorInternal = System.Drawing.Color.Transparent;
     this.UltraLabel2.Font              = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
     this.UltraLabel2.Location          = new System.Drawing.Point(12, 90);
     this.UltraLabel2.Name              = "UltraLabel2";
     this.UltraLabel2.Size              = new System.Drawing.Size(149, 23);
     this.UltraLabel2.TabIndex          = 10;
     this.UltraLabel2.Tag  = "";
     this.UltraLabel2.Text = "Poziv na broj zaduženja:";
     //
     // ModelZaduzenja
     //
     this.ModelZaduzenja.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2007;
     this.ModelZaduzenja.Location     = new System.Drawing.Point(167, 66);
     this.ModelZaduzenja.MaxLength    = 2;
     this.ModelZaduzenja.Name         = "ModelZaduzenja";
     this.ModelZaduzenja.Size         = new System.Drawing.Size(28, 21);
     this.ModelZaduzenja.TabIndex     = 9;
     //
     // ultraLabel4
     //
     appearance.ForeColor               = System.Drawing.Color.Black;
     appearance.TextVAlignAsString      = "Middle";
     this.ultraLabel4.Appearance        = appearance;
     this.ultraLabel4.BackColorInternal = System.Drawing.Color.Transparent;
     this.ultraLabel4.Font              = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
     this.ultraLabel4.Location          = new System.Drawing.Point(12, 66);
     this.ultraLabel4.Name              = "ultraLabel4";
     this.ultraLabel4.Size              = new System.Drawing.Size(149, 23);
     this.ultraLabel4.TabIndex          = 8;
     this.ultraLabel4.Tag               = "";
     this.ultraLabel4.Text              = "Model za PNB zaduženja:";
     //
     // ultratxtSifra
     //
     this.ultratxtSifra.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2007;
     this.ultratxtSifra.Location     = new System.Drawing.Point(167, 40);
     this.ultratxtSifra.MaxLength    = 20;
     this.ultratxtSifra.Name         = "ultratxtSifra";
     this.ultratxtSifra.Size         = new System.Drawing.Size(144, 21);
     this.ultratxtSifra.TabIndex     = 5;
     //
     // UltraLabel3
     //
     appearance1.ForeColor              = System.Drawing.Color.Black;
     appearance1.TextVAlignAsString     = "Middle";
     this.UltraLabel3.Appearance        = appearance1;
     this.UltraLabel3.BackColorInternal = System.Drawing.Color.Transparent;
     this.UltraLabel3.Font              = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
     this.UltraLabel3.Location          = new System.Drawing.Point(12, 40);
     this.UltraLabel3.Name              = "UltraLabel3";
     this.UltraLabel3.Size              = new System.Drawing.Size(130, 23);
     this.UltraLabel3.TabIndex          = 4;
     this.UltraLabel3.Tag  = "";
     this.UltraLabel3.Text = "Identifikator korisnika:";
     //
     // ultraDTDatum
     //
     this.ultraDTDatum.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2007;
     this.ultraDTDatum.Location     = new System.Drawing.Point(167, 16);
     this.ultraDTDatum.Name         = "ultraDTDatum";
     this.ultraDTDatum.Size         = new System.Drawing.Size(90, 21);
     this.ultraDTDatum.TabIndex     = 1;
     //
     // UltraLabel1
     //
     appearance2.ForeColor              = System.Drawing.Color.Black;
     appearance2.TextVAlignAsString     = "Middle";
     this.UltraLabel1.Appearance        = appearance2;
     this.UltraLabel1.BackColorInternal = System.Drawing.Color.Transparent;
     this.UltraLabel1.Font              = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
     this.UltraLabel1.Location          = new System.Drawing.Point(12, 16);
     this.UltraLabel1.Name              = "UltraLabel1";
     this.UltraLabel1.Size              = new System.Drawing.Size(130, 23);
     this.UltraLabel1.TabIndex          = 0;
     this.UltraLabel1.Tag  = "";
     this.UltraLabel1.Text = "Datum uplate:";
     //
     // DatotekaOTP
     //
     this.Controls.Add(this.GroupBox1);
     this.Controls.Add(this.Panel2);
     this.Name = "DatotekaOTP";
     this.Size = new System.Drawing.Size(408, 172);
     this.Panel2.ResumeLayout(false);
     this.GroupBox1.ResumeLayout(false);
     this.GroupBox1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.PozivNaBrojZaduzenja)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.ModelZaduzenja)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.ultratxtSifra)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.ultraDTDatum)).EndInit();
     this.ResumeLayout(false);
 }
 public ShowSignIn(UltraGroupBox ultraGroupBox1, UltraGroupBox ultraGroupBox2, UltraGroupBox ultraGroupBox3, UltraTextEditor txtMemberCardNo, UltraTextEditor txtMemberPwd)
 {
     //
     // Required for Windows Form Designer support
     //
     InitializeComponent();
     this.boxLogin        = ultraGroupBox2;
     this.boxOper         = ultraGroupBox3;
     this.boxInfo         = ultraGroupBox1;
     this.txtMemberCardNo = txtMemberCardNo;
     this.txtMemberPwd    = txtMemberPwd;
     //
     // TODO: Add any constructor code after InitializeComponent call
     //
     //ApplicationIdleTimer idle = new ApplicationIdleTimer();
     //System.Windows.Forms.Application.AddMessageFilter(idle);
     //idle.ApplicationIdle += new ApplicationIdleTimer.ApplicationIdleEventHandler(this.App_Idle);
 }
Exemple #24
0
 private void InitializeComponent()
 {
     Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
     Infragistics.Win.Appearance appearance  = new Infragistics.Win.Appearance();
     this.Panel2 = new System.Windows.Forms.Panel();
     this.ButtonDatotekaUniverzalna = new System.Windows.Forms.Button();
     this.Button1              = new System.Windows.Forms.Button();
     this.GroupBox1            = new System.Windows.Forms.GroupBox();
     this.PozivNaBrojZaduzenja = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
     this.UltraLabel2          = new Infragistics.Win.Misc.UltraLabel();
     this.ModelZaduzenja       = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
     this.UltraLabel3          = new Infragistics.Win.Misc.UltraLabel();
     this.utxtSifraPoduzeca    = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
     this.Label1 = new System.Windows.Forms.Label();
     this.Panel2.SuspendLayout();
     this.GroupBox1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.PozivNaBrojZaduzenja)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.ModelZaduzenja)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.utxtSifraPoduzeca)).BeginInit();
     this.SuspendLayout();
     //
     // Panel2
     //
     this.Panel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
     this.Panel2.BackColor = System.Drawing.Color.SteelBlue;
     this.Panel2.Controls.Add(this.ButtonDatotekaUniverzalna);
     this.Panel2.Controls.Add(this.Button1);
     this.Panel2.Location = new System.Drawing.Point(8, 119);
     this.Panel2.Name     = "Panel2";
     this.Panel2.Size     = new System.Drawing.Size(360, 24);
     this.Panel2.TabIndex = 1;
     //
     // ButtonDatotekaUniverzalna
     //
     this.ButtonDatotekaUniverzalna.Location = new System.Drawing.Point(194, 0);
     this.ButtonDatotekaUniverzalna.Name     = "ButtonDatotekaUniverzalna";
     this.ButtonDatotekaUniverzalna.Size     = new System.Drawing.Size(153, 23);
     this.ButtonDatotekaUniverzalna.TabIndex = 7;
     this.ButtonDatotekaUniverzalna.Text     = "Kreiraj univerzalnu datoteku";
     this.ButtonDatotekaUniverzalna.UseVisualStyleBackColor = true;
     this.ButtonDatotekaUniverzalna.Click += new System.EventHandler(this.ButtonDatotekaUniverzalna_Click);
     //
     // Button1
     //
     this.Button1.Location = new System.Drawing.Point(6, 0);
     this.Button1.Name     = "Button1";
     this.Button1.Size     = new System.Drawing.Size(153, 23);
     this.Button1.TabIndex = 3;
     this.Button1.Text     = "Kreiraj ";
     this.Button1.UseVisualStyleBackColor = true;
     this.Button1.Visible = false;
     this.Button1.Click  += new System.EventHandler(this.Button1_Click);
     //
     // GroupBox1
     //
     this.GroupBox1.Controls.Add(this.PozivNaBrojZaduzenja);
     this.GroupBox1.Controls.Add(this.UltraLabel2);
     this.GroupBox1.Controls.Add(this.ModelZaduzenja);
     this.GroupBox1.Controls.Add(this.UltraLabel3);
     this.GroupBox1.Controls.Add(this.utxtSifraPoduzeca);
     this.GroupBox1.Controls.Add(this.Label1);
     this.GroupBox1.Location = new System.Drawing.Point(8, 8);
     this.GroupBox1.Name     = "GroupBox1";
     this.GroupBox1.Size     = new System.Drawing.Size(360, 100);
     this.GroupBox1.TabIndex = 0;
     this.GroupBox1.TabStop  = false;
     //
     // PozivNaBrojZaduzenja
     //
     this.PozivNaBrojZaduzenja.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2007;
     this.PozivNaBrojZaduzenja.Location     = new System.Drawing.Point(160, 64);
     this.PozivNaBrojZaduzenja.MaxLength    = 22;
     this.PozivNaBrojZaduzenja.Name         = "PozivNaBrojZaduzenja";
     this.PozivNaBrojZaduzenja.Size         = new System.Drawing.Size(184, 21);
     this.PozivNaBrojZaduzenja.TabIndex     = 11;
     //
     // UltraLabel2
     //
     appearance3.ForeColor              = System.Drawing.Color.Black;
     appearance3.TextVAlignAsString     = "Middle";
     this.UltraLabel2.Appearance        = appearance3;
     this.UltraLabel2.BackColorInternal = System.Drawing.Color.Transparent;
     this.UltraLabel2.Font              = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
     this.UltraLabel2.Location          = new System.Drawing.Point(5, 64);
     this.UltraLabel2.Name              = "UltraLabel2";
     this.UltraLabel2.Size              = new System.Drawing.Size(149, 23);
     this.UltraLabel2.TabIndex          = 10;
     this.UltraLabel2.Tag  = "";
     this.UltraLabel2.Text = "Poziv na broj zaduženja:";
     //
     // ModelZaduzenja
     //
     this.ModelZaduzenja.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2007;
     this.ModelZaduzenja.Location     = new System.Drawing.Point(160, 40);
     this.ModelZaduzenja.MaxLength    = 2;
     this.ModelZaduzenja.Name         = "ModelZaduzenja";
     this.ModelZaduzenja.Size         = new System.Drawing.Size(28, 21);
     this.ModelZaduzenja.TabIndex     = 9;
     //
     // UltraLabel3
     //
     appearance.ForeColor               = System.Drawing.Color.Black;
     appearance.TextVAlignAsString      = "Middle";
     this.UltraLabel3.Appearance        = appearance;
     this.UltraLabel3.BackColorInternal = System.Drawing.Color.Transparent;
     this.UltraLabel3.Font              = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
     this.UltraLabel3.Location          = new System.Drawing.Point(5, 40);
     this.UltraLabel3.Name              = "UltraLabel3";
     this.UltraLabel3.Size              = new System.Drawing.Size(149, 23);
     this.UltraLabel3.TabIndex          = 8;
     this.UltraLabel3.Tag               = "";
     this.UltraLabel3.Text              = "Model za PNB zaduženja:";
     //
     // utxtSifraPoduzeca
     //
     this.utxtSifraPoduzeca.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2007;
     this.utxtSifraPoduzeca.Location     = new System.Drawing.Point(160, 16);
     this.utxtSifraPoduzeca.MaxLength    = 7;
     this.utxtSifraPoduzeca.Name         = "utxtSifraPoduzeca";
     this.utxtSifraPoduzeca.Size         = new System.Drawing.Size(86, 21);
     this.utxtSifraPoduzeca.TabIndex     = 6;
     //
     // Label1
     //
     this.Label1.Location = new System.Drawing.Point(4, 18);
     this.Label1.Name     = "Label1";
     this.Label1.Size     = new System.Drawing.Size(150, 23);
     this.Label1.TabIndex = 0;
     this.Label1.Text     = "MB  bez vodeće nule:";
     //
     // DatotekaJadranska
     //
     this.Controls.Add(this.GroupBox1);
     this.Controls.Add(this.Panel2);
     this.Name = "DatotekaJadranska";
     this.Size = new System.Drawing.Size(376, 151);
     this.Panel2.ResumeLayout(false);
     this.GroupBox1.ResumeLayout(false);
     this.GroupBox1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.PozivNaBrojZaduzenja)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.ModelZaduzenja)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.utxtSifraPoduzeca)).EndInit();
     this.ResumeLayout(false);
 }
        private void ApplyData(EventDataItem eventData, SeasonalityChartAndGrid chart, Label eventLabel, UltraTextEditor ssInto, UltraTextEditor ssOut, UltraTextEditor rssInto, UltraTextEditor rssOut, SeasonalityChartAndGrid chartAndGridOverlay)
        {            
            //var con = Helper.TransformToCon(dataAroundEvents, 15, DataAroundEventField.Filled_Diff);
            var conAndShift = Helper.TransformToCompoChartDataAndShift(eventData.DataAroundEvents, 15, DataAroundEventField.RawDataAroundEvent_Diffs);
            var conForProbability = Helper.TransformToCompoChartDataAndShift(eventData.DataAroundEvents, 15, DataAroundEventField.RawDataAroundEvent_Diffs);
            
            var con = conAndShift.Item1;
            var shift = conAndShift.Item2;
            var closestEvent = conAndShift.Item3;
            con.Name = eventData.EventCode;
            var avgsAndProb = ViewModel.ComputeAvgsAndProb(con, conForProbability, shift);
            var avgs = avgsAndProb.Item1;
            var Probs = avgsAndProb.Item2;

            chart.Chart.VerticalLineShift = shift+1;
            chart.ApplyData(eventData.EventCode + "\n" + closestEvent.ToString("yyyy-MMM-dd"), con.ColumnHeadings, avgs);
            SetYAxix(chart);
            chart.Chart.AddLegend();
            eventLabel.Text = eventData.EventCode;

            chartAndGridOverlay.ApplyData(eventData.EventCode + "\n" + closestEvent.ToString("yyyy-MMM-dd"), con.ColumnHeadings, avgs);
            chartAndGridOverlay.Chart.VerticalLineShift = shift + 1;

            // probability
            chart.Chart.AddColumnChart(eventData.EventCode + " prob", conForProbability.Item1.ColumnHeadings, Probs, ProbabilityCalc.GetMaxValue(ViewModel.ProbCalcMethod));

            // apply stats
            ssInto.Text = ViewModel.ComputeSSInto(con, shift).ToString();
            ssOut.Text = ViewModel.ComputeSSOut(con, shift).ToString();
            rssInto.Text = ViewModel.ComputeRSSInto(con, shift).ToString();
            rssOut.Text = ViewModel.ComputeRSSOut(con, shift).ToString();
        }
Exemple #26
0
 public SceltaSegnaposto(UltraTextEditor inputControl, Dictionary<string, string> listaValori) : this(inputControl, null, listaValori) {}
Exemple #27
0
 private void InitializeComponent()
 {
     Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
     Infragistics.Win.Appearance appearance  = new Infragistics.Win.Appearance();
     Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
     Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
     Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
     this.GroupBox1                 = new System.Windows.Forms.GroupBox();
     this.PozivNaBrojZaduzenja      = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
     this.UltraLabel2               = new Infragistics.Win.Misc.UltraLabel();
     this.ModelZaduzenja            = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
     this.ultraLabel4               = new Infragistics.Win.Misc.UltraLabel();
     this.BrojPoslovnice            = new Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit();
     this.UltraLabel3               = new Infragistics.Win.Misc.UltraLabel();
     this.datUplate                 = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
     this.UltraLabel1               = new Infragistics.Win.Misc.UltraLabel();
     this.btnIzradi                 = new Infragistics.Win.Misc.UltraButton();
     this.ButtonDatotekaUniverzalna = new System.Windows.Forms.Button();
     this.GroupBox1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.PozivNaBrojZaduzenja)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.ModelZaduzenja)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.datUplate)).BeginInit();
     this.SuspendLayout();
     //
     // GroupBox1
     //
     this.GroupBox1.Controls.Add(this.PozivNaBrojZaduzenja);
     this.GroupBox1.Controls.Add(this.UltraLabel2);
     this.GroupBox1.Controls.Add(this.ModelZaduzenja);
     this.GroupBox1.Controls.Add(this.ultraLabel4);
     this.GroupBox1.Controls.Add(this.BrojPoslovnice);
     this.GroupBox1.Controls.Add(this.UltraLabel3);
     this.GroupBox1.Controls.Add(this.datUplate);
     this.GroupBox1.Controls.Add(this.UltraLabel1);
     this.GroupBox1.Location = new System.Drawing.Point(8, 8);
     this.GroupBox1.Name     = "GroupBox1";
     this.GroupBox1.Size     = new System.Drawing.Size(360, 127);
     this.GroupBox1.TabIndex = 0;
     this.GroupBox1.TabStop  = false;
     //
     // PozivNaBrojZaduzenja
     //
     this.PozivNaBrojZaduzenja.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2007;
     this.PozivNaBrojZaduzenja.Location     = new System.Drawing.Point(168, 90);
     this.PozivNaBrojZaduzenja.MaxLength    = 22;
     this.PozivNaBrojZaduzenja.Name         = "PozivNaBrojZaduzenja";
     this.PozivNaBrojZaduzenja.Size         = new System.Drawing.Size(184, 21);
     this.PozivNaBrojZaduzenja.TabIndex     = 11;
     //
     // UltraLabel2
     //
     appearance3.ForeColor              = System.Drawing.Color.Black;
     appearance3.TextVAlignAsString     = "Middle";
     this.UltraLabel2.Appearance        = appearance3;
     this.UltraLabel2.BackColorInternal = System.Drawing.Color.Transparent;
     this.UltraLabel2.Font              = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
     this.UltraLabel2.Location          = new System.Drawing.Point(13, 90);
     this.UltraLabel2.Name              = "UltraLabel2";
     this.UltraLabel2.Size              = new System.Drawing.Size(149, 23);
     this.UltraLabel2.TabIndex          = 10;
     this.UltraLabel2.Tag  = "";
     this.UltraLabel2.Text = "Poziv na broj zaduženja:";
     //
     // ModelZaduzenja
     //
     this.ModelZaduzenja.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2007;
     this.ModelZaduzenja.Location     = new System.Drawing.Point(168, 66);
     this.ModelZaduzenja.MaxLength    = 2;
     this.ModelZaduzenja.Name         = "ModelZaduzenja";
     this.ModelZaduzenja.Size         = new System.Drawing.Size(28, 21);
     this.ModelZaduzenja.TabIndex     = 9;
     //
     // ultraLabel4
     //
     appearance.ForeColor               = System.Drawing.Color.Black;
     appearance.TextVAlignAsString      = "Middle";
     this.ultraLabel4.Appearance        = appearance;
     this.ultraLabel4.BackColorInternal = System.Drawing.Color.Transparent;
     this.ultraLabel4.Font              = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
     this.ultraLabel4.Location          = new System.Drawing.Point(13, 66);
     this.ultraLabel4.Name              = "ultraLabel4";
     this.ultraLabel4.Size              = new System.Drawing.Size(149, 23);
     this.ultraLabel4.TabIndex          = 8;
     this.ultraLabel4.Tag               = "";
     this.ultraLabel4.Text              = "Model za PNB zaduženja:";
     //
     // BrojPoslovnice
     //
     this.BrojPoslovnice.EditAs    = Infragistics.Win.UltraWinMaskedEdit.EditAsType.UseSpecifiedMask;
     this.BrojPoslovnice.InputMask = "#######";
     this.BrojPoslovnice.Location  = new System.Drawing.Point(168, 41);
     this.BrojPoslovnice.Name      = "BrojPoslovnice";
     this.BrojPoslovnice.Size      = new System.Drawing.Size(100, 20);
     this.BrojPoslovnice.TabIndex  = 6;
     //
     // UltraLabel3
     //
     appearance2.ForeColor              = System.Drawing.Color.Black;
     appearance2.TextVAlignAsString     = "Middle";
     this.UltraLabel3.Appearance        = appearance2;
     this.UltraLabel3.BackColorInternal = System.Drawing.Color.Transparent;
     this.UltraLabel3.Font              = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
     this.UltraLabel3.Location          = new System.Drawing.Point(12, 40);
     this.UltraLabel3.Name              = "UltraLabel3";
     this.UltraLabel3.Size              = new System.Drawing.Size(139, 23);
     this.UltraLabel3.TabIndex          = 4;
     this.UltraLabel3.Tag  = "";
     this.UltraLabel3.Text = "Šifra poslodavca u banci";
     //
     // datUplate
     //
     this.datUplate.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2003;
     this.datUplate.Location     = new System.Drawing.Point(168, 16);
     this.datUplate.Name         = "datUplate";
     this.datUplate.Size         = new System.Drawing.Size(100, 21);
     this.datUplate.TabIndex     = 1;
     //
     // UltraLabel1
     //
     appearance1.ForeColor              = System.Drawing.Color.Black;
     appearance1.TextVAlignAsString     = "Middle";
     this.UltraLabel1.Appearance        = appearance1;
     this.UltraLabel1.BackColorInternal = System.Drawing.Color.Transparent;
     this.UltraLabel1.Font              = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
     this.UltraLabel1.Location          = new System.Drawing.Point(12, 16);
     this.UltraLabel1.Name              = "UltraLabel1";
     this.UltraLabel1.Size              = new System.Drawing.Size(117, 23);
     this.UltraLabel1.TabIndex          = 0;
     this.UltraLabel1.Tag  = "";
     this.UltraLabel1.Text = "Datum uplate:";
     //
     // btnIzradi
     //
     appearance4.ImageHAlign          = Infragistics.Win.HAlign.Left;
     appearance4.ImageVAlign          = Infragistics.Win.VAlign.Middle;
     this.btnIzradi.Appearance        = appearance4;
     this.btnIzradi.BackColorInternal = System.Drawing.Color.LightSteelBlue;
     this.btnIzradi.ButtonStyle       = Infragistics.Win.UIElementButtonStyle.Office2003ToolbarButton;
     this.btnIzradi.Font          = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
     this.btnIzradi.ImageSize     = new System.Drawing.Size(24, 16);
     this.btnIzradi.Location      = new System.Drawing.Point(8, 141);
     this.btnIzradi.Name          = "btnIzradi";
     this.btnIzradi.ShowFocusRect = false;
     this.btnIzradi.ShowOutline   = false;
     this.btnIzradi.Size          = new System.Drawing.Size(169, 24);
     this.btnIzradi.TabIndex      = 0;
     this.btnIzradi.Text          = "Kreiraj datoteku";
     this.btnIzradi.Visible       = false;
     this.btnIzradi.WrapText      = false;
     this.btnIzradi.Click        += new System.EventHandler(this.btnGeneriraj_Click);
     //
     // ButtonDatotekaUniverzalna
     //
     this.ButtonDatotekaUniverzalna.Location = new System.Drawing.Point(215, 141);
     this.ButtonDatotekaUniverzalna.Name     = "ButtonDatotekaUniverzalna";
     this.ButtonDatotekaUniverzalna.Size     = new System.Drawing.Size(153, 23);
     this.ButtonDatotekaUniverzalna.TabIndex = 7;
     this.ButtonDatotekaUniverzalna.Text     = "Kreiraj univerzalnu datoteku";
     this.ButtonDatotekaUniverzalna.UseVisualStyleBackColor = true;
     this.ButtonDatotekaUniverzalna.Click += new System.EventHandler(this.ButtonDatotekaUniverzalna_Click);
     //
     // DatotekaRAIF
     //
     this.Controls.Add(this.ButtonDatotekaUniverzalna);
     this.Controls.Add(this.btnIzradi);
     this.Controls.Add(this.GroupBox1);
     this.Name = "DatotekaRAIF";
     this.Size = new System.Drawing.Size(376, 179);
     this.GroupBox1.ResumeLayout(false);
     this.GroupBox1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.PozivNaBrojZaduzenja)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.ModelZaduzenja)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.datUplate)).EndInit();
     this.ResumeLayout(false);
 }
Exemple #28
0
        void Form_Load(object sender, EventArgs e)
        {
            LocalPath = QX.Helper.XmlHelper.GetConfig("LocalPath");
            //Stopwatch watch = new Stopwatch();
            //watch.Start();

            InitData();

            BindData();

            BindEvent();

            var comCode = bmHelper.FindCtl<UltraCombo>(this.gpBse.Controls, "PRDC_CompCode");

            if (comCode != null)
            {
                //comCode.ValueChanged += new EventHandler(comCode_ValueChanged);
                comCode.KeyDown += new KeyEventHandler(comCode_KeyDown);
            }

            compNoEditor = bmHelper.FindCtl<UltraTextEditor>(this.gpBse.Controls, "PRDC_CompNo");

            if (opType == OperationTypeEnum.Edit || opType == OperationTypeEnum.Look)
            {

                if (compNoEditor != null)
                {
                    //compNoEditor = compNo;
                    compNoEditor.KeyDown += new KeyEventHandler(comNoedito_KeyDown);

                }
            }

            ExsistComponentSource = compInstance.GetPComponentsList();
            //watch.Stop();

            //MessageBox.Show(watch.Elapsed.ToString());
        }
        public static bool CheckValue(ArrayList clt, ErrorProvider error)
        {
            try
            {
                for (int i = 0; i < clt.Count; i++)
                {
                    Control txt = (Control)clt[i];
                    switch (txt.GetType().Name)
                    {
                    case "UltraTextEditor":
                    {
                        UltraTextEditor Ultratxt = txt as UltraTextEditor;
                        if (Ultratxt.Text == "")
                        {
                            error.SetError(Ultratxt, "loi");
                            Ultratxt.Focus();
                            return(false);
                        }
                        else
                        {
                            error.Clear();
                        }
                        break;
                    }

                    case "ComboBox":
                    {
                        ComboBox Ultratxt = txt as ComboBox;
                        if (Ultratxt.Text == "")
                        {
                            error.SetError(Ultratxt, "loi");
                            Ultratxt.Focus();
                            return(false);
                        }
                        else
                        {
                            error.Clear();
                        }
                        break;
                    }

                    case "TextBox":
                    {
                        TextBox textboxtxt = txt as TextBox;
                        if (textboxtxt.Text == "")
                        {
                            error.SetError(textboxtxt, "loi");
                            textboxtxt.Focus();
                            return(false);
                        }
                        else
                        {
                            error.Clear();
                        }
                        break;
                    }

                    case "UltraCombo":
                    {
                        UltraCombo textboxtxt = txt as UltraCombo;
                        if (textboxtxt.Text == "")
                        {
                            error.SetError(textboxtxt, "loi");
                            textboxtxt.Focus();
                            return(false);
                        }
                        else
                        {
                            error.Clear();
                        }
                        break;
                    }

                    case "UltraComboEditor":
                    {
                        UltraComboEditor textboxtxt = txt as UltraComboEditor;
                        if (textboxtxt.Text == "")
                        {
                            error.SetError(textboxtxt, "loi");
                            textboxtxt.Focus();
                            return(false);
                        }
                        else
                        {
                            error.Clear();
                        }
                        break;
                    }
                    }
                }
            }
            catch (Exception)
            {
                return(false);
            }
            return(true);
        }
        public void ResetGrid(UltraGrid leftGrid, UltraTextEditor nameEdit, UltraTextEditor desEdit)
        {
            DataSetETRoles ETRoles = new DataSetETRoles();
            leftGrid.DataSource = ETRoles;
            leftGrid.DataMember = ETRoles.Tables[0].TableName;

            nameEdit.Text = string.Empty;
            desEdit.Text = string.Empty;
        }
Exemple #31
0
        private bool WfIniTabPageUI(UltraTab pUTab, AdvanceQueryInfo pTabInfo)
        {
            Panel           panel;
            UltraGroupBox   UGroupBox;
            RadioButton     RadioAnd;
            RadioButton     RadioOr;
            UltraCombo      UComboColumn;
            UltraCombo      UComboCondition;
            UltraTextEditor UTextValue;
            UltraGrid       UGrid;

            try
            {
                //var pUTab = uTabControl.Tabs.Add("11");
                //pUTab.Text = "測試";
                panel        = new Panel();
                panel.Height = 100;
                panel.Dock   = DockStyle.Top;

                UGroupBox          = new UltraGroupBox();
                UGroupBox.Size     = new Size(160, 45);
                UGroupBox.Location = new Point(15, 10);
                UGroupBox.Text     = "且/或";
                if (GetStyleLibrary.FontControlNormal != null)
                {
                    UGroupBox.Font = GetStyleLibrary.FontControlNormal;
                }

                RadioAnd          = new RadioButton();
                RadioAnd.Checked  = true;
                RadioAnd.Size     = new Size(60, 20);
                RadioAnd.Location = new Point(20, 18);
                RadioAnd.Text     = "AND";
                if (GetStyleLibrary.FontControlNormal != null)
                {
                    RadioAnd.Font = GetStyleLibrary.FontControlNormal;
                }
                UGroupBox.Controls.Add(RadioAnd);

                RadioOr          = new RadioButton();
                RadioOr.Checked  = false;
                RadioOr.Size     = new Size(60, 20);
                RadioOr.Location = new Point(80, 18);
                RadioOr.Text     = "OR";
                if (GetStyleLibrary.FontControlNormal != null)
                {
                    RadioOr.Font = GetStyleLibrary.FontControlNormal;
                }
                UGroupBox.Controls.Add(RadioOr);
                panel.Controls.Add(UGroupBox);

                UComboColumn          = new UltraCombo();
                UComboColumn.Size     = new Size(160, 22);
                UComboColumn.Location = new Point(20, 60);
                if (GetStyleLibrary.FontControlNormal != null)
                {
                    UComboColumn.Font = GetStyleLibrary.FontControlNormal;
                }
                panel.Controls.Add(UComboColumn);

                UComboCondition          = new UltraCombo();
                UComboCondition.Size     = new Size(80, 22);
                UComboCondition.Location = new Point(190, 60);
                if (GetStyleLibrary.FontControlNormal != null)
                {
                    UComboCondition.Font = GetStyleLibrary.FontControlNormal;
                }
                panel.Controls.Add(UComboCondition);

                UTextValue          = new UltraTextEditor();
                UTextValue.Size     = new Size(260, 22);
                UTextValue.Location = new Point(280, 60);
                if (GetStyleLibrary.FontControlNormal != null)
                {
                    UTextValue.Font = GetStyleLibrary.FontControlNormal;
                }
                panel.Controls.Add(UTextValue);

                UGrid      = new UltraGrid();
                UGrid.Dock = DockStyle.Fill;

                pUTab.TabPage.Controls.Add(UGrid);
                pUTab.TabPage.Controls.Add(panel);

                //ref 到tab
                pTabInfo.UGroupBox       = UGroupBox;
                pTabInfo.RadioAnd        = RadioAnd;
                pTabInfo.RadioOr         = RadioOr;
                pTabInfo.UComboColumn    = UComboColumn;
                pTabInfo.UComboCondition = UComboCondition;
                pTabInfo.UTextValue      = UTextValue;
                pTabInfo.UGrid           = UGrid;

                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #32
0
        public Size GenerateTipsForm(Sys_PD_Module module, List<Sys_PD_Filed> filedList, Control ctr, Point p)
        {
            Sys_PD_RefModule refModule = new Sys_PD_RefModule();
            ctr.Tag = module;
            ctr.Text = module.SPM_Name;

            int iTabInex = 0;
            int xPosition = p.X;
            int yPosition = p.Y;
            int vXPosition = p.X;
            int step = 0;//控制一行已经输出多少列
            int fTI = module.SPM_TI;
            int fTX = module.SPM_TX;
            int fTY = module.SPM_TY;
            int fHeight = module.SPM_Height;
            int controlWidth = 0;
            int controlHeight = 0;

            Size lableSize = new Size(module.SPM_LX, module.SPM_LY);//标签的大小
            Size textSize = new Size(fTX, fTY);//文本框的大小
            Size areaSize = new Size((fTX * 2) + module.SPM_LX + module.SPM_LI, fTY * 3);//备注框大小
            foreach (Sys_PD_Filed field in filedList)
            {

                if (field.DCP_IsHidden == 1)
                {
                    UltraTextEditor _hiddenBox = new UltraTextEditor();
                    _hiddenBox.Location = new System.Drawing.Point(vXPosition, yPosition);
                    _hiddenBox.Name = module.SPM_TPrefix + field.DCP_ControlID;
                    _hiddenBox.Visible = false;
                    ctr.Controls.Add(_hiddenBox);
                    continue;
                }
                if (field.DCP_Style == "newline" ||
                    (field.DCP_ControlType == "textarea" &&
                    step > module.SPM_CNum - 2))
                {
                    step = 0;
                    vXPosition = xPosition;
                    yPosition += fHeight;
                }

                fTI = module.SPM_TI;
                fTX = module.SPM_TX;
                fTY = module.SPM_TY;
                fHeight = module.SPM_Height;
                textSize = new Size(fTX, fTY);//文本框的大小
                areaSize = new Size((fTX * 2) + module.SPM_LX + module.SPM_LI, fTY * 3);

                /////////如果字段有自定义的大小,则赋值到相关模块
                if (field.DCP_TI != 0 && field.DCP_TX != 0 && field.DCP_TY != 0 && field.DCP_Height != 0)
                {
                    textSize = new Size(field.DCP_TX, field.DCP_TY);
                    areaSize = new Size(field.DCP_TX, field.DCP_TY);
                    fTX = field.DCP_TX;
                    fTY = field.DCP_TY;
                    fTI = field.DCP_TI;
                    fHeight = field.DCP_Height;
                }

                Infragistics.Win.Misc.UltraLabel _lab = new Infragistics.Win.Misc.UltraLabel();
                _lab.Location = new Point(vXPosition, yPosition + 6);
                _lab.Name = module.SPM_LPrefix + field.DCP_ControlID.ToString();
                _lab.Size = lableSize;
                _lab.TabIndex = iTabInex++;
                _lab.Text = field.DCP_Label.ToString();
                ctr.Controls.Add(_lab);

                vXPosition += module.SPM_LI;

                #region 控件生成
                switch (field.DCP_ControlType)
                {
                    case "dec":
                        UltraNumericEditor _numBox = new UltraNumericEditor();
                        _numBox.Location = new System.Drawing.Point(vXPosition, yPosition);
                        _numBox.Name = module.SPM_TPrefix + field.DCP_ControlID;
                        _numBox.Size = textSize;
                        _numBox.NumericType = NumericType.Double;
                        _numBox.TabIndex = iTabInex++;
                        _numBox.PromptChar = ' ';
                        _numBox.Nullable = true;
                        _numBox.NullText = "0";
                        if (field.DCP_IsReadonly == 1)
                        {
                            _numBox.ReadOnly = true;
                        }
                        ctr.Controls.Add(_numBox);
                        break;
                    case "int":
                        UltraNumericEditor _intBox = new UltraNumericEditor();
                        _intBox.Location = new System.Drawing.Point(vXPosition, yPosition);
                        _intBox.Name = module.SPM_TPrefix + field.DCP_ControlID;
                        _intBox.Size = textSize;
                        _intBox.NumericType = NumericType.Integer;
                        _intBox.TabIndex = iTabInex++;
                        if (field.DCP_IsReadonly == 1)
                        {
                            _intBox.ReadOnly = true;
                        }
                        _intBox.PromptChar = ' ';
                        _intBox.Nullable = true;
                        _intBox.NullText = "";
                        ctr.Controls.Add(_intBox);
                        break;
                    case "text":
                        UltraTextEditor _textBox = new UltraTextEditor();
                        _textBox.Location = new System.Drawing.Point(vXPosition, yPosition);
                        _textBox.Name = module.SPM_TPrefix + field.DCP_ControlID;
                        _textBox.Size = textSize;
                        _textBox.TabIndex = iTabInex++;
                        _textBox.Nullable = true;
                        if (field.DCP_IsReadonly == 1)
                        {
                            _textBox.ReadOnly = true;
                        }
                        ctr.Controls.Add(_textBox);
                        break;
                    case "textl":
                        UltraTextEditor _texBox = new UltraTextEditor();
                        _texBox.Location = new System.Drawing.Point(vXPosition, yPosition);
                        _texBox.Name = module.SPM_TPrefix + field.DCP_ControlID;
                        _texBox.Size = new Size(textSize.Width * 2, textSize.Height);
                        _texBox.TabIndex = iTabInex++;
                        if (field.DCP_IsReadonly == 1)
                        {
                            _texBox.ReadOnly = true;
                        }
                        ctr.Controls.Add(_texBox);
                        step++;
                        vXPosition += (fTI + module.SPM_LI);
                        break;
                    case "textarea":

                        UltraTextEditor _mBox = new UltraTextEditor();
                        _mBox.Location = new System.Drawing.Point(vXPosition, yPosition);
                        _mBox.Name = module.SPM_TPrefix + field.DCP_ControlID;
                        _mBox.Multiline = true;
                        _mBox.Size = areaSize;
                        _mBox.TabIndex = iTabInex++;
                        if (field.DCP_IsReadonly == 1)
                        {
                            _mBox.ReadOnly = true;
                        }
                        ctr.Controls.Add(_mBox);
                        break;
                    case "date":
                        UltraDateTimeEditor _dateCom = new UltraDateTimeEditor();
                        _dateCom.BackColor = System.Drawing.SystemColors.Window;
                        _dateCom.MaskInput = "yyyy-mm-dd";
                        _dateCom.SpinButtonDisplayStyle = Infragistics.Win.ButtonDisplayStyle.OnMouseEnter;
                        _dateCom.Location = new System.Drawing.Point(vXPosition, yPosition);
                        _dateCom.Name = module.SPM_TPrefix + field.DCP_ControlID;
                        _dateCom.Size = textSize;
                        _dateCom.TabIndex = iTabInex++;
                        _dateCom.Value = DateTime.Now;
                        _dateCom.PromptChar = ' ';
                        _dateCom.Nullable = true;
                        _dateCom.NullText = DateTime.Now.ToString();
                        if (field.DCP_IsReadonly == 1)
                        {
                            _dateCom.ReadOnly = true;
                        }
                        ctr.Controls.Add(_dateCom);
                        break;
                    case "time":
                        UltraDateTimeEditor _timeCom = new UltraDateTimeEditor();
                        _timeCom.BackColor = System.Drawing.SystemColors.Window;
                        _timeCom.MaskInput = "yyyy-mm-dd hh:mm";
                        _timeCom.SpinButtonDisplayStyle = Infragistics.Win.ButtonDisplayStyle.OnMouseEnter;
                        _timeCom.Location = new System.Drawing.Point(vXPosition, yPosition);
                        _timeCom.Name = module.SPM_TPrefix + field.DCP_ControlID;
                        _timeCom.Size = textSize;
                        _timeCom.TabIndex = iTabInex++;
                        _timeCom.Value = DateTime.Now;
                        _timeCom.PromptChar = ' ';
                        _timeCom.Nullable = true;
                        _timeCom.NullText = DateTime.Now.ToString();
                        if (field.DCP_IsReadonly == 1)
                        {
                            _timeCom.ReadOnly = true;
                        }
                        ctr.Controls.Add(_timeCom);
                        break;
                    case "dict":
                        UltraComboEditor _comEdit = new UltraComboEditor();
                        _comEdit.Location = new System.Drawing.Point(vXPosition, yPosition);
                        _comEdit.Name = module.SPM_TPrefix + field.DCP_ControlID;
                        _comEdit.Size = textSize;
                        _comEdit.TabIndex = iTabInex++;
                        _comEdit.DropDownStyle = DropDownStyle.DropDownList;
                        _comEdit.Tag = field;
                        if (field.DCP_IsReadonly == 1)
                        {
                            _comEdit.ReadOnly = true;
                        }
                        _comEdit.ValueChanged += new EventHandler(_comEdit_ValueChanged);

                        ctr.Controls.Add(_comEdit);
                        //ExcuteWithReturnValue ddd = new ExcuteWithReturnValue(this.SetDictValue);

                        //ddd.BeginInvoke(_comEdit, field.DCP_Type, null, null);
                        SetDictValue(_comEdit, field.DCP_Type);
                        break;
                    case "ref":
                        #region UltraGrid 界面设置

                        UltraCombo uCom = new UltraCombo();
                        #endregion
                        uCom.Location = new System.Drawing.Point(vXPosition, yPosition);
                        uCom.Name = module.SPM_TPrefix + field.DCP_ControlID;
                        uCom.Size = textSize;
                        uCom.TabIndex = iTabInex++;
                        uCom.Tag = field;
                        //uCom.Text =
                        ctr.Controls.Add(uCom);
                        //if (uCom.Value == null)
                        //{
                        //    uCom.Value = "";
                        //}

                        string sql = string.Empty;
                        if (!string.IsNullOrEmpty(field.DCP_RefSQL))
                        {
                            refModule = instRef.GetListByWhere(string.Format(" and SPR_RefModule='{0}'", field.DCP_RefSQL)).FirstOrDefault();//获取参考
                            if (refModule != null)
                            {
                                sql = string.Format(refModule.SPR_RefSQL.Trim(), "", "");
                                DataTable refDate = new DataTable();
                                refDate = instField.GetRefData(sql);
                                uCom.DataSource = refDate.DefaultView;
                                uCom.DisplayMember = refModule.SPR_RefData;
                                uCom.ValueMember = refModule.SPR_RefValue;
                            }
                        }
                        if (!string.IsNullOrEmpty(field.DCP_PControl))
                        {
                            uCom.Enabled = false;
                        }

                        uCom.ValueChanged += new EventHandler(uCom_ValueChanged);
                        //uCom.BeforeDropDown += new System.ComponentModel.CancelEventHandler(uCom_BeforeDropDown);
                        uCom.TextChanged += new EventHandler(uCom_TextChanged);
                        //uCom.LostFocus += new EventHandler(uCom_LostFocus);
                        //uCom.InitializeLayout += new InitializeLayoutEventHandler(uCom_InitializeLayout);

                        if (field.DCP_IsReadonly == 1)
                        {
                            uCom.ReadOnly = true;
                        }
                        break;
                }
                #endregion

                if (field.DCP_ControlType == "textarea" && step + 2 < module.SPM_CNum - 2)
                {
                    vXPosition += fTI;//
                    step++;
                }
                else if (field.DCP_ControlType == "textarea" && step + 2 > module.SPM_CNum - 2)
                {
                    step = module.SPM_CNum - 1;

                    if (field.DCP_TI != 0 && field.DCP_TX != 0 && field.DCP_TY != 0 && field.DCP_Height != 0)
                    {
                        yPosition += fHeight;
                    }
                    else
                    {
                        yPosition += fHeight * 2 - 14; ;
                    }
                }

                vXPosition += fTI;
                if (controlWidth < vXPosition)
                {
                    controlWidth = vXPosition;
                }
                if (controlHeight < yPosition + module.SPM_Height)
                {
                    controlHeight = yPosition + module.SPM_Height;
                }
                if (step == module.SPM_CNum - 1)
                {
                    step = 0;
                    vXPosition = xPosition;
                    yPosition += module.SPM_Height;
                }
                else
                {
                    step++;
                }
            }
            ctr.Height = controlHeight;
            Size point = new Size(controlWidth + 20, controlHeight + 10);
            ctr.KeyUp += new KeyEventHandler(ctr_KeyUp);
            return point;
        }
Exemple #33
0
        //UltraTextEditor compNoEditor = new UltraTextEditor();
        void Form_Load(object sender, EventArgs e)
        {
            LocalPath = QX.Helper.XmlHelper.GetConfig("LocalPath");

            InitData();

            BindData();

            compNoEditor = bmHelper.FindCtl<UltraTextEditor>(this.gpBse.Controls, "PRP_ProdCode");

            if (opType == OperationTypeEnum.Edit || opType == OperationTypeEnum.Look)
            {

                if (compNoEditor != null)
                {
                    //compNoEditor = compNo;
                    compNoEditor.KeyDown += new KeyEventHandler(comCode_KeyDown);

                }
            }
        }
 //Set grid cell text edito for lookup
 public static void SetCellLookupEditor(
     UltraGridColumn col,
     EditorButtonEventHandler Event)
 {
     //Set part lookup editor for column
     var txtAssemblyPart = new UltraTextEditor
                           {
                               UseAppStyling = false
                           };
     var btnEditor = new EditorButton
                     {
                         Text = "..",
                         Width = 17,
                         Appearance =
                         {
                             TextHAlign = HAlign.Center
                         }
                     };
     txtAssemblyPart.EditorButtonClick += Event;
     txtAssemblyPart.ButtonsRight.Add(btnEditor);
     col.ButtonDisplayStyle = ButtonDisplayStyle.Always;
     col.EditorComponent = txtAssemblyPart;
 }
Exemple #35
0
        private void ParseSettings()
        {
            if (settings != null && settings.Count > 0)
            {
                string    baseSettinStr = settings["base"].ToString();
                Hashtable htBase        = JSONUtil.Parse <Hashtable>(baseSettinStr);
                metroToggleHisFlag.Checked         = htBase["hisFlag"].ToString().Equals("1");
                numericUpDownHisNum.Enabled        = metroToggleHisFlag.Checked;
                numericUpDownHisNum.Value          = Convert.ToDecimal(htBase["hisNum"].ToString());
                metroButtonClearHis.Enabled        = metroToggleHisFlag.Checked && numericUpDownHisNum.Value > 0;
                metroToggleHisFlag.CheckedChanged += new EventHandler(metroToggleHisFlag_CheckedChanged);
                numericUpDownHisNum.ValueChanged  += new EventHandler(numericUpDownHisNum_ValueChanged);

                List <ServerConfig> srvList       = BipConfig.Load <ServerConfig>(Globals.ServerConfigName);
                ServerConfig        defaultServer = srvList.Find(s => s.Id == 0);
                String[]            srvAddrs      = defaultServer.Url.Split(new char[] { '/' });
                String[]            ip_port       = srvAddrs[2].Split(new char[] { ':' });
                String[]            ips           = ip_port[0].Split(new char[] { '.' });
                ultraTextEditor16.Text      = ips[0];
                ultraTextEditor17.Text      = ips[1];
                ultraTextEditor18.Text      = ips[2];
                ultraTextEditor19.Text      = ips[3];
                ultraTextEditor20.Text      = ip_port[1];
                ultraTextEditor1.Text       = srvAddrs[3];
                metroButtonSrvApply.Enabled = false;

                string           hotkeyStr  = settings["hotkey"].ToString();
                List <Hashtable> hotkeyList = JSONUtil.Parse <List <Hashtable> >(hotkeyStr);

                UltraTextEditor textEditor = null;
                foreach (Hashtable ht in hotkeyList)
                {
                    switch (ht["key"].ToString())
                    {
                    case "relogin":
                        textEditor = uteHkRelogin;
                        break;

                    case "lock":
                        textEditor = uteHkLock;
                        break;

                    case "fun1":
                        textEditor = uteHkFun1;
                        break;

                    case "fun2":
                        textEditor = uteHkFun2;
                        break;

                    case "fun3":
                        textEditor = uteHkFun3;
                        break;

                    case "fun4":
                        textEditor = uteHkFun4;
                        break;

                    case "fun5":
                        textEditor = uteHkFun5;
                        break;

                    case "fun6":
                        textEditor = uteHkFun6;
                        break;

                    case "fun7":
                        textEditor = uteHkFun7;
                        break;

                    case "fun8":
                        textEditor = uteHkFun8;
                        break;
                    }
                    if (textEditor != null)
                    {
                        char[] htValues = ht["value"].ToString().ToCharArray();

                        textEditor.Value = ((htValues[0] == '1') ? "Ctrl + " : "") + ((htValues[1] == '1') ? "Shift + " : "") + ((htValues[2] == '1') ? "Alt + " : "") + htValues[3].ToString().ToUpper();
                    }
                }
                metroButtonHkApply.Enabled = false;


                ultraTextEditor12.Text = user.Employee.EmployeeName;

                //BipRow row = new BipRow();
                //row.IsHeader = true;
                //row.Add(new BipCell() { Text = "系统名称", Width = 100 });
                //row.Add(new BipCell() { Text = "服务器" });
                //row.Add(new BipCell() { Text = "应用服务" });
                //row.Add(new BipCell() { Text = "数据库" });
                //bipTableView1.AddRow(row);
                //bipTableView1.Padding = new Padding(20, 10, 20, 10);
            }
        }
        public ChangePwd(UltraGroupBox ultraGroupBox1, UltraGroupBox ultraGroupBox2, UltraGroupBox ultraGroupBox3, UltraTextEditor txtMemberCardNo, UltraTextEditor txtMemberPwd, UltraLabel lblError)
        {
            //
            // Windows 窗体设计器支持所必需的
            //
            InitializeComponent();

            this.boxLogin        = ultraGroupBox2;
            this.boxOper         = ultraGroupBox3;
            this.boxInfo         = ultraGroupBox1;
            this.txtMemberCardNo = txtMemberCardNo;
            this.txtMemberPwd    = txtMemberPwd;
            this.lblError        = lblError;
            //ApplicationIdleTimer idle = new ApplicationIdleTimer();
            //System.Windows.Forms.Application.AddMessageFilter(idle);
            //idle.ApplicationIdle += new ApplicationIdleTimer.ApplicationIdleEventHandler(this.App_Idle);
            //
            // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
            //
        }
Exemple #37
0
        public void SetNullItemClickBase(object sender, DataRow currentRow)
        {
            Control sourceControl = ((ContextMenu)((MenuItem)sender).Parent).SourceControl;
            string  controlId     = "";

            if (sourceControl.Tag != null)
            {
                controlId = Conversions.ToString(sourceControl.Tag);
            }
            if (sourceControl is DeklaritComboBox)
            {
                DeklaritComboBox box = (DeklaritComboBox)sourceControl;
                if (box.ComboBox.Tag != null)
                {
                    controlId         = Conversions.ToString(box.ComboBox.Tag);
                    box.SelectedIndex = -1;
                }
            }
            if ((controlId.Length == 0) && (sourceControl.Parent != null))
            {
                sourceControl = sourceControl.Parent;
                controlId     = Conversions.ToString(sourceControl.Tag);
            }
            this.GetControl(controlId).Focus();
            if (sourceControl is TextBox)
            {
                TextBox box2 = (TextBox)sourceControl;
                box2.Text = "";
            }
            if (sourceControl is UltraDateTimeEditor)
            {
                UltraDateTimeEditor editor = (UltraDateTimeEditor)sourceControl;
                editor.Value = RuntimeHelpers.GetObjectValue(Convert.DBNull);
            }
            if (sourceControl is UltraTextEditor)
            {
                UltraTextEditor editor2 = (UltraTextEditor)sourceControl;
                editor2.Text = "";
            }
            if (sourceControl is UltraNumericEditor)
            {
                UltraNumericEditor editor3 = (UltraNumericEditor)sourceControl;
                editor3.Value = RuntimeHelpers.GetObjectValue(Convert.DBNull);
            }
            if (sourceControl is UltraMaskedEdit)
            {
                UltraMaskedEdit edit = (UltraMaskedEdit)sourceControl;
                edit.Text = "";
            }
            if (sourceControl is LinkUltraLabelPrompt)
            {
                LinkUltraLabelPrompt prompt = (LinkUltraLabelPrompt)sourceControl;
                prompt.UltraLabel.Text = "";
                prompt.UltraLabel.Focus();
                string descriptionTag = prompt.DescriptionTag;
                if ((descriptionTag != null) && (descriptionTag.Length != 0))
                {
                    currentRow[descriptionTag] = RuntimeHelpers.GetObjectValue(Convert.DBNull);
                }
            }
            currentRow[controlId] = RuntimeHelpers.GetObjectValue(Convert.DBNull);
            DataColumn column = currentRow.Table.Columns[controlId];

            if (((column != null) && (column.ExtendedProperties["TreatEmptyAsNull"] != null)) && (Convert.ToBoolean(column.ExtendedProperties["TreatEmptyAsNull"].ToString()) && !column.DataType.Equals(typeof(DateTime))))
            {
                currentRow[controlId] = RuntimeHelpers.GetObjectValue(FormHelperClass.EmptyValue(column.DataType));
            }
        }
Exemple #38
0
 private void InitializeComponent()
 {
     Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
     Infragistics.Win.Appearance appearance  = new Infragistics.Win.Appearance();
     this.Button1                   = new System.Windows.Forms.Button();
     this.GroupBox1                 = new System.Windows.Forms.GroupBox();
     this.PozivNaBrojZaduzenja      = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
     this.UltraLabel2               = new Infragistics.Win.Misc.UltraLabel();
     this.ModelZaduzenja            = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
     this.UltraLabel3               = new Infragistics.Win.Misc.UltraLabel();
     this.ButtonDatotekaUniverzalna = new System.Windows.Forms.Button();
     this.Label3            = new System.Windows.Forms.Label();
     this.UltraButton1      = new Infragistics.Win.Misc.UltraButton();
     this.datum             = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
     this.Label2            = new System.Windows.Forms.Label();
     this.sifraugovaratelja = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
     this.rkdp   = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
     this.Label1 = new System.Windows.Forms.Label();
     this.GroupBox1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.PozivNaBrojZaduzenja)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.ModelZaduzenja)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.datum)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.sifraugovaratelja)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.rkdp)).BeginInit();
     this.SuspendLayout();
     //
     // Button1
     //
     this.Button1.Location = new System.Drawing.Point(9, 192);
     this.Button1.Name     = "Button1";
     this.Button1.Size     = new System.Drawing.Size(153, 23);
     this.Button1.TabIndex = 3;
     this.Button1.Text     = "Kreiraj ";
     this.Button1.UseVisualStyleBackColor = true;
     this.Button1.Visible = false;
     this.Button1.Click  += new System.EventHandler(this.Button1_Click);
     //
     // GroupBox1
     //
     this.GroupBox1.Controls.Add(this.PozivNaBrojZaduzenja);
     this.GroupBox1.Controls.Add(this.UltraLabel2);
     this.GroupBox1.Controls.Add(this.ModelZaduzenja);
     this.GroupBox1.Controls.Add(this.UltraLabel3);
     this.GroupBox1.Controls.Add(this.ButtonDatotekaUniverzalna);
     this.GroupBox1.Controls.Add(this.Button1);
     this.GroupBox1.Controls.Add(this.Label3);
     this.GroupBox1.Controls.Add(this.UltraButton1);
     this.GroupBox1.Controls.Add(this.datum);
     this.GroupBox1.Controls.Add(this.Label2);
     this.GroupBox1.Controls.Add(this.sifraugovaratelja);
     this.GroupBox1.Controls.Add(this.rkdp);
     this.GroupBox1.Controls.Add(this.Label1);
     this.GroupBox1.Location = new System.Drawing.Point(8, 8);
     this.GroupBox1.Name     = "GroupBox1";
     this.GroupBox1.Size     = new System.Drawing.Size(384, 233);
     this.GroupBox1.TabIndex = 0;
     this.GroupBox1.TabStop  = false;
     this.GroupBox1.Enter   += new System.EventHandler(this.GroupBox1_Enter);
     //
     // PozivNaBrojZaduzenja
     //
     this.PozivNaBrojZaduzenja.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2007;
     this.PozivNaBrojZaduzenja.Location     = new System.Drawing.Point(164, 152);
     this.PozivNaBrojZaduzenja.MaxLength    = 22;
     this.PozivNaBrojZaduzenja.Name         = "PozivNaBrojZaduzenja";
     this.PozivNaBrojZaduzenja.Size         = new System.Drawing.Size(184, 21);
     this.PozivNaBrojZaduzenja.TabIndex     = 16;
     //
     // UltraLabel2
     //
     appearance3.ForeColor              = System.Drawing.Color.Black;
     appearance3.TextVAlignAsString     = "Middle";
     this.UltraLabel2.Appearance        = appearance3;
     this.UltraLabel2.BackColorInternal = System.Drawing.Color.Transparent;
     this.UltraLabel2.Font              = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
     this.UltraLabel2.Location          = new System.Drawing.Point(9, 152);
     this.UltraLabel2.Name              = "UltraLabel2";
     this.UltraLabel2.Size              = new System.Drawing.Size(149, 23);
     this.UltraLabel2.TabIndex          = 15;
     this.UltraLabel2.Tag  = "";
     this.UltraLabel2.Text = "Poziv na broj zaduženja:";
     //
     // ModelZaduzenja
     //
     this.ModelZaduzenja.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2007;
     this.ModelZaduzenja.Location     = new System.Drawing.Point(164, 128);
     this.ModelZaduzenja.MaxLength    = 2;
     this.ModelZaduzenja.Name         = "ModelZaduzenja";
     this.ModelZaduzenja.Size         = new System.Drawing.Size(28, 21);
     this.ModelZaduzenja.TabIndex     = 14;
     //
     // UltraLabel3
     //
     appearance.ForeColor               = System.Drawing.Color.Black;
     appearance.TextVAlignAsString      = "Middle";
     this.UltraLabel3.Appearance        = appearance;
     this.UltraLabel3.BackColorInternal = System.Drawing.Color.Transparent;
     this.UltraLabel3.Font              = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
     this.UltraLabel3.Location          = new System.Drawing.Point(9, 128);
     this.UltraLabel3.Name              = "UltraLabel3";
     this.UltraLabel3.Size              = new System.Drawing.Size(149, 23);
     this.UltraLabel3.TabIndex          = 13;
     this.UltraLabel3.Tag               = "";
     this.UltraLabel3.Text              = "Model za PNB zaduženja:";
     //
     // ButtonDatotekaUniverzalna
     //
     this.ButtonDatotekaUniverzalna.Location = new System.Drawing.Point(195, 192);
     this.ButtonDatotekaUniverzalna.Name     = "ButtonDatotekaUniverzalna";
     this.ButtonDatotekaUniverzalna.Size     = new System.Drawing.Size(153, 23);
     this.ButtonDatotekaUniverzalna.TabIndex = 12;
     this.ButtonDatotekaUniverzalna.Text     = "Kreiraj univerzalnu datoteku";
     this.ButtonDatotekaUniverzalna.UseVisualStyleBackColor = true;
     this.ButtonDatotekaUniverzalna.Click += new System.EventHandler(this.ButtonDatotekaUniverzalna_Click);
     //
     // Label3
     //
     this.Label3.Location = new System.Drawing.Point(4, 69);
     this.Label3.Name     = "Label3";
     this.Label3.Size     = new System.Drawing.Size(154, 23);
     this.Label3.TabIndex = 11;
     this.Label3.Text     = "Datum uplate:";
     //
     // UltraButton1
     //
     this.UltraButton1.Location = new System.Drawing.Point(164, 97);
     this.UltraButton1.Name     = "UltraButton1";
     this.UltraButton1.Size     = new System.Drawing.Size(154, 23);
     this.UltraButton1.TabIndex = 10;
     this.UltraButton1.Text     = "Olakšica (odabir)";
     this.UltraButton1.Click   += new System.EventHandler(this.UltraButton1_Click);
     //
     // datum
     //
     this.datum.Location = new System.Drawing.Point(164, 69);
     this.datum.Name     = "datum";
     this.datum.Size     = new System.Drawing.Size(154, 21);
     this.datum.TabIndex = 9;
     //
     // Label2
     //
     this.Label2.Location = new System.Drawing.Point(4, 43);
     this.Label2.Name     = "Label2";
     this.Label2.Size     = new System.Drawing.Size(154, 23);
     this.Label2.TabIndex = 8;
     this.Label2.Text     = "Šifr. ugovaratelja:";
     //
     // sifraugovaratelja
     //
     this.sifraugovaratelja.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2007;
     this.sifraugovaratelja.Location     = new System.Drawing.Point(164, 41);
     this.sifraugovaratelja.MaxLength    = 8;
     this.sifraugovaratelja.Name         = "sifraugovaratelja";
     this.sifraugovaratelja.Size         = new System.Drawing.Size(154, 21);
     this.sifraugovaratelja.TabIndex     = 7;
     //
     // rkdp
     //
     this.rkdp.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2007;
     this.rkdp.Location     = new System.Drawing.Point(164, 14);
     this.rkdp.MaxLength    = 7;
     this.rkdp.Name         = "rkdp";
     this.rkdp.Size         = new System.Drawing.Size(154, 21);
     this.rkdp.TabIndex     = 6;
     //
     // Label1
     //
     this.Label1.Location = new System.Drawing.Point(4, 16);
     this.Label1.Name     = "Label1";
     this.Label1.Size     = new System.Drawing.Size(154, 23);
     this.Label1.TabIndex = 0;
     this.Label1.Text     = "RKDP:";
     //
     // DatotekaHZZO
     //
     this.Controls.Add(this.GroupBox1);
     this.Name = "DatotekaHZZO";
     this.Size = new System.Drawing.Size(400, 252);
     this.GroupBox1.ResumeLayout(false);
     this.GroupBox1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.PozivNaBrojZaduzenja)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.ModelZaduzenja)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.datum)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.sifraugovaratelja)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.rkdp)).EndInit();
     this.ResumeLayout(false);
 }
Exemple #39
0
        void Form_Load(object sender, EventArgs e)
        {
            LocalPath = QX.Helper.XmlHelper.GetConfig("LocalPath");

            InitData();

            BindData();

            var comCode = bmHelper.FindCtl<UltraCombo>(this.gpBse.Controls, "PRDC_CompCode");
            if (comCode != null)
            {
                comCode.ValueChanged += new EventHandler(comCode_ValueChanged);
            }

            compNoEditor = bmHelper.FindCtl<UltraTextEditor>(this.gpBse.Controls, "PRDC_CompNo");
        }