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