Example #1
0
        public FileCollector(CacheManager cacheManager, FilesModel xmlString)
        {
            _cacheManager = cacheManager;


            // Create a required files object
            _requiredFiles = new RequiredFiles();


            foreach (var item in xmlString.Items)
            {
                _requiredFiles.Files.Add(item);
            }


            // Get the key for later use
            hardwareKey = new HardwareKey();

            // Make a new filelist collection
            _files = new Collection<RequiredFileModel>();

            // Create a webservice call
            xmdsFile = new ServiceClient();

            // Start up the Xmds Service Object
            //xmdsFile.Credentials = null;
            //xmdsFile.Url = Properties.Settings.Default.Client_xmds_xmds;
            //xmdsFile.UseDefaultCredentials = false;

            // Hook onto the xmds file complete event
            xmdsFile.GetFileCompleted += (XmdsFileGetFileCompleted);
        }
Example #2
0
        public FileCollector(CacheManager cacheManager, FilesModel xmlString)
        {
            _cacheManager = cacheManager;


            // Create a required files object
            _requiredFiles = new RequiredFiles();


            foreach (var item in xmlString.Items)
            {
                _requiredFiles.Files.Add(item);
            }


            // Get the key for later use
            hardwareKey = new HardwareKey();

            // Make a new filelist collection
            _files = new Collection <RequiredFileModel>();

            // Create a webservice call
            xmdsFile = new ServiceClient();

            // Start up the Xmds Service Object
            //xmdsFile.Credentials = null;
            //xmdsFile.Url = Properties.Settings.Default.Client_xmds_xmds;
            //xmdsFile.UseDefaultCredentials = false;

            // Hook onto the xmds file complete event
            xmdsFile.GetFileCompleted += (XmdsFileGetFileCompleted);
        }
Example #3
0
        public BlackList()
        {
            // Check that the black list file is available
            blackListFile = App.UserAppDataPath + "//" + Settings.Default.blackListLocation;

            // Get the key for this display
            hardwareKey = new HardwareKey();
        }
Example #4
0
    public BlackList()
    {
        // Check that the black list file is available
        blackListFile = App.UserAppDataPath + "//" + Settings.Default.blackListLocation;

        // Get the key for this display
        hardwareKey = new HardwareKey();
    }
Example #5
0
 private void InitializeListener()
 {
     this._traceMessages            = new Collection <TraceMessage>();
     this._logPath                  = App.UserAppDataPath + "/" + Settings.Default.logLocation;
     this._xmdsProcessing           = false;
     this._xmds                     = new ServiceClient();
     this._xmds.SubmitLogCompleted += new EventHandler <SubmitLogCompletedEventArgs>(this.XmdsSubmitLogCompleted);
     this._hardwareKey              = new HardwareKey();
 }
Example #6
0
 public void ReportInventory()
 {
     HardwareKey key = new HardwareKey();
     string str = "";
     foreach (RequiredFileModel model in this._requiredFiles)
     {
         str = str + string.Format("<file type=\"{0}\" id=\"{1}\" complete=\"{2}\" lastChecked=\"{3}\" md5=\"{4}\" />", new object[] { model.FileType, model.Id.ToString(), model.Complete.ToString(), model.LastChecked.ToString(), model.MD5 });
     }
     str = string.Format("<files macAddress=\"{1}\">{0}</files>", str, key.MacAddress);
     this._report.MediaInventoryAsync(Settings.Default.Version, Settings.Default.ServerKey, key.Key, str);
 }
Example #7
0
        public void ReportInventory()
        {
            HardwareKey key = new HardwareKey();
            string      str = "";

            foreach (RequiredFileModel model in this._requiredFiles)
            {
                str = str + string.Format("<file type=\"{0}\" id=\"{1}\" complete=\"{2}\" lastChecked=\"{3}\" md5=\"{4}\" />", new object[] { model.FileType, model.Id.ToString(), model.Complete.ToString(), model.LastChecked.ToString(), model.MD5 });
            }
            str = string.Format("<files macAddress=\"{1}\">{0}</files>", str, key.MacAddress);
            this._report.MediaInventoryAsync(Settings.Default.Version, Settings.Default.ServerKey, key.Key, str);
        }
Example #8
0
        public StatLog()
        {
            _stats = new Collection <Stat>();
            _xmds  = new ServiceClient();

            // Register a listener for the XMDS stats
            _xmds.SubmitStatsCompleted += (_xmds_SubmitStatsCompleted);

            // Get the key for this display
            _hardwareKey = new HardwareKey();

            _xmdsProcessing = false;
        }
Example #9
0
        public StatLog()
        {
            _stats = new Collection<Stat>();
            _xmds = new ServiceClient();

            // Register a listener for the XMDS stats
            _xmds.SubmitStatsCompleted += (_xmds_SubmitStatsCompleted);

            // Get the key for this display
            _hardwareKey = new HardwareKey();

            _xmdsProcessing = false;
        }
Example #10
0
        private void InitializeListener()
        {
            // Make a new collection of TraceMessages
            _traceMessages = new Collection <TraceMessage>();
            _logPath       = App.UserAppDataPath + @"/" + Settings.Default.logLocation;

            _xmdsProcessing = false;
            _xmds           = new ServiceClient();

            // Register a listener for the XMDS stats
            _xmds.SubmitLogCompleted += (XmdsSubmitLogCompleted);

            // Get the key for this display
            _hardwareKey = new HardwareKey();
        }
Example #11
0
    private void InitializeListener()
    {
        // Make a new collection of TraceMessages
        _traceMessages = new Collection<TraceMessage>();
        _logPath = App.UserAppDataPath + @"/" + Settings.Default.logLocation;

        _xmdsProcessing = false;
        _xmds =new ServiceClient();

        // Register a listener for the XMDS stats
        _xmds.SubmitLogCompleted +=(XmdsSubmitLogCompleted);

        // Get the key for this display
        _hardwareKey = new HardwareKey();
    }
Example #12
0
        public void InitializeComponents()
        {
            this._hardwareKey = new HardwareKey();
            this._xmdsProcessing = false;
            this._xmds2.RequiredFilesCompleted += new EventHandler<RequiredFilesCompletedEventArgs>(this.Xmds2RequiredFilesCompleted);
            this._xmds2.ScheduleCompleted += new EventHandler<ScheduleCompletedEventArgs>(this.xmds2_ScheduleCompleted);
            Trace.WriteLine(string.Format("Collection Interval: {0}", Settings.Default.collectInterval), "Schedule - InitializeComponents");
           new Thread(() =>
                                             {
                                                 while(true)
                                                 {
                                                     XmdsTimerTick(null,null);
                                                     Thread.Sleep(1000);
                                                 }
                                             }).Start();

            //System.Timers.Timer timer = new System.Timers.Timer
            //{
            //    Interval = 1000.0
            //};
            //timer.Elapsed += new ElapsedEventHandler(this.XmdsTimerTick);
            //timer.Start();

           new Thread(() =>
           {
               while (true)
               {
                   ScheduleTimerTick(null, null);
                   Thread.Sleep(10000);
               }
           }).Start();

            //System.Timers.Timer timer2 = new System.Timers.Timer
            //{
            //    Interval = 10000.0
            //};
            //timer2.Elapsed += new ElapsedEventHandler(this.ScheduleTimerTick);
            //timer2.Start();
            this._xmdsProcessing = true;
            this.UpdateLayoutSchedule(true);
            if (!CollectingFiles)
            {
                CollectingFiles = true;  
                this._xmds2.RequiredFilesAsync(Settings.Default.ServerKey, this._hardwareKey.Key, Settings.Default.Version);
           
            }
          
        }
Example #13
0
        /// <summary>
        /// Report Required Files to XMDS
        /// </summary>
        public void ReportInventory()
        {
            HardwareKey hardwareKey = new HardwareKey();

            // Build the XML required by media file
            string xml = "";

            foreach (RequiredFileModel rf in _requiredFiles)
            {
                xml += string.Format("<file type=\"{0}\" id=\"{1}\" complete=\"{2}\" lastChecked=\"{3}\" md5=\"{4}\" />",
                                     rf.FileType, rf.Id.ToString(), rf.Complete.ToString(), rf.LastChecked.ToString(), rf.MD5);
            }

            xml = string.Format("<files macAddress=\"{1}\">{0}</files>", xml, hardwareKey.MacAddress);

            _report.MediaInventoryAsync(Settings.Default.Version, Settings.Default.ServerKey,
                                        hardwareKey.Key, xml);
        }
Example #14
0
    /// <summary>
    /// Initialize the Schedule components
    /// </summary>
    public void InitializeComponents()
    {
        // Get the key for this display
        _hardwareKey = new HardwareKey();

        // Start up the Xmds Service Object
        //_xmds2.Credentials = null;
        //_xmds2.Url = Properties.Settings.Default.Client_xmds_xmds;
        //_xmds2.UseDefaultCredentials = false;

        _xmdsProcessing = false;
        _xmds2.RequiredFilesCompleted += (Xmds2RequiredFilesCompleted);
        _xmds2.ScheduleCompleted += (xmds2_ScheduleCompleted);

        Trace.WriteLine(String.Format("Collection Interval: {0}", Settings.Default.collectInterval), "Schedule - InitializeComponents");

        // The Timer for the Service call
        Timer xmdsTimer = new Timer();
        xmdsTimer.Interval = 1000;// (int) Settings.Default.collectInterval * 1000;
        xmdsTimer.Elapsed += XmdsTimerTick;
        xmdsTimer.Start();

        // The Timer for the Schedule Polling
        Timer scheduleTimer = new Timer();
        scheduleTimer.Interval = 10000; // 10 Seconds
        scheduleTimer.Elapsed += ScheduleTimerTick;
        scheduleTimer.Start();

        // Manual first tick
        _xmdsProcessing = true;

        // We must have a schedule by now.
        UpdateLayoutSchedule(true);

        // Fire off a get required files event - async
        _xmds2.RequiredFilesAsync(Settings.Default.ServerKey, _hardwareKey.Key, Settings.Default.Version);
    }
Example #15
0
 public StatLog()
 {
     this._xmds.SubmitStatsCompleted += new EventHandler <SubmitStatsCompletedEventArgs>(this._xmds_SubmitStatsCompleted);
     this._hardwareKey    = new HardwareKey();
     this._xmdsProcessing = false;
 }
Example #16
0
 public StatLog()
 {
     this._xmds.SubmitStatsCompleted += new EventHandler<SubmitStatsCompletedEventArgs>(this._xmds_SubmitStatsCompleted);
     this._hardwareKey = new HardwareKey();
     this._xmdsProcessing = false;
 }
Example #17
0
    /// <summary>
    /// Report Required Files to XMDS
    /// </summary>
    public void ReportInventory()
    {
        HardwareKey hardwareKey = new HardwareKey();

        // Build the XML required by media file
        string xml = "";

        foreach (RequiredFileModel rf in _requiredFiles)
        {
            xml += string.Format("<file type=\"{0}\" id=\"{1}\" complete=\"{2}\" lastChecked=\"{3}\" md5=\"{4}\" />",
                                 rf.FileType, rf.Id.ToString(), rf.Complete.ToString(), rf.LastChecked.ToString(), rf.MD5);
        }

        xml = string.Format("<files macAddress=\"{1}\">{0}</files>", xml, hardwareKey.MacAddress);

        _report.MediaInventoryAsync(Settings.Default.Version, Settings.Default.ServerKey,
                                    hardwareKey.Key, xml);
    }
Example #18
0
    /// <summary>
    /// Register display clicked
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    private void buttonRegister_Click(object sender, EventArgs e)
    {
        // Make a new hardware key just in case we have changed it in the form.
        _hardwareKey = new HardwareKey();

        textBoxResults.Text = "Sending Request";

        Settings.Default.Xmds = textBoxXmdsUri.Text.TrimEnd('/') + @"/data.asmx";
        //   xmds.Url = Settings.Default.Xmds;

        Settings.Default.displayName = textBoxDisplayName.Text;
        Settings.Default.Save();

        xmds.RegisterDisplayAsync(Settings.Default.ServerKey, _hardwareKey.Key, textBoxDisplayName.Text, Settings.Default.Version);
    }
Example #19
0
    public OptionForm()
    {
        InitializeComponent();

        System.Diagnostics.Debug.WriteLine("Initialise Option Form Components", "OptionForm");

        // Get a hardware key here, just in case we havent been able to get one before
        _hardwareKey = new HardwareKey();

        // XMDS completed event
        xmds.RegisterDisplayCompleted += (Xmds1RegisterDisplayCompleted);

        // Library Path
        if (Settings.Default.LibraryPath == "DEFAULT")
        {
            Debug.WriteLine("Getting the Library Path", "OptionForm");
            Settings.Default.LibraryPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\ Library";
            Settings.Default.Save();
        }

        // Computer name if the display name hasnt been set yet
        if (Settings.Default.displayName == "COMPUTERNAME")
        {
            Debug.WriteLine("Getting the display Name", "OptionForm");
            Settings.Default.displayName = Environment.MachineName;
            Settings.Default.Save();
        }

        // Set global proxy information
        OptionForm.SetGlobalProxy();

        // Settings Tab
        textBoxXmdsUri.Text = Settings.Default.serverURI;
        textBoxServerKey.Text = Settings.Default.ServerKey;
        textBoxLibraryPath.Text = Settings.Default.LibraryPath;
        tbHardwareKey.Text = Settings.Default.hardwareKey;
        numericUpDownCollect.Value = Settings.Default.collectInterval;
        checkBoxPowerPoint.Checked = Settings.Default.powerpointEnabled;
        checkBoxStats.Checked = Settings.Default.statsEnabled;
        nupScrollStepAmount.Value = Settings.Default.scrollStepAmount;

        // Register Tab
        labelXmdsUrl.Text = Settings.Default.Xmds;
        textBoxDisplayName.Text = Settings.Default.displayName;

        // Proxy Tab
        textBoxProxyUser.Text = Settings.Default.ProxyUser;
        maskedTextBoxProxyPass.Text = Settings.Default.ProxyPassword;
        textBoxProxyDomain.Text = Settings.Default.ProxyDomain;

        // Client Tab
        clientWidth.Value = Settings.Default.sizeX;
        clientHeight.Value = Settings.Default.sizeY;
        offsetX.Value = Settings.Default.offsetX;
        offsetY.Value = Settings.Default.offsetY;

        // Advanced Tab
        numericUpDownEmptyRegions.Value = Settings.Default.emptyLayoutDuration;
        cbExpireModifiedLayouts.Checked = Settings.Default.expireModifiedLayouts;
        enableMouseCb.Checked = Settings.Default.EnableMouse;
        doubleBufferingCheckBox.Checked = Settings.Default.DoubleBuffering;

        System.Diagnostics.Debug.WriteLine("Loaded Options Form", "OptionForm");
    }
Example #20
0
 private void InitializeListener()
 {
     this._traceMessages = new Collection<TraceMessage>();
     this._logPath = App.UserAppDataPath + "/" + Settings.Default.logLocation;
     this._xmdsProcessing = false;
     this._xmds = new ServiceClient();
     this._xmds.SubmitLogCompleted += new EventHandler<SubmitLogCompletedEventArgs>(this.XmdsSubmitLogCompleted);
     this._hardwareKey = new HardwareKey();
 }