예제 #1
0
    protected void OnNotebook1SwitchPage(object o, SwitchPageArgs args)
    {
        var notebook = (Notebook)o;
        int pageNum = (int)args.PageNum;

        Widget pageWidget = notebook.GetNthPage(pageNum);
        string tabLabelText = notebook.GetTabLabelText(pageWidget);
        this.labelHeader.Markup = string.Format("<span weight=\"bold\" size=\"xx-large\">Wizard Sample: {0}</span>", tabLabelText);

        this.buttonSkip.Sensitive = true;
        this.buttonBack.Sensitive = true;
        this.buttonNext.Sensitive = true;

        if (pageNum == 0)
        {
            this.buttonBack.Sensitive = false;
        }
        else if (pageNum == notebook.NPages - 1)
        {
            this.buttonNext.Sensitive = false;
            this.buttonSkip.Sensitive = false;
        }

        // Specific page load handling
        switch (pageNum)
        {
            case (int)Pages.Page2:
                this.buttonSkip.Sensitive = false;
                break;
        }
    }
예제 #2
0
        void SidebarNotebookSwitchPage(object o, SwitchPageArgs args)
        {
            //Log.Debug("FaceSidebar Notice that page switched");
            Sidebar sidebar= MainWindow.Toplevel.Sidebar;
            if ( sidebar.Notebook.CurrentPageWidget ==  this.SidebarWidget )
            {
                (SidebarWidget as FaceSidebarWidget).selected = true;

                //FIXME First time that you open this It'll not force user to use 1:1 ratio

                if(firsttime){
                    firsttime = false;
                }
                else {
                    Log.Debug("FaceSidebar Selected : Set Ratio 1:1");
                    MainWindow.Toplevel.PhotoView.View.SelectionXyRatio = 1.0;
                }

            }else if( (SidebarWidget as FaceSidebarWidget).selected){
                (SidebarWidget as FaceSidebarWidget).selected = false;

                if(firsttime ) firsttime = false;
                else {
                    Log.Debug("FaceSidebar UnSelected");
                    try {
                        MainWindow.Toplevel.PhotoView.View.SelectionXyRatio = 0.0;
                    } catch(NullReferenceException ne){
                        Log.Exception(ne);
                    }
                }
            }
        }
예제 #3
0
파일: TabbedSkin.cs 프로젝트: bbriggs/wesay
		private void  OnNotebookSwitchPage(object o, SwitchPageArgs args)
		{
			ITask t = (ITask)_tabsToTools[(int)args.PageNum];
		   if (_currentTool == t)
			   return; //debounce

		   if(_currentTool!=null)
			 _currentTool.Deactivate();
			if(t!=null)
				t.Activate();
			_currentTool = t;
		}
예제 #4
0
	//Called when the user changes the active Tab
	void ChangeTab(object o, SwitchPageArgs args) 
	{
		
		//Deactivate the old history
		CurrentTab.history.Active = false;
		
		//Get the new Tab		
		CurrentTab = (Tab) tabs_nb.GetNthPage ((int) args.PageNum);
		title_label.Text = CurrentTab.Title;
		
		//Activate the new history
		CurrentTab.history.Active = true;
		
		if (CurrentTab.Tab_mode == Mode.Viewer) {
			CurrentTab.history.ActivateCurrent();
			paste1.Sensitive = false;
			print.Sensitive = true;
		} else {
			paste1.Sensitive = true;
			print.Sensitive = false;
		}
		
		if (tree_browser.SelectedNode != CurrentTab.CurrentNode)
			tree_browser.ShowNode (CurrentTab.CurrentNode);
	}
		/// <summary>
		/// Maneja el cambio de pestañas.
		/// </summary>
		/// <param name="e">
		/// A <see cref="System.Object"/>
		/// </param>
		/// <param name="arg">
		/// A <see cref="SelectPageArgs"/>
		/// </param>
		private void OnProcessesNotebookSwitchPage(object e,
		                                           SwitchPageArgs arg)
		{
			// Si vamos a la página delas previsualizaciones,
			// recargamos la imagen por si hemos cambiado los algoritmos
			// en la otra pagina.
			
			if(arg.PageNum == 1)
			{
				if(imagesTV.Selection.CountSelectedRows()==0)		
				{	
					// Si no hay seleccion seleccionamos el primero
					TreeIter firstIter; 
					imagesTV.Model.GetIterFirst(out firstIter);
					imagesTV.Selection.SelectIter(firstIter);
				}
				else
				{
					// Actualizamos la previsualización de la seleccion 
					// actual.
					TreeIter selected;
					imagesTV.Selection.GetSelected(out selected);
					UpdatePreview(selected);
					
				}
			}
		}
예제 #6
0
 void OnPageChange(object sender, SwitchPageArgs e)
 {
     // it's kinda iffy using constants like this. DO NOT LIKE :(
     if(e.PageNum == 0)
     {
         currentMode = Mode.Jar;
         buttonUp.Sensitive = true;
         buttonDown.Sensitive = true;
     }
     else if(e.PageNum == 1)
     {
         currentMode = Mode.Modloader;
         buttonUp.Sensitive = false;
         buttonDown.Sensitive = false;
     }
     System.Console.WriteLine("Notebook page: " + e.PageNum);
 }
예제 #7
0
        protected void OnNotebook1SwitchPage(object o, SwitchPageArgs args)
        {
            if (notebook1.CurrentPage == 2)
                if (OrderCupboard.Clean())
                    UpdateCubeComponents();
            if (notebook1.CurrentPage == 4)
                PrerareReport(true);
            if (notebook1.CurrentPage == 5)
                PrerareReport (false);

            goBackAction.Sensitive = notebook1.CurrentPage != 0;
            goForwardAction.Sensitive = notebook1.CurrentPage != 4;
        }
 public void ActiveMdiChanged(object sender, SwitchPageArgs e)
 {
     try {
         if (ActiveWorkbenchwindow != null) {
             if (ActiveWorkbenchwindow.ViewContent.IsUntitled) {
                 ((Gtk.Window)WorkbenchSingleton.Workbench).Title = "MonoDevelop";
             } else {
                 string post = String.Empty;
                 if (ActiveWorkbenchwindow.ViewContent.IsDirty) {
                     post = "*";
                 }
                 if (ActiveWorkbenchwindow.ViewContent.HasProject)
                 {
                     ((Gtk.Window)WorkbenchSingleton.Workbench).Title = ActiveWorkbenchwindow.ViewContent.Project.Name + " - " + ActiveWorkbenchwindow.ViewContent.PathRelativeToProject + post + " - MonoDevelop";
                 }
                 else
                 {
                     ((Gtk.Window)WorkbenchSingleton.Workbench).Title = ActiveWorkbenchwindow.ViewContent.ContentName + post + " - MonoDevelop";
                 }
             }
         } else {
             ((Gtk.Window)WorkbenchSingleton.Workbench).Title = "MonoDevelop";
         }
     } catch {
         ((Gtk.Window)WorkbenchSingleton.Workbench).Title = "MonoDevelop";
     }
     if (ActiveWorkbenchWindowChanged != null) {
         ActiveWorkbenchWindowChanged(this, e);
     }
 }
예제 #9
0
    private void OnSwitchPage(object sender, SwitchPageArgs s)
    {
        OnFilterbarCloseClicked(sender, s);
        int pageNum = ((Gtk.Notebook)sender).Page;
        CurrentIconView = IconViews[pageNum];
        FilterEntry.Text = "";
        switch(pageNum){
            case 0: man.ArtType=CConfiguration.ArtType.atBackground_gnome; break;
            case 1: man.ArtType=CConfiguration.ArtType.atBackground_other; break;
            case 2: man.ArtType=CConfiguration.ArtType.atBackground_nature; break;
            case 3: man.ArtType=CConfiguration.ArtType.atBackground_abstract; break;
            case 4: man.ArtType=CConfiguration.ArtType.atApplication; break;
            case 5: man.ArtType=CConfiguration.ArtType.atWindowDecoration; break;
            case 6: man.ArtType=CConfiguration.ArtType.atIcon; break;
            case 7: man.ArtType=CConfiguration.ArtType.atGdmGreeter; break;
            case 8: man.ArtType=CConfiguration.ArtType.atSplash; break;
            case 9: man.ArtType=CConfiguration.ArtType.atGtkEngine;	break;
        }

        Gtk.TreeIter iter;
        CurrentIconView.Model.GetIterFirst(out iter);
        //Falls noch kein gefüllter Store (und damit noch kein gültiger Iterator -> Stamp==0
        if (iter.Stamp==0){
            man.GetAllThumbs();
            FillStore(pageNum);
            Gtk.TreeModelFilter filter = new Gtk.TreeModelFilter (CurrentIconView.Model, null);
            filter.VisibleFunc = new Gtk.TreeModelFilterVisibleFunc (onFilter);
            CurrentIconView.Model = filter;
            CurrentIconView.GrabFocus ();
        }
        if (CurrentIconView.SelectedItems.Length > 0)
            man.ThemeIndex=int.Parse(CurrentIconView.SelectedItems[0].ToString());
        FillExtendedSection(man.Theme);
    }
예제 #10
0
        //switch pages
        private void change_content(object o, SwitchPageArgs args)
        {
            //look for the content currently showing
            active_content = null;
            Widget active_widget = tabs.GetNthPage ((int) args.PageNum);

            foreach (Content content in content_list)
                if (content.DisplayWidget == active_widget)
                    active_content = content;

            if (active_content == null)
                return;

            content_resize ();
        }
예제 #11
0
 void HandleSwitchPage(object o, SwitchPageArgs args)
 {
     notebook.SetTabDetachable (notebook.GetNthPage ((int)args.PageNum), true);
 }
예제 #12
0
파일: ConnectDialog.cs 프로젝트: MrJoe/lat
 //        private string GetSelectedProfileName ()
 //        {
 //            TreeIter iter;
 //            TreeModel model;
 //
 //            if (profileListview.Selection.GetSelected (out model, out iter))  {
 //
 //                string name = (string) model.GetValue (iter, 0);
 //                return name;
 //            }
 //
 //            return null;
 //        }
 //
 //        private ConnectionProfile GetSelectedProfile ()
 //        {
 //            ConnectionProfile cp = new ConnectionProfile();
 //            string profileName = GetSelectedProfileName ();
 //
 //            if (profileName != null)
 //                cp = Global.Profiles [profileName];
 //    
 //            return cp;
 //        }
 public void OnPageSwitch(object o, SwitchPageArgs args)
 {
     //			if (args.PageNum == 0)
     //				connectionDialog.Resizable = false;
     //			else if (args.PageNum == 1)
     //				connectionDialog.Resizable = true;
 }
예제 #13
0
        private void notebook_SwitchPage(object o, SwitchPageArgs args)
        {
            notebook.CurrentPageWidget.GrabFocus();

            for (int x = 1; x < notebook.NPages; x++) {
                ChatSubpageBase page = (ChatSubpageBase)notebook.GetNthPage(x);
                page.IsActive = (page == notebook.CurrentPageWidget);
            }
        }
예제 #14
0
    private void OnSwitchPage(object o, Gtk.SwitchPageArgs args)
    {
        Sector NewSector = level.Sectors[(int)args.PageNum];

        application.CurrentSector = NewSector;
    }
예제 #15
0
파일: MainWindow.cs 프로젝트: nhannd/Xian
		private void OnNotebookSwitchPage(object sender, SwitchPageArgs args)
		{
			IWorkspace workspace = GetWorkspaceForWidget(_notebook.GetNthPage((int)args.PageNum));
			if(workspace != null)
			{
				workspace.IsActivated = true;
			}
		}
 protected void OnCurrentPageChanged(object s, Gtk.SwitchPageArgs args)
 {
     UpdateButtons();
 }
예제 #17
0
 private void optionTabs_SwitchPage(object o, SwitchPageArgs args)
 {
     // redraw results preview when tab selected
      if (args.PageNum == 2)
     UpdateResultsDisplay();
 }
예제 #18
0
 private void OnSwitchPageEvent(object o, SwitchPageArgs args)
 {
     if (args.PageNum != 0)
     generalPage.LeavingGeneralPage();
 }
예제 #19
0
		protected void OnNotebookSwitchPage (object o, SwitchPageArgs args)
		{
			if (args.PageNum == 2 && firstLoad) {
				UpdateRepositories ();
				firstLoad = false;
			}
		}
예제 #20
0
 protected void SwitchPageHandler(object o, SwitchPageArgs e)
 {
     // FIXME: port this if we do a DockTabLabel
 }
예제 #21
0
	void OnSwitchPage (object sender, SwitchPageArgs args)
	{
		OnPageChange (sender, args.PageNum);
	}
예제 #22
0
		protected void subViewNotebookIndexChanged(object sender, SwitchPageArgs e)
		{
			if (oldIndex > 0) {
				IAttachableViewContent secondaryViewContent = subViewContents[oldIndex - 1] as IAttachableViewContent;
				if (secondaryViewContent != null) {
					secondaryViewContent.Deselected();
				}
			}
			
			if (subViewNotebook.CurrentPage > 0) {
				IAttachableViewContent secondaryViewContent = subViewContents[subViewNotebook.CurrentPage - 1] as IAttachableViewContent;
				if (secondaryViewContent != null) {
					secondaryViewContent.Selected();
				}
			}
			oldIndex = subViewNotebook.CurrentPage;
			DetachFromPathedDocument ();
			if (oldIndex >= 0) {
				
				MonoDevelop.Ide.Gui.Content.IPathedDocument pathedDocument = null;
				if (oldIndex == 0) {
					pathedDocument = Document != null ? Document.GetContent<MonoDevelop.Ide.Gui.Content.IPathedDocument> () : ViewContent.GetContent<MonoDevelop.Ide.Gui.Content.IPathedDocument> ();
				} else {
					pathedDocument = subViewContents[oldIndex - 1].GetContent<MonoDevelop.Ide.Gui.Content.IPathedDocument> ();
				}
				
				if (pathedDocument != null)
					AttachToPathedDocument (pathedDocument);
			}
			OnActiveViewContentChanged (new ActiveViewContentEventArgs (this.ActiveViewContent));
		}
예제 #23
0
 protected void OnNotebookMainSwitchPage(object o, SwitchPageArgs args)
 {
     switch (notebookMain.CurrentPage)
     {
         case 0:
             orderscalendar1.RefreshOrders();
             break;
         case 1:
             orderscalendar2.RefreshOrders();
             break;
     }
 }
예제 #24
0
 //changed by user clicking on notebook tabs
 private void on_notebook_change_by_user(object o, SwitchPageArgs args)
 {
     //show chronojump logo on down-left area
     //changeTestImage("", "", "LOGO");
 }
예제 #25
0
 public void onSwitchPage(object o, SwitchPageArgs args)
 {
     this.chatconsole1.onSwitchPage(o, args);
 }
예제 #26
0
	private void OnChangeTab (object sender, SwitchPageArgs args)
	{
		current_tab = (DocumentTab) nb_tabs.GetNthPage((int) args.PageNum);
		current_manager = current_tab.Buffer.Undoer;
		
		Undo.Sensitive = current_manager.CanUndo;
		Redo.Sensitive = current_manager.CanRedo;
	}
예제 #27
0
 private void HandleNbDataSwitchPage(object o, SwitchPageArgs args)
 {
     ListPage current = GetCurrentPage();
     if(current != null)
     {
         this.edtFilter.Text = current.TableView.Filter;
         this.viewColumns.NodeStore = current.TableView.Binding.Mapping.ColumnsStore;
     }
     else
     {
         this.edtFilter.Text = "";
         this.viewColumns.NodeStore = null;
     }
 }
예제 #28
0
        /// When User Switch Notebook Viewer Page, 
        /// This Method Catch event and if page is Folder Viewer object
        /// Do Folder Refresh & set menu/toolbar actions.
        /// Else if isn't Folder Viewer object
        /// setup toolbar & menu action (On/Off GoUp, GoHome, ecc)
        private void OnSwitchPage(object o, SwitchPageArgs args)
        {
            Gtk.Application.Invoke(delegate {
                Gtk.Widget page = notebookViewer.GetNthPage((int) args.PageNum);
                Type objType = page.GetType();
                if (objType != typeof(FolderViewer)) {
                    // NetworkViewer or Custom
                    SetSensitiveGoUpMenu(false);
                    SetSensitiveGoHomeMenu(false);
                } else {
                    // Folder Viewer
                    FolderViewer folderViewer = page as FolderViewer;
                    folderViewer.Refresh();

                    bool canGoUp = folderViewer.CanGoUp();
                    SetSensitiveGoUpMenu(canGoUp);
                    SetSensitiveGoHomeMenu(true);
                }

                // Set Sensitive Refresh Menu
                SetSensitiveRefreshMenu(objType.IsSubclassOf(typeof(RefreshableViewer)));
            });
        }
예제 #29
0
 protected void OnNotebook2SwitchPage(object o, SwitchPageArgs args)
 {
     if (Project == null)
         return;
     GLib.Idle.Add(new GLib.IdleHandler(delegate() {
                 Notebook nb = notebook2;
                 if (nb.Page == 0)
                     SetWorld(worldSpinButton.ValueAsInt);
                 else if (nb.Page == 1)
                     SetDungeon(dungeonSpinButton.ValueAsInt);
                 return false;
     }));
 }
예제 #30
0
 private void OnDriagramNotebookSwitchPage(object o, SwitchPageArgs args)
 {
     Uml2.UMLCanvas canvas = (Uml2.UMLCanvas) CurrentPageWidget;
     SetCurrentCanvas (canvas.Diagram.DIDiagram, canvas);
     _current = (Uml2.UMLCanvas) CurrentPageWidget;
     canvas.QueueAction = null;
 }
예제 #31
0
	void HandleViewNotebookSwitchPage (object sender, SwitchPageArgs args)
	{
		switch (view_notebook.CurrentPage) {
		case 0:
			SetViewMode (ModeType.IconView);
			break;
		case 1:
			SetViewMode (ModeType.PhotoView);
			break;
		}
	}
예제 #32
0
 void OnSwitchPage(object o, SwitchPageArgs args)
 {
     //Console.WriteLine(1);
     Widget wdt = control.CurrentPageWidget;
     if (wdt != null)
         (wdt as IDataBaseView).RefreshData();
 }
예제 #33
0
 protected void OnMainBookSwitchPage(object o, Gtk.SwitchPageArgs args)
 {
     filterEntry.Sensitive = args.PageNum != 3;
 }