public Cache(int size) { m_nentries = 0; m_size = size; m_dict = new Dictionary <K, Dlist.Entry>(size); m_dlist = new Dlist(); }
public List <sysBpmsTask> GetAvailableProccess(Guid userID) { string staticAccessType = $"<AccessType>{(int)UserTaskRuleModel.e_UserAccessType.Static}</AccessType>"; string userIdString = userID.ToString(); List <sysBpmsTask> items = (from T in this.Context.sysBpmsTasks join P in this.Context.sysBpmsProcesses on T.ProcessID equals P.ID join D in this.Context.sysBpmsDepartmentMembers on userID equals D.UserID into Dlist join E in this.Context.sysBpmsEvents on P.ID equals E.ProcessID into Elist where (P.TypeLU == (int)sysBpmsProcess.e_TypeLU.General) && (P.StatusLU == (int)sysBpmsProcess.Enum_StatusLU.Published) && (Elist.Count(c => c.TypeLU == (int)sysBpmsEvent.e_TypeLU.StartEvent && c.SubType == (int)WorkflowStartEvent.BPMNStartEventType.None) > 0) && (this.Context.sysBpmsSplit(P.BeginTasks, ",").Any(c => c.Data == T.ElementID)) && ( (T.OwnerTypeLU == (int)Domain.sysBpmsTask.e_OwnerTypeLU.User && T.UserID.Contains(userIdString)) || (T.OwnerTypeLU == (int)Domain.sysBpmsTask.e_OwnerTypeLU.Role && (T.RoleName == string.Empty || T.RoleName == (",0:" + (int)sysBpmsDepartmentMember.e_RoleLU.Requester + ",") ||//it means that everyone can start this proccess. Dlist.Count(c => this.Context.sysBpmsSplit(T.RoleName, ",").Any(f => f.Data == ("0:" + c.RoleLU.ToString().Trim()) || f.Data == (c.DepartmentID.ToString() + ":" + c.RoleLU.ToString().Trim()))) > 0) ) || (!T.Rule.Contains(staticAccessType)))//it will be calculated in engine. select T).OrderBy(d => d.Element.Process.Name).Include(c => c.Element.Process).AsNoTracking().ToList(); return(items); }
public RenderRoutine(uint addr, int x = 0, int y = 0, int z = 0) { Address = addr; X = x; Y = y; Z = z; Dlist = null; }
public TemporalCache(int size, double limit_secs) { m_nentries = 0; m_size = size; m_limit_secs = limit_secs; m_dict = new Dictionary <K, Dlist.Entry>(size); m_dlist = new Dlist(); }
public DisasmForm(bool showByteInputBox = false, string defaultText = null) { InitializeComponent(); _dlist = new Dlist(); if (!showByteInputBox) { textBox_bytes.Visible = label_bytes.Visible = label_disas.Visible = false; textBox_disassembly.Location = new Point(10, 30); textBox_disassembly.Size = new Size(Width - 40, Height - 80); } textBox_disassembly.Text = defaultText ?? ""; }
public List <sysBpmsApplicationPage> GetAvailable(Guid?userID, bool?ShowInMenu) { List <sysBpmsApplicationPage> retVal = null; retVal = (from P in this.Context.sysBpmsApplicationPages join A in this.Context.sysBpmsApplicationPageAccesses.Where(c => c.AllowView) on P.ID equals A.ApplicationPageID into access join D in this.Context.sysBpmsDepartmentMembers on userID equals D.UserID into Dlist where (!ShowInMenu.HasValue || P.ShowInMenu == ShowInMenu) && (access.Count() == 0 || ( userID.HasValue && (access.Count(c => c.UserID.HasValue && c.UserID == userID) > 0 || access.Count(c => c.RoleLU.HasValue && Dlist.Count(d => c.RoleLU == d.RoleLU && (!c.DepartmentID.HasValue || c.DepartmentID == d.DepartmentID)) > 0) > 0) )) select P).OrderBy(c => c.DynamicForms.FirstOrDefault().Name).Include(c => c.DynamicForms).AsNoTracking().ToList(); return(retVal); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { db = new ScoreManageDataContext(); string id = Session["id"].ToString(); string username = Session["username"].ToString(); accname.Text = username; var query = from l in db.Lecturers join en in db.Enrollments on l.ID equals en.IDLecturer join sc in db.Scores on en.ID equals sc.IDEnrollment join st in db.Students on sc.IDStudent equals st.ID join t in db.Terms on en.IDTerm equals t.ID where l.ID == id select new { t.ID, t.Name }; Dlist.DataSource = query.Distinct(); Dlist.DataValueField = "ID"; Dlist.DataTextField = "Name"; Dlist.DataBind(); Dlist_SelectedIndexChanged(sender, e); } }
public List <sysBpmsThreadTask> GetListKartable(Guid UserID, int[] statusLU, PagingProperties currentPaging) { List <sysBpmsThreadTask> list = new List <sysBpmsThreadTask>(); statusLU = statusLU ?? new int[] { }; if (UserID != Guid.Empty) { var query = (from P in this.Context.sysBpmsThreadTasks join T in this.Context.sysBpmsTasks on P.TaskID equals T.ID join D in this.Context.sysBpmsDepartmentMembers on UserID equals D.UserID into Dlist where (!statusLU.Any() || statusLU.Contains(P.StatusLU)) && (P.OwnerUserID.HasValue || (P.OwnerRole != null && P.OwnerRole != string.Empty)) && (!P.OwnerUserID.HasValue || UserID == P.OwnerUserID) && (P.OwnerRole == string.Empty || Dlist.Count(c => this.Context.sysBpmsSplit(P.OwnerRole, ",").Any(f => f.Data == ("0:" + c.RoleLU.ToString().Trim()) || f.Data == (c.DepartmentID.ToString() + ":" + c.RoleLU.ToString().Trim()))) > 0) && (!T.MarkerTypeLU.HasValue || T.MarkerTypeLU == (int)Domain.sysBpmsTask.e_MarkerTypeLU.NonSequential || T.MarkerTypeLU == (int)Domain.sysBpmsTask.e_MarkerTypeLU.Loop || (T.MarkerTypeLU == (int)Domain.sysBpmsTask.e_MarkerTypeLU.Sequential && this.Context.sysBpmsThreadTasks.Count(c => c.ThreadID == P.ThreadID && c.TaskID == P.TaskID && c.StartDate < P.StartDate && c.StatusLU != (int)sysBpmsThreadTask.e_StatusLU.Done) == 0)) select P).Include(c => c.Task.Element).Include(c => c.Thread.Process).AsNoTracking(); if (currentPaging != null) { currentPaging.RowsCount = query.Count(); if (Math.Ceiling(Convert.ToDecimal(currentPaging.RowsCount) / Convert.ToDecimal(currentPaging.PageSize)) < currentPaging.PageIndex) { currentPaging.PageIndex = 1; } list = query.OrderByDescending(p => p.StartDate).Skip((currentPaging.PageIndex - 1) * currentPaging.PageSize).Take(currentPaging.PageSize).ToList(); } else { list = query.ToList(); } } return(list); }
private void textBox1_TextChanged(object sender, EventArgs e) { bool valid = Utils.IsValidHex(textBox_bytes.Text); textBox_disassembly.Text = ""; _dlist = new Dlist(); if (valid) { byte[] data = Utils.HexToBytes(textBox_bytes.Text); try { _dlist = new Dlist(data); } catch { valid = false; } } label_bytes.ForeColor = valid ? Color.Green : Color.Red; UpdateDisassembly(); }
public Disassembler(Dlist dlist, Config cfg = null) { _cfg = cfg ?? StaticConfig; _dlist = dlist ?? new Dlist(); }
public void UpdateDlist(Dlist dlist) { _dlist = dlist; UpdateDisassembly(); }