Jump to content

Treelistte Dragdrop Ile Dosya Kopyalamak


nightmare3519
 Share

Recommended Posts

Arkadaşım sana doğru söyliyeyim tam emin değilim dene istersen ;

Global Fuctions :

[quote]bCanDrag = Grid.GetDragAndDrop("Plugin1");

if bCanDrag then
Grid.SetDragAndDrop("Plugin1", false);
else
Grid.SetDragAndDrop("Plugin1", true);
end
[/quote]

NOT :

Global Fuctions'un altındaki eklentiler yerinden DragAndDrop check box u işaretlemeyi unutma..

Edited by HalilYanar
Link to comment
Share on other sites

[quote name='nightmare3519' date='28 March 2012 - 22:48 ' timestamp='1332967691' post='1176914']
Özür dilerim ben konuda söylemeyi unutmuşum ben TreeListte dosya eklemek için dragdrop istiyorum grid hiç kullanmadım bir kez bile oluşturdğum olmamıştır belkide :D
[/quote]


[quote]bCanDrag = TreeList.GetDragAndDrop("Plugin1");

if bCanDrag then
TreeList.SetDragAndDrop("Plugin1", false);
else
TreeList.SetDragAndDrop("Plugin1", true);
end[/quote]

Link to comment
Share on other sites

  • 3 hafta sonra ...

al baklaım benim kullandığım galetisinkini biraz değiştirdim :D

global

[code]sys = {

dir = "AutoPlay\\Docs", -- Programların bulunduğu klasör
proIcons = {}, -- Iconların depolandığı tablo
programs = {}, -- Programların depolandığı tablo
cats = {}, -- Kategori tablosu

load = function() -- Programın başlangıç fonksiyonu

TreeList.ClearRows("Plugin1");
TreeList.ClearColumns("Plugin1");
TreeList.AddColumn("Plugin1", "Yazılımın İsimi", 400)
TreeList.AddColumn("Plugin1", "Md5", 209)
TreeList.AddColumn("Plugin1", "Boyutu", 75)
sys.init();
end,


init = function() -- Programların listelendiği fonksiyon
TreeList.ClearRows("Plugin1");

local prog_Bul = File.Find(sys.dir, "*.exe", false, false, nil, nil); -- Programları bul
if (prog_Bul == nil) then



else


-- Fonksiyon yüklendiğinde tabloları sıfırla
sys.programs = {};
sys.proIcons = {};

for index, path in pairs(prog_Bul) do

sys.programs[index] = path; -- Yolları belirle
nVers = File.GetVersionInfo(path);
local pro_Path = String.SplitPath(path); -- Programın yol bilgilerini parçala
local pro_Boyut = String.GetFormattedSize(File.GetSize(path), FMTSIZE_AUTOMATIC, true);--Burda dosya boyutunu alıyoruz.Normalde File.GetSize(file) şeklinde de alınıyor.Fakat Kb cinsinden yazar.String.GetFormattedSize() komutuyla otamatik birim veriyoruz.Yani veri azsa Kb çoğaldıkca Mb,Gb şeklinde gösterir.
local pro_Md5 = Crypto.MD5DigestFromFile(path);

TreeList.AddRow("Plugin1", pro_Path.Filename.."|".. pro_Md5 .."|"..pro_Boyut, TreeList.ExtractIcon("Plugin1", path, 0), nil, nil)--Burda Rowlara verileri ekliyoruz


end
end



end, --init bitiş



kur = function() -- Seçilen programları kurma fonksiyonu

local say = TreeList.CountRows("Plugin1", false);-- Listicondaki tüm elemanların sayısı

local kurulacak = {}; -- kurulacak programlar tablosu

for i = 0, say do
local proSecilmismi = TreeList.GetRowChecked("Plugin1", i);

if (proSecilmismi) then

local kurPro = sys.programs[i+1];
kurulacak[i+1] = kurPro; -- kurulacak tablosuna programı at

end

end


local kacPro = Table.Count(kurulacak); -- Kurulacak program sayısını al

if kacPro == 0 then
Dialog.Message("Neon Aıo ~ Kurulum", "Lütfen Program Seçiniz.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
else


for index, path in pairs(kurulacak) do
kur = String.SplitPath(kurulacak[index]); -- Programın bilgilerini parçala
File.Run(kurulacak[index], "", "", SW_SHOWNORMAL, true);

end
end
end

};[/code]

On show

[code]sys.load();
Page.StartTimer(1000);[/code]

On Mouse Move

[code]DragAndDrop.SetDataFormat(DataFormat.FileDrop);
DragAndDrop.Start(Application.GetWndHandle());
nFile = DragAndDrop.GetDataObject();

for i,v in pairs(nFile) do
if String.SplitPath(v).Extension == ".exe" then
File.Copy(v, _SourceFolder.."\\AutoPlay\\Docs", true, true, false, true, CopyCallback);
sys.init();
end
end[/code]

Edited by Kral__
Link to comment
Share on other sites

Peki sürükle bırak ta bu kodlar doğrumu KintaRo abi ?

[quote]bCanDrag = TreeList.GetDragAndDrop("Plugin1");

if bCanDrag then
TreeList.SetDragAndDrop("Plugin1", false);
else
TreeList.SetDragAndDrop("Plugin1", true);
end[/quote]

Edited by HalilYanar
Link to comment
Share on other sites

  • 1 yıl yıl...
  • 4 hafta sonra ...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...