示例#1
0
 public MapOptions(optionsType type)
 {
     InitializeComponent();
     if (type == optionsType.New)
     {
         Text                        = "New Map:";
         doneButton.Text             = "New";
         objectiveType.SelectedIndex = 0;
     }
 }
示例#2
0
        public string Open(optionsType options = null)
        {
            var jArgs = new JObject();

            if (options != null)
            {
                var jpropoptions = JToken.FromObject(options, _client.Serializer);
                jArgs.Add(new JProperty("options", jpropoptions));
            }
            var jRet = _client.GetData <string>("Player.Open", jArgs);

            return(jRet);
        }
示例#3
0
        public string Open2(XBMCRPC.Playlist.Item item = null, optionsType options = null)
        {
            var jArgs = new JObject();

            if (item != null)
            {
                var jpropitem = JToken.FromObject(item, _client.Serializer);
                jArgs.Add(new JProperty("item", jpropitem));
            }
            if (options != null)
            {
                var jpropoptions = JToken.FromObject(options, _client.Serializer);
                jArgs.Add(new JProperty("options", jpropoptions));
            }
            var jRet = _client.GetData <string>("Player.Open", jArgs);

            return(jRet);
        }
示例#4
0
 public MapOptions(optionsType type, Map c)
 {
     InitializeComponent();
     if (type == optionsType.Edit)
     {
         Text                        = "Map Options:";
         doneButton.Text             = "Done";
         nameBox.Text                = c.Name;
         descriptionBox.Text         = c.Description;
         objectiveType.SelectedIndex = c.objective;
         objectiveValue.Value        = c.objectivevalue;
         mN = c.Name;
     }
     if (type == optionsType.Save)
     {
         Text                        = "Save Map As:";
         doneButton.Text             = "Save";
         nameBox.Text                = c.Name;
         descriptionBox.Text         = c.Description;
         objectiveType.SelectedIndex = c.objective;
         objectiveValue.Value        = c.objectivevalue;
     }
 }