Ejemplo n.º 1
0
 public static void Main(string[] args)
 {
     {             // start main systems
         LogManager.MakeInstance(new LogManager());
         CaptureSystem.MakeInstance(new CaptureSystem());
         TrackingSystem.MakeInstance(new TrackingSystem());
         VirtualDeviceManager.MakeInstance(new VirtualDeviceManager());
     }
     {             // prepare content managers
         ContentMaster.MakeInstance(new ContentMaster());
         var    contentSettings = new ContentManagerSettings();
         string resourceRoot    = ContentMaster.FindResourceRoot();
         contentSettings.SetResourcePaths(resourceRoot, resourceRoot, "(no-file)");
         string userRoot = ContentMaster.FindConfigRoot();
         contentSettings.SetConfigPaths(userRoot, userRoot, "(no-file)");
         ContentMaster.Instance.Load(contentSettings);
     }
     {             // load last configuration
         var profile = ContentMaster.Instance.Profiles.LoadDefaultProfile();
         new ProfileActivator().ActivateProfile(profile).Wait();
     }
     {             // start webserver
         var server = new Webface.WebfaceServer();
         server.Start();
         Console.ReadLine();
         server.Stop();
     }
     {             // cleanup main systems
         VirtualDeviceManager.MakeInstance(null);
         TrackingSystem.MakeInstance(null);
         CaptureSystem.MakeInstance(null);
         LogManager.MakeInstance(null);
         EquipmentMaster.MakeInstance(null);
     }
 }
Ejemplo n.º 2
0
        public void BeginPrinting(UInt16 Index, PlotterPenInfo Pen)
        {
            DTPMaster.CheckConnAndVal();

            StartTime = DateTime.Now;
            if (ContentMaster == null)
            {
                ContentMaster = new PlotterContent(Master);
            }

            if (!ContentMaster.ContentTable.VectorAdresses.Contains(Index))
            {
                RaiseErrorEvent(PrintErrorType.CantFoundFileWithSpecifiedIndex);
                return;
            }
            VectorMetaData metaData = ContentMaster.GetVectorMetaData(Index);

            if (XSize == 0)
            {
                XSize = GetXsize(metaData.Width, metaData.Height, YSize);
            }
            else
            {
                YSize = GetYsize(metaData.Width, metaData.Height, XSize);
            }
            GetCoefficients(new SizeF(metaData.Width, metaData.Height));
            try
            {
                ph.StartPrinting(Pen.ElevationDelta, Pen.ElevationCorrection, (UInt16)XCoef, (UInt16)YCoef, Index);
            }
            catch
            {
                RaiseErrorEvent(PrintErrorType.CantFoundFileWithSpecifiedIndex);
                return;
            }
            Printing = true;

            Thread.Sleep(1000);

            StatusRequestTimer = new Thread(StatusRequestTimerHandler);
            StatusRequestTimer.Start();
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        master = ((ContentMaster)Master);

        if (Edited == true)
        {
            UpdateData();
            DataBind();
        }

        if (!IsPostBack)
        {
            Page.DataBind();
        }

        Edited = false;

        master.SetSelectedNavbarElement("documents");

        ScriptManager.RegisterStartupScript(updatePanel, updatePanel.GetType(), "attachChangeListeners", "attachChangeListeners();", true);
    }