/// <summary>
        /// open from clipboard
        /// </summary>
        /// <param name="parameter"></param>
        void key_OPEN_clipboard(object parameter)
        {
            if (Wait.IsOpen)
            {
                return;
            }
            if (LongtaskPingCANCELING.isENABLE())
            {
                return;
            }

            CollectionisCreate();
            string[] str = null;
            string   get = Clipboard.GetText();

            try
            {
                str = get.Split(new Char[] { '\n' });
            }
            catch (Exception ex)
            {
                dialog.Show("ОШИБКА clipboard " + ex.Message);
            }

            if (str == null)
            {
                return;
            }


            var cb = new Parse(Parse.mode.not_command, " OPclipboa");

            cb.OPEN_FROM_CLIPBOARD(ViewModelMain.myLISTfull, str);
        }
Example #2
0
        /// <summary>
        /// open from clipboard
        /// </summary>
        /// <param name="parameter"></param>
        void key_OPEN_clipboard(object parameter)
        {
            if (Wait.IsOpen)
            {
                return;
            }
            if (LongtaskPingCANCELING.isENABLE())
            {
                return;
            }

            CollectionisCreate();
            string[] str = null;
            string   get = Clipboard.GetText();

            try
            {
                str = get.Split(new Char[] { '\n' });
            }
            catch (Exception ex)
            {
                dialog.Show("ОШИБКА clb " + ex.Message.ToString());
            }

            if (str == null)
            {
                return;
            }
            if (_file == null)
            {
                _file = new FileWork();
            }
            _file.OPEN_FROM_CLIPBOARD(ViewModelMain.myLISTfull, str);
        }
Example #3
0
        /// <summary>
        /// UPDATE MDB
        /// </summary>
        /// <param name="parameter"></param>
        public void Update_MDB(object parameter)
        {
            if (Wait.IsOpen)
            {
                return;
            }
            if (LongtaskPingCANCELING.isENABLE())
            {
                return;
            }
            if (myLISTbase == null)
            {
                return;
            }
            if (myLISTbase.Count == 0)
            {
                return;
            }
            if (mdb != null)
            {
                return;
            }

            mdb = new WindowMDB
            {
                Title       = "Обновление базы Access",
                Topmost     = true,
                WindowStyle = WindowStyle.ToolWindow,
                Name        = "update_mdb"
            };

            mdb.Closing += MDB_Closing;
            mdb.Show();
            //mdb.Owner = MainWindow.header;
        }
Example #4
0
        /// <summary>
        /// set all best
        /// </summary>
        /// <param name="parameter"></param>
        async void key_set_all_best(object parameter)
        {
            if (Wait.IsOpen)
            {
                return;
            }
            if (LongtaskPingCANCELING.isENABLE())
            {
                return;
            }
            if (myLISTfull == null)
            {
                return;
            }
            if (data.canal.name == "")
            {
                return;
            }

            MessageBoxResult result = MessageAsk.Create("Переместить пустые группы в избранное?");

            CancellationTokenSource cts1 = new CancellationTokenSource();
            CancellationToken       cancellationToken;

            //MessageBoxResult result = MessageBox.Show("  Переместить пустые группы в избранное" , " ПЕРЕМЕЩЕНИЕ",
            //                    MessageBoxButton.YesNo, MessageBoxImage.Warning);
            if (result != MessageBoxResult.Yes)
            {
                return;
            }

            Wait.Create("Идет заполнение ... ", true);

            cancellationToken = cts1.Token;//для task1
            try
            {
                await AsyncSetBest(cancellationToken);

                Wait.Close();
                Update_collection(typefilter.last);
            }
            catch (Exception e)
            {
                dialog.Show("ОШИБКА SetBest " + e.Message.ToString());
            }
        }
Example #5
0
        /// <summary>
        /// AUTO PING
        /// </summary>
        /// <param name="parameter"></param>
        async void key_AUTOPING(object parameter)
        {
            if (Wait.IsOpen)
            {
                return;
            }
            if (LongtaskPingCANCELING.isENABLE())
            {
                return;
            }
            if (myLISTbase == null)
            {
                return;
            }
            if (myLISTbase.Count == 0)
            {
                return;
            }
            if (winap != null)
            {
                return;
            }

            _ping        = new PING();
            _pingPREPARE = new PING_prepare(_ping);

            ap = new AUTOPING(_ping, _pingPREPARE);

            winap = new WindowPING
            {
                Title       = "АВТО ПИНГ",
                Topmost     = true,
                WindowStyle = WindowStyle.ThreeDBorderWindow,//WindowStyle.ToolWindow,
                Name        = "winPING"
            };

            winap.Closing += Ap_Closing;
            winap.Show();

            await ap.start();

            //winap.Owner = MainWindow.header;
        }
Example #6
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);
 }
Example #7
0
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            if (LongtaskPingCANCELING.isENABLE())
            {
                return;
            }
            if (about != null)
            {
                return;
            }
            about = new WindowAbout
            {
                Title   = "",
                Topmost = true,
                //WindowStyle = WindowStyle.ToolWindow,
                Name = "winABOUT"
            };

            about.Closing += WinABOUT_Closing;
            about.Show();
        }
        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;
        }
Example #9
0
        private void MYLIST_MouseDoubleClick_EDIT(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            if (LongtaskPingCANCELING.isENABLE())
            {
                return;
            }
            if (win1 != null)
            {
                win1.Close();
            }
            int si = MYLIST.SelectedIndex;

            if (si < 0)
            {
                return;
            }
            var p = MYLIST.SelectedItem as ParamCanal;

            if (p == null)
            {
                return;
            }
            data.canal = p;

            win1 = new Window1
            {
                Title       = "РЕДАКТИРОВАНИЕ",
                DataContext = new ViewModelWindow1(tb1.Text),
                Topmost     = true,
                //WindowStyle = WindowStyle.ToolWindow,
                Name = "win2iptvEDIT"
            };

            win1.Closing += Win1_Closing;
            win1.Show();
        }