Пример #1
0
        public string CreateDialog(string caption, int x, int y, int w, int h)
        {
            //create a new dialog
            ClassDialog cd = new ClassDialog(caption, x, y, w, h);

            dialogs.Add(cd);

            System.Diagnostics.Debug.WriteLine("Created:" + cd.Handle);

            //the dialog handle / ID is the windows handle
            return(cd.Handle.ToString());
        }
Пример #2
0
        /*
         * public void AddComboBox(string dialogID, int x, int y, int w, int h, string id)
         * {
         *  ClassDialog cd = dialogs.Find(
         *      delegate(ClassDialog c)
         *      {
         *          return c.Handle.ToString() == dialogID;
         *      }
         *  );
         *
         *  if (cd != null)
         *      cd.AddControl(5, "", x, y, w, h, id, "");
         * }
         */

        public void AddComboBox(string dialogID, int x, int y, int w, int h, string id, int style, string controlName)
        {
            ClassDialog cd = dialogs.Find(
                delegate(ClassDialog c)
            {
                return(c.Handle.ToString() == dialogID);
            }
                );

            if (cd != null)
            {
                cd.AddControl(5, "", x, y, w, h, id, controlName);
            }
        }
Пример #3
0
        public void AddLabel(string dialogID, string caption, int x, int y, int w, int h, string id)
        {
            ClassDialog cd = dialogs.Find(
                delegate(ClassDialog c)
            {
                return(c.Handle.ToString() == dialogID);
            }
                );

            if (cd != null)
            {
                cd.AddControl(3, caption, x, y, w, h, id, "");
            }
        }
Пример #4
0
        public void CloseDialog(string dialogID)
        {
            ClassDialog cd = dialogs.Find(
                delegate(ClassDialog c)
            {
                return(c.Handle.ToString() == dialogID);
            }
                );

            if (cd != null)
            {
                cd.Close();
            }
        }
Пример #5
0
        public void RemoveDialog(string dialogID)
        {
            ClassDialog cd = dialogs.Find(
                delegate(ClassDialog c)
            {
                return(c.Handle.ToString() == dialogID);
            }
                );

            if (cd != null)
            {
                dialogs.Remove(cd);
            }
        }
Пример #6
0
        public void AddCheckBox(string dialogID, string caption, int x, int y, int w, int h, int id, int style, string controlName)
        {
            // id == 0 -- no need for it
            ClassDialog cd = dialogs.Find(
                delegate(ClassDialog c)
            {
                return(c.Handle.ToString() == dialogID);
            }
                );

            if (cd != null)
            {
                cd.AddControl(6, caption, x, y, w, h, "", controlName);
            }
        }
Пример #7
0
        public string CreateDialog(string caption, int x, int y, int w, int h)
        {
            //create a new dialog
            ClassDialog cd = new ClassDialog(caption, x, y, w, h);
            dialogs.Add(cd);

            System.Diagnostics.Debug.WriteLine("Created:" + cd.Handle);

            //the dialog handle / ID is the windows handle
            return cd.Handle.ToString();
        }