1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- using System;
- namespace I2.Loc
- {
- [Serializable]
- public class LanguageData
- {
- public bool IsEnabled()
- {
- return (this.Flags & 1) == 0;
- }
- public void SetEnabled(bool bEnabled)
- {
- if (bEnabled)
- {
- this.Flags = (byte)((int)this.Flags & -2);
- }
- else
- {
- this.Flags |= 1;
- }
- }
- public bool IsLoaded()
- {
- return (this.Flags & 4) == 0;
- }
- public bool CanBeUnloaded()
- {
- return (this.Flags & 2) == 0;
- }
- public void SetLoaded(bool loaded)
- {
- if (loaded)
- {
- this.Flags = (byte)((int)this.Flags & -5);
- }
- else
- {
- this.Flags |= 4;
- }
- }
- public void SetCanBeUnLoaded(bool allowUnloading)
- {
- if (allowUnloading)
- {
- this.Flags = (byte)((int)this.Flags & -3);
- }
- else
- {
- this.Flags |= 2;
- }
- }
- public string Name;
- public string Code;
- public byte Flags;
- [NonSerialized]
- public bool Compressed;
- }
- }
|