예제 #1
0
        public Orders()
        {
            InitializeComponent();

            this.updateFont();
            PopulateComboBox();
            this.txtFromDate.Format       = DateTimePickerFormat.Custom;
            this.txtToDate.Format         = DateTimePickerFormat.Custom;
            this.txtFromDate.CustomFormat = "dd-MM-yyyy";
            this.txtToDate.CustomFormat   = "dd-MM-yyyy";
            this.txtToDate.Value          = DateTime.Today.AddDays(1);

            this.dataGridView1.AutoGenerateColumns = false;
            this.dataGridView1.Columns["UnitPrice"].DefaultCellStyle.Format = NRFormat;
            this.dataGridView1.Columns["Price"].DefaultCellStyle.Format     = NRFormat;
            //this.dataGridView1.Columns["OrderDate"].DefaultCellStyle.Font = new Font("Arial Narrow", fontSize, FontStyle.Regular);

            this.dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            this.dataGridView1.MultiSelect   = false;
            this.dataGridView1.RowPrePaint  += new DataGridViewRowPrePaintEventHandler(dataGridView1_RowPrePaint);

            this.nfi = new NumberFormatInfo();
            this.nfi.NumberDecimalSeparator = ".";
            convertor         = new ISO9TransliterationProvider();
            myCurrentLanguage = InputLanguage.CurrentInputLanguage;

            this.ActiveControl = dataGridView1;
        }
예제 #2
0
        public MainForm(SerialPort serialPort)
        {
            this.InitializeComponent();

            #region INIT UI
            this.tbAddNewProduct = new System.Windows.Forms.Button();
            this.panel1.Controls.Add(this.tbAddNewProduct);
            //
            // tbAddNewProduct
            //
            this.tbAddNewProduct.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.tbAddNewProduct.Location = new System.Drawing.Point(741, 17);
            this.tbAddNewProduct.Name     = "tbAddNewProduct";
            this.tbAddNewProduct.Size     = new System.Drawing.Size(75, 23);
            this.tbAddNewProduct.TabIndex = 10;
            this.tbAddNewProduct.Text     = "Додај нов";
            this.tbAddNewProduct.UseVisualStyleBackColor = true;
            this.tbAddNewProduct.Click += new System.EventHandler(this.tbAddNewProduct_Click);
            #endregion

            this._serialPort = serialPort;
            //if (Program.ActiveForms.Count == 0)
            this._listener = new BarcodeListener(this);
            this.SerialEventListener_Start();

            convertor         = new ISO9TransliterationProvider();
            myCurrentLanguage = InputLanguage.CurrentInputLanguage;

            this.Layout      += new System.Windows.Forms.LayoutEventHandler(this.SplashScreen_Layout);
            this.FormClosing += new FormClosingEventHandler(MainForm_Closing);

            this.ActiveControl = textBox1;
        }
예제 #3
0
 public RowDetails()
 {
     InitializeComponent();
     convertor         = new ISO9TransliterationProvider();
     myCurrentLanguage = InputLanguage.CurrentInputLanguage;
     Program._serialPort.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandler2);
 }
예제 #4
0
        public MainForm()
        {
            InitializeComponent();
            this.Layout      += new System.Windows.Forms.LayoutEventHandler(this.SplashScreen_Layout);
            convertor         = new ISO9TransliterationProvider();
            myCurrentLanguage = InputLanguage.CurrentInputLanguage;

            Program._serialPort.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandler);
        }
예제 #5
0
        public ProductDetails(SerialPort serialPort)
        {
            this.InitializeComponent();

            convertor         = new ISO9TransliterationProvider();
            myCurrentLanguage = InputLanguage.CurrentInputLanguage;

            this._serialPort = serialPort;
            this._listener   = new BarcodeListener(this);
            this.SerialEventListener_Start();
            //_listener.BarcodeScanned += this.OnBarcodeScanned;
        }
예제 #6
0
        public Products(SerialPort serialPort)
        {
            this.InitializeComponent();
            this.updateFont();

            this._serialPort = serialPort;
            this._listener   = new BarcodeListener(this);
            this.SerialEventListener_Start();

            convertor         = new ISO9TransliterationProvider();
            myCurrentLanguage = InputLanguage.CurrentInputLanguage;

            this.FormClosing  += new FormClosingEventHandler(MainForm_Closing);
            this.ActiveControl = textBox1;
        }
예제 #7
0
        public Search()
        {
            this.InitializeComponent();
            //SetStyle(ControlStyles.DoubleBuffer, true); UpdateStyles();

            foreach (DataGridViewColumn c in this.regionDataGridView.Columns)
            {
                //c.DefaultCellStyle.Font = new Font("Arial Narrow", fontSize, System.Drawing.FontStyle.Bold);
                //c.DefaultCellStyle.Padding = new Padding(1);
            }
            this.regionDataGridView.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;

            this.Load += new System.EventHandler(this.SearchForm_Load);

            convertor         = new ISO9TransliterationProvider();
            myCurrentLanguage = InputLanguage.CurrentInputLanguage;

            //this._serialPort = serialPort;
            //_listener = new BarcodeListener(this);
            //_listener.BarcodeScanned += this.OnBarcodeScanned;
            regionDataGridView.AutoGenerateColumns = false;
        }
예제 #8
0
파일: Sale.cs 프로젝트: ewin66/IMS_Project
        public Sale(SerialPort serialPort, SY50 fiscalPrinter, CustomerType currentCustomer)
        {
            InitializeComponent();

            this.updateFont();
            this._currentCustomer = currentCustomer;
            this._serialPort      = serialPort;
            this._fiscalPrinter   = fiscalPrinter;
            //if (Program.ActiveForms.Count == 0)
            this._listener = new BarcodeListener(this);
            this.SerialEventListener_Start();
            this.InitializeFiscalPrinter();

            this.KeyPreview = true;
            this.KeyDown   += new System.Windows.Forms.KeyEventHandler(KeyEvent);

            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.Columns["Quantity"].DefaultCellStyle.Format = "n";
            //dataGridView1.EditMode = DataGridViewEditMode.EditOnKeystroke;
            //dataGridView1.Columns["Quantity"].ReadOnly = false;
            //dataGridView1.Columns["UnitPrice"].ReadOnly = false;

            lblCurrentProduct.Text = string.Empty;
            lblTotalValue.Text     = "0.00";
            this.nfi = new NumberFormatInfo();
            this.nfi.NumberDecimalSeparator = ".";
            convertor         = new ISO9TransliterationProvider();
            myCurrentLanguage = InputLanguage.CurrentInputLanguage;

            orderDetails       = new List <Product>();
            this.ActiveControl = dataGridView1;
            if (this._currentCustomer == CustomerType.HOME)
            {
                this.panelTotal.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
            }
        }