Ejemplo n.º 1
0
 //*************************************************************************************************************
 private void LocalPath_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Down || e.KeyCode == Keys.Up)
     {
         LocalList.LoadList(LocalPath.Text);
     }
 }
Ejemplo n.º 2
0
        //*************************************************************************************************************
        private void LocalPath_DropDownClosed(object sender, EventArgs e)
        {
            LocalList.CheckLick = true;
            string path = (LocalPath.SelectedItem == null) ? LocalPath.Text : LocalPath.SelectedItem.ToString();

            LocalList.LoadList(path);
        }
Ejemplo n.º 3
0
 //*************************************************************************************************************
 private void LocalTree_AfterSelect(object sender, TreeViewEventArgs e)
 {
     LocalList.RealLoadList(e.Node.Tag.ToString(), false);
     if (Main.config.GetValue("DEFAULT_FTP_LOCAL_FOLDER") == "#LASTUSED#")
     {
         Main.config.SetValue("FTP_LAST_USED_FOLDER", e.Node.Tag.ToString());
     }
 }
Ejemplo n.º 4
0
 //*************************************************************************************************************
 private void LocalPin_Click(object sender, EventArgs e)
 {
     if (LocalPath.FindStringExact(LocalList.CurrentDirectory) == -1)
     {
         LocalList.PinFolder();
     }
     else
     {
         LocalList.UnpinFolder();
     }
 }
Ejemplo n.º 5
0
        //*************************************************************************************************************
        private void OnLoad(object sender, EventArgs e)
        {
            ShellImageList.SetSmallImageList(LocalList);
            ShellImageList.SetSmallImageList(RemoteList);

            LocalList.Init(this);
            RemoteList.Init(this, remoteIO);
            QueueList.Init(this, remoteIO);

            localPinTip.SetToolTip(LocalPin, "");
            remotePinTip.SetToolTip(RemotePin, "");
            linkTip.SetToolTip(LinkPath, "");
        }
Ejemplo n.º 6
0
        //*************************************************************************************************************
        private void OnLoad(object sender, EventArgs e)
        {
            ShellImageList.SetSmallImageList(LocalList);
            ShellImageList.SetSmallImageList(RemoteList);
            statusMain.Items["statusMainLabel"].Text     = "";
            statusLocal.Items["statusLocalLabel"].Text   = "";
            statusRemote.Items["statusRemoteLabel"].Text = "";

            LocalList.Init(this);
            RemoteList.Init(this, remoteIO);
            QueueList.Init(this, remoteIO);

            localPinTip.SetToolTip(LocalPin, "");
            remotePinTip.SetToolTip(RemotePin, "");
            linkTip.SetToolTip(LinkPath, "");
        }
Ejemplo n.º 7
0
        //*************************************************************************************************************
        private void LinkFolders()
        {
            int LocalPinID  = LocalList.PinFolder();
            int RemotePinID = RemoteList.PinFolder();

            //TODO: Move this into the Config
            using (XwDbCommand sql = new XwDbCommand(Config.GetConnectionString(), "Data.SQLite"))
            {
                sql.ExecuteTX($"UPDATE Pins SET LinkTo=NULL WHERE LinkTo={LocalPinID}");
                sql.ExecuteTX($"UPDATE Pins SET LinkTo=NULL WHERE LinkTo={RemotePinID}");
                sql.ExecuteTX($"UPDATE Pins SET LinkTo={LocalPinID} WHERE ID={RemotePinID}");
                sql.ExecuteTX($"UPDATE Pins SET LinkTo={RemotePinID} WHERE ID={LocalPinID}");
                LinkPath.Image = Resources.link;
                linkTip.SetToolTip(LinkPath, "Unlink folders");
                LinkPath.Tag = true;
            }
        }
Ejemplo n.º 8
0
        //*************************************************************************************************************
        public async Task CheckLink(string path, bool local)
        {
            if (SkipCheckLink)
            {
                SkipCheckLink = false;
                return;
            }

            //TODO: Move this into the Config
            using (XwDbCommand sql = new XwDbCommand(Config.GetConnectionString(), "Data.SQLite"))
            {
                sql.AddParameter("Local", local);
                sql.ExecuteTX($@"SELECT l.[path] FROM pins p 
                    INNER JOIN pins l ON l.ID=p.LinkTo
                    WHERE p.Local=@Local AND p.path='{path}' AND p.ServerID={server.ID}");

                if (sql.Read())
                {
                    LinkPath.Tag   = true;
                    LinkPath.Image = Resources.link;
                    string link = sql.Value(0).ToString();
                    linkTip.SetToolTip(LinkPath, "Unlink folders");

                    if (local)
                    {
                        await RemoteList.LoadList(link);
                    }
                    else
                    {
                        LocalList.LoadList(link);
                    }
                }
                else
                {
                    LinkPath.Tag   = false;
                    LinkPath.Image = Resources.link_break;
                    linkTip.SetToolTip(LinkPath, "Link local and remote folders");
                }
            }
        }
Ejemplo n.º 9
0
        //********************************************************************************************
        private void OnLoad(object sender, EventArgs e)
        {
            ShellImageList.SetSmallImageList(LocalList);
            ShellImageList.SetSmallImageList(RemoteList);

            /*
             * Don't remember why i did this
             * try
             * {
             *  IPAddress[] addresses = Dns.GetHostAddresses(this.server.Host);
             *  server.Host = addresses[0].ToString();
             * }
             * catch { }
             */

            LocalList.Init(this);
            RemoteList.Init(this, remoteIO);
            QueueList.Init(this, remoteIO);

            localPinTip.SetToolTip(LocalPin, "");
            remotePinTip.SetToolTip(RemotePin, "");
            linkTip.SetToolTip(LinkPath, "");
        }