Ejemplo n.º 1
0
 private void Scribble_RecognitionChanged(object sender, PageEventArgs e)
 {
     if (e.Page == fScribble.Document.Pages[0])
     {
         BeginInvoke(TitlePageChanged, new object[] { sender, new EventArgs() });
     }
 }
Ejemplo n.º 2
0
        private void Info_CloseFromNext(object sender, PageEventArgs e)
        {
            NewJoin.AliasDbKey = txtNewDbKey.Text;
            NewJoin.AliasTable = txtNewName.Text;

            NewJoin.Select = $"{txtNewName.Text}.{NewJoin.DbKey} as {txtNewDbKey.Text}";
        }
Ejemplo n.º 3
0
        private void Info_CloseFromNext(object sender, PageEventArgs e)
        {
            if (txtGeomFiled.Text == "")
            {
                MetroMessageBox.Show(this, Properties.Resources.FieldNameNeeded, Properties.Resources.Erreur, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            var param = new string[] { _view.Nom, txtGeomFiled.Text, $"geometry({cmbType.SelectedItem},{txtSrid.Text})", _view.Schema };

            WizardSQLHelper.ExecuteFromFile("addField.sql", param, Program.AppSet.ConnectionString, this);

            TabloidConfigGeoLoc.GeoLocType geoLocType;
            Enum.TryParse(cmbType.SelectedItem.ToString(), out geoLocType);

            _view.GeoLoc.Type        = geoLocType;
            _view.GeoLoc.TitreCouche = _view.Titre;
            _view.GeoLoc.Geom        = txtGeomFiled.Text;
            _view.GeoLoc.Srid        = txtSrid.Text;
            _view.GeoLoc.ForcerSRID  = true;

            if (chkAddMenu.Checked)
            {
                WizardSQLHelper.AddToMenu(this, _view, "Carte " + _view.Titre, TabloidConfigMenuItem.MenuType.Carte, null);
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Called when showing user management.
 /// </summary>
 /// <param name="sender">The sender.</param>
 public static void OnShowing(object sender, PageEventArgs.DisplayedPage displayed)
 {
     if (Showing != null)
     {
         Showing(sender, new PageEventArgs(displayed));
     }
 }
Ejemplo n.º 5
0
 protected void grdProduct_PageIndexChanged(object sender, PageEventArgs e)
 {
     //pageColumn = RadioButtonList1.SelectedItem.Value;
     //oleDbSelectCommand1.CommandText = "SELECT CustomerID, ContactName, CompanyName, Phone, Fax, Address FROM Customers WHERE (" + pageColumn + " LIKE '" + alphabet[e.NewPageIndex - 1] + "%')";
     ///doData();
     LoadData(e.NewPageIndex);
 }
Ejemplo n.º 6
0
 internal virtual void OnOpenDecodeWindow(object sender, PageEventArgs e)
 {
     if (OpenDecodeWindow != null)
     {
         OpenDecodeWindow(sender, e);
     }
 }
        //créer dans la liste {0} les élément à partir de {1}
        //à la création d'un enregistrement de {0} compléter la liste {1} :
        private void Info_CloseFromNext(object sender, PageEventArgs e)
        {
            // add insertselect function
            e.Cancel = !WizardSQLHelper.ExecuteFromFile("functions\\insertselect.sql", new string[] { _view.Schema }, Program.AppSet.ConnectionString, this);

            var where = string.IsNullOrEmpty(txtWhere.Text) ? "'1=1'" : txtWhere.Text;

            var dest = ((TabloidConfigJointure)cmbListe.SelectedItem);

            var src = ((TabloidConfigJointure)cmbSrc.SelectedItem);

            var srcFields  = $"concat('{src.DbKey},',New.{_view.DbKey})";
            var destFields = $"'{src.ChampDeRef},{dest.ChampDeRef2}'";

            var function = $"PERFORM {_view.Schema}.insertselect('{_view.Schema}.{src.NomTable}',{where},{srcFields},'{_view.Schema}.{dest.NomTable}',{destFields});";

            if (!string.IsNullOrEmpty(txtIf.Text))
            {
                function = $"if {txtIf.Text} Then " + function + "end if;";
            }


            var param = new string[] {
                _view.Schema,
                triggerName + _view.NomTable,
                _view.NomTable,
                "AFTER INSERT",
                _view.Schema + "." + triggerName + _view.NomTable,
                function
            };

            e.Cancel = !WizardSQLHelper.ExecuteFromFile("trigger.sql", param, Program.AppSet.ConnectionString, this);
        }
Ejemplo n.º 8
0
        public void BindAfterSend(int nRet, int groupId, SGData sgData)
        {
            nRet = sgData.GetResult();
            string strMsg = "";

            if (nRet == 0)
            {
                HsNetWork hs = null;
                if (m_DicNetWork.TryGetValue(groupId, out hs) == true)
                {
                    hs = m_DicNetWork[groupId];
                    sgDicRecvData.SetLoginData(hs, groupId, sgData);
                    SGLoginData sgLoginBind    = (SGLoginData)sgDicRecvData.GetLoginData(groupId);
                    Int64       nFilePartSize  = sgLoginBind.GetFilePartSize();
                    Int64       nFileBandWidth = sgLoginBind.GetFileBandWidth();
                    int         nLinkCheckTime = sgLoginBind.GetLinkCheckTime();
                    nLinkCheckTime = (nLinkCheckTime * 2) / 3;
                    bool bDummy = sgLoginBind.GetUseDummyPacket();
                    hs.SetNetworkInfo(nFilePartSize, nFileBandWidth, bDummy, nLinkCheckTime);
                    SendUserInfoEx(groupId, sgLoginBind.GetUserID());
                }
            }
            else
            {
                strMsg = SGLoginData.LoginFailMessage(nRet);
                PageEventArgs e = new PageEventArgs();
                e.result = nRet;
                e.strMsg = strMsg;
                LoginResult_Event(groupId, e);
            }
        }
Ejemplo n.º 9
0
 /// <summary>
 /// Called when a page is requested to be viewed
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="InternalsViewer.Internals.Pages.PageEventArgs"/> instance containing the event data.</param>
 internal virtual void OnViewPage(object sender, PageEventArgs e)
 {
     if (ViewPage != null)
     {
         ViewPage(sender, e);
     }
 }
 protected virtual void OnTotalRowCountAvailable(PageEventArgs e)
 {
     if (TotalRowCountAvailable != null)
     {
         TotalRowCountAvailable(this, e);
     }
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Called when the mouse hovers over a page on the allocation map
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="InternalsViewer.Internals.Pages.PageEventArgs"/> instance containing the event data.</param>
 internal virtual void OnPageOver(object sender, PageEventArgs e)
 {
     if (PageOver != null)
     {
         PageOver(sender, e);
     }
 }
Ejemplo n.º 12
0
    public void SwitchTOMainPage()
    {
        PageEventArgs page_args = new PageEventArgs();

        page_args.SwitchToPage = PageEventArgs.PageIndex.MainMenu;
        pageSwitch(this, page_args);
    }
Ejemplo n.º 13
0
        public void OnPublishedPage(object sender, PageEventArgs eventArgs)
        {
            var pageData = ServiceLocator.Current.GetInstance <IContentRepository>().Get <PageData>(ContentReference.StartPage);

            var settingsPageReference = pageData.Property[Strings.DynamicPropertySettingName].Value as ContentReference;

            if (settingsPageReference == null)
            {
                return;
            }

            var settingsPage = ServiceLocator.Current.GetInstance <IContentRepository>().Get <IB_SettingsPage>(settingsPageReference);
            var parent       = ServiceLocator.Current.GetInstance <IContentRepository>().Get <PageData>(eventArgs.PageLink).ParentLink;

            if (parent != settingsPage.EventMessageRoot)
            {
                return;
            }

            var ibEventMessage = eventArgs.Page as IB_EventMessage;

            if (ibEventMessage == null)
            {
                return;
            }

            SignalRConnector.EventMessage.Clear();
            foreach (var message in EventMessages(string.Empty))
            {
                SignalRConnector.EventMessage.Send(message);
            }
        }
Ejemplo n.º 14
0
        private void OnPublishedPage(object sender, PageEventArgs e)
        {
            var page = e.Page;
            var tags = GetPageTags(page);

            _tagService.Save(page.PageGuid, tags);
        }
Ejemplo n.º 15
0
        static void DataFactory_LoadedPage(object sender, PageEventArgs e)
        {
            if (e.Page == null)
                return;

            e.Page = PageTypeResolver.Instance.ConvertToTyped(e.Page);
        }
Ejemplo n.º 16
0
        public void SystemRunAfterSend(int nRet, int groupId, SGData sgData)
        {
            if (nRet == 0)
            {
                SGLoginData sgLoginDataSystemRun = (SGLoginData)sgDicRecvData.GetLoginData(groupId);
                sgLoginDataSystemRun.AddRunSystemEnvData(sgData);
                HsNetWork hs = null;
                if (m_DicNetWork.TryGetValue(groupId, out hs) == true)
                {
                    sgDicRecvData.SetLoginData(hs, groupId, sgLoginDataSystemRun);

                    /*
                     * sgLoginDataSystemRun = (SGLoginData)sgDicRecvData.GetLoginData(groupId);
                     * string strHszDefaultOption = sgLoginDataSystemRun.GetHszDefaultOption();
                     * int nHszOption = sgLoginDataSystemRun.GetHszDefaultDec();
                     * int nApproveTypeSFM = sgLoginDataSystemRun.GetApproveTypeSFM();
                     * string strInterLockEmail = sgLoginDataSystemRun.GetInterLockEmail();
                     */
                    hs = m_DicNetWork[groupId];
                    int hszOpt = sgLoginDataSystemRun.GetHszDefaultDec();
                    hs.SetHszDefault(hszOpt);
                }
                SendUrlList(groupId, sgLoginDataSystemRun.GetUserID());

                LoginEvent LoginResult_Event = null;
                LoginResult_Event = sgPageEvent.GetLoginEvent(groupId);
                if (LoginResult_Event != null)
                {
                    PageEventArgs e = new PageEventArgs();
                    e.result = 0;
                    e.strMsg = "";
                    LoginResult_Event(groupId, e);
                }
            }
        }
Ejemplo n.º 17
0
 /// <summary>
 /// Called when the user closes a page as a result of clicking the Back button.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 private void Page_CloseFromBack(object sender, PageEventArgs args)
 {
     if (_PageHistory.Count > 0)
     {
         args.Page = _PageHistory.Pop();
     }
 }
    public void PreviewVisaulTarget()
    {
        PageEventArgs page_args = new PageEventArgs();

        page_args.SwitchToPage = PageEventArgs.PageIndex.Preview;
        pageSwitch(this, page_args);
    }
Ejemplo n.º 19
0
        private void Button_end(object sender, PageEventArgs e)
        {
            var table          = radNewTable.Checked ? txtTable.Text.ToLower() : ((TabloidConfigView)cmbView.SelectedItem).NomTable;
            var schemaNewTable = radNewTable.Checked ? null : ((TabloidConfigView)cmbView.SelectedItem).Schema;
            var newDbKey       = radNewTable.Checked ? "id_" + txtTable.Text.ToLower() : ((TabloidConfigView)cmbView.SelectedItem).DbKey;

            var refField = radExistingField.Checked ? cmbExistingField.SelectedItem.ToString() : TxtRef.Text;
            var alias    = radUseAlias.Checked ? txtalias.Text : "";
            var useJoin  = radUseAlias.Checked ? null : existingJoin[0];

            JoinListUpdated = useJoin == null;

            e.Cancel = !WizardSQLHelper.SetDataBaseForList(
                this,
                false,
                _view.Schema,
                table,
                newDbKey,
                txtViewName.Text,
                chkAddToparamMenu.Checked,
                _view,
                refField,
                _connectionString,
                _provider,
                true,
                false,
                alias,
                radUseTable.Checked,
                schemaNewTable,
                useJoin,
                radExistingField.Checked);
        }
Ejemplo n.º 20
0
 /// <summary>
 /// Called when a page is clicked on the allocation map
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="InternalsViewer.Internals.Pages.PageEventArgs"/> instance containing the event data.</param>
 internal virtual void OnPageClicked(object sender, PageEventArgs e)
 {
     if (PageClicked != null)
     {
         PageClicked(sender, e);
     }
 }
Ejemplo n.º 21
0
        private void MarkersDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                if ((MarkerType)markersDataGridView.Rows[e.RowIndex].Cells["DataTypeColumn"].Value ==
                    MarkerType.PageAddress)
                {
                    var temp = PageNavigated;

                    if (temp != null)
                    {
                        var pageEvent =
                            new PageEventArgs(
                                RowIdentifier.Parse(
                                    markersDataGridView.Rows[e.RowIndex].Cells["valueDataGridViewTextBoxColumn"].Value.
                                    ToString()), false);

                        temp(this, pageEvent);
                    }
                }
                else
                {
                    if (SelectionClicked != null)
                    {
                        SelectionClicked(sender, e);
                    }
                }
            }
        }
Ejemplo n.º 22
0
    void ShowSettingPage()
    {
        PageEventArgs page_args = new PageEventArgs();

        page_args.SwitchToPage = PageEventArgs.PageIndex.Setting;
        pageSwitch(this, page_args);
    }
Ejemplo n.º 23
0
 private void Button_end(object sender, PageEventArgs e)
 {
     function = new TabloidConfigFunction
     {
         Titre = txtFunction.Text,
         Nom   = cmbFunction.Text
     };
 }
Ejemplo n.º 24
0
 private void CheckConstraints(object sender, PageEventArgs pageEventArgs)
 {
     var reasons = Validator.Validate(pageEventArgs.Page).ToList();
     if (reasons.Any())
     {
         CancelAction(pageEventArgs, reasons);
     }
 }
Ejemplo n.º 25
0
 private void Visbile_CloseFromBack(object sender, PageEventArgs e)
 {
     if (!_useDatabaseField)
     {
         e.Cancel = true;
         wizard1.BackTo(Editeur);
     }
 }
Ejemplo n.º 26
0
    void StartExperiment()
    {
        PageEventArgs page_args = new PageEventArgs();

        page_args.SwitchToPage = PageEventArgs.PageIndex.Experiment;
        pageSwitch(this, page_args);
        EndPage();
    }
        void DataFactoryCreatingPage(object sender, PageEventArgs e)
        {
            var parentLink = e.Page.ParentLink;
            var page = e.Page;
            parentLink = GetNewParent(parentLink, page);

            e.Page.ParentLink = parentLink;
        }
Ejemplo n.º 28
0
        public static void CreatingPage(object sender, PageEventArgs e)
        {
            var pageData = e.Page as ICreatingPage;
            if (pageData == null)
                return;

            pageData.CreatingPage(sender, e);
        }
Ejemplo n.º 29
0
 private void Fin_CloseFromBack(object sender, PageEventArgs e)
 {
     if (radAuto.Checked)
     {
         wizard1.NextTo(wjStart);
         e.Cancel = true;
     }
 }
Ejemplo n.º 30
0
 /// <summary>
 /// Event raised when the parser has entered a new page record
 /// </summary>
 private void PageStart(object sender, PageEventArgs e)
 {
     if (done)
     {
         throw new AbortException();
     }
     pageInfo = e.Page;
 }
Ejemplo n.º 31
0
        private void wizardControl1_PageShown(object sender, PageEventArgs e)
        {
            if (e.Page == WizardPage2)
            {
                List <Cleaner> cleaners = new List <Cleaner>();
                if (SearchSapFiles.Checked)
                {
                    cleaners.Add(new Sap2000Cleaner());
                }
                if (SearchEtabsFiles.Checked)
                {
                    cleaners.Add(new EtabsCleaner());
                }
                if (SearchSafeFiles.Checked)
                {
                    cleaners.Add(new SafeCleaner());
                }
                if (SearchLarsaFiles.Checked)
                {
                    cleaners.Add(new Larsa4DCleaner());
                }
                FileSearcher searcher = new FileSearcher(new System.IO.DirectoryInfo(SearchFolder.Path), cleaners);
                searcher.ProgressChanged += Searcher_ProgressChanged;
                searcher.SearchCompleted += Searcher_SearchCompleted;

                SearchProgress.Minimum = 0;
                SearchProgress.Maximum = 100;
                SearchProgress.Value   = 0;
                SearchResultList.Items.Clear();
                SearchFileLabel.Text = "";

                totalFiles = 0;
                totalSize  = 0;

                wizardControl1.NextButtonEnabled  = false;
                wizardControl1.BackButtonEnabled  = false;
                wizardControl1.CloseButtonEnabled = false;

                searcher.StartSearch();
            }
            else if (e.Page == WizardPage4)
            {
                FileDeleter deleter = new FileDeleter(SearchResultList.CheckedItems.Select(item => (FileSearcher.SearchResult)item.Tag), UseRecycleBin.Checked);
                deleter.ProgressChanged += Deleter_ProgressChanged;
                deleter.DeleteCompleted += Deleter_DeleteCompleted;

                DeleteProgress.Minimum = 0;
                DeleteProgress.Maximum = 100;
                DeleteProgress.Value   = 0;
                DeleteFileLabel.Text   = "";

                wizardControl1.NextButtonEnabled  = false;
                wizardControl1.BackButtonEnabled  = false;
                wizardControl1.CloseButtonEnabled = false;

                deleter.StartDelete();
            }
        }
Ejemplo n.º 32
0
        static void DataFactory_LoadedPage(object sender, PageEventArgs e)
        {
            if (e.Page == null)
            {
                return;
            }

            e.Page = PageTypeResolver.Instance.ConvertToTyped(e.Page);
        }
    public void BackToMainMenu()
    {
        this.gameObject.SetActive(false);
        PageEventArgs page_args = new PageEventArgs();

        page_args.SwitchToPage = PageEventArgs.PageIndex.MainMenu;
        SaveSetting();
        pageSwitch(this, page_args);
    }
Ejemplo n.º 34
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="e"></param>
        private void OnTotalRowCountAvailable(PageEventArgs e)
        {
            EventHandler <PageEventArgs> handler = (EventHandler <PageEventArgs>)base.Events[GridView.EventTotalRowCountAvailable];

            if (handler != null)
            {
                handler(this, e);
            }
        }
Ejemplo n.º 35
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="e"></param>
        protected virtual void OnTotalRowCountAvailable(PageEventArgs e)
        {
            EventHandler <PageEventArgs> handler = (EventHandler <PageEventArgs>)base.Events[ShopDataPagerGridView.EventTotalRowCountAvailable];

            if (handler != null)
            {
                handler(this, e);
            }
        }
Ejemplo n.º 36
0
        protected virtual void OnTotalRowCountAvailable(PageEventArgs e)
        {
            EventHandler <PageEventArgs> handler = this.TotalRowCountAvailable;

            if (handler != null)
            {
                handler(this, e);
            }
        }
        void DataFactoryMovedPage(object sender, PageEventArgs e)
        {
            var parentLink = e.TargetLink;
            var page = DataFactory.Instance.GetPage(e.PageLink);
            parentLink = GetNewParent(parentLink, page);

            if (PageReference.IsValue(parentLink) && !e.TargetLink.CompareToIgnoreWorkID(parentLink))
            {
                DataFactory.Instance.Move(page.PageLink, parentLink, AccessLevel.NoAccess, AccessLevel.NoAccess);
            }
        }
 private void SavingPage(object sender, PageEventArgs e)
 {
     try
     {
         e.Page.URLSegment = e.Page.URLSegment.ToLowerInvariant();
     }
     catch (Exception ex)
     {
         // If there's a problem don't prevent the page being saved
     }
 }
        /// <summary>
        /// Event handling method which intercepts pages being moved
        /// and if the original parent implements <see cref="IOrganizeChildren"/>
        /// then changes destination parent to fit rules for that parent's type.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="EPiServer.PageEventArgs"/> instance containing the event data.</param>
        private static void DataFactoryMovedPage(object sender, PageEventArgs e)
        {
            var page = DataFactory.Instance.GetPage(e.PageLink);
            var parentLink = GetNewParent(e.TargetLink, page);
            if (!PageReference.IsValue(parentLink))
            {
                return; //no new parent found
            }

            if (e.TargetLink.CompareToIgnoreWorkID(parentLink))
            {
                return; //parent is unchanged from original request
            }
            DataFactory.Instance.Move(page.PageLink, parentLink, AccessLevel.NoAccess, AccessLevel.NoAccess);
        }
Ejemplo n.º 40
0
        protected static void OnPublishingPage(object sender, PageEventArgs e)
        {
            // check if old URL remapping is enabled
            if(!Settings.IsOldNewUrlRemapperEnabled)
            {
                return;
            }

            var oldUrl = new UrlBuilder(e.Page.LinkURL);
            if(Global.UrlRewriteProvider.ConvertToExternal(oldUrl, e.Page.PageLink, Encoding.UTF8))
            {
                if(!oldUrl.Uri.ToString().EndsWith(e.Page.URLSegment + "/"))
                {
                    logger.Debug(string.Format("Old Url=[{0}] does not match with new one=[{1}]", oldUrl.Uri, e.Page.URLSegment));

                    // process page and iterate through all child pages
                    SaveOldUrlRecursive(e.PageLink);
                }
            }
        }
Ejemplo n.º 41
0
        /*
         * When a page gets created lets see if it is a blog post and if so lets create the date page information for it
         */
        void Instance_CreatingPage(object sender, PageEventArgs e)
        {
            if (this.IsImport() || e.Page == null)
            {
                return;
            }
            if (string.Equals(e.Page.PageTypeName, typeof(BlogItemPage).GetPageType().Name, StringComparison.OrdinalIgnoreCase))
            {
                DateTime startPublish = e.Page.StartPublish;
               
                var contentRepository = ServiceLocator.Current.GetInstance<IContentRepository>();

                PageData page = contentRepository.Get<PageData>(e.Page.ParentLink);

                if (page is BlogStartPage)
                {
                    e.Page.ParentLink = GetDatePageRef(page, startPublish, contentRepository);
                }
            }
        }
 void OnPageRemoved(object sender, PageEventArgs e)
 {
     NoBorderTabPage page = e.Page;
     tabs.TabPages.Remove(page.Page);
     if (this.Controls.Contains(page)) {
         this.Controls.Remove(page);
     }
 }
 void OnPageAdded(object sender, PageEventArgs e)
 {
     NoBorderTabPage page = e.Page;
     if (e.Index >= tabs.TabPages.Count) {
         tabs.TabPages.Add(page.Page);
     } else {
         tabs.TabPages.Insert(e.Index, page.Page);
     }
     if (!this.Controls.Contains(page)) {
         this.Controls.Add(page);
         this.Controls.SetChildIndex(page, this.TabPages.IndexOf(page));
     }
 }
Ejemplo n.º 44
0
		private void Scribble_RecognitionChanged(object sender, PageEventArgs e)
		{
			if(e.Page == fScribble.Document.Pages[0])
			{
				BeginInvoke(TitlePageChanged, new object[] { sender, new EventArgs() });	
			}
		}
Ejemplo n.º 45
0
        public static void LoadingDefaultPageData(object sender, PageEventArgs e)
        {
            var pageData = e.Page as ILoadingDefaultPageData;
            if (pageData == null)
                return;

            pageData.LoadingDefaultPageData(sender, e);
        }
Ejemplo n.º 46
0
 void Instance_CreatedPage(object sender, PageEventArgs e)
 {
    
 }
Ejemplo n.º 47
0
 void Instance_PublishingPage(object sender, PageEventArgs e)
 {
     
 }
 private void OnPagePublished(object sender, PageEventArgs e) {
     NotifyDependencyChanged(this, EventArgs.Empty);
 }
Ejemplo n.º 49
0
 protected void grdProduct_PageIndexChanged(object sender, PageEventArgs e)
 {
     spanSelect.InnerText = LoadSanPham(int.Parse(Request.QueryString["pid"]), e.NewPageIndex).ToString();
 }
 /// <summary>
 /// Event handling method which intercepts pages being created
 /// and if the original parent implements <see cref="IOrganizeChildren"/>
 /// then changes the new page's parent to fit rules for that parent's type.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="EPiServer.PageEventArgs"/> instance containing the event data.</param>
 private static void DataFactoryCreatingPage(object sender, PageEventArgs e)
 {
     // change the parent this page is going to be added under to the new parent
     e.Page.ParentLink = GetNewParent(e.Page.ParentLink, e.Page);
 }
Ejemplo n.º 51
0
        public static void DeletingPageLanguage(object sender, PageEventArgs e)
        {
            var pageData = e.Page as IDeletingPageLanguage;
            if (pageData == null)
                return;

            pageData.DeletingPageLanguage(sender, e);
        }
Ejemplo n.º 52
0
 protected void grdStore_PageIndexChanged(object sender, PageEventArgs e)
 {
     int sid = int.Parse(Request.QueryString["sid"]);
     spanSelect.InnerText = LoadCuaHang(sid).ToString();
 }
Ejemplo n.º 53
0
        public static void FinishedLoadingPage(object sender, PageEventArgs e)
        {
            var pageData = e.Page as IFinishedLoadingPage;
            if (pageData == null)
                return;

            pageData.FinishedLoadingPage(sender, e);
        }
Ejemplo n.º 54
0
 protected void grdAdv_PageIndexChanged(object sender, PageEventArgs e)
 {
     int aid = int.Parse(Request.QueryString["aid"]);
     if (Request.QueryString["rid"] != null)
     {
         int rid = int.Parse(Request.QueryString["rid"]);
         spanSelect.InnerText = LoadQuangCaoByKhuVuc(aid, rid).ToString();
     }
     else
     {
         if (aid == 11 || aid == 12 || aid == 13)
         {
             int cid = int.Parse(Request.QueryString["cid"]);
             spanSelect.InnerText = LoadQuangCao(aid, cid).ToString();
         }
         else
         {
             spanSelect.InnerText = LoadQuangCao(aid).ToString();
         }
     }
 }
Ejemplo n.º 55
0
        public static void SavedPage(object sender, PageEventArgs e)
        {
            var pageData = e.Page as ISavedPage;
            if (pageData == null)
                return;

            pageData.SavedPage(sender, e);
        }
Ejemplo n.º 56
0
 private void printControl1_SelectedPageChanged(object sender, PageEventArgs e)
 {
     this.pageButtonEdit.EditValue = this.printControl1.PrintingSystem.Pages.IndexOf(e.Page) + 1;
 }
 void OnPageSaved(object sender, PageEventArgs e) {
     IndexPage(e.Page);
 }
Ejemplo n.º 58
0
 private void CancelAction(PageEventArgs pageEventArgs, IList<string> reason)
 {
     logger.InfoFormat("a page of type => {0}, with name => \"{1}\" violated one or more constraints", pageEventArgs.Page.GetType(), pageEventArgs.Page.PageName);
     pageEventArgs.CancelReason = FormatReasons(reason);
     pageEventArgs.CancelAction = true;
 }
Ejemplo n.º 59
0
 // ------------------------------------------------------------------
 /// <summary>
 /// Raises the <see cref="OnCurrentPageChanged"/> event.
 /// </summary>
 /// <param name="e">PageEventArgs</param>
 // ------------------------------------------------------------------
 protected virtual void RaiseOnCurrentPageChanged(PageEventArgs e) {
   if (this.OnCurrentPageChanged != null) {
     OnCurrentPageChanged(this, e);
   }
 }
Ejemplo n.º 60
0
 private void OnPublishedPage(object sender, PageEventArgs e)
 {
     var page = e.Page;
     var tags = GetPageTags(page);
     _tagService.Save(page.PageGuid, tags);
 }