Exemplo n.º 1
0
        protected virtual void load(LabeledQueue <object, IkadnBaseObject> data)
        {
            if (data == null)
            {
                throw new ArgumentNullException(nameof(data));
            }

            var baseData = data.Dequeue(BaseSettingsTag).To <IkonComposite>();

            this.LanguageId = baseData[LanguageKey].To <string>();
            this.LastGame   = LastGameInfo.Load(baseData[LastGameKey].To <IkonComposite>());
        }
Exemplo n.º 2
0
        private SelectorParameter loadDegrees(LabeledQueue <object, IkadnBaseObject> data)
        {
            this.degreeOptions = new DegreeOption[data.CountOf(DegreeKey)];
            var parameterOptions = new Dictionary <int, string>();

            for (int i = 0; i < degreeOptions.Length; i++)
            {
                degreeOptions[i] = new DegreeOption(data.Dequeue(DegreeKey).To <IkonComposite>());
                parameterOptions.Add(i, degreeOptions[i].Name);
            }

            return(new SelectorParameter(LanguageContext, DegreeKey, parameterOptions, (int)Math.Ceiling(parameterOptions.Count / 2.0)));
        }
Exemplo n.º 3
0
        protected override void load(LabeledQueue <object, IkadnBaseObject> data)
        {
            base.load(data);

            var wfSettignsData = data.Dequeue(WinformsSettingsTag).To <IkonComposite>();

            this.GuiScale = wfSettignsData[GuiScaleKey].To <float>();

            this.Framerate = wfSettignsData[FpsKey].To <int>();
            this.FramerateBusySpinUsage = (BusySpinMode)wfSettignsData[FpsBusyWaitKey].To <int>();
            this.UnlimitedFramerate     = wfSettignsData[FpsUnlimitedKey].To <int>() >= 0;
            this.VSync = wfSettignsData[VSyncKey].To <int>() >= 0;

            this.ReportContact    = wfSettignsData[ReportContactKey].To <int>() >= 0;
            this.ReportTechnology = wfSettignsData[ReportTechnologyKey].To <int>() >= 0;
            this.ShowScanRange    = wfSettignsData[ShowScanRangeKey].To <int>() >= 0;
        }