コード例 #1
0
    public static Record_CardLevel GetRecord(int tag)
    {
        Tab_CardLevel tab = TabMgr.GetTab <Tab_CardLevel>(fileName);

        if (null == tab.mDic)
        {
            tab.mDic = new Dictionary <int, Record_CardLevel>();
            foreach (var item in tab.mList)
            {
                tab.mDic.Add(item.tag, item);
            }
        }

        Record_CardLevel record;

        if (tab.mDic.TryGetValue(tag, out record))
        {
            return(record);
        }
        return(null);
    }
コード例 #2
0
        public CloseableTabItem(TextBlock header, bool closeable = true)
        {
            tabId                    = Guid.NewGuid();
            header.FontSize          = 14;
            header.VerticalAlignment = VerticalAlignment.Center;
            // Container for header controls

            var dockPanel = new DockPanel();

            dockPanel.Children.Add(header);

            // Close button to remove the tab
            if (closeable)
            {
                var closeButton = new TabCloseButton();
                closeButton.Click +=
                    (sender, e) =>
                {
                    TabMgr.CloseTab(tabId);
                };
                dockPanel.Children.Add(closeButton);
            }
            Header = dockPanel;
        }
コード例 #3
0
 public static List <Record_CardLevel> GetRecordList()
 {
     return(TabMgr.GetTab <Tab_CardLevel>(fileName).mList);
 }
コード例 #4
0
 private void DisplayEventLog(object obj)
 {
     logViewerCtrl = logViewerCtrl ?? Logger.LogViewerCtrl;
     TabMgr.AddOrSelectTabItem("Event Log", "LogGrid", 1, logViewerCtrl);
 }
コード例 #5
0
 private void DisplaySettingsView(object obj)
 {
     settingsView = settingsView ?? new SettingsView();
     TabMgr.AddOrSelectTabItem("Settings", "SettingsGrid", 1, settingsView);
 }
コード例 #6
0
 private void DisplaySessionsAdminView(object obj)
 {
     sessionsAdminView = sessionsAdminView ?? new SessionsAdminView();
     TabMgr.AddOrSelectTabItem("Sessions", "SessionsAdminGrid", 1, sessionsAdminView);
 }
コード例 #7
0
 private void DisplayAudioclipsAdminView(object obj)
 {
     audioclipsAdminView = audioclipsAdminView ?? new AudioclipsAdminView();
     TabMgr.AddOrSelectTabItem("Audio clips", "AudiclipsAdminGrid", 1, audioclipsAdminView);
 }
コード例 #8
0
 private void OnCloseBtnClick(object sender, RoutedEventArgs e)
 {
     TabMgr.CloseTab(tabId);
 }