Example #1
0
        private void Intercept(ref Message m)
        {
            long delta = (long)m.WParam >> 16 & 0xFF;

            if (ctrlFlag)
            {
                if ((delta >> 7) == 1)
                {
                    TabManager.SetZoomFromMouse((Form1)FindForm(), -1);
                }
                else
                {
                    TabManager.SetZoomFromMouse((Form1)FindForm(), 1);
                }
            }
            else
            {
                base.WndProc(ref m);
            }
            //else
            //{
            //    if ((delta >> 7) == 1)
            //    {
            //        SendMessage(m.HWnd, WM_VSCROLL, (IntPtr)SB_LINEDOWN, (IntPtr)0);
            //    }
            //    else
            //    {
            //        SendMessage(m.HWnd, WM_VSCROLL, (IntPtr)SB_LINEUP, (IntPtr)0);
            //    }
            //}
        }
Example #2
0
        private async Task SendFilesToModule(IList <string> files, IModule module)
        {
            if (module == null)
            {
                return;
            }

            var msgcontent = SelectFilesSupportedByModule(files, module);

            int tabIndex = TabManager.GetTabIndexByTitle(module.ModuleName);

            if (tabIndex == -1)
            {
                var id = await TabManager.StartModule(module, true);

                await Task.Delay(25);

                Messager.SendMessage(id, new HandleFileMessage(AppConstants.ApplicationGuid, msgcontent));
            }
            else
            {
                TabManager.FocusTabByIndex(tabIndex);
                Messager.SendMessage(module.RunModule().GetType(), new HandleFileMessage(AppConstants.ApplicationGuid, msgcontent));
            }
        }
Example #3
0
 // Use this for initialization
 void Start()
 {
     BG = GameObject.Find("GaudyBG");
     ds = BG.GetComponent <DataScript> ();
     tm = BG.GetComponent <TabManager> ();
     LoadXML();
 }
        public void Init(MainWindow win, TabManager manager)
        {
            mainWindow = win;
            tabManager = manager;

            GenerateList();
        }
Example #5
0
        public void CloseTab(ColumnViewModel column, TabViewModel tab)
        {
            var ci = _columns.IndexOf(column);
            var ti = column.Tabs.IndexOf(tab);

            TabManager.CloseTab(ci, ti);
        }
		protected override void OnCreate (Bundle savedInstanceState)
		{
			base.OnCreate (savedInstanceState);
			
			SetContentView(Resource.Layout.fragment_tabs);
	        tabHost = FindViewById<TabHost>(Android.Resource.Id.TabHost);
	        tabHost.Setup();
			
	        tabManager = new TabManager(this, tabHost, Resource.Id.realtabcontent);
	
	        tabManager.AddTab(tabHost.NewTabSpec("simple").SetIndicator("Simple"), Java.Lang.Class.FromType(typeof(FragmentStackSupport.CountingFragment)), null);
			tabManager.AddTab(tabHost.NewTabSpec("contacts").SetIndicator("Custom"), Java.Lang.Class.FromType(typeof(LoaderCursorSupport.CursorLoaderListFragment)), null);
			/*tabManager.AddTab(tabHost.NewTabSpec("contacts").SetIndicator("Contacts"),
	                LoaderCursorSupport.CursorLoaderListFragment.class, null);
	        tabManager.AddTab(tabHost.NewTabSpec("custom").SetIndicator("Custom"),
	                LoaderCustomSupport.AppListFragment.class, null);
	        tabManager.AddTab(mttabHost.NewTabSpec("throttle").SetIndicator("Throttle"),
	                LoaderThrottleSupport.ThrottledLoaderListFragment.class, null);
			*/
				
				
	        if (savedInstanceState != null) {
	            tabHost.SetCurrentTabByTag(savedInstanceState.GetString("tab"));
	        }
		}
 public void Start()
 {
     tabManager          = GetComponentInParent <LevelManager>().tabManager;
     stats               = GetComponent <Stats>();
     enemyVisible        = GetComponent <Image>();
     stats.currentHealth = stats.maxHealth;
 }
Example #8
0
        private void updateButton_Click(object sender, EventArgs e)
        {
            Form1 form = (Form1)Owner;

            String errorMessage;

            statusLabel.Text = LanguageUtil.GetCurrentLanguageString("statusLabelUpdater", Name); //"Checking for new updater..."
            Refresh();

            if (!VersionCheckManager.UpdaterCheck(out errorMessage))
            {
                warningPictureBox.Visible = true;
                statusLabel.Text          = errorMessage;
                return;
            }

            statusLabel.Text = LanguageUtil.GetCurrentLanguageString("statusLabelClosing", Name); //"Closing open tabs..."
            Refresh();

            TabManager.CloseAllPages(form);
            ProcessStartInfo processInfo = new ProcessStartInfo("DtPadUpdater.exe", "-nocheck");

            OtherManager.StartProcessInfo(this, processInfo);
            Application.Exit();
        }
Example #9
0
        private void okButton_Click(object sender, EventArgs e)
        {
            Form1 form = (Form1)Owner;

            TabManager.GoToLine(form, Convert.ToInt32(lineNumericUpDown.Value));
            WindowManager.CloseForm(this);
        }
Example #10
0
 public void Close()
 {
     if (!IsConfigurationActive)
     {
         return;
     }
     this.IsConfigurationActive = false;
     if (_currentConfigurationTarget != null)
     {
         if (String.IsNullOrEmpty(_currentConfigurationTarget.Name))
         {
             _currentConfigurationTarget.Name = "(untitled)";
         }
         if (_filterQuery != null && _filterQuery.ToQuery() != _initialQuery)
         {
             _currentConfigurationTarget.FilterQuery = _filterQuery;
         }
         if (_completeCallback != null)
         {
             _completeCallback.OnNext(Unit.Default);
             _completeCallback.OnCompleted();
             _completeCallback = null;
         }
     }
     TabManager.Save();
 }
Example #11
0
        public FormMain()
        {
            InitializeComponent();

            tabManager  = new TabManager(tabControlPages);
            treeManager = new TreeManager(treeViewDatabase);
        }
Example #12
0
        /// <summary>
        /// Creates the markup for the current TabCollection
        /// </summary>
        /// <returns></returns>
        protected void BuildNavigationTree(StringBuilder builder, TabCollection tc, int parentsCount, bool isDisplay)
        {
            if (tc?.Tabs == null)
            {
                return;
            }

            foreach (var parent in tc.Tabs)
            {
                if (!TabManager.IsValid(parent, PermissionList))
                {
                    continue;
                }

                var linkUrl = FormatLink(parent);
                if (!string.IsNullOrEmpty(linkUrl) && !StringUtils.EqualsIgnoreCase(linkUrl, PageUtils.UnclickedUrl))
                {
                    linkUrl = PageUtils.GetLoadingUrl(linkUrl);
                }
                var hasChildren = parent.Children != null && parent.Children.Length > 0;
                var openWindow  = !hasChildren && StringUtils.EndsWithIgnoreCase(parent.Href, "main.aspx");

                var item = NavigationTreeItem.CreateNavigationBarItem(isDisplay, parent.Selected, parentsCount, hasChildren, openWindow, parent.Text, linkUrl, parent.Target, parent.Enabled, parent.IconUrl);

                builder.Append(item.GetTrHtml());
                if (parent.Children != null && parent.Children.Length > 0)
                {
                    var tc2 = NodeNaviTabManager.GetTabCollection(parent, PublishmentSystemId);
                    BuildNavigationTree(builder, tc2, parentsCount + 1, parent.Selected);
                }
            }
        }
Example #13
0
 /// <summary>
 /// Opens a new main menu tab
 /// </summary>
 private void NewTabButton_Click(object sender, RoutedEventArgs e)
 {
     TabManager.ProcessViewModelRequest(
         new MvxViewModelRequest(
             typeof(MainMenuViewModel), new MvxBundle(), new MvxBundle(), MvxRequestedBy.UserAction),
         TabNavigationType.NewForegroundTab);
 }
Example #14
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.fragment_tabs);
            tabHost = FindViewById <TabHost>(Android.Resource.Id.TabHost);
            tabHost.Setup();

            tabManager = new TabManager(this, tabHost, Resource.Id.realtabcontent);

            tabManager.AddTab(tabHost.NewTabSpec("simple").SetIndicator("Simple"), Java.Lang.Class.FromType(typeof(FragmentStackSupport.CountingFragment)), null);
            tabManager.AddTab(tabHost.NewTabSpec("contacts").SetIndicator("Custom"), Java.Lang.Class.FromType(typeof(LoaderCursorSupport.CursorLoaderListFragment)), null);

            /*tabManager.AddTab(tabHost.NewTabSpec("contacts").SetIndicator("Contacts"),
             * LoaderCursorSupport.CursorLoaderListFragment.class, null);
             * tabManager.AddTab(tabHost.NewTabSpec("custom").SetIndicator("Custom"),
             * LoaderCustomSupport.AppListFragment.class, null);
             * tabManager.AddTab(mttabHost.NewTabSpec("throttle").SetIndicator("Throttle"),
             * LoaderThrottleSupport.ThrottledLoaderListFragment.class, null);
             */


            if (savedInstanceState != null)
            {
                tabHost.SetCurrentTabByTag(savedInstanceState.GetString("tab"));
            }
        }
Example #15
0
        private AppShell(Window window)
        {
            if (window.Content != null)
            {
                throw new ArgumentException("App shell can be registered only for Window with empty content", nameof(window));
            }

            this.InitializeComponent();

            window.Content = this;

            TabManager = new TabManager(this);

            DataContext = this;

            AppShells.Add(window, this);

            InitNavigation();

            //debug-only cheats
            InitCheats();
            InitNotifications();

            InitFeedback();
        }
Example #16
0
 /// <summary>
 /// Handles the system back navigation
 /// </summary>
 private void BackRequested(object sender, BackRequestedEventArgs e)
 {
     //let the tab manager handle global back navigation
     TabManager.HandleGlobalBackNavigation();
     //prevent navigation from the app
     e.Handled = true;
 }
 // Use this for initialization
 void Start()
 {
     parentBG       = GameObject.Find("GaudyBG");
     BG             = transform.gameObject;
     ds             = transform.GetComponent <DataScript> ();
     tm             = transform.GetComponent <TabManager> ();
     TitleValuePath = "TabEditorPanel/Content/Row0/TMPInputField/TitleValue";
 }
Example #18
0
 /// <summary>
 /// Handles the Esc key for back navigation
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 private void EscapingHandling(CoreWindow sender, KeyEventArgs args)
 {
     if (args.VirtualKey == Windows.System.VirtualKey.Escape)
     {
         //let the tab manager handle global back navigation
         TabManager.HandleGlobalBackNavigation();
     }
 }
Example #19
0
 public void PinToTab()
 {
     TabManager.CreateTab(TabModel.Create(
                              _parent.ScreenName,
                              "from local where (user == @" + _parent.ScreenName + " & !retweet) | retweeter == @" +
                              _parent.ScreenName));
     _parent.Close();
 }
Example #20
0
        internal static void OpenNewTab(Form1 form)
        {
            TrayManager.RestoreFormFromTray(form, form.PreviousWindowState);

            if (TabManager.IsCurrentTabInUse(form))
            {
                form.TabIdentity = TabManager.AddNewPage(form, form.TabIdentity);
            }
        }
Example #21
0
        private void fontButton_Click(object sender, EventArgs e)
        {
            TabManager.FontPagesWithoutSave(this);

            TypeConverter tc = TypeDescriptor.GetConverter(typeof(Font));

            fontLabel1.Text            = StringUtil.CheckStringLengthEnd(tc.ConvertToString(TextFont), maxCharsFont);
            fontColorTextBox.BackColor = TextFontColor;
        }
Example #22
0
 public void RestoreLastClosedTab()
 {
     this.Focus();
     if (TabManager.CanReviveTab)
     {
         TabManager.ReviveTab();
     }
     this._parent.Columns.ForEach(cvm => cvm.RestoreLastClosedTabCommand.RaiseCanExecuteChanged());
 }
Example #23
0
 private void Awake()
 {
     tabButton       = GetComponentInParent <PressableButtonHoloLens2>();
     tabInteractable = tabButton.GetComponent <Interactable>();
     tabInteractable.OnClick.AddListener(ShowTab);
     tabManager = tabButton.GetComponentInParent <TabManager>();
     tabManager.SetTab(this);
     HideTab();
 }
Example #24
0
 void Awake()
 {
     if (instance != null)
     {
         Debug.LogWarning("More than one instance of TabManager found!");
         return;
     }
     instance = this;
 }
Example #25
0
        public MainWindow()
        {
            this.InitializeComponent();
#if DEBUG
            this.AttachDevTools();
#endif
            using var initScope = new TimedScope(LoggingScope.Global($"{nameof(MainWindow)}.InitializeServices"));

            Session = new Session();

            var menuProvider = new MenuProvider();
            Services.AddService <IMenuProvider>(menuProvider);

            Session.EditorViewModel = new EditorViewModel(menuProvider);
            Session.Services        = Services;

            Services.AddService <Window>(this);
            Services.AddService <Session>(Session);
            Services.AddService <IRootViewModelContainer>(Session);
            Services.AddService <ViewRegistry>(new ViewRegistry());
            Services.AddService <IDialogService>(new DialogService(Services));

            var viewDataTemplate = new ViewDataTemplate(Services);
            Services.AddService <IViewUpdater>(viewDataTemplate);
            DataTemplates.Add(viewDataTemplate);

            Services.AddService <IUndoService>(new UndoService());
            Services.AddService <IMemberViewProvider <IViewBuilder> >(new MemberViewProvider(Services));

            var commandDispatcher = new CommandDispatcher(Services);
            Services.AddService <ICommandDispatcher>(commandDispatcher);
            // after all synchronous code caused by user input has been executed
            // we begin the commands processing.
            InputManager.Instance.PostProcess.Subscribe(async(e) => await commandDispatcher.ProcessDispatchedCommands());

            var tabManager = new TabManager(Services);
            Services.AddService <ITabManager>(tabManager);
            Services.AddService <TabManager>(tabManager);

            var assetManager = new AssetManager(Services);
            Services.AddService <IAssetManager>(assetManager);
            Services.AddService <IAssetEditorRegistry>(assetManager);

            var pluginRegistry = new PluginRegistry(Services);
            pluginRegistry.RefreshAvailablePlugins();

            Services.AddService <PluginRegistry>(pluginRegistry);

            foreach (var initialPlugin in pluginRegistry.AvailablePlugins)
            {
                pluginRegistry.Register(initialPlugin);
            }

            // It will be rendered by the DataTemplate
            DataContext = Session.EditorViewModel;
        }
Example #26
0
 /// <summary>
 /// Sets references to components that will display information about a partyMember
 /// </summary>
 public void SetExternalDisplayComponents()
 {
     eventDescription  = EventManager.instance.eventDescription;
     actionsPanel      = EventManager.instance.actionsPanel;
     partyPanel        = EventManager.instance.partyPanel;
     gearPanel         = EventManager.instance.gearPanel;
     candlesPanel      = EventManager.instance.candlesPanel;
     statusPanel       = EventManager.instance.statusPanel;
     skillsPanel       = EventManager.instance.skillsPanel;
     utilityTabManager = EventManager.instance.utilityTabManager;
 }
Example #27
0
 private void Awake()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         _instance = this;
     }
 }
Example #28
0
        protected override void Render(HtmlTextWriter writer)
        {
            var builder = new StringBuilder();
            var tabList = TabManager.GetTabList(TopId, SiteId);

            if (tabList != null && tabList.Count > 0)
            {
                builder.Append($@"<li class=""text-muted menu-title"">{Title}</li>");
                BuildNavigationTree(builder, tabList, 0, true);
            }
            writer.Write(builder);
        }
Example #29
0
        private void Navigate(string username, string url)
        {
            HttpCookie cookie = new HttpCookie(USER_NAME_COOKIE, username);

            this.Response.Cookies.Add(cookie);

            if (String.IsNullOrEmpty(url) == true)
            {
                url = TabManager.GetUrl(this.PortalSettings.HomeTabId);
            }
            this.Response.Redirect(url);
        }
        public void PinToTab()
        {
            var sn = _parent.ScreenName;

            if (sn.StartsWith("@"))
            {
                sn = sn.Substring(1);
            }
            TabManager.CreateTab(TabModel.Create(sn,
                                                 "from local where (user == @" + sn + " & !retweet) | retweeter == @" + sn));
            _parent.Close();
        }
    // Use this for initialization
    void Start()
    {
        BG       = transform.gameObject;
        parentBG = GameObject.Find("GaudyBG");
        ds       = transform.GetComponent <DataScript> ();
        tm       = transform.GetComponent <TabManager> ();
        //editSectionPanel = transform.Find ("SectionEditorBG").gameObject;
        TitleValuePath = "SectionEditorPanel/Content/Row0/TMPInputField/TitleValue/";

        gData        = transform.parent.GetComponent <GlobalDataScript> ();
        BGInfoOption = transform.Find("TabSelectorBG/TabSelectorPanel/Content/ScrollView/Viewport/Content/BackgroundInfoTabPanel");
    }
Example #32
0
		internal void tabManager_OnSelectionChanged(TabManager<TabStateDecompile> tabManager, TabStateDecompile oldState, TabStateDecompile newState)
		{
			var oldView = oldState == null ? null : oldState.TextView;
			var newView = newState == null ? null : newState.TextView;

			UninitializeActiveTab(oldState, false);
			InitializeActiveTab(newState, false);

			if (IsActiveTab(newState))
				SetTextEditorFocus(newView);

			if (OnDecompilerTextViewChanged != null)
				OnDecompilerTextViewChanged(this, new DecompilerTextViewChangedEventArgs(oldView, newView));
		}
Example #33
0
		static SavedTabGroupState CreateSavedTabGroupState(TabManager<TabStateDecompile> tabManager)
		{
			var savedState = new SavedTabGroupState();

			savedState.Index = tabManager.ActiveIndex;

			foreach (var tabState in tabManager.AllTabStates)
				savedState.Tabs.Add(CreateSavedTabState(tabState));

			return savedState;
		}
Example #34
0
		TabStateDecompile CreateNewTabState(TabManager<TabStateDecompile> tabManager, Language language = null)
		{
			var tabState = new TabStateDecompile(language ?? sessionSettings.FilterSettings.Language);
			return tabManager.AddNewTabState(tabState);
		}
Example #35
0
		void tabManager_OnAddRemoveTabState(TabManager<TabStateDecompile> tabManager, TabManagerAddType addType, TabStateDecompile tabState)
		{
			var view = tabState.TextView;
			if (addType == TabManagerAddType.Add) {
				tabState.PropertyChanged += tabState_PropertyChanged;
				RemoveCommands(view);
				view.TextEditor.TextArea.MouseRightButtonDown += delegate { view.GoToMousePosition(); };
				view.TextEditor.WordWrap = sessionSettings.WordWrap;
				view.TextEditor.Options.HighlightCurrentLine = sessionSettings.HighlightCurrentLine;
				view.TextEditor.Options.EnableRectangularSelection = false;

				if (OnDecompilerTextViewAdded != null)
					OnDecompilerTextViewAdded(this, new DecompilerTextViewEventArgs(view));
			}
			else if (addType == TabManagerAddType.Remove) {
				tabState.PropertyChanged -= tabState_PropertyChanged;
				if (OnDecompilerTextViewRemoved != null)
					OnDecompilerTextViewRemoved(this, new DecompilerTextViewEventArgs(view));
			}
			else if (addType == TabManagerAddType.Attach) {
				if (OnDecompilerTextViewAttached != null)
					OnDecompilerTextViewAttached(this, new DecompilerTextViewEventArgs(view));
			}
			else if (addType == TabManagerAddType.Detach) {
				if (OnDecompilerTextViewDetached != null)
					OnDecompilerTextViewDetached(this, new DecompilerTextViewEventArgs(view));
			}
			else
				throw new InvalidOperationException();
		}