Ejemplo n.º 1
0
        void Open_arguments()
        {
            loc.openfile = true;
            CollectionisCreate();
            string name = data.arguments_startup[0];

            loc.block_dialog_window = true;

            if (_file == null)
            {
                _file = new FileWork();
            }
            _file.LOAD(ViewModelMain.myLISTfull, name);

            loc.block_dialog_window = false;
            loc.openfile            = false;
        }
Ejemplo n.º 2
0
        /// /// <summary>
        /// from clipboard
        /// </summary>
        /// <param name="lst"></param>
        /// <param name="str"></param>
        public void OPEN_FROM_CLIPBOARD(List <ParamCanal> lst, string[] str)
        {
            if (str == null)
            {
                dialog.Show("Буфер пустой"); return;
            }


            if (str.Length == 1) //web ссылка
            {
                Regex regex3 = new Regex("http:");
                Regex regex4 = new Regex(".m3u");
                Regex regex5 = new Regex("https:");

                if (regex3.Match(str[0]).Success || regex5.Match(str[0]).Success)
                {
                    if (regex4.Match(str[0]).Success)
                    {
                        var web = new FileWork();
                        wblst = lst;
                        web.Get_from_web(str[0]);
                        if (Event_UpdateLIST != null)
                        {
                            Event_UpdateLIST(typefilter.last);
                        }
                        Wait.Close();
                    }
                }
            }
            else //список каналов
            {
                var web = new FileWork();
                web.add_stringS_to_file(data.temppath, str);
                web.parse_temp_file(lst);
            }


            if (Event_UpdateLIST != null)
            {
                Event_UpdateLIST(typefilter.last);
            }
            Wait.Close();
            loc.openfile = false;
        }
Ejemplo n.º 3
0
        void key_OPENEVENT(string path)
        {
            CollectionisCreate();

            ModeWork.flag_add = true;

            if (_file == null)
            {
                _file = new FileWork();
            }

            _file.Event_DownloadLinkCompleted += EVENT_OPENfinalize;
            Trace.WriteLine("podpiska =" + path);

            string fullpath = _file.ANALIZ_LINE(path, out bool type);

            if (type)
            {
                EVENT_OPENfinalize(fullpath);
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 ///  save
 /// </summary>
 /// <param name="parameter"></param>
 void key_SAVE(object parameter)
 {
     if (Wait.IsOpen)
     {
         return;
     }
     if (LongtaskPingCANCELING.isENABLE())
     {
         return;
     }
     if (myLISTfull == null)
     {
         return;
     }
     if (myLISTfull.Count == 0)
     {
         return;
     }
     _file = new FileWork();
     _file.SAVE(myLISTfull, text_title);
 }
Ejemplo n.º 5
0
        void key_OPEN(object parameter)
        {
            if (Wait.IsOpen)
            {
                return;
            }
            if (LongtaskPingCANCELING.isENABLE())
            {
                return;
            }
            if (loc.openfile)
            {
                return;
            }
            loc.openfile = true;
            CollectionisCreate();

            Script.ResetMODEApplication();
            _file = new FileWork();
            _file.LOAD("", ViewModelMain.myLISTfull, chek_upd, chek__hoop);

            loc.openfile = false;
        }