Exemple #1
0
 //*************************************************************************************************************
 private void LocalPin_Click(object sender, EventArgs e)
 {
     if (LocalPath.FindStringExact(LocalList.CurrentDirectory) == -1)
     {
         LocalList.PinFolder();
     }
     else
     {
         LocalList.UnpinFolder();
     }
 }
Exemple #2
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;
            }
        }