mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Commit of missing files.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1691 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
5f9deb2f06
commit
b0c942c596
4 changed files with 143 additions and 0 deletions
11
GreenshotInterop/Interop/Base.cs
Normal file
11
GreenshotInterop/Interop/Base.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Greenshot.Interop {
|
||||
/// <summary>
|
||||
/// Common properties that has appreared in almost all objects
|
||||
/// </summary>
|
||||
public interface Common : IDisposable {
|
||||
}
|
||||
}
|
14
GreenshotInterop/Interop/IDispatch.cs
Normal file
14
GreenshotInterop/Interop/IDispatch.cs
Normal file
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices.CustomMarshalers;
|
||||
|
||||
namespace Greenshot.Interop {
|
||||
[ComImport, Guid("00020400-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
||||
public interface IDispatch {
|
||||
void Reserved();
|
||||
[PreserveSig]
|
||||
int GetTypeInfo(uint nInfo, int lcid, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(TypeToTypeInfoMarshaler))] out Type typeInfo);
|
||||
}
|
||||
}
|
39
GreenshotInterop/RemedyInterop/RemedyExporter.cs
Normal file
39
GreenshotInterop/RemedyInterop/RemedyExporter.cs
Normal file
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Greenshot.Interop.Remedy {
|
||||
public class RemedyExporter {
|
||||
private const string HELP_DESK = "HPD:Help Desk";
|
||||
private const string INCIDENT_INTERFACE = "HPD:IncidentInterface_Create";
|
||||
private const string INCIDENT_MANAGEMENT_CONSOLE = "HPD:Incident Management Console";
|
||||
private const int FIELD_INCIDENT = 1000000161;
|
||||
private const int FIELD_ATTACH = 536880912;
|
||||
|
||||
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(RemedyExporter));
|
||||
public static void Info() {
|
||||
try {
|
||||
using (IRemedyUserApplication remedyApplication = COMWrapper.GetInstance<IRemedyUserApplication>()) {
|
||||
if (remedyApplication != null) {
|
||||
//COMWrapper.DumpTypeInfo(remedyApplication);
|
||||
|
||||
ICOMFormWnd2 form = remedyApplication.GetActiveForm();
|
||||
//COMWrapper.DumpTypeInfo(form);
|
||||
LOG.InfoFormat("Server name {0}", form.GetServerName());
|
||||
LOG.InfoFormat("Form name {0}", form.GetFormName());
|
||||
if (HELP_DESK.Equals(form.GetFormName())) {
|
||||
ICOMField4 field = form.GetFieldById(FIELD_INCIDENT);
|
||||
//COMWrapper.DumpTypeInfo(field);
|
||||
LOG.InfoFormat("Incident {0}", field.Value);
|
||||
ICOMField4 fieldAttach = form.GetFieldById(FIELD_ATTACH);
|
||||
LOG.InfoFormat("Attachment {0}", fieldAttach.Value);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
LOG.Error(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
79
GreenshotInterop/RemedyInterop/RemedyInterop.cs
Normal file
79
GreenshotInterop/RemedyInterop/RemedyInterop.cs
Normal file
|
@ -0,0 +1,79 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Greenshot.Interop;
|
||||
|
||||
namespace Greenshot.Interop.Remedy {
|
||||
// "Remedy.User.1" is the active remedy, if any
|
||||
[ComProgId("Remedy.User.1")]
|
||||
public interface IRemedyUserApplication : Common {
|
||||
int Login(string a, string b, int c);
|
||||
void Logout(int a);
|
||||
ICOMFormWnd2 OpenForm(int a, string b, string c, OpenMode d, int e);
|
||||
ICOMFormWnd2 GetActiveForm();
|
||||
ICOMFormWnd2 LoadForm(int a, string b, string c, string d, OpenMode e, int f);
|
||||
object GetServerList(int a);
|
||||
object GetFormList(int a, string b);
|
||||
int HasDefaultSession();
|
||||
void OpenGuide(int a, string b, string c);
|
||||
void RunMacro(int a, string b, int c, ref object d);
|
||||
object QueryForm(int a, string b, string c, string d, string e, OpenMode f, int g);
|
||||
IRemedyUser GetUser(ref string a);
|
||||
int Login2(int a);
|
||||
void OpenAlertList(string a, string b);
|
||||
int Login3(string a, string b, string c, int d);
|
||||
}
|
||||
|
||||
public interface IRemedyUser : Common {
|
||||
}
|
||||
|
||||
public interface ICOMFormWnd2 : Common {
|
||||
string Submit();
|
||||
void Modify();
|
||||
void Close();
|
||||
void MakeVisible();
|
||||
ICOMField4 GetField(string a);
|
||||
void GiveFieldFocus(string a);
|
||||
ICOMField4 GetFieldById(int a);
|
||||
void GiveFieldFocusById(int a);
|
||||
object Query(string a);
|
||||
string GetServerName();
|
||||
string GetFormName();
|
||||
int HasFieldFocus(string a);
|
||||
int HasFieldFocusById(int a);
|
||||
int GetVUIId();
|
||||
void GetFieldList(ref object a, ref object b);
|
||||
}
|
||||
|
||||
public interface ICOMField4 : Common {
|
||||
void MakeVisible(int a);
|
||||
void MakeReadWrite(int a);
|
||||
void Disable();
|
||||
int IsVisible();
|
||||
int IsHidden();
|
||||
int IsReadOnly();
|
||||
int IsReadWrite();
|
||||
int IsDisabled();
|
||||
object GetARDBProp(uint a);
|
||||
object GetCurrencyPart(NCOMField3CurrencyPartEnum a);
|
||||
void SetCurrencyValue(string a);
|
||||
object GetDiaryHistoryList(NCOMField3DiaryHistoryFlagsEnum a);
|
||||
string GetFieldLabel();
|
||||
string GetFieldFont();
|
||||
string GetFieldColor();
|
||||
string Value {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
public enum NCOMField3CurrencyPartEnum {
|
||||
}
|
||||
public enum NCOMField3DiaryHistoryFlagsEnum {
|
||||
}
|
||||
|
||||
public enum OpenMode {
|
||||
ARQuery,
|
||||
ARModify
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue