public RobotMointoring_Ctrl(FleetManager.FleetManager_MainForm mainform, MonitoringMain_Ctrl monitormain)
 {
     this.mainform  = mainform;
     monitoringMain = monitormain;
     InitializeComponent();
 }
        private void FleetManager_MainForm_Load(object sender, EventArgs e)
        {
#if _fleet
            Data.Instance.MAINFORM = this;
#endif
            worker = new Worker(this, 1);

            if (panel1.Controls.Count == 1)
            {
                panel1.Controls.RemoveAt(0);
            }

            try
            {
                if (!File.Exists(m_strDBConnectionPath))
                {
                    using (StreamWriter sw = new System.IO.StreamWriter(m_strDBConnectionPath, false, Encoding.Default))
                    {
                        sw.WriteLine("data source=192.168.0.201; database=fleet_db; user id=nickyjo; password=r023866677!; charset=utf8");
                        sw.Close();
                    }
                }

                using (StreamReader sr1 = new System.IO.StreamReader(m_strDBConnectionPath, Encoding.Default))
                {
                    while (sr1.Peek() >= 0)
                    {
                        string strTemp = sr1.ReadLine();

                        m_strDBConnectstring = strTemp;
                    }
                    sr1.Close();
                }

                if (m_strDBConnectstring == "")
                {
                    MessageBox.Show("DB connection file open 에러");
                    return;
                }
            }
            catch (Exception ex)
            {
                Console.Out.WriteLine("FleetManager_MainForm_Load dbconnection file open  err :={0}", ex.Message.ToString());
            }



            if (onInitSql() == 0)
            {
                Data.Instance.isDBConnected = true;

                onDBRead_Robotlist("all");
                onDBRead_RobotStatus();

                onRobots_WorkInfo_InitSet();

                missioneditctrl  = new MissionEdit_ctrl(this);
                settingmain_ctrl = new SettingMainCtrl(this);

                monitoringmainctrl = new Monitoring.MonitoringMain_Ctrl(this);
#if !_fleetdemo
                joborderctrl = new order.JobOrder_ctrl(this);
#elif _fleetdemo
                jobdemoorderctrl = new Demo.JobOrder_Demo_ctrl(this);
#endif
            }
            else
            {
                Data.Instance.isDBConnected = false;
                MessageBox.Show("데이타베이스 연결 에러, 점검후 사용하세요.");
                return;
            }
        }