Пример #1
0
        private void Window_Drop(object sender, DragEventArgs e)
        {
            //[DI]VisualCopy.displayInfo.CopyListWndFilesCount_tb = filesCount_tb;
            VisualCopy.HandleDrop(new List <string>((string[])e.Data.GetData("FileDrop")));

            Hide();
        }
Пример #2
0
        public void LoadCompressed()
        {
            try
            {
                if (CurrentFilesList != null)
                {
                    ofd.Filter = "cnl Files (*.cnl)|*.cnl";
                    var dlgResult = ofd.ShowDialog();

                    if (dlgResult == System.Windows.Forms.DialogResult.OK)
                    {
                        if (VisualCopy.State == VisualCopy.VisualCopyState.Runing)
                        {
                            //VisualCopy.Pause();

                            VisualCopy.HandleLoadList(FilesList.LoadCompressed(ofd.FileName));

                            //VisualCopy.Resume();
                        }
                        else
                        {
                            VisualCopy.HandleLoadList(FilesList.LoadCompressed(ofd.FileName));
                        }

                        Hide();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(string.Format("An Error has ocurred loading a list: {0}", ex.Message));
            }
        }
Пример #3
0
        public void StartOperation_SetRunningState(VisualCopy visualCopy, RequestInfo requestInfo)
        {
            visualCopy.AceptArgumentsFinished += visualCopy_AceptArgumentsFinished;

            if (requestInfo.Content == RquestContent.All)
            {
                visualCopy.AceptRequest(requestInfo, false, false);
            }
        }
Пример #4
0
        public CopyListWindow(VisualCopy vc)
        {
            InitializeComponent();

            VisualCopy = vc;

            CurrentFilesList = new FilesList();

            ofd = new System.Windows.Forms.OpenFileDialog();
            sfd = new System.Windows.Forms.SaveFileDialog();
        }
Пример #5
0
        public void Inqueve_SetRunningState(VisualCopy visualCopy, RequestInfo requestInfo)
        {
            visualCopy.InqueveState = QueueState.Waiting;
            queve.Add(visualCopy);
            visualCopy.InqueveId = queve.Count;

            visualCopy.AceptArgumentsFinished += visualCopy_AceptArgumentsFinished1;

            if (requestInfo.Content == RquestContent.All)
            {
                visualCopy.AceptRequest(requestInfo, false, false);
            }
        }
Пример #6
0
        void visualCopy_AceptArgumentsFinished1(VisualCopy sender)
        {
            //If the visualcopy is the first in queve => start
            if (queve[0].InqueveId == sender.InqueveId)
            {
                sender.InqueveState = QueueState.StartedRuning;
                //sender.CurrentPauseButtonAction = VisualCopy.PauseButtonAction.Pause;

                sender.PerformOperation();
            }
            else
            {
                //sender.CurrentPauseButtonAction = VisualCopy.PauseButtonAction.StartNow;
            }
        }
Пример #7
0
        /// <summary>
        /// Remove the specific VisualCopy from a VisualsCopy queve if it
        /// below to this queve. Them start the next one inqueved based on startNext param.
        /// </summary>
        /// <param name="visualCopy"></param>
        /// <param name="startNext"></param>
        public void RemoveFromQueve(VisualCopy visualCopy, bool startNext)
        {
            //If below to VisualsCopy queve.
            if (visualCopy.InqueveState != QueueState.None)
            {
                //Remove from queve
                queve.Remove(visualCopy);
                visualCopy.InqueveState = QueueState.None;
                //[DI]visualCopy.displayInfo.UpdateInqueveNo();

                //Update others inqueved VisualsCopys index
                foreach (var vc in VisualsCopysHandler.VisualsCopys.Where(c => c.InqueveId > visualCopy.InqueveId))
                {
                    vc.InqueveId--;
                    //[DI]vc.displayInfo.UpdateInqueveNo();
                }

                //Start the next one
                if (startNext)
                {
                    Configuration.Main.StartNextInQueveVC();
                }
            }
        }
Пример #8
0
 void visualCopy_AceptArgumentsFinished(VisualCopy sender)
 {
     //sender.CurrentPauseButtonAction = VisualCopy.PauseButtonAction.Pause;
     sender.PerformOperation();
 }