Пример #1
0
 //*************************************************************************************************************
 private void RemotePin_Click(object sender, EventArgs e)
 {
     if (RemotePath.FindStringExact(RemoteList.CurrentDirectory) == -1)
     {
         RemoteList.PinFolder();
     }
     else
     {
         RemoteList.UnpinFolder();
     }
 }
Пример #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;
            }
        }