예제 #1
0
 static void Main()
 {
     Util.UserDebug("FolderTrack Gui Started");
     Util.DBug2("Program", "Started Gui");
     Application.EnableVisualStyles();
     Util.DBug2("Program", "EnableVisualStyles");
     Application.SetCompatibleTextRenderingDefault(false);
     Util.DBug2("Program", "SetCompatibleTextRenderingDefault");
     ftobjects = new FTObjects(new DataReceiver());
     Util.DBug2("Program", "Run Check");
      //   MainForm FolderTrackGui = new MainForm(ftobjects);
     Util.DBug2("Program", "Get Monitor Group Information");
     List<MonitorGroupInfo> monitorGrList = ftobjects.GetAllMonitorGroupInfor();
     mainform = new MainForm();
     mainform.SetFTBeforeOpenMonGr(ftobjects);
     //add main form so it can receive alerts and
     ftobjects.AddToCallList(mainform);
     if (monitorGrList.Count == 0)
     {
         Util.DBug2("Program", "No Monitor Groups Detected show window");
         NewMonitorGroupForm mgDia = new NewMonitorGroupForm();
         DialogResult di = mgDia.ShowDialog();
         if (di == DialogResult.OK)
         {
             mainform.HideNoMonitorGroup();
             Util.DBug2("Program", "Sending NameOfMonitor " + mgDia.LocationManager.NameOfMonitor);
             foreach (string loca in mgDia.LocationManager.MonitorLocation)
             {
                 Util.DBug2("Program", "Location " + loca);
             }
             new Thread(new ParameterizedThreadStart(SendNewMonitorGroup)).Start(mgDia);
         }
         else if (di == DialogResult.Cancel)
         {
          //   return;
         }
     }
     else
     {
         new Thread(SetFtOb).Start();
     }
     Util.DBug2("Program", "R");
     Application.Run(mainform);
 }
예제 #2
0
 public void SetMainForm(MainForm mainform)
 {
     this.mainform = mainform;
 }