protected void Button1_Click(object sender, EventArgs e) { RequestRetrieveAttendanceRecords request = new RequestRetrieveAttendanceRecords(); request.Username = txtUsername.Text; DataTable dt = DAT.RetrieveDTR(request); GridViewDTR.DataSource = dt; GridViewDTR.DataBind(); }
protected void btnSearchEmployee_Click(object sender, EventArgs e) { RequestSearchEmployees requestSearch = new RequestSearchEmployees(); requestSearch.LName = txtSearchEmployee.Text; DataTable dt = DAT.SearchEmployees(requestSearch); grdSearchEmployee.DataSource = dt; grdSearchEmployee.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { RequestRetrieveAttendanceRecords request = new RequestRetrieveAttendanceRecords(); request.Username = Session["Username"].ToString(); DataTable dt = DAT.RetrieveDTR(request); GridViewDTR.DataSource = dt; GridViewDTR.DataBind(); }
protected void ButtonAddEmployeeCompensation_Click(object sender, EventArgs e) { RequestAddEmployeeCompensation request = new RequestAddEmployeeCompensation(); request.UserID = int.Parse(txtUserID.Text); request.BasicPay = Convert.ToDouble(txtBasicPay.Text); DAT.RegisterEmployeeCompensation(request); Response.Write("<script language='javascript'>alert('Successfully Added Compensation!.')</script>"); }
protected void Button3_Click(object sender, EventArgs e) { RequestAddWorkExperience requestAddWorkExperience = new RequestAddWorkExperience(); requestAddWorkExperience.Username = Session["Username"].ToString(); requestAddWorkExperience.YearStarted = int.Parse(txtYearStarted.Text); requestAddWorkExperience.YearEnded = int.Parse(txtYearEnded.Text); requestAddWorkExperience.Company = txtCompany.Text; requestAddWorkExperience.ExpPosition = txtExpPosition.Text; DAT.AddWorkExperience(requestAddWorkExperience); }
protected void Button3_Click(object sender, EventArgs e) { RequestAddSiblingInfo request = new RequestAddSiblingInfo(); request.Username = Session["Username"].ToString(); request.SiblingFName = txtSiblingFName.Text; request.SiblingLName = txtSiblingLName.Text; request.SiblingContactNum = txtSiblingContactNum.Text; DAT.AddSiblingInfo(request); Response.Write("<script language='javascript'>alert('Added Successful!.')</script>"); }
protected void Button1_Click(object sender, EventArgs e) { RequestUpdateTask request = new RequestUpdateTask(); request.NotifID = txtNotificationID.Text; request.UserID = int.Parse(txtEmployee.Text); request.Task = txtTasks.Text; request.TaskDate = txtDate.Text; DAT.UpdateTask(request); Response.Write("<script language='javascript'>alert('Update Successful!.')</script>"); }
protected void Button1_Click(object sender, EventArgs e) { DataTable d12 = new DataTable(); RequestLogin requestlogin = new RequestLogin(TextBoxUsername.Text.Trim(), TextBoxPassword.Text.Trim()); DataTable dt = DAT.Login(requestlogin); if (dt.Rows.Count == 1 && dt.Rows[0]["UserTypeID"].ToString() == ((int)Enum.UserType.GeneralManager).ToString() && dt.Rows[0]["AccountStatus"].ToString() != "Deactivated") { Session.Add("Username", TextBoxUsername.Text.Trim()); Response.Redirect("GeneralManager/GM_Home.aspx"); } else if (dt.Rows.Count == 1 && dt.Rows[0]["UserTypeID"].ToString() == ((int)Enum.UserType.Employee).ToString() && dt.Rows[0]["AccountStatus"].ToString() != "Deactivated") { Session.Add("Username", TextBoxUsername.Text.Trim()); Response.Redirect("Employee/Employee_Home.aspx"); } else if (dt.Rows.Count == 1 && dt.Rows[0]["UserTypeID"].ToString() == ((int)Enum.UserType.ExternalAccountant).ToString() && dt.Rows[0]["AccountStatus"].ToString() != "Deactivated") { Session.Add("Username", TextBoxUsername.Text.Trim()); Response.Redirect("ExternalAccountant/EA_Home.aspx"); } else if (dt.Rows.Count == 1 && dt.Rows[0]["UserTypeID"].ToString() == ((int)Enum.UserType.Administrator).ToString() && dt.Rows[0]["AccountStatus"].ToString() != "Deactivated") { Session.Add("Username", TextBoxUsername.Text.Trim()); Response.Redirect("/SystemAdmin/SystemsAdmin_Home.aspx"); } else if (dt.Rows.Count == 1 && dt.Rows[0]["UserTypeID"].ToString() == ((int)Enum.UserType.Programmer).ToString() && dt.Rows[0]["AccountStatus"].ToString() != "Deactivated") { Session.Add("Username", TextBoxUsername.Text.Trim()); Response.Redirect("gumagana/yay.aspx"); } else if (dt.Rows.Count == 1 && dt.Rows[0]["UserTypeID"].ToString() == ((int)Enum.UserType.Programmer).ToString() && dt.Rows[0]["AccountStatus"].ToString() == "Deactivated") { Label1.Text = "The status of your account is Deactivated."; Label1.Visible = true; } else { if (dt.Rows.Count == 1 && dt.Rows[0]["AccountStatus"].ToString() == "Deactivated") { Label1.Text = "The status of your account is Deactivated."; Label1.Visible = true; } else { Label1.Text = "Invalid Login"; Label1.Visible = true; //Response.Write("<script language='javascript'>alert('Invalid Login')</script>"); } } }
protected void Button1_Click(object sender, EventArgs e) { RequestUpdateWorkExperience request = new RequestUpdateWorkExperience(); request.Username = Session["Username"].ToString(); request.WorkExperienceID = int.Parse(txtWorkExperienceID.Text); request.YearStarted = int.Parse(txtYearStarted.Text); request.YearEnded = int.Parse(txtYearEnded.Text); request.Company = txtCompany.Text; request.ExpPosition = txtExpPosition.Text; DAT.UpdateWorkExperience(request); }
protected void Button1_Click(object sender, EventArgs e) { RequestVerifyRequests request = new RequestVerifyRequests(); request.RequestID = int.Parse(txtRequestID.Text); request.Username = Session["Username"].ToString(); request.UserID = int.Parse(txtUserID.Text); request.Status = DropDownList1.SelectedItem.ToString(); request.Remarks = txtRemarks.Text; DAT.VerifyRequest(request); Response.Write("<script language='javascript'>alert('Verified Request Successfully!.')</script>"); }
protected void Button4_Click(object sender, EventArgs e) { RequestLeaveRequest request = new RequestLeaveRequest(); request.Username = Session["Username"].ToString(); request.StartDate = CalendarStartDate.SelectedDate.ToString(); request.EndDate = CalendarEndDate.SelectedDate.ToString(); request.LeaveType = DropDownLeaveTypes.SelectedItem.ToString(); request.Reason = txtReason.Text; DAT.LeaveRequest(request); Response.Write("<script language='javascript'>alert('Successfully Added Request!.')</script>"); }
protected void Button2_Click(object sender, EventArgs e) { RequestUpdateSiblingInfo requestUpdateSiblingInfo = new RequestUpdateSiblingInfo(); requestUpdateSiblingInfo.Username = Session["Username"].ToString(); requestUpdateSiblingInfo.SiblingID = int.Parse(txtSiblingID.Text); requestUpdateSiblingInfo.SiblingFName = txtSiblingFName.Text; requestUpdateSiblingInfo.SiblingLName = txtSiblingLName.Text; requestUpdateSiblingInfo.SiblingContactNum = txtSiblingContactNum.Text; DAT.UpdateSiblingInfo(requestUpdateSiblingInfo); Response.Write("<script language='javascript'>alert('Update Successful!.')</script>"); }
protected void Button1_Click(object sender, EventArgs e) { RequestTimeChangeRequest request = new RequestTimeChangeRequest(); request.Username = Session["Username"].ToString(); request.AttendanceDateChange = txtAttendanceDateChange.Text; request.TimeInChange = txtTimeInChange.Text; request.TimeOutChange = txtTimeChangeOut.Text; request.Reason = txtReason.Text; DAT.TimeChangeRequest(request); Response.Write("<script language='javascript'>alert('Successfully Added Request!.')</script>"); }
protected void Button1_Click(object sender, EventArgs e) { RequestGetCompensation request = new RequestGetCompensation(); request.UserID = int.Parse(txtUserID.Text); DataTable dt = DAT.GetCompensation(request); txtBasicPay.Text = dt.Rows[0]["CBasicPay"].ToString(); txtTransportAllowance.Text = dt.Rows[0]["CTransport"].ToString(); txtMealAllowance.Text = dt.Rows[0]["CMeal"].ToString(); txtRiceSubsidy.Text = dt.Rows[0]["CRiceSubsidy"].ToString(); txtLaundry.Text = dt.Rows[0]["CLaundry"].ToString(); }
protected void ButtonAddEducInfo_Click(object sender, EventArgs e) { RequestAddEducInfo requestAddEducInfo = new RequestAddEducInfo(); requestAddEducInfo.Username = Session["Username"].ToString(); requestAddEducInfo.School = txtGraduateSchool.Text; requestAddEducInfo.Degree = DropDownList1.SelectedItem.ToString(); requestAddEducInfo.Course = txtCourseTaken.Text; requestAddEducInfo.YearGraduated = int.Parse(txtYearGraduated.Text); DAT.AddEducInfo(requestAddEducInfo); Response.Write("<script language='javascript'>alert('Successfully Added School!')</script>"); }
public Searcher(int offset, char[] chars, DAT <V> dat) { _dat = dat; charArr = chars; i = offset; last = dat._base[0]; if (chars.Length == 0) { begin = -1; } else { begin = offset; } }
protected void Button1_Click1(object sender, EventArgs e) { RequestActivateAccount requestActivate = new RequestActivateAccount(); requestActivate.UserID = int.Parse(txtID.Text); DataTable dt = DAT.ActivateAccount(requestActivate); DataTable UpdateGrid = DAT.ViewUsers(); GridView1.DataSource = UpdateGrid; GridView1.DataBind(); Label2.Text = "*Account Activated*"; Label2.Visible = true; }
protected void Page_Load(object sender, EventArgs e) { RequestViewGeneralInfo requestViewGeneralInfo = new RequestViewGeneralInfo(); requestViewGeneralInfo.Username = Session["Username"].ToString(); DataTable dt = DAT.ViewGeneralInfo(requestViewGeneralInfo); LabelFName.Text = dt.Rows[0]["FName"].ToString(); LabelLName.Text = dt.Rows[0]["LName"].ToString(); LabelMName.Text = dt.Rows[0]["MName"].ToString(); LabelNickname.Text = dt.Rows[0]["Nickname"].ToString(); LabelGender.Text = dt.Rows[0]["Gender"].ToString(); LabelDOB.Text = dt.Rows[0]["DOB"].ToString(); LabelCivilStatus.Text = dt.Rows[0]["CivilStatus"].ToString(); }
//xoa dat public ActionResult XoaDAT(int id) { if (int.Parse(Session["Quyen"].ToString()) == 1) { DAT d = data.DATs.FirstOrDefault(s => s.ID_DAT == id); d.TRANGTHAI = false; UpdateModel(d); data.SubmitChanges(); return(RedirectToAction("BanggiadatNB", "Tracuu")); } else { Response.StatusCode = 403; return(null); } }
protected void Button1_Click(object sender, EventArgs e) { RequestUpdateFamilyInfo request = new RequestUpdateFamilyInfo(); request.Username = Session["Username"].ToString(); request.FamilyInfoID = int.Parse(txtFamilyInfoID.Text); request.FatherFName = txtFatherFName.Text; request.FatherLName = txtFatherLName.Text; request.FatherContactNum = txtFatherCNum.Text; request.MotherFName = txtMotherFName.Text; request.MotherLName = txtMotherLName.Text; request.MotherContactNum = txtMotherCNum.Text; DAT.UpdateFamilyInfo(request); Response.Write("<script language='javascript'>alert('Update Successful!.')</script>"); }
protected void Page_Load(object sender, EventArgs e) { RequestViewCompanyInfo requestViewCompanyInfo = new RequestViewCompanyInfo(); requestViewCompanyInfo.Username = Session["Username"].ToString(); DataTable dt = DAT.ViewCompanyInfo(requestViewCompanyInfo); if (dt.Rows.Count > 0) { LabelDateHired.Text = dt.Rows[0]["DateHired"].ToString(); LabelPosition.Text = dt.Rows[0]["Position"].ToString(); } else { Response.Write("Please Inform General Manager about your Company Information"); } }
public MGMT() { config = new AmpConfig(); UserSettings = new UserSettingsModel(); Players = new List <Player>(); Coaches = new List <Coach>(); Owners = new List <Coach>(); Teams = new Dictionary <int, Team>(); PlayerPortDAT = new DAT(); CoachPortDAT = new DAT(); LeaguesAverages = new LeagueAvg(); Main = new BackgroundWorker(); Loader = new BackgroundWorker(); Functions = new BackgroundWorker(); }
protected void Page_Load(object sender, EventArgs e) { RequestViewEducInfo request = new RequestViewEducInfo(); request.Username = Session["Username"].ToString(); DataTable dt = DAT.ViewEducInfo(request); if (dt.Rows.Count > 0) { LabelGraduateSchool.Text = dt.Rows[0]["GraduateSchool"].ToString(); LabelCourseTaken.Text = dt.Rows[0]["CourseTaken"].ToString(); LabelYearGraduated.Text = dt.Rows[0]["YearGraduated"].ToString(); } else { Response.Redirect("Employee_UpdateEducInfo.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { RequestViewFamilyInfo request = new RequestViewFamilyInfo(); request.Username = Session["Username"].ToString(); DataTable dt = DAT.ViewFamilyInfo(request); GridViewFamilyInfo.DataSource = dt; GridViewFamilyInfo.DataBind(); RequestViewSiblingInfo request2 = new RequestViewSiblingInfo(); request2.Username = Session["Username"].ToString(); DataTable dt2 = DAT.ViewSiblingInfo(request2); GridViewSiblingInfo.DataSource = dt2; GridViewSiblingInfo.DataBind(); }
protected void ButtonTask_Click(object sender, EventArgs e) { RequestAddTask request = new RequestAddTask(); DataTable dt = new DataTable(); request.UserID = DropDownListEmployee.Text; request.Task = txtTasks.Text; request.TaskDate = CalendarTaskDate.SelectedDate.ToString(); try { DAT.AddTask(request); Response.Write("<script language='javascript'>alert('Added Task Successfully!.')</script>"); } catch { Response.Write("<script language='javascript'>alert('Added Task Failed!.')</script>"); } }
protected void Page_Load(object sender, EventArgs e) { RequestViewContactInfo requestViewContactInfo = new RequestViewContactInfo(); requestViewContactInfo.Username = Session["Username"].ToString(); DataTable dt = DAT.ViewContactInfo(requestViewContactInfo); if (dt.Rows.Count > 0) { LabelHomeNum.Text = dt.Rows[0]["HomeNum"].ToString(); LabelCellphoneNum.Text = dt.Rows[0]["CellphoneNum"].ToString(); LabelHomeAddress.Text = dt.Rows[0]["HomeAddress"].ToString(); LabelEmail.Text = dt.Rows[0]["Email"].ToString(); } else { Response.Redirect("GM_UpdateContactInfo.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { Session["Username"].ToString(); } catch { Response.Redirect("../Login.aspx"); } RequestViewLeaveRequest request = new RequestViewLeaveRequest(); request.Username = Session["Username"].ToString(); DataTable dt = DAT.ViewLeaveRequest(request); GridView1.DataSource = dt; GridView1.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { RequestViewGovtInfo requestViewGovtInfo = new RequestViewGovtInfo(); requestViewGovtInfo.Username = Session["Username"].ToString(); DataTable dt = DAT.ViewGovtInfo(requestViewGovtInfo); if (dt.Rows.Count > 0) { LabelTIN.Text = dt.Rows[0]["TIN"].ToString(); LabelSSS.Text = dt.Rows[0]["SSS"].ToString(); LabelPhilHealth.Text = dt.Rows[0]["PhilHealth"].ToString(); LabelPagibig.Text = dt.Rows[0]["Pagibig"].ToString(); } else { Response.Redirect("GM_UpdateGovtInfo.aspx"); } }
public static bool LoadDat(string DatPath, Color Transparency) { DatReaderError status; DAT loadedDat = DATReader.ReadDat(DatPath, out status); if (status.Error != DatError.Success) { Message.Show("Error loading " + DatPath + ": " + Environment.NewLine + status.Message, MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } List <DATFile> files = new List <DATFile>(); foreach (string path in GraphicsPaths) { files.AddRange(loadedDat.GetFilesByPattern(path)); } foreach (DATFile file in files) { string ext = Path.GetExtension(file.FileName).ToLower(); if (!(ext == ".frm" || ext == ".png")) { continue; } if (ext == ".frm") { List <Bitmap> bmaps = FalloutFRM.Load(file.GetData(), Transparency); Graphics[file.Path.ToLower()] = bmaps[0]; } else { System.ComponentModel.TypeConverter tc = System.ComponentModel.TypeDescriptor.GetConverter(typeof(Bitmap)); Bitmap bitmap = (Bitmap)tc.ConvertFrom(file.GetData()); } } loadedDat.Close(); return(true); }
protected void Page_Load(object sender, EventArgs e) { RequestViewGovtInfo request = new RequestViewGovtInfo(); request.Username = Session["Username"].ToString(); DataTable dt = DAT.ViewGovtInfo(request); if (dt.Rows.Count > 0) { LabelTIN.Text = dt.Rows[0]["TIN"].ToString(); LabelSSS.Text = dt.Rows[0]["SSS"].ToString(); LabelPhilHealth.Text = dt.Rows[0]["PhilHealth"].ToString(); LabelPagibig.Text = dt.Rows[0]["Pagibig"].ToString(); } else { Response.Write("<script>alert('Hello');</script>"); Response.Redirect("Employee_UpdateGovtInfo.aspx"); } }
public static DAT.v1.DTO.BOM.Response<DAT.v1.Assets.Developement.DTO.Database.Database.Database> SelectAll(string databaseName, string authToken, string api_url, DAT.v1.Utils.Enumerations.DataExchangeFormats format) { DAT.v1.DTO.BOM.RequestOptions options = new DAT.v1.DTO.BOM.RequestOptions() { AuthenticationToken = authToken, ApiUrl = api_url, EndPoint = Constants.EndPoint, Method = DAT.v1.Utils.Enumerations.HttpVerbs.GET, RequestType = format, ResponseType = format }; switch (format) { case DAT.v1.Utils.Enumerations.DataExchangeFormats.JSON: return Utils.Serialization.JSON.Serializer.Deserialize<DAT.v1.DTO.BOM.Response<DAT.v1.Assets.Developement.DTO.Database.Database.Database>>(DAT.v1.DTO.BOM.Request.Send(options)); case DAT.v1.Utils.Enumerations.DataExchangeFormats.XML: return Utils.Serialization.XML.Serializer.Deserialize<DAT.v1.DTO.BOM.Response<DAT.v1.Assets.Developement.DTO.Database.Database.Database>>(DAT.v1.DTO.BOM.Request.Send(options)); default: throw new DAT.v1.DTO.BOM.Exceptions.SerializationNotImplementedException("Format not supported."); }; }
private static extern UInt16 LinuxDsmEntryImagememxfer ( ref TW_IDENTITY_LEGACY origin, ref TW_IDENTITY_LEGACY dest, DG dg, DAT dat, MSG msg, ref TW_IMAGEMEMXFER twimagememxfer );
/// <summary> /// Our callback delegate for Mac OS X... /// </summary> /// <param name="origin">Origin of message</param> /// <param name="dest">Message target</param> /// <param name="dg">Data group</param> /// <param name="dat">Data argument type</param> /// <param name="msg">Operation</param> /// <param name="twnull">NULL pointer</param> /// <returns>TWAIN status</returns> private UInt16 MacosxDsmEntryCallbackProxy ( ref TW_IDENTITY_MACOSX origin, ref TW_IDENTITY_MACOSX dest, DG dg, DAT dat, MSG msg, IntPtr twnull ) { ProcessEvent(msg); return ((UInt16)STS.SUCCESS); }
private static extern UInt16 MacosxDsmEntryJpegcompression ( ref TW_IDENTITY_MACOSX origin, ref TW_IDENTITY_MACOSX dest, DG dg, DAT dat, MSG msg, ref TW_JPEGCOMPRESSION twjpegcompression );
private static extern UInt16 MacosxDsmEntryIccprofile ( ref TW_IDENTITY_MACOSX origin, ref TW_IDENTITY_MACOSX dest, DG dg, DAT dat, MSG msg, ref TW_MEMORY twmemory );
private static extern UInt16 Linux64DsmEntryImagefilexfer ( ref TW_IDENTITY origin, ref TW_IDENTITY dest, DG dg, DAT dat, MSG msg, IntPtr twmemref );
private static extern UInt16 MacosxDsmEntryPalette8 ( ref TW_IDENTITY_MACOSX origin, ref TW_IDENTITY_MACOSX dest, DG dg, DAT dat, MSG msg, ref TW_PALETTE8 twpalette8 );
private static extern UInt16 Linux64DsmEntryImagelayout ( ref TW_IDENTITY origin, ref TW_IDENTITY dest, DG dg, DAT dat, MSG msg, ref TW_IMAGELAYOUT twimagelayout );
private static extern UInt16 MacosxDsmEntryImageinfo ( ref TW_IDENTITY_MACOSX origin, ref TW_IDENTITY_MACOSX dest, DG dg, DAT dat, MSG msg, ref TW_IMAGEINFO twimageinfo );
private static extern UInt16 Linux64DsmEntryImagenativexfer ( ref TW_IDENTITY origin, ref TW_IDENTITY dest, DG dg, DAT dat, MSG msg, ref IntPtr intptrBitmap );
private static extern UInt16 MacosxDsmEntryImagenativexfer ( ref TW_IDENTITY_MACOSX origin, ref TW_IDENTITY_MACOSX dest, DG dg, DAT dat, MSG msg, ref IntPtr intptrBitmap );
private static extern UInt16 WindowsTwaindsmDsmEntryJpegcompression ( ref TW_IDENTITY_LEGACY origin, ref TW_IDENTITY_LEGACY dest, DG dg, DAT dat, MSG msg, ref TW_JPEGCOMPRESSION twjpegcompression );
private static extern UInt16 MacosxDsmEntryRgbresponse ( ref TW_IDENTITY_MACOSX origin, ref TW_IDENTITY_MACOSX dest, DG dg, DAT dat, MSG msg, ref TW_RGBRESPONSE twrgbresponse );
private static extern UInt16 Linux64DsmEntryRgbresponse ( ref TW_IDENTITY origin, ref TW_IDENTITY dest, DG dg, DAT dat, MSG msg, ref TW_RGBRESPONSE twrgbresponse );
private static extern UInt16 WindowsTwaindsmDsmEntryRgbresponse ( ref TW_IDENTITY_LEGACY origin, ref TW_IDENTITY_LEGACY dest, DG dg, DAT dat, MSG msg, ref TW_RGBRESPONSE twrgbresponse );
private static extern UInt16 WindowsTwaindsmDsmEntryImagememfilexfer ( ref TW_IDENTITY_LEGACY origin, ref TW_IDENTITY_LEGACY dest, DG dg, DAT dat, MSG msg, ref TW_IMAGEMEMXFER twimagememxfer );
private static extern UInt16 MacosxDsmEntryImagelayout ( ref TW_IDENTITY_MACOSX origin, ref TW_IDENTITY_MACOSX dest, DG dg, DAT dat, MSG msg, ref TW_IMAGELAYOUT twimagelayout );
private static extern UInt16 WindowsTwaindsmDsmEntryPalette8 ( ref TW_IDENTITY_LEGACY origin, ref TW_IDENTITY_LEGACY dest, DG dg, DAT dat, MSG msg, ref TW_PALETTE8 twpalette8 );
private static extern UInt16 WindowsTwaindsmDsmEntryImagelayout ( ref TW_IDENTITY_LEGACY origin, ref TW_IDENTITY_LEGACY dest, DG dg, DAT dat, MSG msg, ref TW_IMAGELAYOUT twimagelayout );
private static extern UInt16 LinuxDsmEntryImageinfo ( ref TW_IDENTITY_LEGACY origin, ref TW_IDENTITY_LEGACY dest, DG dg, DAT dat, MSG msg, ref TW_IMAGEINFO twimageinfo );
private static extern UInt16 WindowsTwaindsmDsmEntryImagenativexfer ( ref TW_IDENTITY_LEGACY origin, ref TW_IDENTITY_LEGACY dest, DG dg, DAT dat, MSG msg, ref IntPtr intptrBitmap );
private static extern UInt16 MacosxDsmEntryImagememxfer ( ref TW_IDENTITY_MACOSX origin, ref TW_IDENTITY_MACOSX dest, DG dg, DAT dat, MSG msg, ref TW_IMAGEMEMXFER_MACOSX twimagememxfer );
private static extern UInt16 Linux64DsmEntryImageinfo ( ref TW_IDENTITY origin, ref TW_IDENTITY dest, DG dg, DAT dat, MSG msg, ref TW_IMAGEINFO_LINUX64 twimageinfolinux64 );
private static extern UInt16 Linux64DsmEntryImagememxfer ( ref TW_IDENTITY origin, ref TW_IDENTITY dest, DG dg, DAT dat, MSG msg, ref TW_IMAGEMEMXFER_LINUX64 twimagememxferlinux64 );
private static extern UInt16 MacosxDsmEntryImagefilexfer ( ref TW_IDENTITY_MACOSX origin, ref TW_IDENTITY_MACOSX dest, DG dg, DAT dat, MSG msg, IntPtr twmemref );
/// <summary> /// Generic DSM when the dest must be a data source... /// </summary> /// <param name="a_dg">Data group</param> /// <param name="a_dat">Data argument type</param> /// <param name="a_msg">Operation</param> /// <param name="a_twmemref">Pointer to data</param> /// <returns>TWAIN status</returns> public STS DsmEntry(DG a_dg, DAT a_dat, MSG a_msg, IntPtr a_twmemref) { STS sts; // Submit the work to the TWAIN thread... if ((m_threadTwain != null) && (m_threadTwain.ManagedThreadId != Thread.CurrentThread.ManagedThreadId)) { lock (m_lockTwain) { // Set our command variables... ThreadData threaddata = default(ThreadData); threaddata.twmemref = a_twmemref; threaddata.dg = a_dg; threaddata.msg = a_msg; threaddata.dat = a_dat; long lIndex = m_twaincommand.Submit(threaddata); // Submit the command and wait for the reply... CallerToThreadSet(); ThreadToCallerWaitOne(); // Return the result... a_twmemref = m_twaincommand.Get(lIndex).twmemref; sts = m_twaincommand.Get(lIndex).sts; // Clear the command variables... m_twaincommand.Delete(lIndex); } return (sts); } // Log it... if (Log.GetLevel() > 0) { Log.LogSendBefore(a_dg.ToString(), a_dat.ToString(), a_msg.ToString(), ""); } // Windows... if (ms_platform == Platform.WINDOWS) { // Issue the command... try { if (m_blUseLegacyDSM) { sts = (STS)WindowsTwain32DsmEntry(ref m_twidentitylegacyApp, ref m_twidentitylegacyDs, a_dg, a_dat, a_msg, a_twmemref); } else { sts = (STS)WindowsTwaindsmDsmEntry(ref m_twidentitylegacyApp, ref m_twidentitylegacyDs, a_dg, a_dat, a_msg, a_twmemref); } } catch { // The driver crashed... Log.LogSendAfter(STS.BUMMER.ToString(), ""); return (STS.BUMMER); } } // Linux... else if (ms_platform == Platform.LINUX) { // Issue the command... try { if (GetMachineWordBitSize() == 32) { sts = (STS)LinuxDsmEntry(ref m_twidentitylegacyApp, ref m_twidentitylegacyDs, a_dg, a_dat, a_msg, a_twmemref); } else { sts = (STS)Linux64DsmEntry(ref m_twidentityApp, ref m_twidentityDs, a_dg, a_dat, a_msg, a_twmemref); } } catch { // The driver crashed... Log.LogSendAfter(STS.BUMMER.ToString(), ""); return (STS.BUMMER); } } // Mac OS X, which has to be different... else if (ms_platform == Platform.MACOSX) { // Issue the command... try { sts = (STS)MacosxDsmEntry(ref m_twidentitymacosxApp, ref m_twidentitymacosxDs, a_dg, DAT.AUDIOINFO, a_msg, a_twmemref); } catch { // The driver crashed... Log.LogSendAfter(STS.BUMMER.ToString(), ""); return (STS.BUMMER); } } // Uh-oh... else { Log.LogSendAfter(STS.BUMMER.ToString(), ""); return (STS.BUMMER); } // Log it... if (Log.GetLevel() > 0) { Log.LogSendAfter(sts.ToString(), ""); } // All done... return (AutoDatStatus(sts)); }
private static extern UInt16 WindowsTwaindsmDsmEntryImagefilexfer ( ref TW_IDENTITY_LEGACY origin, ref TW_IDENTITY_LEGACY dest, DG dg, DAT dat, MSG msg, IntPtr twmemref );
/// <summary> /// Our callback delegate for Linux... /// </summary> /// <param name="origin">Origin of message</param> /// <param name="dest">Message target</param> /// <param name="dg">Data group</param> /// <param name="dat">Data argument type</param> /// <param name="msg">Operation</param> /// <param name="twnull">NULL pointer</param> /// <returns>TWAIN status</returns> private UInt16 LinuxDsmEntryCallbackProxy ( ref TW_IDENTITY_LEGACY origin, ref TW_IDENTITY_LEGACY dest, DG dg, DAT dat, MSG msg, IntPtr twnull ) { ProcessEvent(msg); return ((UInt16)STS.SUCCESS); }
private static extern UInt16 Linux64DsmEntryPalette8 ( ref TW_IDENTITY origin, ref TW_IDENTITY dest, DG dg, DAT dat, MSG msg, ref TW_PALETTE8 twpalette8 );
private static extern UInt16 Linux64DsmEntryJpegcompression ( ref TW_IDENTITY origin, ref TW_IDENTITY dest, DG dg, DAT dat, MSG msg, ref TW_JPEGCOMPRESSION twjpegcompression );