Ejemplo n.º 1
0
        public static int SearchDialog(IntPtr listWin, int findNext)
        {
            ListerResult result = ListerResult.Error;

            callSignature = String.Format("SearchDialog ({0}, {1})",
                                          listWin.ToString(), findNext);
            try {
                object listerControl = TcHandles.GetObject(listWin);
                result = Plugin.SearchDialog(listerControl, (findNext != 0));
                TraceCall(TraceLevel.Info, result.ToString());
            } catch (Exception ex) {
                ProcessException(ex);
            }
            return((int)result);
        }
Ejemplo n.º 2
0
        public static int LoadNextW(IntPtr parentWin, IntPtr listWin,
                                    [MarshalAs(UnmanagedType.LPWStr)] string fileToLoad, int flags)
        {
            ListerResult result    = ListerResult.Error;
            ShowFlags    showFlags = (ShowFlags)flags;

            callSignature = String.Format("LoadNext ({0}, {1}, {2})",
                                          listWin.ToString(), fileToLoad, showFlags.ToString());
            try {
                object listerControl = TcHandles.GetObject(listWin);
                result = Plugin.LoadNext(listerControl, fileToLoad, showFlags);
                TcHandles.UpdateHandle(listWin, listerControl);
                TraceCall(TraceLevel.Warning, result.ToString());
            } catch (Exception ex) {
                ProcessException(ex);
            }
            return((int)result);
        }
Ejemplo n.º 3
0
        public static int SendCommand(IntPtr listWin, int command, int parameter)
        {
            ListerResult  result = ListerResult.Error;
            ListerCommand cmd    = (ListerCommand)command;
            ShowFlags     par    = (ShowFlags)parameter;

            callSignature = String.Format("SendCommand ({0}, {1}, {2})",
                                          listWin.ToString(), cmd.ToString(), par.ToString());
            try {
                object listerControl = TcHandles.GetObject(listWin);
                result = Plugin.SendCommand(listerControl, cmd, par);
                TcHandles.UpdateHandle(listWin, listerControl);
                TraceCall(TraceLevel.Info, result.ToString());
            } catch (Exception ex) {
                ProcessException(ex);
            }
            return((int)result);
        }
Ejemplo n.º 4
0
        public static int PrintW(IntPtr listWin, [MarshalAs(UnmanagedType.LPWStr)] string fileToPrint,
                                 [MarshalAs(UnmanagedType.LPWStr)] string defPrinter, int flags, PrintMargins margins)
        {
            ListerResult result     = ListerResult.Error;
            PrintFlags   printFlags = (PrintFlags)flags;

            callSignature = String.Format("Print ({0}, {1}, {2}, {3})",
                                          listWin.ToString(), fileToPrint, defPrinter, printFlags.ToString());
            try {
                object listerControl = TcHandles.GetObject(listWin);
                result = Plugin.Print(listerControl, fileToPrint, defPrinter, printFlags, margins);
                TcHandles.UpdateHandle(listWin, listerControl);
                TraceCall(TraceLevel.Warning, result.ToString());
            } catch (Exception ex) {
                ProcessException(ex);
            }
            return((int)result);
        }
Ejemplo n.º 5
0
        public static int SearchTextW(IntPtr listWin,
                                      [MarshalAs(UnmanagedType.LPWStr)] string searchString, int searchParameter)
        {
            ListerResult    result = ListerResult.Error;
            SearchParameter sp     = (SearchParameter)searchParameter;

            callSignature = String.Format("SearchText ({0}, {1}, {2})",
                                          listWin.ToString(), searchString, sp.ToString());
            try {
                object listerControl = TcHandles.GetObject(listWin);
                result = Plugin.SearchText(listerControl, searchString, sp);
                TcHandles.UpdateHandle(listWin, listerControl);
                TraceCall(TraceLevel.Warning, result.ToString());
            } catch (Exception ex) {
                ProcessException(ex);
            }
            return((int)result);
        }