Пример #1
0
        public Form LoadForm(G_ID windowID)
        {
            if (this.formList.ContainsKey((int)windowID) && windowID != G_ID.TOOLTIP_DLG)
            {
                if (this.formList[(int)windowID].ShowHide)
                {
                    this.formList[(int)windowID].Show();
                }
                return(this.formList[(int)windowID]);
            }
            if (this.formList.ContainsKey((int)windowID) && windowID == G_ID.TOOLTIP_DLG)
            {
                this.CloseForm(windowID);
            }
            Form form = MsgHandler.HandleReturn <Form>("CreateForm", new object[]
            {
                windowID
            });

            if (form == null)
            {
                return(null);
            }
            this.formList.Add((int)windowID, form);
            this.formDepth.Add((int)windowID);
            form.WindowID   = (int)windowID;
            form.Orignal_ID = windowID;
            form.InitializeForm();
            if (form.InteractivePanel == null)
            {
                if (this.formList.ContainsKey((int)windowID))
                {
                    this.formList.Remove((int)windowID);
                }
                if (this.formDepth.Contains((int)windowID))
                {
                    this.formDepth.Remove((int)windowID);
                }
                return(null);
            }
            form.OnLoad();
            form.OnOpenCallback();
            return(form);
        }