public DdemlStringActivityEventArgs(
     string value, 
     DdemlStringActivityType action, 
     IntPtr taskHandle) : base(taskHandle)
 {
     _Value = value;
     _Action = action;
 }
 public DdemlStringActivityEventArgs(
     string value, 
     DdemlStringActivityType action, 
     IntPtr taskHandle)
     : base(taskHandle)
 {
     _Value = value;
     _Action = action;
 }
Ejemplo n.º 3
0
        private void OnString(Ddeml.MONHSZSTRUCT mon)
        {
            // Get the string from the hsz string handle.  
            // For some reason this does not work correctly.
            StringBuilder psz = new StringBuilder(Ddeml.MAX_STRING_SIZE);
            int length = Ddeml.DdeQueryString(_Context.InstanceId, mon.hsz, psz, psz.Capacity, Ddeml.CP_WINANSI);
            string str = psz.ToString();

            DdemlStringActivityType action = DdemlStringActivityType.CleanUp;
            switch (mon.fsAction)
            {
                case Ddeml.MH_CLEANUP: action = DdemlStringActivityType.CleanUp; break;
                case Ddeml.MH_CREATE: action = DdemlStringActivityType.Create; break;
                case Ddeml.MH_DELETE: action = DdemlStringActivityType.Delete; break;
                case Ddeml.MH_KEEP: action = DdemlStringActivityType.Keep; break;
            }

            DdemlStringActivityEventArgs args = new DdemlStringActivityEventArgs(str, action, mon.hTask);

            if (StringActivity != null)
            {
                StringActivity(this, args);
            }
        }