Exemple #1
0
        void sub_Click(object sender, EventArgs e)
        {
            _idleTime = DateTime.Now;
            foreach (Form f in Application.OpenForms)
            {
                if (f.Name == "CB_002" && ((System.Windows.Forms.ToolStripDropDownItem)(sender)).Tag.ToString() == "CB_002")
                {
                    PLABS.MessageBoxPL.Show("Multiple Instances Cannot Be Allowed For This Window");
                    goto last;
                }
            }
            //throw new NotImplementedException();
            String FormId      = "RoysGold." + ((System.Windows.Forms.ToolStripDropDownItem)(sender)).Tag.ToString();
            String FormCaption = ((System.Windows.Forms.ToolStripDropDownItem)(sender)).Text;

            PLABS.MasterForm frm = new PLABS.MasterForm();

            Type tp = Type.GetType(FormId);

            if (tp != null)
            {
                frm               = ((PLABS.MasterForm)Activator.CreateInstance(tp));
                frm.MdiParent     = this;
                frm.Text          = FormCaption;
                frm.Location      = new Point(1, 1);
                frm.StartPosition = FormStartPosition.Manual;

                frm.Show();
                frm.BringToFront();
            }
last:
            int i = 0;
        }
Exemple #2
0
        void MnuFrm_KeyDown(object sender, KeyEventArgs e)
        {
            _idleTime = DateTime.Now;
            if (e.KeyCode == Keys.F12)
            {
                //DD_001 objdd001 = new DD_001();
                //objdd001.ShowDialog();
                //objdd001.Close();
            }
            else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.T)
            {
                GT_001 obj = new GT_001();
                obj.ShowDialog();
            }
            else
            {
                DataRow[] dr = dt.Select(string.Format("Key='{0}'", e.KeyCode.ToString()), "");
                if (dr.Length != 0)
                {
                    String           FormId      = "RoysGold." + dr[0]["frm_nam"].ToString();
                    String           FormCaption = dr[0]["frm_desc"].ToString();
                    PLABS.MasterForm frm         = new PLABS.MasterForm();

                    Type tp = Type.GetType(FormId);
                    if (tp != null)
                    {
                        frm               = ((PLABS.MasterForm)Activator.CreateInstance(tp));
                        frm.MdiParent     = this;
                        frm.Text          = FormCaption;
                        frm.Location      = new Point(1, 1);
                        frm.StartPosition = FormStartPosition.Manual;

                        frm.Show();
                        frm.BringToFront();
                    }
                }
            }
        }
Exemple #3
0
        public DataSet GetRefreshTables(String as_mode, String ai_typ_id, String ai_addr_id)
        {
            DataSet ds = new DataSet();

            try
            {
                PLABS.MasterForm obj    = new PLABS.MasterForm();
                string           argXml = obj.getBlankXml();
                argXml = PLABS.Utils.addNode(argXml, "as_mode", as_mode);
                argXml = PLABS.Utils.addNode(argXml, "ai_typ_id", ai_typ_id);
                argXml = PLABS.Utils.addNode(argXml, "ai_addr_id", ai_addr_id);
                argXml = PLABS.Utils.addNode(argXml, "ai_usr_id", Properties.Settings.Default.id.ToString());

                UtilsApp.CallBO objServ = new UtilsApp.CallBO();
                argXml = objServ.CallWS(argXml, "BizObj.Utils,BizObj", "");
                ds     = PLABS.Utils.CnvXMLToDataSet(argXml);
                return(ds);
            }
            catch (Exception ex)
            {
            }
            return(ds);
        }