Пример #1
0
        private void InitialCloudData()
        {
            this.Opacity       = 0;
            this.ShowInTaskbar = false;
            Param.MainPanel    = pnlMain;

            bool exit = false;

            FmInitialData fm     = new FmInitialData();
            var           result = fm.ShowDialog(this);

            if (result == System.Windows.Forms.DialogResult.OK)
            {
                if (Param.EmployeeId == null)
                {
                    FmLogin fmLogin = new FmLogin();
                    bool    success = false;
                    while (!success && !exit)
                    {
                        if (fmLogin.ShowDialog(this) == DialogResult.OK)
                        {
                            success = true;
                        }
                        else
                        {
                            exit = true;
                        }
                    }
                }

                if (!exit)
                {
                    this.Text             = string.Format("Power POS - ร้าน {0} ({1})", Param.ShopName, Param.ComputerName);
                    this.Opacity          = 100;
                    this.ShowInTaskbar    = true;
                    Param.InitialFinished = true;

                    AddPanel(Param.Screen.Sale);
                    Param.SelectedScreen = (int)Screen.Sale;
                }
                else
                {
                    this.Dispose();
                }
            }
            else
            {
                this.Dispose();
            }
        }
Пример #2
0
        private void InitialCloudData()
        {
            this.Opacity = 0;
            this.ShowInTaskbar = false;
            Param.MainPanel = pnlMain;

            bool exit = false;

            FmInitialData fm = new FmInitialData();
            var result = fm.ShowDialog(this);
            if (result == System.Windows.Forms.DialogResult.OK)
            {
                if (Param.EmployeeId == null)
                {
                    FmLogin fmLogin = new FmLogin();
                    bool success = false;
                    while (!success && !exit)
                    {
                        if (fmLogin.ShowDialog(this) == DialogResult.OK)
                        {
                            success = true;
                        }
                        else
                        {
                            exit = true;
                        }
                    }
                }

                if (!exit)
                {
                    this.Text = string.Format("Power POS - ร้าน {0} ({1})", Param.ShopName, Param.ComputerName);
                    this.Opacity = 100;
                    this.ShowInTaskbar = true;
                    Param.InitialFinished = true;

                    AddPanel(Param.Screen.Sale);
                    Param.SelectedScreen = (int)Screen.Sale;
                }
                else
                {
                    this.Dispose();
                }
            }
            else
            {
                this.Dispose();
            }
        }