本文整理汇总了C#中RC类的典型用法代码示例。如果您正苦于以下问题:C# RC类的具体用法?C# RC怎么用?C# RC使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RC类属于命名空间,在下文中一共展示了RC类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowMessages
public ShowMessages(RC.Gmail.GmailAtomFeed.AtomFeedEntryCollection aGMailFeed)
{
InitializeComponent();
setGridViewStyle();
try
{
if (aGMailFeed.Count != 0)
{
for (int i = 0; i < aGMailFeed.Count; i++)
{
gridViewMessages.Rows.Add(i + 1, aGMailFeed[i].Subject, aGMailFeed[i].FromEmail);
gridViewMessages.Rows[gridViewMessages.Rows.Count - 1].Tag = aGMailFeed[i].Link;
}
labelNoNewMessages.Visible = false;
}
else
{
Melissa.Say("You have no new messages!");
gridViewMessages.Visible = false;
labelNoNewMessages.Visible = true;
}
}
catch { }
}
示例2: MessagingManager
public MessagingManager( AuthInfo authInfo,
EmailServiceDescription emailServiceDescription,
OpenPGPRing openPgpRing,
XmppServiceDescription xmppServiceDescription,
OTRKeyRing otrKeyring,
ContactManager contactManager,
Logger logger,
int inboxCheckIntervall,
bool isInMinutes)
{
m_AuthInfo = authInfo;
m_EmailServiceDescription = emailServiceDescription;
m_OpenPgpRing = openPgpRing;
m_XmppServiceDescription = xmppServiceDescription;
m_OtrKeyRing = otrKeyring;
m_Logger = logger;
m_InboxCheckIntervall = inboxCheckIntervall;
m_bIsIntervallInMinutes = isInMinutes;
m_ConversationManager = new ConversationManager ();
m_ContactManager = contactManager;
RC rcMail = initEmailManager();
RC rcXmpp = initXmppManager();
m_Status = RC.RC_OK;
if (rcMail != RC.RC_OK) {
m_Status = RC.RC_COULD_NOT_INIT_EMAIL;
}
if (rcXmpp != RC.RC_OK) {
m_Status = RC.RC_COULD_NOT_INIT_XMPP;
}
}
示例3: find
private static void find(RC A, RC B, RC C, RC D, RC K, int i, int j, out char symbol)
{
if (A.r == i && A.c == j)
{
symbol = 'A';
}
else if (B.r == i && B.c == j)
{
symbol = 'B';
}
else if (C.r == i && C.c == j)
{
symbol = 'C';
}
else if (D.r == i && D.c == j)
{
symbol = 'D';
}
else if (K.r == i && K.c == j)
{
symbol = 'K';
}
else if ((i + j) % 2 == 0)
{
symbol = '+';
}
else
{
symbol = '-';
}
}
示例4: PackagesFromUndumpBuffer
public static int PackagesFromUndumpBuffer(out byte data, int len, RC.ChannelAndSubdFn channel_callback, RC.PackageDelegate package_callback, RC.PackageMatchDelegate lock_callback) {
RCSharp.ChannelAndSubdFnWrapper channel_callback_wrapper = new RCSharp.ChannelAndSubdFnWrapper (channel_callback);
RCSharp.PackageDelegateWrapper package_callback_wrapper = new RCSharp.PackageDelegateWrapper (package_callback);
RCSharp.PackageMatchDelegateWrapper lock_callback_wrapper = new RCSharp.PackageMatchDelegateWrapper (lock_callback);
int raw_ret = rc_extract_packages_from_undump_buffer(out data, len, channel_callback_wrapper.NativeDelegate, package_callback_wrapper.NativeDelegate, lock_callback_wrapper.NativeDelegate, IntPtr.Zero);
int ret = raw_ret;
return ret;
}
示例5: PackagesFromDebianFile
public static int PackagesFromDebianFile(string filename, RC.Channel channel, RC.PackageDelegate cb) {
IntPtr filename_as_native = GLib.Marshaller.StringToPtrGStrdup (filename);
RCSharp.PackageDelegateWrapper cb_wrapper = new RCSharp.PackageDelegateWrapper (cb);
int raw_ret = rc_extract_packages_from_debian_file(filename_as_native, channel == null ? IntPtr.Zero : channel.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
int ret = raw_ret;
GLib.Marshaller.Free (filename_as_native);
return ret;
}
示例6: PackagesFromDirectory
public static int PackagesFromDirectory(string path, RC.Channel channel, RC.Packman packman, bool recursive, RC.PackageDelegate cb) {
IntPtr path_as_native = GLib.Marshaller.StringToPtrGStrdup (path);
RCSharp.PackageDelegateWrapper cb_wrapper = new RCSharp.PackageDelegateWrapper (cb);
int raw_ret = rc_extract_packages_from_directory(path_as_native, channel == null ? IntPtr.Zero : channel.Handle, packman == null ? IntPtr.Zero : packman.Handle, recursive, cb_wrapper.NativeDelegate, IntPtr.Zero);
int ret = raw_ret;
GLib.Marshaller.Free (path_as_native);
return ret;
}
示例7: ApiExit
public static RC ApiExit(Context ctx, RC rc)
{
// If the ctx handle is not NULL, then we must hold the connection handle mutex here. Otherwise the read (and possible write) of db->mallocFailed is unsafe, as is the call to sqlite3Error().
Debug.Assert(ctx == null || MutexEx.Held(ctx.Mutex));
if (ctx != null && (ctx.MallocFailed || rc == RC.IOERR_NOMEM))
{
Error(ctx, RC.NOMEM, null);
ctx.MallocFailed = false;
rc = RC.NOMEM;
}
return (RC)((int)rc & (ctx != null ? ctx.ErrMask : 0xff));
}
示例8: OnSubworldRemoved
protected virtual void OnSubworldRemoved (RC.World subworld)
{
GLib.Value ret = GLib.Value.Empty;
GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
GLib.Value[] vals = new GLib.Value [2];
vals [0] = new GLib.Value (this);
inst_and_params.Append (vals [0]);
vals [1] = new GLib.Value (subworld);
inst_and_params.Append (vals [1]);
g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
foreach (GLib.Value v in vals)
v.Dispose ();
}
示例9: Form1
public Form1()
{
scene = new Scene();
scene.redraw += new EventHandler(scene_redraw);
InitializeComponent();
simpleOpenglControl1.InitializeContexts();
scene.Initialize();
Otros.LoadTexture();
scene.element=new Lugar();//new Base111(new Point3D(0,-2.6,-20),7,new float[]{1.0f,0.4f,0.2f,1.0f});
rc=new RC(this);
rc.Show();
}
示例10: Error
//public static void Error(Context ctx, RC rc, int noString) { Error(ctx, rc, (rc == 0 ? null : string.Empty)); }
public static void Error(Context ctx, RC rc, string fmt, params object[] args)
{
if (ctx != null && (ctx.Err != null || (ctx.Err = Vdbe.ValueNew(ctx)) != null))
{
ctx.ErrCode = rc;
if (fmt != null)
{
string z = C._vmtagprintf(ctx, fmt, args);
Vdbe.ValueSetStr(ctx.Err, -1, z, TEXTENCODE.UTF8, C.DESTRUCTOR_DYNAMIC);
}
else
Vdbe.ValueSetStr(ctx.Err, 0, null, TEXTENCODE.UTF8, C.DESTRUCTOR_STATIC);
}
}
示例11: ptrmapPutOvflPtr
internal void ptrmapPutOvflPtr(byte[] pCell, ref RC pRC)
{
if (pRC != 0)
return;
var info = new CellInfo();
Debug.Assert(pCell != null);
btreeParseCellPtr(pCell, ref info);
Debug.Assert((info.nData + (this.HasIntKey ? 0 : info.nKey)) == info.nPayload);
if (info.iOverflow != 0)
{
Pgno ovfl = ConvertEx.Get4(pCell, info.iOverflow);
this.Shared.ptrmapPut(ovfl, PTRMAP.OVERFLOW1, this.ID, ref pRC);
}
}
示例12: pager_error
internal RC pager_error(RC rc)
{
var rc2 = (RC)((int)rc & 0xff);
Debug.Assert(rc == RC.OK ||
#if SQLITE_OMIT_MEMORYDB
0==MEMDB
#else
0 == this.memDb
#endif
);
Debug.Assert(this.errCode == RC.FULL || this.errCode == RC.OK || ((int)this.errCode & 0xff) == (int)RC.IOERR);
if (rc2 == RC.FULL || rc2 == RC.IOERR)
{
this.errCode = rc;
this.eState = PAGER.ERROR;
}
return rc;
}
示例13: ptrmapPutOvflPtr
static void ptrmapPutOvflPtr(MemPage page, byte[] cell, ref RC rcRef)
{
if (rcRef != RC.OK) return;
Debug.Assert(cell != null);
var info = new CellInfo();
btreeParseCellPtr(page, cell, ref info);
Debug.Assert((info.Data + (page.IntKey ? 0 : info.Key)) == info.Payload);
if (info.Overflow != 0)
{
Pid ovfl = ConvertEx.Get4(cell, info.Overflow);
ptrmapPut(page.Bt, ovfl, PTRMAP.OVERFLOW1, page.ID, ref rcRef);
}
}
示例14: ptrmapPut
static void ptrmapPut(BtShared bt, Pid key, PTRMAP type, Pid parent, ref RC rcRef)
{
if (rcRef != RC.OK) return;
Debug.Assert(MutexEx.Held(bt.Mutex));
// The master-journal page number must never be used as a pointer map page
Debug.Assert(!PTRMAP_ISPAGE(bt, PENDING_BYTE_PAGE(bt)));
Debug.Assert(bt.AutoVacuum);
if (key == 0)
{
rcRef = SysEx.CORRUPT_BKPT();
return;
}
var ptrmapIdx = PTRMAP_PAGENO(bt, key); // The pointer map page number
var page = (IPage)new PgHdr(); // The pointer map page
var rc = bt.Pager.Acquire(ptrmapIdx, ref page, false);
if (rc != RC.OK)
{
rcRef = rc;
return;
}
var offset = (int)PTRMAP_PTROFFSET(ptrmapIdx, key); // Offset in pointer map page
if (offset < 0)
{
rcRef = SysEx.CORRUPT_BKPT();
goto ptrmap_exit;
}
Debug.Assert(offset <= (int)bt.UsableSize - 5);
var ptrmap = Pager.GetData(page); // The pointer map page
if (type != (PTRMAP)ptrmap[offset] || ConvertEx.Get4(ptrmap, offset + 1) != parent)
{
TRACE("PTRMAP_UPDATE: %d->(%d,%d)\n", key, type, parent);
rcRef = rc = Pager.Write(page);
if (rc == RC.OK)
{
ptrmap[offset] = (byte)type;
ConvertEx.Put4(ptrmap, offset + 1, parent);
}
}
ptrmap_exit:
Pager.Unref(page);
}
示例15: copyNodeContent
static void copyNodeContent(MemPage from, MemPage to, ref RC rcRef)
{
if (rcRef == RC.OK)
{
BtShared bt = from.Bt;
var fromData = from.Data;
var toData = to.Data;
int fromHdr = from.HdrOffset;
int toHdr = (to.ID == 1 ? 100 : 0);
Debug.Assert(from.IsInit);
Debug.Assert(from.Frees >= toHdr);
Debug.Assert(ConvertEx.Get2(fromData, fromHdr + 5) <= (int)bt.UsableSize);
// Copy the b-tree node content from page pFrom to page pTo.
int data = ConvertEx.Get2(fromData, fromHdr + 5);
Buffer.BlockCopy(fromData, data, toData, data, (int)bt.UsableSize - data);
Buffer.BlockCopy(fromData, fromHdr, toData, toHdr, from.CellOffset + 2 * from.Cells);
// Reinitialize page pTo so that the contents of the MemPage structure match the new data. The initialization of pTo can actually fail under
// fairly obscure circumstances, even though it is a copy of initialized page pFrom.
to.IsInit = false;
var rc = btreeInitPage(to);
if (rc != RC.OK)
{
rcRef = rc;
return;
}
// If this is an auto-vacuum database, update the pointer-map entries for any b-tree or overflow pages that pTo now contains the pointers to.
#if !OMIT_AUTOVACUUM
if (bt.AutoVacuum)
rcRef = setChildPtrmaps(to);
#endif
}
}