Exemplo n.º 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());
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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, "");
            }
        }
Exemplo n.º 4
0
        public void CloseDialog(string dialogID)
        {
            ClassDialog cd = dialogs.Find(
                delegate(ClassDialog c)
            {
                return(c.Handle.ToString() == dialogID);
            }
                );

            if (cd != null)
            {
                cd.Close();
            }
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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();
        }