本文整理汇总了C#中OCL类的典型用法代码示例。如果您正苦于以下问题:C# OCL类的具体用法?C# OCL怎么用?C# OCL使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OCL类属于命名空间,在下文中一共展示了OCL类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: frmFindSource
public frmFindSource(ref OCL.Oyster OSystem, ref OCL.User AccessingUser,bool EditingSystem)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
this.OSystem = OSystem;
this.AccessingUser = AccessingUser;
this.EditingSystem = EditingSystem;
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:10,代码来源:frmFindSource.cs
示例2: frmLogin
public frmLogin(ref OCL.Oyster OSystem)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
m_oyster = OSystem;
//
// TODO: Add any constructor code after InitializeComponent call
//
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:11,代码来源:frmLogin.cs
示例3: OCLWriter2
public OCLWriter2(string ApplicationName, string ApplicationVersion, int UserId,ref OCL.Oyster OSystem)
{
this.ApplicationName = ApplicationName;
this.UserId = UserId;
this.OSystem = OSystem;
OSVersion = System.Environment.OSVersion.ToString();
MachineName = System.Environment.MachineName;
MachineIPAddress = System.Net.Dns.Resolve(Environment.MachineName).AddressList[0].ToString();
UserName = System.Environment.UserDomainName + "\\" + System.Environment.UserName;
this.ApplicationVersion = ApplicationVersion;
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:11,代码来源:OCLWriter2.cs
示例4: frmFindControl
public frmFindControl(ArrayList ExcludingControls,OCL.Scene CurrentScene,ref OCL.Oyster OSystem, ref OCL.User AccessingUser)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
this.OSystem = OSystem;
this.AccessingUser = AccessingUser;
this.ExcludingControls = ExcludingControls;
this.CurrentScene = CurrentScene;
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:12,代码来源:frmFindControl.cs
示例5: frmUserPermissions
public frmUserPermissions(ref OCL.User AccessingUser,ref OCL.Oyster OSystem)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
this.AccessingUser = AccessingUser;
this.OSystem = OSystem;
//
// TODO: Add any constructor code after InitializeComponent call
//
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:14,代码来源:frmUserPermissions.cs
示例6: frmFindGroup
public frmFindGroup(ref OCL.User LUser, ref OCL.Oyster OSystem, OCL.Group SelectedGroup)
{
this.LUser = LUser;
this.OSystem = OSystem;
this.SelectedGroup = SelectedGroup;
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:14,代码来源:frmFindGroup.cs
示例7: frmSessionProperties
public frmSessionProperties(OCL.RecordingSession RecordingSession, OCL.User AccessingUser)
{
this.RecordingSession = RecordingSession;
this.AccessingUser = AccessingUser;
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
//m_Editing = false;
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:15,代码来源:frmSessionProperties.cs
示例8: frmNote
public frmNote(OCL.User AccessingUser,OCL.RecordingSession RS,OCL.Note CN)
{
this.AccessingUser = AccessingUser;
this.RS = RS;
this.CN = CN;
//
// Required for Windows Form Designer support
//
InitializeComponent();
NewFiles = new ArrayList();
DeletedFiles = new ArrayList();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:15,代码来源:frmNote.cs
示例9: frmCreateScene
public frmCreateScene(ref OCL.Oyster OSystem, ref OCL.User AccessingUser,OCL.Scene CurrentScene)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
this.OSystem = OSystem;
this.AccessingUser = AccessingUser;
this.CurrentScene = CurrentScene;
this.Text = CarverLab.Utility.AppInfo.Title + ": Edit Scene Dialog: Editing " + CurrentScene.Description;
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:16,代码来源:frmCreateScene.cs
示例10: frmRecordingSessionPermissions
public frmRecordingSessionPermissions(ref OCL.Group G,ref OCL.RecordingSession RS)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
this.RS = RS;
this.G = G;
this.Text = G.Description + "'s " + RS.Description + " Permissions";
this.groupBox1.Text = "Modify User's access to " + RS.Description + " in group " +
G.Description;
this.gbRecordingSessions.Text = "Current permissions for " + RS.Description;
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:18,代码来源:frmRecordingSessionPermissions.cs
示例11: frmScenePermissions
public frmScenePermissions(ref OCL.Oyster OSystem, ref OCL.User AccessingUser,OCL.Group G,OCL.Scene S)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
this.OSystem = OSystem;
this.AccessingUser = AccessingUser;
this.CurrentScene = S;
this.CurrentGroup = G;
this.Text = G.Description + "'s " + S.Description + " Permissions";
this.groupBox1.Text = "Modify User's access to " + S.Description + " in group " +
G.Description;
this.gbScenes.Text = "Current permissions for " + S.Description;
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:21,代码来源:frmScenePermissions.cs
示例12: DownloadSessions
public void DownloadSessions(User AccessingUser,string sDestination, bool IncludeAttachments,bool ShowProgress,ref OCL.FTPTransfer FTP)
{
Functions F = new Functions();
F.DownloadRecordingSession(AccessingUser,this,sDestination,IncludeAttachments, ShowProgress, ref FTP);
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:5,代码来源:RecordingSessions.cs
示例13: RunSearch
private void RunSearch(OCL.OysterRecordingSessionSearchType RecordingSessionSearchType, string SearchCriteria)
{
lvSearchResults.Items.Clear();
OCL.RecordingSessions ARS = new OCL.RecordingSessions();
if(SearchCriteria != string.Empty)
{
ARS = LUser.AllVisibleRecordingSessions(LUser,RecordingSessionSearchType,SearchCriteria);
}
else
{
try
{
ARS = LUser.AllVisibleRecordingSessions(LUser);
}
catch(Exception Err)
{
MessageBox.Show(Err.Message,"Programmer Error:");
return;
}
}
if(ARS.Count == 0)
{
lblInformation.Text = "No Recording Sessions found that match this search string";
lblInformation.ForeColor = Color.Red;
return;
}
foreach(OCL.RecordingSession RS in ARS)
{
ListViewItem LVI = lvSearchResults.Items.Add(RS.Description);
LVI.SubItems.Add(RS.CreatedDate.ToString());
OCL.User Owner = OSystem.GetUserById(RS.OwnerID);
LVI.SubItems.Add(Owner.Description);
LVI.SubItems.Add(RS.IsPresentation.ToString());
LVI.SubItems.Add(RS.CurrentRecordings(LUser).Count.ToString());
LVI.Tag = RS;
}
lblInformation.Text = "Search Results - Check recording sessions then click Add.";
lblInformation.ForeColor = Color.Black;
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:43,代码来源:frmFindSession.cs
示例14: MarkSessionForDeletion
internal bool MarkSessionForDeletion(OCL.User AccessingUser,OCL.RecordingSession RS)
{
string sSQL = "";
int numrecs = 0;
try
{
sSQL = "DELETE FROM tblGroupTokens WHERE " +
" ObjectTypeId = " + Convert.ToInt32(OCL.OysterObjectType.RecordingSession) +
" AND ObjectId = " + RS.ID;
numrecs = RF.ExecuteCommandNonQuery(sSQL);
sSQL = "SELECT tblNotes.Id from tblNotes left outer join tblSession ON " +
"tblSession.Id = tblNotes.SessionId WHERE tblSession.Id = " + RS.ID;
DataSet DS = RF.GetDataSet(sSQL);
foreach(DataRow R1 in DS.Tables[0].Rows)
{
int NoteID = Convert.ToInt32(R1[0]);
sSQL = "DELETE FROM tblGroupTokens Where " +
" AND ObjectTypeId = " + Convert.ToInt32(OCL.OysterObjectType.Note)+
" AND ObjectId = " + NoteID;
numrecs = RF.ExecuteCommandNonQuery(sSQL);
sSQL = "SELECT ID from tblAttachments WHERE NoteId = " + NoteID;
DataSet DS2 = RF.GetDataSet(sSQL);
foreach(DataRow R2 in DS2.Tables[0].Rows)
{
int AttachmentID = Convert.ToInt32(R2[0]);
sSQL = "DELETE FROM tblGroupTokens Where " +
" AND ObjectTypeId = " + Convert.ToInt32(OCL.OysterObjectType.Attachment) +
" AND ObjectId = " + AttachmentID;
numrecs = RF.ExecuteCommandNonQuery(sSQL);
}
}
sSQL = "UPDATE tblSession SET OwnerId = " +
((OCL.User)this.GetUnassignedObject(OCL.OysterUnassignedObjects.User)).mvarID +
", IsMarkedForDeletion <> 0" +
" WHERE ID = " + RS.ID;
numrecs = RF.ExecuteCommandNonQuery(sSQL);
if(numrecs > 0)
return true;
else
return false;
}
catch(Exception Err)
{
throw new Exception(Err.Message);
}
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:51,代码来源:Functions.cs
示例15: PlayerOptions
public PlayerOptions(string DefaultOysterAddress,int DefaultOysterConnectionPort,int DefaultOysterFilePort, string DefaultOysterDeviceID,string OysterDeviceFriendlyName, bool ManualConfiguration,OCL.OysterRecordingSessionSearchType DefaultSearchType, string DefaultBeginDate, string DefaultEndDate)
{
ClassInit(DefaultOysterAddress,DefaultOysterConnectionPort,DefaultOysterFilePort,DefaultOysterDeviceID,OysterDeviceFriendlyName,ManualConfiguration,DefaultSearchType,DefaultBeginDate,DefaultEndDate);
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:4,代码来源:frmPlayerOptions.cs
示例16: RegistryInit
void RegistryInit(string DefaultOysterAddress,int DefaultOysterConnectionPort, int DefaultOysterFilePort,string DefaultOysterDeviceID,string OysterDeviceFriendlyName, bool ManualConfiguration,
OCL.OysterRecordingSessionSearchType DefaultSearchType, string DefaultBeginDate, string DefaultEndDate)
{
m_sDefaultOysterAddress = (string)
m_RegKey.GetValue("DefaultOysterAddress",DefaultOysterAddress);
m_iDefaultOysterConnectionPort = (int)
m_RegKey.GetValue("DefaultOysterConnectionPort",DefaultOysterConnectionPort);
m_iDefaultOysterFilePort = (int)
m_RegKey.GetValue("DefaultOysterFilePort",DefaultOysterFilePort);
m_sDefaultOysterDeviceID = (string)
m_RegKey.GetValue("DefaultOysterDeviceID",DefaultOysterDeviceID);
m_sOysterDeviceFriendlyName = (string)
m_RegKey.GetValue("OysterDeviceFriendlyName",OysterDeviceFriendlyName);
m_iDefaultSearchType = (OCL.OysterRecordingSessionSearchType)
Convert.ToInt32(m_RegKey.GetValue("DefaultSearchType",Convert.ToInt32(DefaultSearchType)));
m_sDefaultBeginDate = (string)
m_RegKey.GetValue("DefaultBeginDate",DefaultBeginDate);
m_sDefaultEndDate = (string)
m_RegKey.GetValue("DefaultEndDate",DefaultEndDate);
m_bManualConfiguration = bool.Parse((string)m_RegKey.GetValue("ManualConfiguration",ManualConfiguration.ToString()));
m_bHasBeenSaved = bool.Parse((string)m_RegKey.GetValue("HasBeenSaved",false.ToString()));
m_bDebugMode = bool.Parse((string)m_RegKey.GetValue("Debug",false.ToString()));
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:23,代码来源:frmPlayerOptions.cs
示例17: RemoveNote
internal bool RemoveNote(OCL.User AccessingUser, OCL.Note CurrentNote)
{
try
{
if(CurrentNote.CanDelete(AccessingUser))
{
//Remove any attached files
if(CurrentNote.HasAttachment)
{
foreach(OCL.Attachment NA in CurrentNote.FileAttachments)
{
this.RemoveNoteAttachment(CurrentNote.mvarID, NA.ID);
}
}
string sSQL = "DELETE FROM tblNotes WHERE Id = " + CurrentNote.ID;
int numrecs = RF.ExecuteCommandNonQuery(sSQL);
if(numrecs < 1)
throw new Exception("Failed to delete Note " + CurrentNote.ID +
" for unknown reason");
else
return true;
}
return false;
}
catch(Exception Err)
{
throw new ApplicationException(Err.Message);
}
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:31,代码来源:Functions.cs
示例18: UploadFiles
internal string[] UploadFiles(string[] sourcefiles,bool ShowProgress,bool EncryptFileNames,ref OCL.FTPTransfer FT)
{
OCL.Attachments AS = new Attachments();
try
{
FT.ConnectToOysterServer(ServerAddress);
//FT.ConnectToOysterServer("ome-prototype");
}
catch(Exception Err)
{
throw new Exception(Err.Message);
}
System.IO.FileInfo[] FI = new System.IO.FileInfo[sourcefiles.Length];
int i = 0;
foreach(string CFile in sourcefiles)
{
FI[i] = new System.IO.FileInfo(CFile);
i++;
}
string[] EncodedFileNames = new string[1];
try
{
EncodedFileNames = FT.UploadFile(FI,ShowProgress,EncryptFileNames);
}
catch(Exception Err)
{
throw new Exception(Err.Message);
}
try
{
FT.DisconnectFromOysterServer();
}
catch(Exception Err)
{
string peekError = Err.Message;
}
return EncodedFileNames;
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:40,代码来源:Functions.cs
示例19: UpdatePermission
internal bool UpdatePermission(OCL.Group CurrentGroup,OCL.User CurrentUser, OCL.OysterObjectType ObjectType,
int ObjectId, bool IsVisible, bool CanAdd, bool CanEdit, bool CanDelete, bool IsUsable,
bool CanEditPermissions,bool CanSeePermissions,
bool CanAddObjectA,bool CanEditObjectA,bool CanDeleteObjectA,
bool CanAddObjectB,bool CanEditObjectB,bool CanDeleteObjectB,
int AddedByUserId)
{
string sSQL = "SELECT * FROM tblGroupTokens WHERE GroupId = " + CurrentGroup.ID +
" AND UserId = " + CurrentUser.ID + " AND ObjectTypeId = " + Convert.ToInt32(ObjectType) +
" AND ObjectId = " + ObjectId;
int numrecs = RF.ExecuteQuery(sSQL);
if(numrecs < 1)
{
throw new Exception("Attempted to update a record that does not exist in tblGroupTokens");
// return InsertPermission(CurrentGroup,CurrentUser,ObjectType,ObjectId,IsVisible,
// CanAdd,CanEdit,CanDelete,IsUsable,AddedByUserId);
}
else
{
//UPDATE EXISTING VALUES WITH AN UPDATE STATEMENT
sSQL = "UPDATE tblGroupTokens SET IsVisible = " + Convert.ToInt32(IsVisible) +
", CanAdd = " + Convert.ToInt32(CanAdd) +
", CanEdit = " + Convert.ToInt32(CanEdit) +
", CanDelete = " + Convert.ToInt32(CanDelete) +
", IsUsable = " + Convert.ToInt32(IsUsable) +
", CanEditPermissions = " + Convert.ToInt32(CanEditPermissions) +
", CanSeePermissions = " + Convert.ToInt32(CanSeePermissions) +
", CanAddObjectA = " + Convert.ToInt32(CanAddObjectA) +
", CanEditObjectA = " + Convert.ToInt32(CanEditObjectA) +
", CanDeleteObjectA = " + Convert.ToInt32(CanDeleteObjectA) +
", CanAddObjectB = " + Convert.ToInt32(CanAddObjectB) +
", CanEditObjectB = " + Convert.ToInt32(CanEditObjectB) +
", CanDeleteObjectB = " + Convert.ToInt32(CanDeleteObjectB) +
" WHERE GroupId = " + CurrentGroup.ID +
" AND UserId = " + CurrentUser.ID +
" AND ObjectTypeId = " + Convert.ToInt32(ObjectType) +
" AND ObjectId = " + ObjectId;
}
numrecs = 0;
try
{
numrecs = RF.ExecuteCommandNonQuery(sSQL);
}
catch(System.Data.SqlClient.SqlException Err)
{
throw new Exception(Err.Message);
}
if(numrecs > 0)
return true;
else
return false;
}
开发者ID:CarverLab,项目名称:Oyster,代码行数:54,代码来源:Functions.cs
示例20: UpdateObjectInGroup
/// <summary>
/// Updates an Object within a supplied Group
/// Object must be an object that is recognized by OysterObjectType values;
/// </summary>
/// <param name="AccessingUser"></param>
/// <param name="Obj"></param>
/// <param name="CurrentGroup"></param>
/// <param name="UpdatedValues"></param>
/// <returns>Returns true if success otherwise false means access denied</returns>
internal bool UpdateObjectInGroup(OCL.User AccessingUser, object Obj, OCL.Group CurrentGroup, OCL.Permission UpdatedValues)
{
OCL.User DefaultUser = (OCL.User)GetUnassignedObject(OCL.OysterUnassignedObjects.User);
OCL.OysterObjectType OBT = OCL.OysterObjectType.None;
int ObjectTypeId = 0;
int ObjectId = 0;
string sType = "Unknown Type";
if(Obj is OCL.User)
{
if(!CurrentGroup.CanEditUserPermissions(AccessingUser))
return false;
sType = "User";
OCL.User U = (OCL.User)Obj;
ObjectTypeId = (int)U.ObjectType;
ObjectId = U.ID;
OBT = OCL.OysterObjectType.User;
}
else if(Obj is OCL.Recording)
{
if(!CurrentGroup.CanEditRecordingPermissions(AccessingUser))
return false;
sType = "Recording";
OCL.Recording R = (OCL.Recording)Obj;
ObjectTypeId = (int)R.ObjectType;
ObjectId = R.ID;
OBT = OCL.OysterObjectType.Recording;
}
else if(Obj is OCL.Source)
{
if(!CurrentGroup.CanEditSourcePermissions(AccessingUser))
return false;
sType = "Source";
OCL.Source S = (OCL.Source)Obj;
ObjectTypeId = (int)S.ObjectType;
ObjectId = S.ID;
OBT = OCL.OysterObjectType.Source;
}
else if(Obj is OCL.Control)
{
if(!CurrentGroup.CanEditControlPermissions(AccessingUser))
return false;
sType = "Control";
OCL.Control C = (OCL.Control)Obj;
ObjectTypeId = (int)C.ObjectType;
ObjectId = C.ID;
OBT = OCL.OysterObjectType.Control;
}
else if(Obj is OCL.Scene)
{
if(!CurrentGroup.CanEditScenePermissions(AccessingUser))
return false;
sType = "Scene";
OCL.Scene S = (OCL.Scene)Obj;
ObjectTypeId = (int)S.ObjectType;
ObjectId = S.ID;
OBT = OCL.OysterObjectType.Scene;
}
else if(Obj is OCL.Note)
{
if(!CurrentGroup.CanEditNotePermissions(AccessingUser))
return false;
sType = "Note";
OCL.Note N = (OCL.Note)Obj;
ObjectTypeId = (int)N.ObjectType;
ObjectId = N.ID;
OBT = OCL.OysterObjectType.Note;
}
else if(Obj is OCL.RecordingSession)
{
if(!CurrentGroup.CanEditRecordingSessionPermissions(AccessingUser))
return false;
sType = "RecordingSession";
OCL.RecordingSession RS = (OCL.RecordingSession)Obj;
ObjectTypeId = (int)RS.ObjectType;
OBT = RS.ObjectType;
ObjectId = RS.ID;
}
else if(Obj is OCL.Attachment)
{
if(!CurrentGroup.CanEditAttachmentPermissions(AccessingUser))
return false;
sType = "Attachment";
OCL.Attachment A = (OCL.Attachment)Obj;
ObjectTypeId = (int)A.ObjectType;
ObjectId = A.ID;
OBT = A.ObjectType;
}
//.........这里部分代码省略.........
开发者ID:CarverLab,项目名称:Oyster,代码行数:101,代码来源:Functions.cs
注:本文中的OCL类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论