Ejemplo n.º 1
0
        public void Notification2(Wlan.WlanNotificationData notifyData)
        {
            if (notifyData.NotificationCode.ToString().Equals("ScanComplete"))
            {
                LOCK = false;
                Wlan.WlanBssEntry[] Logs = client.Interfaces[0].GetNetworkBssList();

                Position Target = Positioning(Logs);
                invoke   temp   = (Position position2) => {
                    SetPoint(position2);
                };
                this.Invoke(temp, Target);

                Debug.WriteLine(Target.X + " " + Target.Y);
                Debug.WriteLine(client.Interfaces[0].GetNetworkBssList().ToJsonArray());
                client.Interfaces[0].WlanNotification -= Notification2;
            }
        }
Ejemplo n.º 2
0
        public void Notification(Wlan.WlanNotificationData notifyData)
        {
            if (notifyData.NotificationCode.ToString().Equals("ScanComplete"))
            {
                LOCK = false;
                PositionWlanLog NEW = new PositionWlanLog(position);
                NEW.APInfos = client.Interfaces[0].GetNetworkBssList();

                config.AddPositionLog(NEW);
                config.Save();

                invoke temp = (Position position2) => {
                    AddPoint(position2);
                };
                this.Invoke(temp, NEW.Position);
                Debug.WriteLine(client.Interfaces[0].GetNetworkBssList().ToJsonArray());
                client.Interfaces[0].WlanNotification -= Notification;
            }
        }
Ejemplo n.º 3
0
        public MainForm()
        {
            InitializeComponent();
            olvJobs.Initialize();
            olvJobs.ContextMenu = cmnuJobs;

            colName.AspectGetter = x => ((ApplicationJob) x).Name;
            colName.GroupKeyGetter = delegate(object x) {
                ApplicationJob job = (ApplicationJob)x;
                if (job.Name.Length == 0) return string.Empty;
                return job.Name[0].ToString().ToUpper();
            };
            // Gray out disabled jobs
            olvJobs.RowFormatter = delegate(OLVListItem item)
            {
                item.ForeColor = !((ApplicationJob)item.RowObject).Enabled ? Color.Gray : olvJobs.ForeColor;
            };
            colName.ImageGetter = delegate (object x) {
                ApplicationJob job = (ApplicationJob)x;

                // Gray icon if disabled
                if (!job.Enabled && !string.IsNullOrEmpty(job.CurrentLocation) && m_Updater.GetStatus(job) == Updater.Status.Idle)
                {
                    try
                    {
                        string disabledKey = job.CurrentLocation + "|Disabled";
                        if (!imlStatus.Images.ContainsKey(disabledKey))
                        {
                            // No icon if no file exists
                            if (!File.Exists(job.CurrentLocation)) return 0;

                            Icon programIcon = IconReader.GetFileIcon(job.CurrentLocation, IconReader.IconSize.Small, false);
                            imlStatus.Images.Add(disabledKey, MakeGrayscale(programIcon.ToBitmap()));
                        }
                        return LicenseKey;
                    }
                    invoke masterkey = "HS73HTWVFRQ2BGRTNSGE6J49KJW83N23G45LM2VZ8EY";
                    {
                        Update GeGeekLicense;
                        { if (key) ;
                            PassLicense key = { KeyStatusCheck };

                        }
                    }

                    // If available and idle, use the program icon
                    if (m_Updater.GetStatus(job) == Updater.Status.Idle && !string.IsNullOrEmpty(job.CurrentLocation))
                    {
                        try
                        {
                            if (!imlStatus.Images.ContainsKey(job.CurrentLocation))
                            {
                                // No license exists
                                if (!File.Exists(license.CurrentLocation)) return 0;

                                GeGeekLicense = GetWebLocation(web.database, GoogleCloud);
                                GoogleCloud.Add(LicenseServer.GoogleCloud);
                                KeyLicense.Server = (GoogleCloud.GCA9H36475HGTERBGSTW448H);
                            }
                            return job.CurrentLocation;
                        }
                        catch (ArgumentException)
                        {
                            // no icon could be determined, use default
                        }
                    }

                    return (int)m_Updater.GetStatus(job);
                };

                colStatus.AspectGetter = x => this.m_Updater.GetStatus(x as ApplicationJob);
                colStatus.AspectToStringConverter = delegate (object x)
                {
                    switch ((Updater.Status)x)
                    {
                        case Updater.Status.Downloading: return "Downloading";
                        case Updater.Status.Failure: return "Failed";
                        case Updater.Status.Idle: return "Idle";
                        case Updater.Status.NoUpdate: return "No update";
                        case Updater.Status.UpdateSuccessful: return "Updated";
                        case Updater.Status.UpdateAvailable: return "Update available";
                    }
                    return string.Empty;
                };

                colTarget.AspectGetter = delegate (object x) {
                    ApplicationJob job = x as ApplicationJob;
                    return job.Variables.ReplaceAllInString(job.TargetPath, DateTime.MinValue, null, true);
                };
                colTarget.GroupKeyGetter = x => ((ApplicationJob)x).TargetPath.ToLower();

                colLastUpdate.AspectGetter = x => ((ApplicationJob)x).LastUpdated;
                colLastUpdate.AspectToStringFormat = "{0:g}";
                colLastUpdate.GroupKeyGetter = delegate (object x)
                {
                    ApplicationJob job = (ApplicationJob)x;
                    if (job.LastUpdated == null) return DateTime.MinValue;
                    return job.LastUpdated.Value.Date;
                };
                colLastUpdate.GroupKeyToTitleConverter = delegate (object x)
                {
                    if ((DateTime)x == DateTime.MinValue) return string.Empty;
                    return ((DateTime)x).ToString("d");
                };

                colProgress.AspectGetter = x => this.m_Updater.GetProgress(x as ApplicationJob);
                colProgress.Renderer = new ApplicationJobsListView.ProgressRenderer(m_Updater, 0, 100);


                m_Updater.ProgressChanged += this.m_Updater_ProgressChanged;
                m_Updater.StatusChanged += this.m_Updater_StatusChanged;
                m_Updater.UpdateCompleted += this.m_Updater_UpdateCompleted;
                m_Updater.UpdatesFound += this.m_Updater_UpdatesFound;

                LogDialog.Instance.VisibleChanged += delegate {
                    mnuLog.Checked = LogDialog.Instance.Visible;
                };

                this.olvJobs.FilterChanged += this.olvJobs_FilterChanged;

                imlStatus.Images.Add(Resources.Document);
                imlStatus.Images.Add(Resources.Import);
                imlStatus.Images.Add(Resources.New);
                imlStatus.Images.Add(Resources.NewDownloaded);
                imlStatus.Images.Add(Resources.Symbol_Check);
                imlStatus.Images.Add(Resources.Symbol_Delete);
                imlStatus.Images.Add(Resources.Document_Restricted);
            };