void serverSearch_Click(object sender, EventArgs e) { MainSection section = selectedServerSection as MainSection; ToolStripMenuItem tsi = sender as ToolStripMenuItem; SearchSection searchSection = tsi != null ? tsi.Tag as SearchSection : null; if (OnSearchInput != null && section != null && searchSection != null) { // Show search dialog string query = ""; if (OnSearchInput(searchSection, out query)) { LibrarySection librarySection = searchSection.createFromSearch(query); if (librarySection != null) { librarySection.IsMusic = section.IsMusic; // Add a new child node to the musicsection node TreeNode tn = tvServerSection.SelectedNode.Nodes.Add(librarySection.Key, librarySection.Title); tn.Tag = librarySection; // Select the newly added node in the tree tvServerSection.SelectedNode = tn; } } } }
public DubizzleURIBuilder(HTTPProtocol protocol, Localization location, MainSection section) { Location = location ; Protocol = protocol; Section = section; this.Url = new Uri(string.Format("{0}{1}.{2}/{3}", _protocolString, _locationString, baseuri, _sectionString)); }
private void Button2_OnClicked(object sender, EventArgs e) { MainSection.Add(new ViewCell { View = new Entry { Text = $"Added at {MainSection.Count}" } }); }
/// <summary> /// Setup the ViewModel /// </summary> protected override void Setup() { base.Setup(); // TODO: Add Maintenance pages here. // Please don't leave any commented out text here! MainSection mainSection = AddMainSection("General"); mainSection.AddMaintenancePage <OETWeb.Maintenance.Products>("Products"); }
private void btnShowFolders_Click(object sender, EventArgs e) { MainSection mainSection = getSelectedMainSection(); if (mainSection != null) { SectionFolderForm folderForm = new SectionFolderForm(); folderForm.setMainSection(mainSection); folderForm.ShowDialog(); } }
/// <summary> /// Setup the ViewModel /// </summary> protected override void Setup() { base.Setup(); // Add Maintenance pages here. MainSection mainSection = AddMainSection("General"); mainSection.AddMaintenancePage <MELib.Maintenance.MovieGenreList>("Movie Genres"); mainSection.AddMaintenancePage <MELib.Movies.MovieList>("Movies"); mainSection.AddMaintenancePage <MELib.Products.ProductList>("Products"); // Add more lists here for maintaining, e.g. Status List, Years or lookup tables used in the project }
public void Read(Stream stream) { var reader = new StreamReader(stream); MainSection.Read(reader); while (!reader.EndOfStream) { var section = new ManifestSection(); section.Read(reader); AdditionalSections[section.Value] = section; } }
public MainPage() { InitializeComponent(); for (var x = 0; x < 20; x++) { MainSection.Add(new ViewCell { View = new Label { Text = $"Added at {MainSection.Count}" } }); } }
public JsonResult SaveSection(int sid, string sname, string imgUrl, string AllUserID, string tags, string desc) { var admins = AllUserID.GetArray(); //if (admins.Length == 0) //{ // return Json(new { result = 0, msg = "没有指定版主" }, JsonRequestBehavior.DenyGet); //} MainSection section; if (sid == 0) { section = new MainSection(); section.TenantId = CurrentTenant.TenantId; } else { section = _bbsService.GetMainSectionById(sid); if (section == null || section.TenantId != CurrentTenant.TenantId) { return(Json(new { result = 0, msg = "没有找到要修改的版块" }, JsonRequestBehavior.DenyGet)); } } section.SectionName = sname; if (Request.Files["frontImg"] != null && Request.Files["frontImg"].ContentLength > 0) { //Request.Files["frontImg"] .SaveAs(""); section.FrontImage = SaveFile(Request.Files["frontImg"]); } else if (!string.IsNullOrEmpty(imgUrl)) { section.FrontImage = imgUrl; } section.Tags = tags; section.SectionDescription = desc; if (sid == 0) { _bbsService.AddMainSection(section); } else { _bbsService.UpdateSection(section); } if (admins.Length > 0) { _bbsService.ClearSectionAdmins(section.SectionId); _bbsService.AddSectionAdmins(admins, section.SectionId); } return(Json(new { result = 1, msg = RetechWing.LanguageResources.Common.SaveSuccess }, JsonRequestBehavior.DenyGet)); }
public ActionResult CreateSection(int sectionId = 0) { var section = _bbsService.GetMainSectionById(sectionId); if (section == null) { section = new MainSection(); } else { var admins = _bbsService.GetSectionAdmins(new int[] { sectionId }); section.SectionAdmins.AddRange(admins); } return(View(section)); }
private void enableServerSectionCommands() { MainSection section = selectedServerSection as MainSection; btnServerSectionSearch.Enabled = OnSearchInput != null && section != null && section.canBeSearched; if (btnServerSectionSearch.Enabled && btnServerSectionSearch.Tag != section) { btnServerSectionSearch.DropDownItems.Clear(); foreach (SearchSection search in section.searchSections) { ToolStripMenuItem tsi = (ToolStripMenuItem)btnServerSectionSearch.DropDownItems.Add(search.Title); tsi.Tag = search; tsi.Click += new EventHandler(serverSearch_Click); } } }
public void Write(Stream stream, AndroidApkSigningTool.HashAlgorithmInfo hashAlgorithmInfo) { using (var manifestHasher = hashAlgorithmInfo.HashAlgorithmFactory()) { manifestHasher.Initialize(); MainSection.Write(stream, manifestHasher, hashAlgorithmInfo); foreach (var section in AdditionalSections.Values) { section.Write(stream, manifestHasher, hashAlgorithmInfo); } //stream.Write(NewLineBytes,0, NewLineBytes.Length); manifestHasher.TransformFinalBlock(new byte[0], 0, 0); Digest = Convert.ToBase64String(manifestHasher.Hash); } }
public void addMainSection(MainSection _mainSection) { if (_mainSection != null && m_mainSections.FirstOrDefault(mainSection => mainSection.Key.Equals(_mainSection.Key, StringComparison.OrdinalIgnoreCase)) == null) { _mainSection.Owner = PMSServer; m_mainSections.Add(_mainSection); _mainSection.loadFromCache(false, false, null); foreach (string location in _mainSection.Locations) { if (m_sectionLocations.FirstOrDefault(section => section.PlexLocation.Equals(location, StringComparison.OrdinalIgnoreCase)) == null) { m_sectionLocations.Add(new SectionLocation(_mainSection) { PlexLocation = location }); } } } }
IEnumerator Delayed(int id) { this.id = id; MainSection mainSection = all[id - 1]; switch (id) { case 1: anim.Play("vejiga"); break; case 2: anim.Play("mama"); break; case 3: anim.Play("pulmon"); break; } yield return(new WaitForSeconds(0.7f)); mainSection.gameObject.SetActive(true); mainSectionsDefault.SetActive(true); }
public void setSectionLocation(SectionLocation _sectionLocation, bool _usePlexLocation, ImportManager.ProgressEventHandler _progressMessage) { string relativePath = RelativePath(_usePlexLocation ? _sectionLocation.PlexLocation : _sectionLocation.MappedLocation); MainSection = _sectionLocation.Owner(); MainSection.loadFromCache(false, true, _progressMessage); var folders = from folder in MainSection.folders where folder.Title.Equals(relativePath, StringComparison.OrdinalIgnoreCase) select folder; FolderSection = folders.FirstOrDefault(); char directorySeparatorFrom = PMSServer.DirectorySeparator == PMSBase.BACKWARD_SLASH ? PMSBase.FORWARD_SLASH : PMSBase.BACKWARD_SLASH; m_fullPlexFileName = FullFileName; if (!_usePlexLocation && !String.IsNullOrEmpty(_sectionLocation.MappedLocation)) { if (m_fullPlexFileName.StartsWith(_sectionLocation.MappedLocation, StringComparison.OrdinalIgnoreCase)) { m_fullPlexFileName = _sectionLocation.PlexLocation + m_fullPlexFileName.Remove(0, _sectionLocation.MappedLocation.Length); } m_fullPlexFileName = normalizePath(m_fullPlexFileName, directorySeparatorFrom, PMSServer.DirectorySeparator); } }
void Awake() { mainSection = GetComponentInParent <MainSection>(); handWritting = gameObject.AddComponent(typeof(HandWriting)) as HandWriting; handWritting.Init(field.text); }
public int UpdateSection(MainSection section) { return(_dataAccess.UpdateEntity(section)); }
public CorePage() { Title = "Tasks"; Node = MainSection.GetNode(); }
public ProfilePage(Driver driver) : base(driver) { DescriptionSection = new DescriptionSection(driver); GeneralInformationSection = new AvailabilitySection(driver); MainSection = new MainSection(driver); }
private void NavigateFromLandingPage(MainSection chosenSection) // figuring out what section was pressed { // and navigating it + resetting the selectedSection MainSection section = chosenSection; var navigation = Application.Current.MainPage as NavigationPage; switch (section.SectionName) { case "About Me": var aboutMeViewModel = new AboutMeViewModel(); var aboutMePage = new AboutMe { BindingContext = aboutMeViewModel }; SelectedSection = null; navigation.PushAsync(aboutMePage, true); break; case "Projects": var projectsViewModel = new ProjectsViewModel(); var projectsPage = new ProjectsPage { BindingContext = projectsViewModel }; SelectedSection = null; navigation.PushAsync(projectsPage, true); break; case "Skills": var skillsViewModel = new SkillsViewModel(); var skillsPage = new SkillsPage { BindingContext = skillsViewModel }; SelectedSection = null; navigation.PushAsync(skillsPage, true); break; case "Experience": var experienceViewModel = new ExperienceViewModel(); var experiencePage = new ExperiencePage { BindingContext = experienceViewModel }; SelectedSection = null; navigation.PushAsync(experiencePage, true); break; case "Goals": var goalsViewModel = new GoalsViewModel(); var goalsPage = new GoalsPage { BindingContext = goalsViewModel }; SelectedSection = null; navigation.PushAsync(goalsPage, true); break; case "Contact": var contactViewModel = new ContactViewModel(); var contactPage = new ContactPage { BindingContext = contactViewModel }; SelectedSection = null; navigation.PushAsync(contactPage, true); break; } //var viewModel = new GeneralInfoViewModel(); //var sectionPage = new GeneralInfoPage { BindingContext = viewModel }; //SelectedSection = null; //var navigation = Application.Current.MainPage as NavigationPage; //navigation.PushAsync(sectionPage, true); }
/// <summary> /// 更新一条数据 /// </summary> public bool UpdateMainSection(MainSection model) { return(_dataAccess.UpdateEntity(model) > 0); }
/// <summary> /// 增加一条数据 /// </summary> public int AddMainSection(MainSection model) { return(_dataAccess.AddEntity(model)); }
public void setMainSection(MainSection _mainSection) { m_mainSection = _mainSection; this.Text = String.Format("Folders in section {0}", m_mainSection != null ? m_mainSection.Title : ""); }
public MatchEntry(MainSection _mainSection, XElement _trackElement) { m_mainSection = _mainSection; m_trackElement = _trackElement; }
public int AddMainSection(MainSection section) { return(_dataAccess.AddEntity(section)); }