private static bool IsStartup(this SyncfusionSerializationType type, string key)
        {
            string path = GetFullPath(type, key, true);
            if (File.Exists(path))
            {
                return false;
            }

            path = GetFullPath(type, key, true);
            return !File.Exists(path);
        }
 private static string GetBasePath(SyncfusionSerializationType type)
 {
     switch (type)
     {
         case SyncfusionSerializationType.DockPanel:
             return ConfigPathHelper.GetDockingConfigPath();
         case SyncfusionSerializationType.ToolBar:
             return ConfigPathHelper.GetToolbarConfigPath();
         default:
             throw new ArgumentOutOfRangeException("type");
     }
 }
예제 #3
0
        private static string GetPathCore(SyncfusionSerializationType type, string key, bool startup)
        {
            string path = GetBasePath(type);

            if (!PathHelper.CreateFolder(path))
            {
                return(string.Empty);
            }

            path += key;

            if (startup)
            {
                path += "_startup";
            }

            return(path);
        }
예제 #4
0
        private static AppStateSerializer GetSerializer(SyncfusionSerializationType type, string key, bool startup)
        {
            string path = GetPathCore(type, key, startup);

            return(new AppStateSerializer(SerializeMode.XMLFile, path));
        }
예제 #5
0
 private static string GetFullPath(SyncfusionSerializationType type, string key, bool startup)
 {
     return(GetPathCore(type, key, startup) + ".xml");
 }