コード例 #1
0
        public DownloadItem(int index, string basePath, UpdateNotify Func, Track track = null, string quality = "LOW", Video video = null, string resolution = "720")
        {
            TidalVideo = video;
            TidalTrack = track;
            Quality    = quality;
            Resolution = resolution;
            BasePath   = basePath;
            Index      = index;
            Errlabel   = "";
            Progress   = new ProgressHelper();
            UpdataFunc = Func;

            if (TidalTrack != null)
            {
                Title    = track.Title;
                Duration = track.SDuration;
                sType    = "Track";
            }
            else
            {
                Title    = video.Title;
                Duration = video.SDuration;
                sType    = "Video";
            }
        }
コード例 #2
0
        public void upCheckNotify()
        {
            UpdateNotify notify = new UpdateNotify(doCheckNotify);

            this.Invoke(notify);
            //this.BeginInvoke(notify);
        }
コード例 #3
0
ファイル: FormReconnect.cs プロジェクト: bookorz/Sachiel
        private static void FormShow(bool Show)
        {
            Form form = null;

            lock (lockObj)
            {
                form = Application.OpenForms["FormReconnect"];

                if (form == null)
                {
                    instance = new FormReconnect();
                    form     = instance;
                }
            }
            if (form.InvokeRequired)
            {
                UpdateNotify ph = new UpdateNotify(FormShow);
                form.Invoke(ph, Show);
            }
            else
            {
                if (Show)
                {
                    if (!form.Created)
                    {
                        form.TopMost     = true;
                        form.WindowState = FormWindowState.Maximized;
                        form.ShowDialog();
                    }
                }
                else
                {
                    if (form.Created)
                    {
                        form.Close();
                    }
                }
            }
        }
コード例 #4
0
ファイル: FormReconnect.cs プロジェクト: bookorz/Sachiel
        private static void NotifyUpdate(bool EMO)
        {
            Form  form = Application.OpenForms["FormReconnect"];
            Label emo;

            if (form == null)
            {
                return;
            }

            emo = form.Controls.Find("EMO_lb", true).FirstOrDefault() as Label;

            if (emo == null)
            {
                return;
            }

            if (emo.InvokeRequired)
            {
                UpdateNotify ph = new UpdateNotify(NotifyUpdate);
                emo.Invoke(ph, EMO);
            }
            else
            {
                Label cntdw = form.Controls.Find("Countdown_lb", true).FirstOrDefault() as Label;
                if (EMO)
                {
                    emo.Visible   = true;
                    cntdw.Visible = false;
                }
                else
                {
                    emo.Visible   = false;
                    cntdw.Visible = true;
                }
            }
        }