/// <summary> /// 删除图片的处理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ColorPic_Disposed(object sender, EventArgs e) { TitleImage pic = sender as TitleImage; CostumePhotos.Remove(pic.Tag as EmCostumePhoto); AddRemovePhotos(pic.Tag as EmCostumePhoto); }
public void Fade() { bFading = true; TitleImage.GetComponent <Image>().CrossFadeAlpha(0.0f, 1.0f, false); StartButton.GetComponent <Image>().CrossFadeAlpha(0.01f, 1.0f, false); Intro.GetComponent <Image>().CrossFadeAlpha(0.01f, 1.0f, false); StartButton.GetComponentInChildren <Text>().CrossFadeAlpha(0.01f, 1.0f, false); Intro.GetComponentInChildren <Text>().CrossFadeAlpha(0.01f, 1.0f, false); }
public void ShowTitle() { Debug.Log("Show Me"); TitleImage.image.sprite = Ini.instance.infos[ValueSheet.CurrentPlayID].TitleSprite; TitleImage.image.rectTransform.sizeDelta = new Vector2(width, height); ShowBrackets(); LeftImage.ShowAll(); RightImage.ShowAll(); TitleImage.ShowAll(); }
public void SaveTitleImage(TitleImage entity) { if (entity.Id == default) { context.Entry(entity).State = EntityState.Added; } else { context.Entry(entity).State = EntityState.Modified; } context.SaveChanges(); }
void BlankPage7_Loaded(object sender, RoutedEventArgs e) { //this.pictureRotatorHubTile.UpdateInterval = TimeSpan.FromSeconds(3); titleImageRotatorHubTile.UpdateInterval = new TimeSpan(0, 0, 0, 3); ObservableCollection <TitleImage> imageSources = new ObservableCollection <TitleImage>(); TitleImage titleImage1 = new TitleImage() { Title = "美女1", Content = "是个大漂亮姑娘1", ImageUri = "http://ww4.sinaimg.cn/bmiddle/6cacb4ebjw1drurw8kjftj.jpg" }; imageSources.Add(titleImage1); TitleImage titleImage2 = new TitleImage() { Title = "美女2", Content = "是个大漂亮姑娘2", ImageUri = "http://ww4.sinaimg.cn/bmiddle/a1eadd4agw1drvj66k58dj.jpg" }; imageSources.Add(titleImage2); TitleImage titleImage3 = new TitleImage() { Title = "美女3", Content = "是个大漂亮姑娘3", ImageUri = "http://ww1.sinaimg.cn/bmiddle/7ee46e25gw1drvj5po6nfj.jpg" }; imageSources.Add(titleImage3); TitleImage titleImage4 = new TitleImage() { Title = "美女4", Content = "是个大漂亮姑娘4", ImageUri = "http://ww4.sinaimg.cn/bmiddle/6cef4748jw1drvil3vyw4j.jpg" }; imageSources.Add(titleImage4); TitleImage titleImage5 = new TitleImage() { Title = "美女5", Content = "是个大漂亮姑娘5", ImageUri = "http://ww1.sinaimg.cn/bmiddle/8a52b9a0jw1drxyc384o7j.jpg" }; imageSources.Add(titleImage5); TitleImage titleImage6 = new TitleImage() { Title = "美女6", Content = "是个大漂亮姑娘6", ImageUri = "http://ww3.sinaimg.cn/bmiddle/4ada9d17gw1drxy77g740j.jpg" }; imageSources.Add(titleImage6); //TitleImage titleImage1 = new TitleImage() { Title = "美女1", Content = "是个大漂亮姑娘1", ImageUri = "/Images/HubTile/comment1.png" }; //imageSources.Add(titleImage1); //TitleImage titleImage2 = new TitleImage() { Title = "美女2", Content = "是个大漂亮姑娘2", ImageUri = "/Images/HubTile/comment2.png" }; //imageSources.Add(titleImage2); //TitleImage titleImage3 = new TitleImage() { Title = "美女3", Content = "是个大漂亮姑娘3", ImageUri = "/Images/HubTile/comment3.png" }; //imageSources.Add(titleImage3); this.titleImageRotatorHubTile.ImageSources = imageSources; }
void ReleaseDesignerOutlets() { if (InputText != null) { InputText.Dispose(); InputText = null; } if (TitleLabel != null) { TitleLabel.Dispose(); TitleLabel = null; } if (TitleImage != null) { TitleImage.Dispose(); TitleImage = null; } }
public void Save(string resolution, string destination, bool createDirectory) { if (!destination.EndsWith("\\")) { destination += "\\"; } if (createDirectory) { destination = string.Concat(destination, RemoveInvalidChars(Title), "\\"); Directory.CreateDirectory(destination); } SaveNfoFile(destination); var streamInformation = StreamInformations.InformationFromResolution(resolution); var subtitleTask = Task.Factory.StartNew(() => new SrtGenerator(StreamInformations.SubtitlesUri).SaveToFile(destination + SubTitleFile)); var str = string.Concat(destination, FileName); var processStartInfo = new ProcessStartInfo(FFMPEG_FILENAME, $" -i \"{streamInformation.Uri}\" -hide_banner -v quiet -stats -c copy \"{str}\"") { WindowStyle = ProcessWindowStyle.Hidden, UseShellExecute = true }; str = string.Concat(destination, ImageFilename); File.Delete(str); using (var fileStream = new FileStream(str, FileMode.CreateNew)) { TitleImage.WriteTo(fileStream); fileStream.Close(); } Process.Start(processStartInfo)?.WaitForExit(); subtitleTask.Wait(); }
private void SaveTitleImage(string codeWord, IFormFile titleImage, TextField model) { if (codeWord == "AboutUsBigTitleImage" || codeWord == "AboutUsSmallTitleImage") { using (var stream = new FileStream(Path.Combine(hostingEnvironment.WebRootPath, "images/", titleImage.FileName), FileMode.Create)) { System.IO.File.Delete(Path.Combine(hostingEnvironment.WebRootPath, "images/", model.TitleImages.FirstOrDefault(x => x.CodeWord == codeWord).TitleImagePath)); model.TitleImages.FindAll(x => x.CodeWord == codeWord).ForEach(s => s.TitleImagePath = titleImage.FileName); titleImage.CopyTo(stream); } } else if (codeWord == "EventsBigTitleImage" || codeWord == "EventsSmallTitleImage") { using (var stream = new FileStream(Path.Combine(hostingEnvironment.WebRootPath, "images/events", titleImage.FileName), FileMode.Create)) { var titleImage2 = new TitleImage { TitleImagePath = titleImage.FileName, TextFieldId = model.Id, CodeWord = codeWord }; dataManager.TitleImages.SaveTitleImage(titleImage2); titleImage.CopyTo(stream); } } }
public void HideAll() { LeftImage.HideAll(); RightImage.HideAll(); TitleImage.HideAll(); }
public MainPage() { InitializeComponent(); TitleImage.BindingContext = this; TitleImage.SetBinding(ImageEffect.TextProperty, new Binding("Uri")); }
void ReleaseDesignerOutlets() { if (DaysButton != null) { DaysButton.Dispose(); DaysButton = null; } if (DescriptionLabel != null) { DescriptionLabel.Dispose(); DescriptionLabel = null; } if (DescriptionLayout != null) { DescriptionLayout.Dispose(); DescriptionLayout = null; } if (DescriptionText != null) { DescriptionText.Dispose(); DescriptionText = null; } if (DueDateImage != null) { DueDateImage.Dispose(); DueDateImage = null; } if (DueDateLabel != null) { DueDateLabel.Dispose(); DueDateLabel = null; } if (DueDateLayout != null) { DueDateLayout.Dispose(); DueDateLayout = null; } if (SideBar != null) { SideBar.Dispose(); SideBar = null; } if (TagsImage != null) { TagsImage.Dispose(); TagsImage = null; } if (TagsLayout != null) { TagsLayout.Dispose(); TagsLayout = null; } if (TagsText != null) { TagsText.Dispose(); TagsText = null; } if (TitleImage != null) { TitleImage.Dispose(); TitleImage = null; } if (TitleLayout != null) { TitleLayout.Dispose(); TitleLayout = null; } if (TitleText != null) { TitleText.Dispose(); TitleText = null; } if (WillDoLabel != null) { WillDoLabel.Dispose(); WillDoLabel = null; } if (CreatedLabel != null) { CreatedLabel.Dispose(); CreatedLabel = null; } if (CreatedDateLabel != null) { CreatedDateLabel.Dispose(); CreatedDateLabel = null; } if (CompletedLabel != null) { CompletedLabel.Dispose(); CompletedLabel = null; } if (CompletedDateLabel != null) { CompletedDateLabel.Dispose(); CompletedDateLabel = null; } if (DetailsLayout != null) { DetailsLayout.Dispose(); DetailsLayout = null; } if (BlockLayout != null) { BlockLayout.Dispose(); BlockLayout = null; } }