Exemple #1
0
        private void CheckType(JObject data, string path, int index, int length)
        {
            if (data["thumb"] != null)
            {
                DeprecatedFile(data, index, length);
                return;
            }
            int?type = (int?)(data["fileType"] ?? data["type"]);

            switch (type)
            {
            case (int)IHitomi.HFileType.Hitomi:
                Hitomi hitomi = data.ToObject <Hitomi>();
                hitomi.FileInfo.dir = path;
                hitomiupdate(hitomi, index, length);
                break;

            case (int)IHitomi.HFileType.Hiyobi:
                HiyobiGallery hiyobi = data.ToObject <HiyobiGallery>();
                hiyobi.FileInfo.dir = path;
                hiyobiupdate(hiyobi, index, length);
                break;

            default:
                PluginHandler.FireUnknownFileLoaded(type ?? 0, data);
                break;
            }
        }
Exemple #2
0
 public HiyobiReader(HiyobiGallery hiyobi)
 {
     base.Background = new SolidColorBrush(Global.background);
     this.hiyobi     = hiyobi;
     base.window     = Global.MainWindow;
     base.page       = 0;
     base.images     = new BitmapImage[hiyobi.files.Length];
     InitializeComponent();
     Init();
 }
Exemple #3
0
        public HiyobiPanel(HiyobiGallery h, bool large = true, bool file = false, bool blur = false)
        {
            this.large = large;
            this.file  = file;
            this.blur  = blur;
            this.h     = h;
            base.h     = h;

            Init();
            InitEvent();
        }
Exemple #4
0
 public static void Update(HiyobiGallery h, int index, int max)
 {
     Global.MainWindow.label.Content = $"{index}/{max}";
     Global.MainWindow.MainPanel.Children.Add(new UserControls.Panels.HiyobiPanel(h));
 }