Example #1
0
        public OverlayManager(OverlayWindow myOverlay)
        {
            cancelToken = token.Token;
            //Initialize logging for components
            GW2APIComponent.BaseComponents.BaseComponent.logging += BaseComponent_logging;

            //setOverlayParent;
            overlay = myOverlay;

            InitializeComponent();

            // AddComponents
            list        = gw2InformationObject.AddComponent <ItemListComponent>(null);
            recipe      = gw2InformationObject.AddComponent <RecipeRequestComponent>(null);
            list.onAdd += list_onAdd;
            // start backgroundworkers
            itemListFetcher.RunWorkerAsync();
            AddItemWorker.RunWorkerAsync();

            //set sorting algorithm for the itemNameList
            Disposed += OverlayManager_Disposed;

            itemProjectList.Items.AddRange(overlay.OverlayInfo.getItemProjectNames().ToArray());
            editProject = newProject;
        }
 public OverlayInfo()
 {
     object[] o = { Properties.Settings.Default.APIKey };
     InitializeComponent();
     obj         = new GW2Object();
     apikey      = obj.AddComponent <APIKeyInfoComponent>(o);
     permissions = obj.AddComponent <APIKeyPermissionsComponent>(null);
     accountInfo = obj.AddComponent <AccountComponent>(null);
     obj.AddComponent <ItemTradeComponent>(null);
     loadItemProjects();
 }