Exemplo n.º 1
0
 private void TabComponent_PointerExited(object sender, PointerRoutedEventArgs e)
 {
     if (!string.IsNullOrEmpty(current_tab.TabOriginalPathContent) && current_tab.TabContentType == ContentType.File)
     {
         ShowName.Begin();
     }
 }
Exemplo n.º 2
0
 private void TabComponent_PointerExited(object sender, PointerRoutedEventArgs e)
 {
     if (!string.IsNullOrEmpty(current_tab.PathContent))
     {
         ShowName.Begin();
     }
 }
Exemplo n.º 3
0
        /*
         * =============
         * = FUNCTIONS =
         * =============
         */



        private void SetMessenger()
        {
            Messenger.Default.Register <EditorViewNotification>(this, async(notification_ui) =>
            {
                await DispatcherHelper.ExecuteOnUIThreadAsync(() =>
                {
                    try
                    {
                        SetTheme();
                    }
                    catch { }
                });
            });

            Messenger.Default.Register <STSNotification>(this, async(nm) =>
            {
                await DispatcherHelper.ExecuteOnUIThreadAsync(async() =>
                {
                    try
                    {
                        if (nm.ID.ID_Tab == current_tab.ID && nm.ID.ID_TabsList == current_list)
                        {
                            switch (nm.Type)
                            {
                            case TypeUpdateTab.TabUpdated:
                                UpdateTabInformations();
                                break;

                            case TypeUpdateTab.TabDeleted:
                                ShowName.Begin();
                                break;

                            case TypeUpdateTab.TabNewModifications:
                                current_tab.TabNewModifications = true;
                                await TabsWriteManager.PushUpdateTabAsync(current_tab, current_list, false);
                                UpdateTabInformations();
                                break;
                            }
                        }
                    }
                    catch { }
                });
            });

            Messenger.Default.Register <TabSelectedNotification>(this, async(nm) =>
            {
                await DispatcherHelper.ExecuteOnUIThreadAsync(async() =>
                {
                    try
                    {
                        if (nm.tabID == current_tab.ID && nm.tabsListID == current_list)
                        {
                            switch (nm.contactType)
                            {
                            case ContactTypeSCEE.GetCodeForTab:
                                await TabsWriteManager.PushTabContentViaIDAsync(new TabID {
                                    ID_Tab = current_tab.ID, ID_TabsList = current_list
                                }, current_tab.TabContentTemporary, true);
                                break;
                            }
                        }
                    }
                    catch { }
                });
            });
        }