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();
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 6
0
        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>");
        }
Exemplo n.º 7
0
        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>");
        }
Exemplo n.º 8
0
        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>");
                }
            }
        }
Exemplo n.º 9
0
        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>");
        }
Exemplo n.º 13
0
        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>");
        }
Exemplo n.º 14
0
        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();
        }
Exemplo n.º 15
0
        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>");
        }
Exemplo n.º 16
0
 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;
        }
Exemplo n.º 18
0
        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);
     }
 }
Exemplo n.º 20
0
        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");
            }
        }
Exemplo n.º 22
0
        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");
            }
        }
Exemplo n.º 24
0
        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();
        }
Exemplo n.º 25
0
        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");
            }
        }
Exemplo n.º 29
0
        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);
        }
Exemplo n.º 30
0
        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");
            }
        }
Exemplo n.º 31
0
 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.");
     };
 }
Exemplo n.º 32
0
 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
 );
Exemplo n.º 33
0
 /// <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);
 }
Exemplo n.º 34
0
 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
 );
Exemplo n.º 35
0
 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
 );
Exemplo n.º 36
0
 private static extern UInt16 Linux64DsmEntryImagefilexfer
 (
     ref TW_IDENTITY origin,
     ref TW_IDENTITY dest,
     DG dg,
     DAT dat,
     MSG msg,
     IntPtr twmemref
 );
Exemplo n.º 37
0
 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
 );
Exemplo n.º 38
0
 private static extern UInt16 Linux64DsmEntryImagelayout
 (
     ref TW_IDENTITY origin,
     ref TW_IDENTITY dest,
     DG dg,
     DAT dat,
     MSG msg,
     ref TW_IMAGELAYOUT twimagelayout
 );
Exemplo n.º 39
0
 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
 );
Exemplo n.º 40
0
 private static extern UInt16 Linux64DsmEntryImagenativexfer
 (
     ref TW_IDENTITY origin,
     ref TW_IDENTITY dest,
     DG dg,
     DAT dat,
     MSG msg,
     ref IntPtr intptrBitmap
 );
Exemplo n.º 41
0
 private static extern UInt16 MacosxDsmEntryImagenativexfer
 (
     ref TW_IDENTITY_MACOSX origin,
     ref TW_IDENTITY_MACOSX dest,
     DG dg,
     DAT dat,
     MSG msg,
     ref IntPtr intptrBitmap
 );
Exemplo n.º 42
0
 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
 );
Exemplo n.º 43
0
 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
 );
Exemplo n.º 44
0
 private static extern UInt16 Linux64DsmEntryRgbresponse
 (
     ref TW_IDENTITY origin,
     ref TW_IDENTITY dest,
     DG dg,
     DAT dat,
     MSG msg,
     ref TW_RGBRESPONSE twrgbresponse
 );
Exemplo n.º 45
0
 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
 );
Exemplo n.º 46
0
 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
 );
Exemplo n.º 47
0
 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
 );
Exemplo n.º 48
0
 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
 );
Exemplo n.º 49
0
 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
 );
Exemplo n.º 50
0
 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
 );
Exemplo n.º 51
0
 private static extern UInt16 WindowsTwaindsmDsmEntryImagenativexfer
 (
     ref TW_IDENTITY_LEGACY origin,
     ref TW_IDENTITY_LEGACY dest,
     DG dg,
     DAT dat,
     MSG msg,
     ref IntPtr intptrBitmap
 );
Exemplo n.º 52
0
 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
 );
Exemplo n.º 53
0
 private static extern UInt16 Linux64DsmEntryImageinfo
 (
     ref TW_IDENTITY origin,
     ref TW_IDENTITY dest,
     DG dg,
     DAT dat,
     MSG msg,
     ref TW_IMAGEINFO_LINUX64 twimageinfolinux64
 );
Exemplo n.º 54
0
 private static extern UInt16 Linux64DsmEntryImagememxfer
 (
     ref TW_IDENTITY origin,
     ref TW_IDENTITY dest,
     DG dg,
     DAT dat,
     MSG msg,
     ref TW_IMAGEMEMXFER_LINUX64 twimagememxferlinux64
 );
Exemplo n.º 55
0
 private static extern UInt16 MacosxDsmEntryImagefilexfer
 (
     ref TW_IDENTITY_MACOSX origin,
     ref TW_IDENTITY_MACOSX dest,
     DG dg,
     DAT dat,
     MSG msg,
     IntPtr twmemref
 );
Exemplo n.º 56
0
        /// <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));
        }
Exemplo n.º 57
0
 private static extern UInt16 WindowsTwaindsmDsmEntryImagefilexfer
 (
     ref TW_IDENTITY_LEGACY origin,
     ref TW_IDENTITY_LEGACY dest,
     DG dg,
     DAT dat,
     MSG msg,
     IntPtr twmemref
 );
Exemplo n.º 58
0
 /// <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);
 }
Exemplo n.º 59
0
 private static extern UInt16 Linux64DsmEntryPalette8
 (
     ref TW_IDENTITY origin,
     ref TW_IDENTITY dest,
     DG dg,
     DAT dat,
     MSG msg,
     ref TW_PALETTE8 twpalette8
 );
Exemplo n.º 60
0
 private static extern UInt16 Linux64DsmEntryJpegcompression
 (
     ref TW_IDENTITY origin,
     ref TW_IDENTITY dest,
     DG dg,
     DAT dat,
     MSG msg,
     ref TW_JPEGCOMPRESSION twjpegcompression
 );