示例#1
0
        unsafe static void Main(string[] cmdargs)
        {
            var intent = new Intent();

            intent.Add("z", 3);
            intent.Add("h", true);
            intent.Add("wtf", "asdas");
            Console.WriteLine(intent.ToAdbArguments());
        }
示例#2
0
        protected internal override void OnCreate(object parameter)
        {
            base.OnCreate(parameter);
            if (!Intent.ContainsKey("api"))
            {
                Intent.Add("api", Singleton <EHApi> .Instance);
            }

            var api = Intent.TryGet("api") as EHApi;

            if (parameter is EHGalleryTag tag)
            {
                ViewModel = new GalleryViewModel(api, tag);
            }
            else if (parameter is string link)
            {
                ViewModel = new GalleryViewModel(api, Intent.TryGet("title") as string, link);
            }
            else
            {
                ViewModel = new GalleryViewModel(api);
            }
        }