//Initialization of the main window public MainWindow() : base(Gtk.WindowType.Toplevel) { //Building GUI, launching timer to dynamically update the Windows Player state, setting base values Build(); GLib.Timeout.Add(250, new GLib.TimeoutHandler(PlayerTimer)); textbox.ModifyFont(Pango.FontDescription.FromString("Monospace 20")); MainTitle.ModifyFont(Pango.FontDescription.FromString("Monospace 14")); textbox.Alignment = 0.5F; //Setting widget color scheme and splitter position SetWidgetColor(this, RGB2HEX(201, 201, 201)); SetWidgetColor(eventbox20, RGB2HEX(235, 235, 235)); SetWidgetColor(eventbox21, RGB2HEX(235, 235, 235)); SetWidgetColor(eventbox22, RGB2HEX(235, 235, 235)); SetWidgetColor(TitleBack, RGB2HEX(161, 161, 161)); SetWidgetColor(PlayBack, RGB2HEX(77, 77, 77)); SetWidgetColor(BlackBack, RGB2HEX(135, 135, 135)); SetWidgetColor(WhiteBack, RGB2HEX(96, 96, 96)); splitter1.Position = 400; //Morphing images into controls, attaching handlers for events ImagesAsControls(); ActivateImages(); //Loading dynamic widgets for correct visual representation of audiotracks and corresponding timestamps Dynamic_Widgets_Audio = FillLeftScrolledWindow(scrolledwindow1); Refresh_Audio_Widgets(); Dynamic_Widgets_Timestamps = FillRightScrolledWindow(scrolledwindow2); ((Viewport)scrolledwindow1.Child).ShadowType = scrolledwindow1.ShadowType; ((Viewport)scrolledwindow2.Child).ShadowType = scrolledwindow2.ShadowType; }
private static bool AddTitle(bool isTitleAdded, Section section, MainTitle mainTitleElm, SubTitle subtitleElm) { if (!isTitleAdded) { Paragraph paragraph = section.AddParagraph(mainTitleElm.Title); paragraph.Format.Font.Size = 0.01; paragraph.Format.Font.Color = Colors.White; paragraph.Format.OutlineLevel = OutlineLevel.Level1; paragraph.AddBookmark(subtitleElm.Id); isTitleAdded = true; } return(isTitleAdded); }
public MainWindowViewModel(UserInterface userInterface, StatusInfo statusInfo, OpenedProjects openedProjects) { if (userInterface == null) { throw new ArgumentNullException(nameof(userInterface)); } if (statusInfo == null) { throw new ArgumentNullException(nameof(statusInfo)); } if (openedProjects == null) { throw new ArgumentNullException(nameof(openedProjects)); } this.userInterface = userInterface; this.statusInfo = statusInfo; this.openedProjects = openedProjects; // Create commands SelectAllFlagsCommand = new SelectAllFlagsCommand(userInterface, openedProjects); SelectNoFlagsCommand = new SelectNoFlagsCommand(userInterface, openedProjects); CopyCommand = new CopyCommand(userInterface, openedProjects); PasteCommand = new PasteCommand(userInterface, openedProjects); CreateProjectCommand = new CreateProjectCommand(userInterface, openedProjects); CloseCurrentProjectCommand = new CloseCurrentProjectCommand(userInterface, openedProjects); DigitCommand = new DigitCommand(userInterface, openedProjects); // Initialize everything IEnumerable <ProjectViewModel> projects = openedProjects .Select(x => new ProjectViewModel(userInterface, statusInfo, openedProjects, x)); Projects = new ObservableCollection <ProjectViewModel>(projects); SelectedProject = Projects.FirstOrDefault(); mainTitle = new MainTitle(openedProjects); mainTitle.Changed += HandleMainTitleChanged; Title = mainTitle.ToString(); this.openedProjects.CurrentProjectChanged += HandleCurrentProjectChanged; this.openedProjects.ProjectCreated += HandleProjectCreated; this.openedProjects.ProjectClosed += HandleProjectClosed; IsNoTabInfoVisible = Projects.Count == 0; }
public List <string> ToSearchParameters() { List <string> parms = new List <string>(); // only use the first 2 words of the anime's title string[] titles = MainTitle.Split(' '); int i = 0; foreach (string s in titles) { i++; parms.Add(s.Trim()); if (i == 2) { break; } } return(parms); }
void ReleaseDesignerOutlets() { if (MainTitle != null) { MainTitle.Dispose(); MainTitle = null; } if (SubTitle != null) { SubTitle.Dispose(); SubTitle = null; } if (Icon != null) { Icon.Dispose(); Icon = null; } }
void ReleaseDesignerOutlets() { if (LblTitle != null) { LblTitle.Dispose(); LblTitle = null; } if (MainTitle != null) { MainTitle.Dispose(); MainTitle = null; } if (TableView != null) { TableView.Dispose(); TableView = null; } }
public override void ViewDidLoad() { base.ViewDidLoad(); View.InjectMainBackground(this.View.Bounds); View.AdaptSizeToScreen(); NavigationController.SetNavigationBarHidden(true, true); MainTitle.Frame = new CGRect(0, 0, UIScreen.MainScreen.Bounds.Width, TableView.Frame.Top); MainTitle.TextContainer.LineFragmentPadding = 0; MainTitle.Text = string.Empty; MainTitle.ApplyTitleStyle(); //MainTitle.TextContainerInset = new UIEdgeInsets((MainTitle.Bounds.Height / 2) - 8, (nfloat)LangTableRow.PADDING_LEFT, 0, 0); LblTitle.Text = Translator.GetText("choose_lang"); LblTitle.Font = UIFont.FromName("Arial", 16f); LblTitle.TextColor = Style.Header.TextColor; LblTitle.Frame = new CGRect((nfloat)LangTableRow.PADDING_LEFT, (MainTitle.Bounds.Height / 2) - (LblTitle.Bounds.Height / 2), UIScreen.MainScreen.Bounds.Width, TableView.Frame.Top); LblTitle.SizeToFit(); // Initialize table //TableView.Frame = new CGRect(0, MainTitle.Frame.Y + MainTitle.Frame.Size.Height, UIScreen.MainScreen.Bounds.Width, 0); TableView.Source = new LangTableSource(ViewModel.Langs, this); TableView.SeparatorStyle = UITableViewCellSeparatorStyle.SingleLine; TableView.SeparatorColor = Style.OptionView.LineSeparatorColor; TableView.BackgroundColor = Style.OptionView.TableBackgroundColor; TableView.SeparatorInset = UIEdgeInsets.Zero; TableView.TintColor = Style.OptionView.ContentColor; _spinner = new Spinner(View); }
void ReleaseDesignerOutlets() { if (BannerLogo != null) { BannerLogo.Dispose(); BannerLogo = null; } if (BarButtonItem != null) { BarButtonItem.Dispose(); BarButtonItem = null; } if (BarButtonItem2 != null) { BarButtonItem2.Dispose(); BarButtonItem2 = null; } if (BarButtonItem3 != null) { BarButtonItem3.Dispose(); BarButtonItem3 = null; } if (BarButtonItem4 != null) { BarButtonItem4.Dispose(); BarButtonItem4 = null; } if (BarButtonItem5 != null) { BarButtonItem5.Dispose(); BarButtonItem5 = null; } if (MainTitle != null) { MainTitle.Dispose(); MainTitle = null; } if (MainView != null) { MainView.Dispose(); MainView = null; } if (MapType_Segmented != null) { MapType_Segmented.Dispose(); MapType_Segmented = null; } if (MapView != null) { MapView.Dispose(); MapView = null; } if (Pause_Button != null) { Pause_Button.Dispose(); Pause_Button = null; } if (SoundBar != null) { SoundBar.Dispose(); SoundBar = null; } if (Start_Button != null) { Start_Button.Dispose(); Start_Button = null; } if (Stop_Button != null) { Stop_Button.Dispose(); Stop_Button = null; } }