public async Task LoadAndPurge() { SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); ResourceGroupResource rg = await CreateResourceGroup(subscription, "testRg-"); string cdnProfileName = Recording.GenerateAssetName("profile-"); ProfileResource cdnProfile = await CreateCdnProfile(rg, cdnProfileName, CdnSkuName.StandardVerizon); string cdnEndpointName = Recording.GenerateAssetName("endpoint-"); CdnEndpointData cdnEndpointData = ResourceDataHelper.CreateEndpointData(); DeepCreatedOrigin deepCreatedOrigin = new DeepCreatedOrigin("testOrigin") { HostName = "testsa4dotnetsdk.blob.core.windows.net" }; cdnEndpointData.Origins.Add(deepCreatedOrigin); var lro = await cdnProfile.GetCdnEndpoints().CreateOrUpdateAsync(WaitUntil.Completed, cdnEndpointName, cdnEndpointData); CdnEndpointResource cdnEndpoint = lro.Value; PurgeContent purgeParameters = new PurgeContent(new List <string> { "/*" }); Assert.DoesNotThrowAsync(async() => await cdnEndpoint.PurgeContentAsync(WaitUntil.Completed, purgeParameters)); LoadContent loadParameters = new LoadContent(new List <string> { "/testfile/file1.txt" }); Assert.DoesNotThrowAsync(async() => await cdnEndpoint.LoadContentAsync(WaitUntil.Completed, loadParameters)); }
public ContentForm(ILog log, string courseKey, string contentKey, LoadContent content, string typeKey) { InitializeComponent(); this.content = content; this.courseKey = courseKey; this.contentKey = contentKey; this.typeKey = typeKey; this.log = log; }
public static void InvokeLoadContent() { try { LoadContent.Invoke(); } catch (Exception ex) { Program.LogError("An exception occured in XNA LoadContent: " + ex.ToString()); } }
internal static void InvokeLoadContent() { try { LoadContent.Invoke(null, EventArgs.Empty); } catch (Exception ex) { Log.AsyncR("An exception occured in XNA LoadContent: " + ex); } }
public MainPage() { // Load content from CSV file into Class OBjects and store in dictionary. Add keys to the picker list to display to user. InitializeComponent(); LoadContent content = new LoadContent(); cityDict = content.GetCSVContent(); List <string> pickerItems = cityDict.Keys.ToList <string>(); pckrCity.ItemsSource = pickerItems; }
public DungeonManager() : base("Dungeon") { walls = new List <GameObject>(); objects = new List <GameObject>(); enemies = new List <GameObject>(); LoadContent prefabs = GameObject.Find("Prefabs").GetComponent <LoadContent>(); wall = prefabs.wall; enemy = prefabs.enemy; door = prefabs.door; key = prefabs.key; }
public void UnplanComponent(IGlyphComponent component) { Initialize.Unplan(component); if (component is ILoadContent loadContent) { LoadContent.Unplan(loadContent); } if (component is IUpdate update) { Update.Unplan(update); } if (component is IDraw draw) { Draw.Unplan(draw); } }
private void MainForm_Load(object sender, EventArgs e) { this.Text = courseName; closeForm = false; axWMP.Visible = false; panelBottom.Visible = false; //Load content try { string path = Manager.path + @"Files\"; content = new LoadContent(log, String.Format(@"{0}\{1}\{2}\Content\ContentXml.xml", path, courseKey, contentKey)); } catch (Exception ex) { btnContent.Enabled = false; //panelMain.BackgroundImage = Image.FromFile(String.Format(@"{0}\Images\Courses\Themes\404.JPG", Directory.GetCurrentDirectory()), true); //panelMain.BackgroundImageLayout = ImageLayout.Stretch; this.log.Error(String.Format("Content of [{0}] not exist. {1}", contentKey, ex.Message)); } //Load theme try { panelMain.BackgroundImage = Image.FromFile(String.Format(@"{0}\Images\Courses\Themes\{1}.JPG", Directory.GetCurrentDirectory(), contentKey), true); panelMain.BackgroundImageLayout = ImageLayout.Stretch; } catch (Exception ex) { panelMain.BackgroundImage = Image.FromFile(String.Format(@"{0}\Images\Courses\Themes\405.JPG", Directory.GetCurrentDirectory()), true); panelMain.BackgroundImageLayout = ImageLayout.Stretch; this.log.Error(String.Format("Theme of [{0}] not exist. [{0}]", contentKey, ex.Message)); } int widthScreen = SystemInformation.VirtualScreen.Width; int heightScreen = SystemInformation.VirtualScreen.Height; if (widthScreen < this.Width || heightScreen < this.Height) { this.WindowState = FormWindowState.Maximized; } }
public void OnEnabled() { _target = (LoadContent)base.target; }
protected virtual void RaiseLoadContent(GraphicsDeviceEventArgs args) => LoadContent?.Invoke(this, args);
public void Awake() { Instance = this; }