Example #1
0
        public GameFeatures LoadGameDataFromFile()
        {
            string fajlnev  = string.Empty;
            bool   gepiKezi = false;

            switch (comboBox1.SelectedIndex)
            {
            case 0:
                fajlnev = "otos";
                break;

            case 1:
                fajlnev = "hatos";
                break;

            case 2:
                fajlnev  = "skandi";
                gepiKezi = true;
                break;

            case 3:
                fajlnev = "keno";
                break;
            }
            SelectGame        = new GameFeatures();
            groupBox1.Enabled = gepiKezi;
            //string json = JsonFileManagement.ReadStringFromJsonFile("./Adatallomanyok/otos.json");
            //SelectGame.ConvertJsonStringToJsonFormat(json);
            //SelectGame.ConvertJsonStringToJsonFormat(JsonFileManagement.ReadFromJsonFile(dataDirectory+fajlnev));
            //GameFeatures newGame = JsonConvert.DeserializeObject<GameFeatures>(File.ReadAllText("./Adatallomanyok/otos.json"));
            SelectGame = JsonConvert.DeserializeObject <GameFeatures>(File.ReadAllText(dataDirectory + fajlnev + ".json"));
            //SelectGame.ConvertJsonStringToJsonFormat(File.ReadAllText(dataDirectory + fajlnev));
            return(SelectGame);
        }
 public CreateDataTablesfromJson(GameFeatures game)
 {
     sqlTablaStrings  = new Dictionary <string, string>();
     baseTableStrings = new List <string>();
     chooseGame       = game;
     sqlTablaStrings  = chooseGame.TableDatas;
     sqlSep           = chooseGame.SqlSeparator;
 }
Example #3
0
        public SynchVersionS2C(PacketReader reader, ChannelID channelID, NetID senderNetID)
        {
            this.SenderNetID = senderNetID;
            this.ChannelID   = channelID;

            byte bitfield = reader.ReadByte();

            this.VersionMatches    = (bitfield & 1) != 0;
            this.WriteToClientFile = (bitfield & 2) != 0;
            this.MatchedGame       = (bitfield & 4) != 0;
            this.DradisInit        = (bitfield & 8) != 0;

            this.MapToLoad = reader.ReadInt32();
            for (var i = 0; i < this.PlayerInfo.Length; i++)
            {
                this.PlayerInfo[i] = reader.ReadPlayerInfo();
            }
            this.VersionString = reader.ReadFixedString(256);
            this.MapMode       = reader.ReadFixedString(128);
            this.PlatformID    = reader.ReadFixedString(32);
            for (var i = 0; i < this.Mutators.Length; i++)
            {
                this.Mutators[i] = reader.ReadFixedString(64);
            }
            this.MutatorsNum             = reader.ReadByte();
            this.OrderRankedTeamName     = reader.ReadFixedString(97);
            this.OrderRankedTeamTag      = reader.ReadFixedString(25);
            this.ChaosRankedTeamName     = reader.ReadFixedString(97);
            this.ChaosRankedTeamTag      = reader.ReadFixedString(25);
            this.MetricsServerWebAddress = reader.ReadFixedString(256);
            this.MetricsServerWebPath    = reader.ReadFixedString(256);
            this.MetricsServerPort       = reader.ReadUInt16();
            this.DradisProdAddress       = reader.ReadFixedString(256);
            this.DradisProdResource      = reader.ReadFixedString(256);
            this.DradisProdPort          = reader.ReadUInt16();
            this.DradisTestAddress       = reader.ReadFixedString(256);
            this.DradisTestResource      = reader.ReadFixedString(256);
            this.DradisTestPort          = reader.ReadUInt16();
            this.TipConfig    = reader.ReadTipConfig();
            this.GameFeatures = reader.ReadGameFeatures();
            for (var i = 0; i < this.DisabledItems.Length; i++)
            {
                this.DisabledItems[i] = reader.ReadUInt32();
            }
            for (var i = 0; i < this.EnabledDradisMessages.Length; i++)
            {
                this.EnabledDradisMessages[i] = reader.ReadBool();
            }

            this.ExtraBytes = reader.ReadLeft();
        }
Example #4
0
 public void FillGameDataToForm(GameFeatures game)
 {
     textBox2.Text  = game.HomePage;
     textBox3.Text  = game.FromWhat;
     textBox4.Text  = game.WhereWhat;
     textBox5.Text  = game.PlayableIndexFilePath;
     textBox6.Text  = game.HitIndexFilePath;
     textBox1.Text  = game.SmallestNumber.ToString();
     textBox7.Text  = game.LargestNumber.ToString();
     textBox8.Text  = game.HowManyCanIPlay.ToString();
     textBox9.Text  = game.VibrationYConstantDivisibleBy.ToString(); //osztandó
     textBox10.Text = game.VibrationYConstantDivisor.ToString();     //osztó
     textBox11.Text = game.ConstantValueOfVibrationY.ToString();
 }
        public ConfigurationSettingsFrm()
        {
            InitializeComponent();
            #region The basic settings load from json file
            ConfSett = new ConfigurationSettings();
            ConfSett.ReadFromJsonFile(JsonFileManagement.ReadStringFromJsonFile("beallitasok.json"));
            #endregion

            #region This is section loading the game features
            Game = new GameFeatures();
            Game.ConvertJsonStringToJsonFormat(JsonFileManagement.ReadStringFromJsonFile(ConfSett.GameName + ".json"));  //(Conf.GameName + ".json"));
            #endregion

            #region This is section loading the reference number from json file
            RefNum = new ReferenciaNumber();
            RefNum.ReadFromJsonFile(JsonFileManagement.ReadStringFromJsonFile("viszonyitasiszam.json"));
            #endregion

            #region This is section loading the ABC length settings from Json file for trend determination
            ABCS = new ABCLongSettings();
            ABCS.ReadFromJsonFile(JsonFileManagement.ReadStringFromJsonFile("abc.json"));
            #endregion

            #region This is section loading the RSI indicator settings from json file
            RsiS = new RsiSettings();
            RsiS.ReadFromJsonFile(JsonFileManagement.ReadStringFromJsonFile("rsi.json"));
            #endregion

            #region This is module loading the Trix indicator datas from Json file
            Trix = new TrixSettings();
            Trix.ReadFromJsonFile(JsonFileManagement.ReadStringFromJsonFile("trix.json"));
            #endregion

            #region This is modul loading the EMA settings from Json file
            EmaS = new EmasSettings();
            EmaS.ReadFromJsonFile(JsonFileManagement.ReadStringFromJsonFile("ema.json"));
            #endregion

            rowNumber = -1;
            focusLb1  = false;
            focusLb2  = false;
        }
Example #6
0
 public static void WriteGameFeatures(this PacketWriter writer, GameFeatures data)
 {
     writer.WriteUInt64((ulong)data);
 }
Example #7
0
 public bool GetFeature(GameFeatures feature) => Features.Get((int)feature);
Example #8
0
 public void DisableFeature(GameFeatures feature) => Features.Set((int)feature, false);
Example #9
0
 public void EnableFeature(GameFeatures feature) => Features.Set((int)feature, true);