예제 #1
0
 public Frm_AddSnRange(string Key, string woId, Office2007Form Frm)
 {
     InitializeComponent();
     mFrm  = Frm;
     mKey  = Key;
     mwoId = woId;
 }
예제 #2
0
파일: ShowData.cs 프로젝트: fengyubox/SFIS
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="_frm">传进去的窗体</param>
 /// <param name="_dt">传进去的数据</param>
 /// <param name="bFlag">控件是否接受双击事件</param>
 public ShowData(Office2007Form _frm, DataTable _dt, bool bFlag)
 {
     InitializeComponent();
     mFrm  = _frm;
     mdt   = _dt;
     mFlag = bFlag;
 }
예제 #3
0
        /////////////////////// http://www.csharp-examples.net/inputbox/ //////////////////////
        public static DialogResult InputBox(string title, string promptText, ref string value)
        {
            Office2007Form form  = new Office2007Form();
            LabelX         label = new LabelX();

            DevComponents.DotNetBar.Controls.TextBoxX textBox = new DevComponents.DotNetBar.Controls.TextBoxX();
            ButtonX buttonOk     = new ButtonX();
            ButtonX buttonCancel = new ButtonX();

            form.Text    = title;
            label.Text   = promptText;
            textBox.Text = value;


            textBox.Border.Class      = "TextBoxBorder";
            textBox.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
            textBox.Location          = new System.Drawing.Point(240, 151);
            textBox.Name     = "textbox";
            textBox.ReadOnly = false;
            textBox.Size     = new System.Drawing.Size(275, 20);
            textBox.TabIndex = 1;

            buttonOk.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
            buttonOk.ColorTable     = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;

            buttonCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
            buttonCancel.ColorTable     = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;


            buttonOk.Text             = "OK";
            buttonCancel.Text         = "Cancel";
            buttonOk.DialogResult     = DialogResult.OK;
            buttonCancel.DialogResult = DialogResult.Cancel;

            label.SetBounds(9, 20, 372, 13);
            textBox.SetBounds(12, 36, 372, 20);
            buttonOk.SetBounds(228, 72, 75, 23);
            buttonCancel.SetBounds(309, 72, 75, 23);

            label.AutoSize      = true;
            textBox.Anchor      = textBox.Anchor | AnchorStyles.Right;
            buttonOk.Anchor     = AnchorStyles.Bottom | AnchorStyles.Right;
            buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;

            form.ClientSize = new Size(396, 107);
            form.Controls.AddRange(new Control[] { label, textBox, buttonOk, buttonCancel });
            form.ClientSize      = new Size(Math.Max(300, label.Right + 10), form.ClientSize.Height);
            form.FormBorderStyle = FormBorderStyle.FixedDialog;
            form.StartPosition   = FormStartPosition.CenterScreen;
            form.MinimizeBox     = false;
            form.MaximizeBox     = false;
            form.AcceptButton    = buttonOk;
            form.CancelButton    = buttonCancel;
            form.EnableGlass     = false;

            DialogResult dialogResult = form.ShowDialog();

            value = textBox.Text;
            return(dialogResult);
        }
예제 #4
0
파일: FrmMsg.cs 프로젝트: fengyubox/SFIS
 public FrmMsg(Office2007Form frm, string woid, string msg)
 {
     InitializeComponent();
     this.mMsg  = msg;
     this.mWoid = woid;
     this.mFrm  = frm;
 }
예제 #5
0
 public SelectDataListBox(Office2007Form _Frm, string FrmSelect, DataTable mdt)
 {
     InitializeComponent();
     mFrm       = _Frm;
     mFrmSelect = FrmSelect;
     dt         = mdt;
 }
예제 #6
0
 public SelectData(Office2007Form _frm, DataTable _dt)
 {
     InitializeComponent();
     //sqlcmd = sql;
     mDatatable = mTempDt = _dt;
     mFrm       = _frm;
 }
예제 #7
0
        //(3.2)控件自适应大小,
        public void controlAutoSize(Office2007Form mForm)
        {
            //int wLeft0 = oldCtrl[0].Left; ;//窗体最初的位置
            //int wTop0 = oldCtrl[0].Top;
            ////int wLeft1 = this.Left;//窗体当前的位置
            //int wTop1 = this.Top;
            if (oldCtrl == null)
            {
                return;
            }
            float wScale = (float)mForm.Width / (float)oldCtrl[0].Width;   //新旧窗体之间的比例,与最早的旧窗体
            float hScale = (float)mForm.Height / (float)oldCtrl[0].Height; //.Height;
            int   ctrLeft0, ctrTop0, ctrWidth0, ctrHeight0;
            int   ctrlNo = 1;                                              //第1个是窗体自身的 Left,Top,Width,Height,所以窗体控件从ctrlNo=1开始

            foreach (Control c in mForm.Controls)
            {
                ctrLeft0   = oldCtrl[ctrlNo].Left;
                ctrTop0    = oldCtrl[ctrlNo].Top;
                ctrWidth0  = oldCtrl[ctrlNo].Width;
                ctrHeight0 = oldCtrl[ctrlNo].Height;
                //c.Left = (int)((ctrLeft0 - wLeft0) * wScale) + wLeft1;//新旧控件之间的线性比例
                //c.Top = (int)((ctrTop0 - wTop0) * h) + wTop1;
                c.Left   = (int)((ctrLeft0) * wScale); //新旧控件之间的线性比例。控件位置只相对于窗体,所以不能加 + wLeft1
                c.Top    = (int)((ctrTop0) * hScale);  //
                c.Width  = (int)(ctrWidth0 * wScale);  //只与最初的大小相关,所以不能与现在的宽度相乘 (int)(c.Width * w);
                c.Height = (int)(ctrHeight0 * hScale); //
                ctrlNo  += 1;
            }
        }
예제 #8
0
 public DataPartition(Office2007Form _frm, string cartonnumber, int flag)
 {
     InitializeComponent();
     querycode = cartonnumber;
     bflag     = flag;
     mFrm      = _frm;
 }
예제 #9
0
        void SetParentMaximized()
        {
            Control hControl = this;

            while (hControl.Parent != null)
            {
                hControl = hControl.Parent;
            }
            Office2007Form hFrmParent = (Office2007Form)hControl;

            label1_MouseDoubleClick(label1, new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0));
            while (hFrmParent.WindowState != FormWindowState.Maximized)
            {
                label1_MouseDoubleClick(label1, new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0));
            }
        }
예제 #10
0
        public SerialInfo(Office2007Form _sr, DataTable dt, string partnumber, string cartonId, string palletnumber, string lotid)
        {
            InitializeComponent();
            mFsr = _sr;
            dt.Columns.Add("partnumber");
            dt.Columns.Add("CartonId");
            dt.Columns.Add("PalletNumber");
            dt.Columns.Add("lotId");

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                dt.Rows[i]["partnumber"]   = partnumber;
                dt.Rows[i]["CartonId"]     = cartonId;
                dt.Rows[i]["PalletNumber"] = palletnumber;
                dt.Rows[i]["lotId"]        = lotid;
            }
            mdt = dt;
        }
예제 #11
0
        /// <summary>
        /// 双击切换最大化、最小化
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void label1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            Control hControl = this;

            while (hControl.Parent != null)
            {
                hControl = hControl.Parent;
            }
            Office2007Form hFrmParent = (Office2007Form)hControl;

            if (hFrmParent.WindowState == FormWindowState.Maximized)
            {
                hFrmParent.WindowState = FormWindowState.Normal;
            }
            else
            {
                hFrmParent.WindowState = FormWindowState.Maximized;
            }
        }
        private void btnSetBaseData_Click(object sender, EventArgs e)
        {
            Office2007Form editBaseData = new Office2007Form();

            editBaseData.EnableGlass     = false;
            editBaseData.Icon            = Resources.iconLarge;
            editBaseData.Text            = "Stammdaten bearbeiten";
            editBaseData.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
            editBaseData.ControlBox      = false;
            editBaseData.AutoSize        = true;
            editBaseData.Controls.Add(new EditorBaseData());

            if (editBaseData.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                loadBaseData();
            }

            this.BringToFront();
        }
예제 #13
0
 //int ctrl_first = 0;
 //(3). 创建两个函数
 //(3.1)记录窗体和其控件的初始位置和大小,
 public void controllInitializeSize(Office2007Form mForm)
 {
     // if (ctrl_first == 0)
     {
         //  ctrl_first = 1;
         oldCtrl = new List <controlRect>();
         controlRect cR;
         cR.Left = mForm.Left; cR.Top = mForm.Top; cR.Width = mForm.Width; cR.Height = mForm.Height;
         oldCtrl.Add(cR);
         foreach (Control c in mForm.Controls)
         {
             controlRect objCtrl;
             objCtrl.Left = c.Left; objCtrl.Top = c.Top; objCtrl.Width = c.Width; objCtrl.Height = c.Height;
             oldCtrl.Add(objCtrl);
         }
     }
     // this.WindowState = (System.Windows.Forms.FormWindowState)(2);//记录完控件的初始位置和大小后,再最大化
     //0 - Normalize , 1 - Minimize,2- Maximize
 }
예제 #14
0
        private void Control_Add(Office2007Form form)
        {
            foreach (Control ctl in panelEx1.Controls)
            {
                if (ctl.Name == form.Name)
                {
                    return;
                }
            }
            foreach (Control ctl in panelEx1.Controls)
            {
                (ctl as Office2007Form).Close();
                panelEx1.Controls.Remove(ctl);
            }

            panelEx1.Controls.Clear();                                        //移除所有控件
            form.TopLevel        = false;                                     //设置为非顶级窗体
            form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; //设置窗体为非边框样式
            form.Dock            = System.Windows.Forms.DockStyle.Fill;       //设置样式是否填充整个panel
            panelEx1.Controls.Add(form);                                      //添加窗体
            form.Show();                                                      //窗体运行
        }
예제 #15
0
        /// <summary>
        /// 多文档实现
        /// </summary>
        /// <param name="caption">窗体名称</param>
        /// <param name="formType">窗体类型</param>
        public void SetMdiForm(string caption, Type formType)
        {
            bool IsOpened = false;

            //
            foreach (SuperTabItem tabitem in superTabControl1.Tabs)
            {
                if (tabitem.Name == caption)
                {
                    superTabControl1.SelectedTab = tabitem;
                    IsOpened = true;
                    break;
                }
            }
            //
            if (!IsOpened)
            {
                Office2007Form form = ChildWinManagement.LoadMdiForm(this, formType)
                                      as Office2007Form;

                SuperTabItem tabitem = superTabControl1.CreateTab(caption);
                tabitem.Name = caption;
                tabitem.Text = caption;

                form.FormBorderStyle = FormBorderStyle.None;
                form.TopLevel        = false;
                form.Visible         = true;
                form.Dock            = DockStyle.Fill;

                tabitem.AttachedControl.Controls.Add(form);

                superTabControl1.SelectedTab = tabitem;

                if (!tablItemDit.ContainsKey(tabitem.Text))
                {
                    tablItemDit.Add(tabitem.Text, form.Name);
                }
            }
        }
        private void btnSetSettings_Click(object sender, EventArgs e)
        {
            Office2007Form editBaseData = new Office2007Form();

            editBaseData.EnableGlass     = false;
            editBaseData.Icon            = Resources.iconLarge;
            editBaseData.Text            = "Einstellungen bearbeiten";
            editBaseData.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
            editBaseData.ControlBox      = false;
            editBaseData.AutoSize        = true;
            editBaseData.AutoSizeMode    = System.Windows.Forms.AutoSizeMode.GrowAndShrink;

            EditorSettings edit = new EditorSettings();

            edit.cbxSelectReporttype.Enabled = false;
            editBaseData.Controls.Add(edit);

            if (editBaseData.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                _settings = DataManager.LoadSettings();
            }
            this.BringToFront();
        }
예제 #17
0
        private void OptionForm()
        {
            PanelFrm.Invoke(new EventHandler(delegate
            {
                Frm = (Office2007Form)Assembly.Load(cmb_prglist.Text.Split('.')[0]).CreateInstance(cmb_prglist.Text);

                Frm.TopLevel        = false;
                Frm.Dock            = System.Windows.Forms.DockStyle.Fill;
                Frm.FormBorderStyle = FormBorderStyle.None;
                Frm.Parent          = this.panel1;
                foreach (Control ctl in PanelFrm.Controls)
                {
                    if (ctl.Name == Frm.Name)
                    {
                        PanelFrm.Controls.SetChildIndex(ctl, 0);
                        GroupBox_Frm.Text = Frm.Text;
                        return;
                    }
                }
                this.PanelFrm.Controls.Add(Frm);
                GroupBox_Frm.Text = Frm.Text;
                Frm.Show();
            }));
        }
예제 #18
0
        /// <summary>
        /// Performs the launching / execution of
        /// the individual demo sample apps
        /// </summary>
        private void LaunchDemoItem()
        {
            GridRow row = superGridControl1.PrimaryGrid.ActiveRow as GridRow;

            if (row != null)
            {
                Type type = row.Tag as Type;

                if (type != null)
                {
                    Cursor.Current = Cursors.WaitCursor;

                    Office2007Form form = (Office2007Form)Activator.CreateInstance(type);

                    if (type != typeof(DemoBasicFiltering) && type != typeof(DemoExtendedFiltering))
                    {
                        form.Icon = Icon;
                    }

                    form.Show(this);
                    form.Activate();
                }
            }
        }
예제 #19
0
 public Frm_ChangeKP(Office2007Form Frm)
 {
     InitializeComponent();
     mFrm = Frm;
 }
예제 #20
0
 public Frm_StationName(Office2007Form Frm)
 {
     InitializeComponent();
     sFrm = Frm;
 }
예제 #21
0
 public Frm_WO_LineSet(Office2007Form Frm, int sFlag)
 {
     InitializeComponent();
     mFrm = Frm;
     Flag = sFlag;
 }
예제 #22
0
 public Frm_InputSn(Office2007Form frm)
 {
     InitializeComponent();
     mFrm = frm;
 }
예제 #23
0
 public Frm_Duty(Office2007Form Frm, DataTable dt)
 {
     InitializeComponent();
     mdt  = dt;
     mFrm = Frm;
 }
예제 #24
0
 public Frm_Station_Config_SubForm(Office2007Form Frm, string FrmText)
 {
     InitializeComponent();
     mFrm     = Frm;
     mFrmText = FrmText;
 }
예제 #25
0
        /////////////////////// http://www.csharp-examples.net/inputbox/ //////////////////////
        public static DialogResult InputBox(string title, string promptText, ref string value)
        {
            Office2007Form form = new Office2007Form();
            LabelX label = new LabelX();
            DevComponents.DotNetBar.Controls.TextBoxX textBox = new DevComponents.DotNetBar.Controls.TextBoxX();
            ButtonX buttonOk = new ButtonX();
            ButtonX buttonCancel = new ButtonX();

            form.Text = title;
            label.Text = promptText;
            textBox.Text = value;

            textBox.Border.Class = "TextBoxBorder";
            textBox.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
            textBox.Location = new System.Drawing.Point(240, 151);
            textBox.Name = "textbox";
            textBox.ReadOnly = false;
            textBox.Size = new System.Drawing.Size(275, 20);
            textBox.TabIndex = 1;

            buttonOk.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
            buttonOk.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;

            buttonCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
            buttonCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;

            buttonOk.Text = "OK";
            buttonCancel.Text = "Cancel";
            buttonOk.DialogResult = DialogResult.OK;
            buttonCancel.DialogResult = DialogResult.Cancel;

            label.SetBounds(9, 20, 372, 13);
            textBox.SetBounds(12, 36, 372, 20);
            buttonOk.SetBounds(228, 72, 75, 23);
            buttonCancel.SetBounds(309, 72, 75, 23);

            label.AutoSize = true;
            textBox.Anchor = textBox.Anchor | AnchorStyles.Right;
            buttonOk.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
            buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;

            form.ClientSize = new Size(396, 107);
            form.Controls.AddRange(new Control[] { label, textBox, buttonOk, buttonCancel });
            form.ClientSize = new Size(Math.Max(300, label.Right + 10), form.ClientSize.Height);
            form.FormBorderStyle = FormBorderStyle.FixedDialog;
            form.StartPosition = FormStartPosition.CenterScreen;
            form.MinimizeBox = false;
            form.MaximizeBox = false;
            form.AcceptButton = buttonOk;
            form.CancelButton = buttonCancel;
            form.EnableGlass = false;

            DialogResult dialogResult = form.ShowDialog();
            value = textBox.Text;
            return dialogResult;
        }
예제 #26
0
 public Frm_ColorBox_RePrint(Office2007Form Frm)
 {
     InitializeComponent();
     mFrm = Frm;
 }
예제 #27
0
 public Frm_CheckListBox(Office2007Form frm, object obj)
 {
     InitializeComponent();
     mFrm  = frm;
     MyObj = obj;
 }
예제 #28
0
 public Frm_Update(Office2007Form Frm)
 {
     InitializeComponent();
     mFrm = Frm;
 }
예제 #29
0
파일: Form1.cs 프로젝트: tpc707494/C-Erp
        private void DoubleList(Office2007Form office2007Form, Object lCKA)
        {
            if (office2007Form is LckBarSearch)
            {
                LckBarMake lckBarMake = new LckBarMake();
                SetTabShow("流程卡制作", lckBarMake);
                lckBarMake.SetData(lCKA);
            }

            /*
             * else if (office2007Form is JInCangChaXun)
             * {
             *  JinCangMake(lCKA);
             * }
             *
             * else if (office2007Form is JinCangMake)
             * {
             *  JinCangChaXun();
             * }
             */
            else if (office2007Form is ChanLiangDjCha)
            {
                ChanLiangMake(lCKA);
            }
            else if (office2007Form is DuiZhangDanCha)
            {
                DuiZhangDanMake(lCKA);
            }
            else if (office2007Form is DuiZhangDanMake)
            {
                DuiZhangDanCha();
            }
            else if (office2007Form is ChanLiangDjMake)
            {
                ChanLiangDjCha();
            }
            else if (office2007Form is FanXiuDjCha)
            {
                FanXiuMake(lCKA);
            }
            else if (office2007Form is FanXiuDjMake)
            {
                FanXiuDjCha();
            }
            else if (office2007Form is JHBChaXun)
            {
                JHBMake(lCKA);
            }
            else if (office2007Form is JHBMake)
            {
                JHBCha();
            }
            else if (office2007Form is ChenBenJInCangChaXun)
            {
                ChenBenJinCangMake(lCKA);
            }
            else if (office2007Form is ChenBenJinCangMake)
            {
                ChenBenJinCangChaXun();
            }
            else if (office2007Form is view.RecipeManager.XiaoYangPeiF.Search)
            {
                XYMakeF(lCKA);
            }
            else if (office2007Form is view.RecipeManager.XiaoYangPeiF.Make)
            {
                XYsearchF();
            }
            else if (office2007Form is MaDanChaXun)
            {
                MaDanMakeF(lCKA);
            }
            else if (office2007Form is MaDanMake)
            {
                MDChaXunF();
            }
        }
예제 #30
0
 public Frm_WO_Update(int sFlag, Office2007Form Frm)
 {
     InitializeComponent();
     Flag = sFlag;
     mFrm = Frm;
 }
예제 #31
0
 public Frm_SelcetNextStation(Office2007Form Frm)
 {
     InitializeComponent();
     mFrm = Frm;
 }