Example #1
0
        private void bunifuImageButton1_Click(object sender, EventArgs e)
        {
            var tr  = new T_Dashboard();
            var svr = new FrmServerSettings();

            tr.Show(this);
            svr.ShowDialog();
            tr.Dispose();
            Focus();
        }
Example #2
0
        private void bunifuImageButton9_Click(object sender, EventArgs e)
        {
            var a = new T_Dashboard();
            var b = new FrmAddStock();

            b.label1.Text = lblID.Text;
            a.Show(this);
            b.ShowDialog();
            a.Hide();
            Focus();
        }
Example #3
0
        private async void FrmLogin_Load(object sender, EventArgs e)
        {
            try
            {
                if (Properties.Settings.Default.ip_add != "")
                {
                    IP_Add    = Properties.Settings.Default.ip_add;
                    user_id   = Properties.Settings.Default.user_id;
                    user_pass = Properties.Settings.Default.user_pass;
                    var p = new Ping();
                    var s = IP_Add;
                    var r = p.Send(s);
                    if (r != null && r.Status == IPStatus.Success)
                    {
                        await TestConnection();

                        if (Connected)
                        {
                            await XFilldesignation();

                            GetSettings();
                        }
                        else
                        {
                            var tr  = new T_Dashboard();
                            var svr = new FrmServerSettings();
                            tr.Show(this);
                            svr.ShowDialog();
                            tr.Dispose();
                            Focus();
                        }
                    }
                    else
                    {
                        MessageBox.Show(@"Server has not been set-up. Please set-up server first!", @"Server setting", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        var tr  = new T_Dashboard();
                        var svr = new FrmServerSettings();
                        tr.Show(this);
                        svr.ShowDialog();
                        tr.Dispose();
                        Focus();
                    }
                }
                else
                {
                    MessageBox.Show(@"Server has not been set-up. Please set-up server first!", @"Server setting", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    var tr  = new T_Dashboard();
                    var svr = new FrmServerSettings();
                    tr.Show(this);
                    svr.ShowDialog();
                    tr.Dispose();
                    Focus();
                }
            }
            catch
            {
                MessageBox.Show(@"Server has not been set-up. Please set-up server first!", @"Server setting", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                var tr  = new T_Dashboard();
                var svr = new FrmServerSettings();
                tr.Show(this);
                svr.ShowDialog();
                tr.Dispose();
                Focus();
            }
        }