コード例 #1
0
        public static async Task <string> GetTabContentViaIDAsync(TabID id)
        {
            try
            {
                StorageFolder folder_content = await ApplicationData.Current.LocalFolder.CreateFolderAsync("tabs", CreationCollisionOption.OpenIfExists);

                StorageFile file_content = await folder_content.GetFileAsync(id.ID_TabsList + "_" + id.ID_Tab + ".json");

                using (var reader = new StreamReader(await file_content.OpenStreamForReadAsync()))
                    using (JsonReader JsonReader = new JsonTextReader(reader))
                    {
                        try
                        {
                            ContentTab content = new JsonSerializer().Deserialize <ContentTab>(JsonReader);

                            if (content != null)
                            {
                                return(content.Content);
                            }
                        }
                        catch
                        {
                            return(null);
                        }
                    }

                return(null);
            }
            catch
            {
                return(null);
            }
        }
コード例 #2
0
        public static void CreateNewTabInFolder(int IDList, TabID FolderIDs, string FileName, Encoding encoding, StorageListTypes type, string content)
        {
            var newtab = new InfosTab
            {
                TabName               = FileName,
                TabStorageMode        = type,
                TabEncoding           = encoding.CodePage,
                TabContentType        = ContentType.File,
                CanBeDeleted          = true,
                CanBeModified         = true,
                TabType               = LanguagesHelper.GetLanguageType(FileName),
                TabInvisibleByDefault = true
            };

            Task.Run(() =>
            {
                int id_tab = Task.Run(async() => { return(await TabsWriteManager.CreateTabAsync(newtab, IDList, false)); }).Result;
                if (Task.Run(async() => { return(await TabsWriteManager.PushTabContentViaIDAsync(new TabID {
                        ID_Tab = id_tab, ID_TabsList = IDList
                    }, content, false)); }).Result)
                {
                    Messenger.Default.Send(new STSNotification {
                        Type = TypeUpdateTab.NewTab, ID = new TabID {
                            ID_Tab = id_tab, ID_TabsList = IDList
                        }
                    });

                    InfosTab Folder = TabsAccessManager.GetTabViaID(FolderIDs);
                    Folder.FolderContent.Add(id_tab);
                    Task.Run(async() => { await TabsWriteManager.PushUpdateTabAsync(Folder, FolderIDs.ID_TabsList, false); });
                }
            });
        }
コード例 #3
0
ファイル: Manager.cs プロジェクト: stefb965/SerrisCodeEditor
        public TabIDs getCurrentSelectedTabAndTabsListID()
        {
            bool   notif_received = false;
            TabIDs result         = new TabIDs();

            Messenger.Default.Register <TempContentNotification>(this, (notification) =>
            {
                if (notification.answerNotification && notification.type == TempContentType.currentIDs)
                {
                    TabID currentIDs = (TabID)notification.content;
                    result.listID    = currentIDs.ID_TabsList;
                    result.tabID     = currentIDs.ID_Tab;
                    notif_received   = true;
                }
            });

            Messenger.Default.Send(new TempContentNotification {
                answerNotification = false, type = TempContentType.currentIDs
            });

            while (!notif_received)
            {
                ;
            }

            return(result);
        }
コード例 #4
0
        public static InfosTab GetTabViaID(TabID id)
        {
            using (var reader = new StreamReader(AsyncHelpers.RunSync(() => file.OpenStreamForReadAsync())))
                using (JsonReader JsonReader = new JsonTextReader(reader))
                {
                    try
                    {
                        List <TabsList> list = new JsonSerializer().Deserialize <List <TabsList> >(JsonReader);

                        if (list != null)
                        {
                            if (list.Where(m => m.ID == id.ID_TabsList).FirstOrDefault().tabs != null)
                            {
                                return(list.Where(m => m.ID == id.ID_TabsList).FirstOrDefault().tabs.Where(m => m.ID == id.ID_Tab).FirstOrDefault());
                            }
                        }
                    }
                    catch
                    {
                        return(null);
                    }
                }

            return(null);
        }
コード例 #5
0
        /// <summary>
        /// Delete a tab who was selected by his ID and tabs list ID
        /// </summary>
        /// <param name="ids">ID of the tab and tabs list where is the tab</param>
        /// <returns></returns>
        public static async Task <bool> DeleteTabAsync(TabID ids)
        {
            TabsDataCache.LoadTabsData();

            try
            {
                TabsList list_tabs = TabsDataCache.TabsListDeserialized.First(m => m.ID == ids.ID_TabsList);
                InfosTab tab       = list_tabs.tabs.First(m => m.ID == ids.ID_Tab);
                list_tabs.tabs.Remove(tab);
                StorageFile delete_file = await TabsDataCache.TabsListFolder.CreateFileAsync(ids.ID_TabsList + "_" + ids.ID_Tab + ".json", CreationCollisionOption.ReplaceExisting); await delete_file.DeleteAsync();

                TabsDataCache.WriteTabsListContentFile();

                foreach (CoreApplicationView view in CoreApplication.Views)
                {
                    await view.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                    {
                        Messenger.Default.Send(new STSNotification {
                            Type = TypeUpdateTab.TabDeleted, ID = new TabID {
                                ID_Tab = ids.ID_Tab, ID_TabsList = ids.ID_TabsList
                            }
                        });
                    });
                }
                return(true);
            }
            catch
            {
                return(false);
            }
        }
コード例 #6
0
 public int ProximoIDAnt(String Tabela)
 {
     try
     {
         SqlDataReader TabID;
         TabID = ConsultaSQL("SELECT ID FROM TABELAID WHERE TABELA='" + Tabela + "'");
         if (TabID.HasRows)
         {
             ExecutaSQL("UPDATE TABELAID SET ID=ID+1 WHERE TABELA='" + Tabela + "'");
             TabID = ConsultaSQL("SELECT ID FROM TABELAID WHERE TABELA='" + Tabela + "'");
             TabID.Read();
             return(int.Parse(TabID["ID"].ToString()));
         }
         else
         {
             ExecutaSQL("INSERT INTO TABELAID(TABELA,ID) VALUES ('" + Tabela + "',1)");;
             return(1);
         }
     }
     catch (Exception e)
     {
         MessageBox.Show("Erro: " + e.Message, "Atenção", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return(0);
     }
 }
コード例 #7
0
        /// <summary>
        /// Delete a tab who was selected by his ID and tabs list ID
        /// </summary>
        /// <param name="ids">ID of the tab and tabs list where is the tab</param>
        /// <returns></returns>
        public static async Task <bool> DeleteTabAsync(TabID ids)
        {
            using (var reader = new StreamReader(await file.OpenStreamForReadAsync()))
                using (JsonReader JsonReader = new JsonTextReader(reader))
                {
                    try
                    {
                        List <TabsList> list      = new JsonSerializer().Deserialize <List <TabsList> >(JsonReader);
                        TabsList        list_tabs = list.First(m => m.ID == ids.ID_TabsList);
                        InfosTab        tab       = list_tabs.tabs.First(m => m.ID == ids.ID_Tab);
                        list_tabs.tabs.Remove(tab);
                        StorageFile delete_file = await folder_tabs.CreateFileAsync(ids.ID_TabsList + "_" + ids.ID_Tab + ".json", CreationCollisionOption.ReplaceExisting); await delete_file.DeleteAsync();

                        await FileIO.WriteTextAsync(file, JsonConvert.SerializeObject(list, Formatting.Indented));

                        foreach (CoreApplicationView view in CoreApplication.Views)
                        {
                            await view.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                            {
                                Messenger.Default.Send(new STSNotification {
                                    Type = TypeUpdateTab.TabDeleted, ID = new TabID {
                                        ID_Tab = ids.ID_Tab, ID_TabsList = ids.ID_TabsList
                                    }
                                });
                            });
                        }
                        return(true);
                    }
                    catch
                    {
                        return(false);
                    }
                }
        }
コード例 #8
0
        public static async Task <string> GetTabContentViaIDAsync(TabID id)
        {
            try
            {
                StorageFile file_content = await TabsDataCache.TabsListFolder.GetFileAsync(id.ID_TabsList + "_" + id.ID_Tab + ".json");

                using (var reader = new StreamReader(await file_content.OpenStreamForReadAsync()))
                    using (JsonReader JsonReader = new JsonTextReader(reader))
                    {
                        try
                        {
                            ContentTab content = new JsonSerializer().Deserialize <ContentTab>(JsonReader);

                            if (content != null)
                            {
                                return(content.Content);
                            }
                        }
                        catch
                        {
                            return(null);
                        }
                    }

                return(null);
            }
            catch
            {
                return(null);
            }
        }
コード例 #9
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            var Infos = e.Parameter as Tuple <OnedriveExplorerMode, TabID>;

            CurrentExplorerMode = Infos.Item1;
            TabIDRequest        = Infos.Item2;
        }
コード例 #10
0
 private async void TabsList_ListTabDeleted(object sender, TabID e)
 {
     if (current_tab != null)
     {
         current_tab.FolderContent.Remove(e.ID_Tab);
         await TabsWriteManager.PushUpdateTabAsync(current_tab, current_list, false);
     }
 }
コード例 #11
0
        private async void Tabs_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ListView List = sender as ListView;

            if (List.SelectedItem != null)
            {
                if (((TabID)List.SelectedItem).ID_Tab != GlobalVariables.CurrentIDs.ID_Tab)
                {
                    CurrentSelectedIDs = (TabID)List.SelectedItem;
                    var    tab = TabsAccessManager.GetTabViaID(CurrentSelectedIDs);
                    string MonacoID;

                    if (string.IsNullOrEmpty(tab.TabMonacoModelID))
                    {
                        MonacoID = Guid.NewGuid().ToString();
                    }
                    else
                    {
                        MonacoID = tab.TabMonacoModelID;
                    }

                    if (tab.TabContentType == ContentType.File)
                    {
                        int    EncodingType = tab.TabEncoding;
                        string TabType      = "";

                        if (EncodingType == 0)
                        {
                            EncodingType = Encoding.UTF8.CodePage;
                        }

                        if (string.IsNullOrEmpty(tab.TabType))
                        {
                            TabType = "TXT";
                        }
                        else
                        {
                            TabType = tab.TabType.ToUpper();
                        }

                        if (tab != null)
                        {
                            Messenger.Default.Send(new TabSelectedNotification {
                                tabID = CurrentSelectedIDs.ID_Tab, tabsListID = CurrentSelectedIDs.ID_TabsList, code = await TabsAccessManager.GetTabContentViaIDAsync(CurrentSelectedIDs), contactType = ContactTypeSCEE.SetCodeForEditor, typeLanguage = TabType, typeCode = Encoding.GetEncoding(EncodingType).EncodingName, cursorPositionColumn = tab.TabCursorPosition.column, cursorPositionLineNumber = tab.TabCursorPosition.row, tabName = tab.TabName, monacoModelID = MonacoID
                            });
                        }

                        AppSettings.Values["Tabs_tab-selected-index"]  = ((TabID)List.SelectedItem).ID_Tab;
                        AppSettings.Values["Tabs_list-selected-index"] = ((TabID)List.SelectedItem).ID_TabsList;

                        CheckIfTabHaveNewOutsideUpdate(tab);
                    }
                }
            }
        }
コード例 #12
0
 public static async Task <bool> CreateNewFileViaTab(TabID ids)
 {
     try
     {
         await new StorageRouter(TabsAccessManager.GetTabViaID(ids), ids.ID_TabsList).CreateFile().ContinueWith(async(e) =>
         {
             await new StorageRouter(TabsAccessManager.GetTabViaID(ids), ids.ID_TabsList).WriteFile();
         });
         return(true);
     }
     catch
     {
         return(false);
     }
 }
コード例 #13
0
        private void Tab_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
        {
            if (DataContext != null)
            {
                TabID ids = (TabID)DataContext;

                if (current_tab == null)
                {
                    current_tab = new InfosTab();
                }

                current_tab.ID = ids.ID_Tab; current_list = ids.ID_TabsList;
                UpdateTabInformations();
            }
        }
コード例 #14
0
        private async void ListTabs_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (ListTabs.SelectedItem != null)
            {
                if (((TabID)ListTabs.SelectedItem).ID_Tab != GlobalVariables.CurrentIDs.ID_Tab)
                {
                    CurrentSelectedIDs = (TabID)ListTabs.SelectedItem;
                    var tab = TabsAccessManager.GetTabViaID(CurrentSelectedIDs);

                    if (tab.TabContentType == ContentType.File)
                    {
                        int    EncodingType = tab.TabEncoding;
                        string TabType      = "";

                        if (EncodingType == 0)
                        {
                            EncodingType = Encoding.UTF8.CodePage;
                        }

                        if (string.IsNullOrEmpty(tab.TabType))
                        {
                            TabType = "TXT";
                        }
                        else
                        {
                            TabType = tab.TabType.ToUpper();
                        }

                        if (tab != null)
                        {
                            Messenger.Default.Send(new TabSelectedNotification {
                                tabID = CurrentSelectedIDs.ID_Tab, tabsListID = CurrentSelectedIDs.ID_TabsList, code = await TabsAccessManager.GetTabContentViaIDAsync(CurrentSelectedIDs), contactType = ContactTypeSCEE.SetCodeForEditor, typeLanguage = TabType, typeCode = Encoding.GetEncoding(EncodingType).EncodingName
                            });
                        }

                        AppSettings.Values["Tabs_tab-selected-index"]  = ((TabID)ListTabs.SelectedItem).ID_Tab;
                        AppSettings.Values["Tabs_list-selected-index"] = ((TabID)ListTabs.SelectedItem).ID_TabsList;

                        ListTabSelectionChanged?.Invoke(this, new EventArgs());
                    }
                }
            }
        }
コード例 #15
0
        /// <summary>
        /// Push code content in a tab
        /// </summary>
        /// <param name="id">ID of the tab and tabs list where is the tab</param>
        /// <param name="content">Content you want to push in the tab</param>
        /// <param name="sendnotification">Send (or not) a notification about the updated content with MVVMLight</param>
        /// <returns></returns>
        public static async Task <bool> PushTabContentViaIDAsync(TabID id, string content, bool sendnotification)
        {
            try
            {
                TabsDataCache.LoadTabsData();
                StorageFile file_content = await TabsDataCache.TabsListFolder.CreateFileAsync(id.ID_TabsList + "_" + id.ID_Tab + ".json", CreationCollisionOption.OpenIfExists);

                using (var reader = new StreamReader(await file_content.OpenStreamForReadAsync()))
                    using (JsonReader JsonReader = new JsonTextReader(reader))
                    {
                        try
                        {
                            ContentTab _content = new JsonSerializer().Deserialize <ContentTab>(JsonReader);

                            if (content != null)
                            {
                                _content.Content = content;
                                await FileIO.WriteTextAsync(file_content, JsonConvert.SerializeObject(_content, Formatting.Indented));

                                if (sendnotification)
                                {
                                    foreach (CoreApplicationView view in CoreApplication.Views)
                                    {
                                        await view.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                                        {
                                            Messenger.Default.Send(new STSNotification {
                                                Type = TypeUpdateTab.TabUpdated, ID = id
                                            });
                                        });
                                    }
                                }

                                return(true);
                            }
                        }
                        catch { }
                    }
            }
            catch { }
            return(false);
        }
コード例 #16
0
ファイル: Tab.xaml.cs プロジェクト: hexicans/SerrisCodeEditor
        private void Tab_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
        {
            if (DataContext != null)
            {
                TabID ids = (TabID)DataContext;

                if (current_tab == null)
                {
                    current_tab = new InfosTab();
                }

                if (AppSettings.Values.ContainsKey("ui_leftpanelength"))
                {
                    GridInfoLeft.Width = (int)AppSettings.Values["ui_leftpanelength"];
                    StackInfos.Margin  = new Thickness((int)AppSettings.Values["ui_leftpanelength"], 0, 0, 0);
                }

                current_tab.ID = ids.ID_Tab; current_list = ids.ID_TabsList;
                UpdateTabInformations();
            }
        }
コード例 #17
0
        /// <summary>
        /// Push code content in a tab
        /// </summary>
        /// <param name="id">ID of the tab and tabs list where is the tab</param>
        /// <param name="content">Content you want to push in the tab</param>
        /// <param name="sendnotification">Send (or not) a notification about the updated content with MVVMLight</param>
        /// <returns></returns>
        public static async Task <bool> PushTabContentViaIDAsync(TabID id, string content, bool sendnotification)
        {
            try
            {
                TabsDataCache.LoadTabsData();
                StorageFile file_content = await TabsDataCache.TabsListFolder.CreateFileAsync(id.ID_TabsList + "_" + id.ID_Tab + ".json", CreationCollisionOption.OpenIfExists);

                try
                {
                    if (content != null)
                    {
                        string ContentToBeWritenn = JsonConvert.SerializeObject(new ContentTab {
                            ID = id.ID_Tab, Content = content
                        }, Formatting.Indented);
                        using (var writer = new StreamWriter(await file_content.OpenStreamForWriteAsync()))
                        {
                            writer.Write(ContentToBeWritenn);
                        }

                        if (sendnotification)
                        {
                            foreach (CoreApplicationView view in CoreApplication.Views)
                            {
                                await view.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                                {
                                    Messenger.Default.Send(new STSNotification {
                                        Type = TypeUpdateTab.TabUpdated, ID = id
                                    });
                                });
                            }
                        }

                        return(true);
                    }
                }
                catch { }
            }
            catch { }
            return(false);
        }
コード例 #18
0
        public static InfosTab GetTabViaID(TabID id)
        {
            TabsDataCache.LoadTabsData();

            try
            {
                if (TabsDataCache.TabsListDeserialized != null)
                {
                    List <InfosTab> InfosTabList = TabsDataCache.TabsListDeserialized.Where(m => m.ID == id.ID_TabsList).FirstOrDefault().tabs;

                    if (InfosTabList != null)
                    {
                        return(InfosTabList.Where(m => m.ID == id.ID_Tab).FirstOrDefault());
                    }
                }
            }
            catch
            {
                return(null);
            }

            return(null);
        }
コード例 #19
0
        public string GetProperty(string propertyName, string format, CultureInfo formatProvider, UserInfo accessingUser, Scope currentScope, ref bool propertyNotFound)
        {
            string outputFormat = string.Empty;

            if (format == string.Empty)
            {
                outputFormat = "g";
            }

            string lowerPropertyName = propertyName.ToLower();

            if (currentScope == Scope.NoSettings)
            {
                propertyNotFound = true;
                return(PropertyAccess.ContentLocked);
            }
            propertyNotFound = true;

            string result   = string.Empty;
            bool   isPublic = true;

            switch (lowerPropertyName)
            {
            case "tabid":
                propertyNotFound = false;
                result           = (TabID.ToString(outputFormat, formatProvider));
                break;

            case "taborder":
                isPublic         = false;
                propertyNotFound = false;
                result           = (TabOrder.ToString(outputFormat, formatProvider));
                break;

            case "portalid":
                propertyNotFound = false;
                result           = (PortalID.ToString(outputFormat, formatProvider));
                break;

            case "tabname":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(LocalizedTabName, format);
                break;

            case "isvisible":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(IsVisible, formatProvider));
                break;

            case "parentid":
                isPublic         = false;
                propertyNotFound = false;
                result           = (ParentId.ToString(outputFormat, formatProvider));
                break;

            case "level":
                isPublic         = false;
                propertyNotFound = false;
                result           = (Level.ToString(outputFormat, formatProvider));
                break;

            case "iconfile":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(IconFile, format);
                break;

            case "iconfilelarge":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(IconFileLarge, format);
                break;

            case "disablelink":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(DisableLink, formatProvider));
                break;

            case "title":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(Title, format);
                break;

            case "description":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(Description, format);
                break;

            case "keywords":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(KeyWords, format);
                break;

            case "isdeleted":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(IsDeleted, formatProvider));
                break;

            case "url":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(Url, format);
                break;

            case "skinsrc":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(SkinSrc, format);
                break;

            case "containersrc":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(ContainerSrc, format);
                break;

            case "tabpath":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(TabPath, format);
                break;

            case "startdate":
                isPublic         = false;
                propertyNotFound = false;
                result           = (StartDate.ToString(outputFormat, formatProvider));
                break;

            case "enddate":
                isPublic         = false;
                propertyNotFound = false;
                result           = (EndDate.ToString(outputFormat, formatProvider));
                break;

            case "haschildren":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(HasChildren, formatProvider));
                break;

            case "refreshinterval":
                isPublic         = false;
                propertyNotFound = false;
                result           = (RefreshInterval.ToString(outputFormat, formatProvider));
                break;

            case "pageheadtext":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(PageHeadText, format);
                break;

            case "skinpath":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(SkinPath, format);
                break;

            case "skindoctype":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(SkinDoctype, format);
                break;

            case "containerpath":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(ContainerPath, format);
                break;

            case "issupertab":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(IsSuperTab, formatProvider));
                break;

            case "fullurl":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(FullUrl, format);
                break;

            case "sitemappriority":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(SiteMapPriority.ToString(), format);
                break;
            }
            if (!isPublic && currentScope != Scope.Debug)
            {
                propertyNotFound = true;
                result           = PropertyAccess.ContentLocked;
            }
            return(result);
        }
コード例 #20
0
ファイル: ModuleInfo.cs プロジェクト: yangcs2016/Dnn.Platform
        public string GetProperty(string propertyName, string format, CultureInfo formatProvider, UserInfo accessingUser, Scope currentScope, ref bool propertyNotFound)
        {
            string outputFormat = string.Empty;

            if (format == string.Empty)
            {
                outputFormat = "g";
            }
            if (currentScope == Scope.NoSettings)
            {
                propertyNotFound = true;
                return(PropertyAccess.ContentLocked);
            }
            propertyNotFound = true;
            string result   = string.Empty;
            bool   isPublic = true;

            switch (propertyName.ToLowerInvariant())
            {
            case "portalid":
                propertyNotFound = false;
                result           = (PortalID.ToString(outputFormat, formatProvider));
                break;

            case "displayportalid":
                propertyNotFound = false;
                result           = (OwnerPortalID.ToString(outputFormat, formatProvider));
                break;

            case "tabid":
                propertyNotFound = false;
                result           = (TabID.ToString(outputFormat, formatProvider));
                break;

            case "tabmoduleid":
                propertyNotFound = false;
                result           = (TabModuleID.ToString(outputFormat, formatProvider));
                break;

            case "moduleid":
                propertyNotFound = false;
                result           = (ModuleID.ToString(outputFormat, formatProvider));
                break;

            case "moduledefid":
                isPublic         = false;
                propertyNotFound = false;
                result           = (ModuleDefID.ToString(outputFormat, formatProvider));
                break;

            case "moduleorder":
                isPublic         = false;
                propertyNotFound = false;
                result           = (ModuleOrder.ToString(outputFormat, formatProvider));
                break;

            case "panename":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(PaneName, format);
                break;

            case "moduletitle":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(ModuleTitle, format);
                break;

            case "cachetime":
                isPublic         = false;
                propertyNotFound = false;
                result           = (CacheTime.ToString(outputFormat, formatProvider));
                break;

            case "cachemethod":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(CacheMethod, format);
                break;

            case "alignment":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(Alignment, format);
                break;

            case "color":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(Color, format);
                break;

            case "border":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(Border, format);
                break;

            case "iconfile":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(IconFile, format);
                break;

            case "alltabs":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(AllTabs, formatProvider));
                break;

            case "isdeleted":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(IsDeleted, formatProvider));
                break;

            case "header":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(Header, format);
                break;

            case "footer":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(Footer, format);
                break;

            case "startdate":
                isPublic         = false;
                propertyNotFound = false;
                result           = (StartDate.ToString(outputFormat, formatProvider));
                break;

            case "enddate":
                isPublic         = false;
                propertyNotFound = false;
                result           = (EndDate.ToString(outputFormat, formatProvider));
                break;

            case "containersrc":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(ContainerSrc, format);
                break;

            case "displaytitle":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(DisplayTitle, formatProvider));
                break;

            case "displayprint":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(DisplayPrint, formatProvider));
                break;

            case "displaysyndicate":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(DisplaySyndicate, formatProvider));
                break;

            case "iswebslice":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(IsWebSlice, formatProvider));
                break;

            case "webslicetitle":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(WebSliceTitle, format);
                break;

            case "websliceexpirydate":
                isPublic         = false;
                propertyNotFound = false;
                result           = (WebSliceExpiryDate.ToString(outputFormat, formatProvider));
                break;

            case "webslicettl":
                isPublic         = false;
                propertyNotFound = false;
                result           = (WebSliceTTL.ToString(outputFormat, formatProvider));
                break;

            case "inheritviewpermissions":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(InheritViewPermissions, formatProvider));
                break;

            case "isshareable":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(IsShareable, formatProvider));
                break;

            case "isshareableviewonly":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(IsShareableViewOnly, formatProvider));
                break;

            case "desktopmoduleid":
                isPublic         = false;
                propertyNotFound = false;
                result           = (DesktopModuleID.ToString(outputFormat, formatProvider));
                break;

            case "friendlyname":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(DesktopModule.FriendlyName, format);
                break;

            case "foldername":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(DesktopModule.FolderName, format);
                break;

            case "description":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(DesktopModule.Description, format);
                break;

            case "version":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(DesktopModule.Version, format);
                break;

            case "ispremium":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(DesktopModule.IsPremium, formatProvider));
                break;

            case "isadmin":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(DesktopModule.IsAdmin, formatProvider));
                break;

            case "businesscontrollerclass":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(DesktopModule.BusinessControllerClass, format);
                break;

            case "modulename":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(DesktopModule.ModuleName, format);
                break;

            case "supportedfeatures":
                isPublic         = false;
                propertyNotFound = false;
                result           = (DesktopModule.SupportedFeatures.ToString(outputFormat, formatProvider));
                break;

            case "compatibleversions":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(DesktopModule.CompatibleVersions, format);
                break;

            case "dependencies":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(DesktopModule.Dependencies, format);
                break;

            case "permissions":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(DesktopModule.Permissions, format);
                break;

            case "defaultcachetime":
                isPublic         = false;
                propertyNotFound = false;
                result           = (ModuleDefinition.DefaultCacheTime.ToString(outputFormat, formatProvider));
                break;

            case "modulecontrolid":
                isPublic         = false;
                propertyNotFound = false;
                result           = (ModuleControlId.ToString(outputFormat, formatProvider));
                break;

            case "controlsrc":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(ModuleControl.ControlSrc, format);
                break;

            case "controltitle":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(ModuleControl.ControlTitle, format);
                break;

            case "helpurl":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(ModuleControl.HelpURL, format);
                break;

            case "supportspartialrendering":
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(ModuleControl.SupportsPartialRendering, formatProvider));
                break;

            case "containerpath":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(ContainerPath, format);
                break;

            case "panemoduleindex":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PaneModuleIndex.ToString(outputFormat, formatProvider));
                break;

            case "panemodulecount":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PaneModuleCount.ToString(outputFormat, formatProvider));
                break;

            case "isdefaultmodule":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(IsDefaultModule, formatProvider));
                break;

            case "allmodules":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(AllModules, formatProvider));
                break;

            case "isportable":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(DesktopModule.IsPortable, formatProvider));
                break;

            case "issearchable":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(DesktopModule.IsSearchable, formatProvider));
                break;

            case "isupgradeable":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PropertyAccess.Boolean2LocalizedYesNo(DesktopModule.IsUpgradeable, formatProvider));
                break;

            case "adminpage":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(DesktopModule.AdminPage, format);
                break;

            case "hostpage":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(DesktopModule.HostPage, format);
                break;
            }
            if (!isPublic && currentScope != Scope.Debug)
            {
                propertyNotFound = true;
                result           = PropertyAccess.ContentLocked;
            }
            return(result);
        }