Пример #1
0
        /// <summary>
        /// Loads the images.
        /// </summary>
        /// <param name="stateinfo">The stateinfo.</param>
        private void LoadImages(object stateinfo)
        {
            try
            {
                if (InvokeRequired)
                {
                    var o = new DelegateThis(LoadImages);
                    Invoke(o, stateinfo);
                }
                else
                {
                    panel1.BackgroundImage = new Bitmap(_files[_imagePos]);
                    lblCount.Text = string.Format("{0}/{1}", _imagePos + 1, _files.Count());

                    _imagePos++;

                    if (_imagePos >= _files.Count())
                    {
                        _files = Directory.GetFiles("./PressImages/");
                        _imageCount = _files.Count();
                        _imagePos = 0;
                    }

                    Application.DoEvents();
                }
            }
            catch
            {
            }
        }
Пример #2
0
 /// <summary>
 /// Sets the panel4 image.
 /// </summary>
 private void SetPanel4Image()
 {
     if (pnl4.InvokeRequired)
     {
         var o = new DelegateThis(SetPanel4Image);
         pnl4.Invoke(o);
     }
     else
     {
         pnl4.BackgroundImage = Resources.widget_black320;
     }
 }
Пример #3
0
 /// <summary>
 /// Sets the background image.
 /// </summary>
 private void SetBackgroundImage()
 {
     if (InvokeRequired)
     {
         var o = new DelegateThis(SetBackgroundImage);
         Invoke(o);
     }
     else
     {
         BackgroundImage = Resources.kde;
     }
 }
Пример #4
0
 /// <summary>
 /// Loads the press images.
 /// </summary>
 private void LoadPressImages()
 {
     if (InvokeRequired)
     {
         var o = new DelegateThis(LoadPressImages);
         Invoke(o);
     }
     else
     {
         _pressWidget = new QWPress {Dock = DockStyle.Fill};
         pnlImage.Controls.Add(_pressWidget);
     }
 }
Пример #5
0
 /// <summary>
 /// Ts the company.
 /// </summary>
 private void TCompany()
 {
     if (InvokeRequired)
     {
         var o = new DelegateThis(TCompany);
         Invoke(o);
     }
     else
     {
         var f = new CompanyUI {MdiParent = this};
         f.Show();
     }
 }
Пример #6
0
 /// <summary>
 /// Ts the background image.
 /// </summary>
 private void TBackgroundImage()
 {
     if (InvokeRequired)
     {
         var o = new DelegateThis(TBackgroundImage);
         Invoke(o);
     }
     else
     {
         BackgroundImage = Resources.widget_black480;
     }
 }
Пример #7
0
        /// <summary>
        /// Prints the nomor penyerahan berkas.
        /// </summary>
        private void PrintNomorPenyerahanBerkas()
        {
            if (InvokeRequired)
            {
                var o = new DelegateThis(PrintNomorPenyerahanBerkas);
                Invoke(o);
            }
            else
            {
                string session = EnvironmentRepository.GetLocalSession();

                var nomor = new Berkas
                                {
                                    LayananID = "A",
                                    Session = session
                                };

                var db = new BerkasBase();
                int nResult = db.SaveByDml(nomor);

                if (nResult == 1)
                {
                    Berkas rs = db.GetById(session);

                    try
                    {
                        string nocetak =
                            string.Format("{0}-{1}", rs.LayananID,
                                          rs.LayananNomor.ToString().Trim().PadLeft(3, '0'));

                        /* ---------------------------
                         *  get copies configuration
                         * --------------------------- */
                        Layanan layanan = new LayananBase().GetById("A");

                        try
                        {
                            switch (Settings.Default.PrintingLayout)
                            {
                                case 0: // ESC
                                    QWPrinting.PrintWithESC(nocetak, "PENYERAHAN BERKAS", layanan.Copies, this);
                                    break;
                                case 1: // CR
                                    QWPrinting.PrintWithCRLayout(nocetak, "PENYERAHAN BERKAS", layanan.Copies, this);
                                    break;
                            }
                        }
                        catch (NullReferenceException)
                        {
                        }
                    }
                    catch (NullReferenceException)
                    {
                    }
                }
            }
        }
Пример #8
0
 /// <summary>
 /// Initializes the kasir widget.
 /// </summary>
 private void InitializeKasirWidget()
 {
     if (InvokeRequired)
     {
         var o = new DelegateThis(InitializeKasirWidget);
         Invoke(o);
     }
     else
     {
         _qwKasir = new QWKasirPrint();
         _qwKasir.Location = new Point(Width - _qwKasir.Width, Height - _qwKasir.Height + 15);
         Controls.Add(_qwKasir);
     }
 }
Пример #9
0
 /// <summary>
 /// Ts the workflow.
 /// </summary>
 private void TWorkflow()
 {
     if (InvokeRequired)
     {
         var o = new DelegateThis(TWorkflow);
         Invoke(o);
     }
     else
     {
         var f = new WorkflowUI {MdiParent = this};
         f.Show();
     }
 }
Пример #10
0
 /// <summary>
 /// Initalizes the penyerahan berkas widget.
 /// </summary>
 private void InitalizePenyerahanBerkasWidget()
 {
     if (InvokeRequired)
     {
         var o = new DelegateThis(InitalizePenyerahanBerkasWidget);
         Invoke(o);
     }
     else
     {
         _qwBerkas = new QWEntryPrint();
         _qwBerkas.Location = new Point(10, Height - _qwBerkas.Height + 15);
         Controls.Add(_qwBerkas);
     }
 }
Пример #11
0
 /// <summary>
 /// Ts the loket.
 /// </summary>
 private void TLoket()
 {
     if (InvokeRequired)
     {
         var o = new DelegateThis(TLoket);
         Invoke(o);
     }
     else
     {
         var f = new LoketUI {MdiParent = this};
         f.Show();
     }
 }
Пример #12
0
 /// <summary>
 /// Ts the keymap.
 /// </summary>
 private void TKeymap()
 {
     if (InvokeRequired)
     {
         var o = new DelegateThis(TKeymap);
         Invoke(o);
     }
     else
     {
         var f = new KeymapUI {MdiParent = this};
         f.Show();
     }
 }
Пример #13
0
 /// <summary>
 /// Ts the keymap.
 /// </summary>
 private void TDatabase()
 {
     if (InvokeRequired)
     {
         var o = new DelegateThis(TDatabase);
         Invoke(o);
     }
     else
     {
         var f = new DBLogonUI {MdiParent = this};
         f.Show();
     }
 }
Пример #14
0
 /// <summary>
 /// Sets the panel press image.
 /// </summary>
 private void SetPanelPressImage()
 {
     if (pnl4.InvokeRequired)
     {
         var o = new DelegateThis(SetPanelPressImage);
         pnlPress.Invoke(o);
     }
     else
     {
         pnlPress.BackgroundImage = Resources.wbox2;
     }
 }
Пример #15
0
 /// <summary>
 /// Initializes the search widget.
 /// </summary>
 private void InitializeSearchWidget()
 {
     if (InvokeRequired)
     {
         var o = new DelegateThis(InitializeSearchWidget);
         Invoke(o);
     }
     else
     {
         _qwSearch = new QWSearch {Location = new Point(10, 10)};
         Controls.Add(_qwSearch);
     }
 }
Пример #16
0
        /// <summary>
        /// Ts the loket.
        /// </summary>
        private void TLoket()
        {
            if (InvokeRequired)
            {
                var o = new DelegateThis(TLoket);
                Invoke(o);
            }
            else
            {
                /* --------------------------------------
                 *  all lokets
                 * -------------------------------------- */
                _lokets = new LoketBase().GetAll();

                /* --------------------------------------
                 *  show each panel header
                 * -------------------------------------- */
                foreach (Loket r in _lokets)
                {
                    switch (r.LoketID)
                    {
                        case "BERKAS":
                            lblHeader1.Text = string.Format("Loket: {0}", r.LoketDescription);
                            break;
                        case "BAYAR":
                            lblHeader2.Text = string.Format("Loket: {0}", r.LoketDescription);
                            break;
                        case "FOTO":
                            lblHeader3.Text = string.Format("Loket: {0}", r.LoketDescription);
                            break;
                        case "WAWANCARA":
                            lblHeader4.Text = string.Format("Loket: {0}", r.LoketDescription);
                            break;
                    }
                }
            }
        }
Пример #17
0
 /// <summary>
 /// Loads the CR layout.
 /// </summary>
 private void LoadCRLayout()
 {
     if (InvokeRequired)
     {
         var o = new DelegateThis(LoadCRLayout);
         Invoke(o);
     }
     else
     {
         var crDocument = new ReportDocument();
         crDocument.Load(Application.StartupPath + "/Reports/PrintNomor.Rpt");
         crDocument.Close();
     }
 }
Пример #18
0
        /// <summary>
        /// Searches the data.
        /// </summary>
        private void SearchData()
        {
            if (InvokeRequired)
            {
                var o = new DelegateThis(SearchData);
                Invoke(o);
            }
            else
            {
                string teks = lblDetail.Text.Trim();

                if (string.IsNullOrEmpty(teks)) return;

                XLPassportForm pass = new XLPassportFormBase().GetById(teks);
                string msg = "";

                if (pass != null)
                {
                    lblHeader.Text = string.Format("Permh. a.n {0}", pass.Name);

                    var db = new WorkflowBase();
                    Workflow wf = db.GetById(pass.WorkFlowXID.ToString().Trim());
                    db.Dispose();

                    msg = wf != null ? wf.WorkflowDescription : "Status tidak diketahui, hubungi petugas!";
                }
                else
                {
                    msg = "No. Permohonan tidak ditemukan!";
                }

                lblDetail.Text = msg;
            }
        }
Пример #19
0
 /// <summary>
 /// Shows the time widget.
 /// </summary>
 private void TClock()
 {
     if (InvokeRequired)
     {
         var o = new DelegateThis(TClock);
         Invoke(o);
     }
     else
     {
         _qwClock = new QWClock();
         _qwClock.Location = new Point(Width - _qwClock.Width, 10);
         Controls.Add(_qwClock);
     }
 }
Пример #20
0
 /// <summary>
 /// Prints the nomor antrian kode C.
 /// </summary>
 private void PrintNomorAntrianKodeC()
 {
     if (InvokeRequired)
     {
         var o = new DelegateThis(PrintNomorAntrianKodeC);
         Invoke(o);
     }
     else
     {
         PrintNomorAntrian("C");
     }
 }
Пример #21
0
 /// <summary>
 /// Loads the clock.
 /// </summary>
 private void LoadClock()
 {
     if (InvokeRequired)
     {
         var o = new DelegateThis(LoadClock);
         Invoke(o);
     }
     else
     {
         _clockWidget = new QWClock {Location = new Point(0, 10)};
         pnlRight.Controls.Add(_clockWidget);
     }
 }
Пример #22
0
 /// <summary>
 /// Ts the locked.
 /// </summary>
 private void TLocked()
 {
     if (InvokeRequired)
     {
         var o = new DelegateThis(TLocked);
         Invoke(o);
     }
     else
     {
         using (var f = new QWaitingWidget("Maaf, layanan ini tidak aktif ! "))
         {
             f.Show(this);
             Application.DoEvents();
             Thread.Sleep(1000);
         }
     }
 }
Пример #23
0
 /// <summary>
 /// Ts the clock.
 /// </summary>
 private void TClock()
 {
     if (InvokeRequired)
     {
         var o = new DelegateThis(TClock);
         Invoke(o);
     }
     else
     {
         _clockWidget = new QWClock();
         pnlRight.Controls.Add(_clockWidget);
         _clockWidget.Dock = DockStyle.Top;
     }
 }