示例#1
0
    private void Form1_Shown(object sender, EventArgs e)
    {
      SplashScreen.SplashScreen.SetStatus("Abriendo ventana de informacion de capas de tiempo real");
      RealtimeInfo = new ElementInformation(this);
      RealtimeInfo.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.DockBottom;//.Document;// WeifenLuo.WinFormsUI.Docking.DockState.Float;
      RealtimeInfo.Text = "EVENTOS";
      RealtimeInfo.Name = "Eventos";
      RealtimeInfo.TabText = "Eventos";
      RealtimeInfo.Text = "Eventos";
      RealtimeInfo.CloseButtonVisible = false;
      RealtimeInfo.CloseButton = false;
      
/*      if (this.dockPanel.DocumentStyle == WeifenLuo.WinFormsUI.Docking.DocumentStyle.SystemMdi)
      {
        RealtimeInfo.MdiParent = this;
        RealtimeInfo.Show();
      }
      else
      {
        RealtimeInfo.Show(dockPanel);
      }
      nCount++;*/

      SplashScreen.SplashScreen.SetStatus("Abriendo Mapa");
      frmMap = new MapForm(this);
      frmMap.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.Document;
      /*frmMap.Text = "Form " + nCount.ToString();*/

      nCount++;

      SplashScreen.SplashScreen.SetStatus("Generando eventos...");
      //System.Windows.Forms.Application.DoEvents();
      eventosFrm = new Eventos(this);
      eventosFrm.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.DockBottom;
      eventosFrm.CloseButtonVisible = false;
      eventosFrm.CloseButton = false;
      eventosFrm.Text = "Eventos";
      

      SplashScreen.SplashScreen.SetStatus("Abriendo vista general");
      //System.Windows.Forms.Application.DoEvents();
      Overviewmap = new OverviewMap(this);
      Overviewmap.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.Float;
      Overviewmap.Text = "MAPA";
      
      SplashScreen.SplashScreen.SetStatus("Abriendo ventana de selección");
      //System.Windows.Forms.Application.DoEvents();
      elementInfo = new ElementInformation(this);
      elementInfo.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.DockBottom;
      elementInfo.Text = "INFORMACION";
      elementInfo.CloseButtonVisible = false;
      elementInfo.CloseButton = false;

      //System.Windows.Forms.Application.DoEvents();
      SplashScreen.SplashScreen.CloseForm();

      string configFile = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory), "dock.xml");
      
      if (!System.IO.File.Exists(configFile))
      {
        if (this.dockPanel.DocumentStyle == WeifenLuo.WinFormsUI.Docking.DocumentStyle.SystemMdi)
        {
          frmMap.MdiParent = this;
          frmMap.Show();
        }
        else
        {
          frmMap.Show(dockPanel);
        }
        eventosFrm.Show(dockPanel);
        Overviewmap.Show(dockPanel/*dockPanel.DockWindows[WeifenLuo.WinFormsUI.Docking.DockState.DockBottom]*/);
        elementInfo.Show(dockPanel);
        RealtimeInfo.Show(dockPanel); 
      }
      else
      {
        dockPanel.LoadFromXml(configFile, m_deserializeDockContent);
      }

      ReloadTabsRealTimeLayers();
      IntelliTrack.Service.Common.Singleton<IntelliTrack.Client.Application.Imaging.ComplexMap>.Instance.StartTimer();

      //Aca voy a activar o desactivar los items del menu, en funcion de la seguridad
      elementInfo.Hide();
    }
示例#2
0
    private void Form1_Shown(object sender, EventArgs e)
    {
      SplashScreen.SplashScreen.SetStatus("Abriendo ventana de informacion de capas de tiempo real");
      RealtimeInfo = new ElementInformation(this);
      RealtimeInfo.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.DockBottom;//.Document;// WeifenLuo.WinFormsUI.Docking.DockState.Float;
      RealtimeInfo.Text = "EVENTOS";
      RealtimeInfo.Name = "Eventos";
      RealtimeInfo.TabText = "Eventos";
      RealtimeInfo.Text = "Eventos";
      RealtimeInfo.CloseButtonVisible = false;
      RealtimeInfo.CloseButton = false;

      /*      if (this.dockPanel.DocumentStyle == WeifenLuo.WinFormsUI.Docking.DocumentStyle.SystemMdi)
            {
              RealtimeInfo.MdiParent = this;
              RealtimeInfo.Show();
            }
            else
            {
              RealtimeInfo.Show(dockPanel);
            }
            nCount++;*/

      SplashScreen.SplashScreen.SetStatus("Abriendo Mapa");
      frmMap = new MapForm(this);
      frmMap.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.Document;
      frmMap.Text = "Mapa";
      nCount++;

      /*reportForm = new ReportForm(this);
      reportForm.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.Document;
      reportForm.Text = "Reporte";

      nCount++;*/

      SplashScreen.SplashScreen.SetStatus("Generando eventos...");
      //System.Windows.Forms.Application.DoEvents();
      eventosFrm = new Eventos(this);
      eventosFrm.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.DockBottom;
      eventosFrm.CloseButtonVisible = false;
      eventosFrm.CloseButton = false;
      eventosFrm.Text = "Eventos";


      SplashScreen.SplashScreen.SetStatus("Abriendo vista general");
      //System.Windows.Forms.Application.DoEvents();
      Overviewmap = new OverviewMap(this);
      Overviewmap.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.Float;
      Overviewmap.Text = "MAPA";

      SplashScreen.SplashScreen.SetStatus("Abriendo ventana de selección");
      //System.Windows.Forms.Application.DoEvents();
      elementInfo = new ElementInformation(this);
      elementInfo.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.DockBottom;
      elementInfo.Text = "INFORMACION";
      elementInfo.CloseButtonVisible = false;
      elementInfo.CloseButton = false;

      //System.Windows.Forms.Application.DoEvents();
      SplashScreen.SplashScreen.CloseForm();

      string configFile = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory), "dock.xml");

      if (!System.IO.File.Exists(configFile))
      {
        if (this.dockPanel.DocumentStyle == WeifenLuo.WinFormsUI.Docking.DocumentStyle.SystemMdi)
        {
          frmMap.MdiParent = this;
          frmMap.Show();
          /*reportForm.MdiParent = this;
          reportForm.Show();*/
        }
        else
        {
          frmMap.Show(dockPanel);
          //reportForm.Show(dockPanel);
        }
        eventosFrm.Show(dockPanel);
        Overviewmap.Show(dockPanel/*dockPanel.DockWindows[WeifenLuo.WinFormsUI.Docking.DockState.DockBottom]*/);
        elementInfo.Show(dockPanel);
        RealtimeInfo.Show(dockPanel);
      }
      else
      {
        dockPanel.LoadFromXml(configFile, m_deserializeDockContent);
      }
      System.Collections.Generic.Dictionary<string, SharpMap.Data.Providers.IProvider> providers = IntelliTrack.Service.Common.Singleton<IntelliTrack.Client.Application.Imaging.ComplexMap>.Instance.GetRealTimeLayerProviders();
      foreach (System.Collections.Generic.KeyValuePair<string, SharpMap.Data.Providers.IProvider> pair in providers)
      {
        SharpMap.Data.FeatureDataSet fds = new SharpMap.Data.FeatureDataSet();
        pair.Value.ExecuteIntersectionQuery(pair.Value.GetExtents(), fds);
        fds.Tables[0].TableName = pair.Key;
        RealtimeInfo.SetData(fds.Tables[0]);
        ((SharpMap.Data.Providers.MemoryDataProviderBase)pair.Value).OnDataUpdated += new SharpMap.Data.Providers.MemoryDataProviderBase.DataUpdated(Form1_OnDataUpdated);
      }
      IntelliTrack.Service.Common.Singleton<IntelliTrack.Client.Application.Imaging.ComplexMap>.Instance.StartTimer();

      //      reportForm = new ReportForm(this, new IntelliTrack.Client.Application.Reportes.Reporte1());
      //      reportForm.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.Document;
      //      reportForm.Text = "Reporte";
      nCount++;
      //      reportForm.Show(dockPanel);

      reporteRegadores = new ReportForm(this, new IntelliTrack.Client.Application.Reportes.Regadores());
      reporteRegadores.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.Document;
      reporteRegadores.Text = "Reporte de Regadores";
      nCount++;
      reporteRegadores.Show(dockPanel);

      rawDataForm = new frmRawData(this);
      rawDataForm.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.Document;
      rawDataForm.Text = "Información obtenida";
      nCount++;
      rawDataForm.Show(dockPanel);

      frmMap.Activate();

      //Aca voy a activar o desactivar los items del menu, en funcion de la seguridad
      elementInfo.Hide();
      QuitarControlesAForms();
    }