monika Posted September 8, 2010 Share Posted September 8, 2010 arkadaslar inputa girdigimiz bi degerleri bi butonla nasil sifirlariz?? Quote Link to comment Share on other sites More sharing options...
kadiraybar Posted September 8, 2010 Share Posted September 8, 2010 (edited) Konunun açıldığı yere bakmadığım için yanlış cevap yazdım ve sildim. Kolay gelsin... Edited September 8, 2010 by kadiraybar Quote Link to comment Share on other sites More sharing options...
djonur007 Posted September 8, 2010 Share Posted September 8, 2010 @kadiraybar AutoIT bölümündeyiz.! #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 633, 447, 192, 124) $Button1 = GUICtrlCreateButton("Button1", 88, 32, 169, 49, $WS_GROUP) $Input1 = GUICtrlCreateInput("Input1", 96, 128, 273, 21) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 GUICtrlSetData($Input1, "") EndSwitch WEnd Quote Link to comment Share on other sites More sharing options...
monika Posted September 8, 2010 Author Share Posted September 8, 2010 tesekurler kardesim oldu bi de rica etsem su numaralandirmayi biliyosan solermisin yani sadece istedigim inputtaki yere yazdigim seyi 1 input icerigi 2 input icerigi bu sekilde 1 2 3 4 die siralicak nasil yapariz Quote Link to comment Share on other sites More sharing options...
blue_life Posted September 8, 2010 Share Posted September 8, 2010 Tam olarak ne demek istiyorsun. Inputtaki yazıyımı okuyup almak istiyorsun? Eğer öyleyse GUICtrlRead kullanacaksın... Biraz daha net anlatmalısın... $Form1 = GUICreate("Form1", 633, 447, 192, 124) $Button1 = GUICtrlCreateButton("Button1", 88, 32, 169, 49) $Input1 = GUICtrlCreateInput("Input1", 96, 128, 273, 21) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $Button1 MsgBox(64,"",GUICtrlRead($Input1)) GUICtrlSetData($Input1, "") EndSwitch WEnd Quote Link to comment Share on other sites More sharing options...
djonur007 Posted September 8, 2010 Share Posted September 8, 2010 istediğin blue_life hocamın verdiği kodlardaki gibiyse onu kullan. bir ini dosyasına yazdıracaksan iniwrite kullanacaksın. help dosyasına bak. Quote Link to comment Share on other sites More sharing options...
monika Posted September 8, 2010 Author Share Posted September 8, 2010 kardesim sadece inputa yazdigimi siralamasini istiyorum ornegin inputa hata yazdim ekle diyince 1 hata yazacak yani inputa yazdigimi alt alta 1 2 3 diye siralayacak turkcem biraz bozuk kusura bakmayin Quote Link to comment Share on other sites More sharing options...
blackman12 Posted September 8, 2010 Share Posted September 8, 2010 peki 1 e hata yazdın bastın 1 hata çıktı da 2 ye ne yazıcak? inputta mesela: "böyle bir hata var" yazıyorsa 1 böyle 2 bir 3 hata 4 var mı yazıcak? Quote Link to comment Share on other sites More sharing options...
monika Posted September 8, 2010 Author Share Posted September 8, 2010 yok hepsini sadece 1 de siralayacak sonra ben o yaziyi silip baska bisi yazdigimda ekle dedigimde 2.ye yazacak ornegin "boyle bir hata var" diye yazdim inputa ekle dedigimde 1 boyle bi hata var yazacak "boyle bir hata var "yazsini inputtan silip 'baska bisi" yazdim ve ekle dedim bunuda 2 baska bisi bu sekilde Quote Link to comment Share on other sites More sharing options...
blue_life Posted September 12, 2010 Share Posted September 12, 2010 @monika Aşağıdaki gibi bir şeymi istiyorsun? Pek bir şey anlamadım Global $ListWiev_Items[1] = [0] Global $Bl_Value Global $Form1 = GUICreate("Form1", 633, 449) Global $listview = GUICtrlCreateListView("Number|Text ", 0, 0, 250, 150) Global $Input1 = GUICtrlCreateInput("Selam Millet", 8, 160, 241, 21) Global $Button1 = GUICtrlCreateButton("Button1", 8, 192, 243, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $Button1 $Bl_Value = GUICtrlRead($Input1) $ListWiev_Items[0] += 1 ReDim $ListWiev_Items[$ListWiev_Items[0] +1] $ListWiev_Items[$ListWiev_Items[0]] = GUICtrlCreateListViewItem($ListWiev_Items[0] & "|" & $Bl_Value, $listview) EndSwitch WEnd Quote Link to comment Share on other sites More sharing options...
blackman12 Posted September 12, 2010 Share Posted September 12, 2010 Global $i=1 Global $Bl_Value Global $Form1 = GUICreate("Form1", 633, 449) Global $Input1 = GUICtrlCreateInput("Selam Millet", 8, 160, 241, 21) Global $Button1 = GUICtrlCreateButton("Button1", 8, 192, 243, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $Button1 Msgbox(0,"başlık",$i & " " & GUICtrlRead($Input1)) $i += 1 EndSwitch WEnd Quote Link to comment Share on other sites More sharing options...
monika Posted September 13, 2010 Author Share Posted September 13, 2010 (edited) oncelikle cevaplariiz icin tesekur ederim blue_life kardesim kodlar dogru ancak ListViewe eklediginde onlari bide txt olusuturup onun icine yapistiracak yada sole soyleyeyim bu form a bide olustur butonu koyacaz butona bastigimizda ListViewe eklediklerimizin hepsini bi metin belgesi olusturup icine yazacak. Edited September 13, 2010 by monika Quote Link to comment Share on other sites More sharing options...
blue_life Posted September 13, 2010 Share Posted September 13, 2010 Global $TextFile = @ScriptDir & "\Deneme_123.txt" Global $ListWiev_Items[1] = [0] Global $Bl_Value,$Bl_Value1,$File_Opt Global $Form1 = GUICreate("Form1", 633, 449) Global $listview = GUICtrlCreateListView("Number|Text ", 0, 0, 250, 150) Global $Input1 = GUICtrlCreateInput("Selam Millet", 5, 160, 240, 21) Global $Button1 = GUICtrlCreateButton("Button1", 5, 195, 120, 25) Global $Button2 = GUICtrlCreateButton("Oluştur", 130, 195, 120, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $Button1 $Bl_Value = GUICtrlRead($Input1) $ListWiev_Items[0] += 1 ReDim $ListWiev_Items[$ListWiev_Items[0] +1] $ListWiev_Items[$ListWiev_Items[0]] = GUICtrlCreateListViewItem($ListWiev_Items[0] & "|" & $Bl_Value, $listview) Case $Button2 $Bl_Value = "" For $I = 1 to $ListWiev_Items[0] $Bl_Value1 = GUICtrlRead($ListWiev_Items[$I]) If StringRight($Bl_Value1,1) = "|" Then $Bl_Value1 = StringTrimRight($Bl_Value1,1) $Bl_Value1 = StringReplace($Bl_Value1,"|"," = ") $Bl_Value &= $Bl_Value1 & @CRLF Next $File_Opt = FileOpen($TextFile, 2) If $File_Opt <> -1 Then FileWrite($File_Opt,$Bl_Value) MsgBox(64,"Kayıt edildi!",$TextFile) Else MsgBox(16,"Kayıt edilemedi!",$TextFile) EndIf FileClose($File_Opt) EndSwitch WEnd Quote Link to comment Share on other sites More sharing options...
monika Posted September 20, 2010 Author Share Posted September 20, 2010 saol kardesim tam istedigim gibi ama bunu birden fazla inputlu halde yapa bilirmiyiz ornegin 1.inputta selam 2.inpuuta millet yazsak ve bunu alltaki gibi yazacak 1 selam millet Quote Link to comment Share on other sites More sharing options...
blue_life Posted September 20, 2010 Share Posted September 20, 2010 @monika Anlamadım, aşağıdaki gibi mi demek istiyorsun? Global $TextFile = @ScriptDir & "\Deneme_123.txt" Global $ListWiev_Items[1] = [0] Global $Bl_Value,$Bl_Value1,$File_Opt Global $Form1 = GUICreate("Form1", 633, 449) Global $listview = GUICtrlCreateListView("Number|Text ", 0, 0, 250, 150) Global $Input1 = GUICtrlCreateInput("Selam", 5, 160, 115, 21) Global $Input2 = GUICtrlCreateInput("Millet", 125, 160, 115, 21) Global $Button1 = GUICtrlCreateButton("Button1", 5, 195, 120, 25) Global $Button2 = GUICtrlCreateButton("Oluştur", 130, 195, 120, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $Button1 $ListWiev_Items[0] += 2 ReDim $ListWiev_Items[$ListWiev_Items[0] +1] $ListWiev_Items[$ListWiev_Items[0]-1] = GUICtrlCreateListViewItem(($ListWiev_Items[0] -1) & "|" & GUICtrlRead($Input1), $listview) $ListWiev_Items[$ListWiev_Items[0]] = GUICtrlCreateListViewItem($ListWiev_Items[0] & "|" & GUICtrlRead($Input2), $listview) Case $Button2 $Bl_Value = "" For $I = 1 to $ListWiev_Items[0] $Bl_Value1 = GUICtrlRead($ListWiev_Items[$I]) If StringRight($Bl_Value1,1) = "|" Then $Bl_Value1 = StringTrimRight($Bl_Value1,1) $Bl_Value1 = StringReplace($Bl_Value1,"|"," = ") $Bl_Value &= $Bl_Value1 & @CRLF Next $File_Opt = FileOpen($TextFile, 2) If $File_Opt <> -1 Then FileWrite($File_Opt,$Bl_Value) MsgBox(64,"Kayıt edildi!",$TextFile) Else MsgBox(16,"Kayıt edilemedi!",$TextFile) EndIf FileClose($File_Opt) EndSwitch WEnd Quote Link to comment Share on other sites More sharing options...
monika Posted September 20, 2010 Author Share Posted September 20, 2010 bole deil kardesim millet i de 1 de gosterecek vede sadece buna ekledigin inputun kodlarini vere bilirmisin yani sadece bu kodlara 1 den fazla input ekleme kodu Quote Link to comment Share on other sites More sharing options...
blue_life Posted September 21, 2010 Share Posted September 21, 2010 Sen inceleyip, kendine göre ayarla! Global $TextFile = @ScriptDir & "\Deneme_123.txt" Global $ListWiev_Items[1] = [0] Global $Bl_Value,$Bl_Value1,$File_Opt Global $Form1 = GUICreate("Form1", 633, 449) Global $listview = GUICtrlCreateListView("Number|Text ", 0, 0, 250, 150) Global $Input1 = GUICtrlCreateInput("Selam", 5, 160, 115, 21) Global $Input2 = GUICtrlCreateInput("Millet", 125, 160, 115, 21) Global $Button1 = GUICtrlCreateButton("Button1", 5, 195, 120, 25) Global $Button2 = GUICtrlCreateButton("Oluştur", 130, 195, 120, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $Button1 $Bl_Value = GUICtrlRead($Input1) & ' ' & GUICtrlRead($Input2) $ListWiev_Items[0] += 1 ReDim $ListWiev_Items[$ListWiev_Items[0] +1] $ListWiev_Items[$ListWiev_Items[0]] = GUICtrlCreateListViewItem($ListWiev_Items[0] & "|" & $Bl_Value, $listview) Case $Button2 $Bl_Value = "" For $I = 1 to $ListWiev_Items[0] $Bl_Value1 = GUICtrlRead($ListWiev_Items[$I]) If StringRight($Bl_Value1,1) = "|" Then $Bl_Value1 = StringTrimRight($Bl_Value1,1) $Bl_Value1 = StringReplace($Bl_Value1,"|"," = ") $Bl_Value &= $Bl_Value1 & @CRLF Next $File_Opt = FileOpen($TextFile, 2) If $File_Opt <> -1 Then FileWrite($File_Opt,$Bl_Value) MsgBox(64,"Kayıt edildi!",$TextFile) Else MsgBox(16,"Kayıt edilemedi!",$TextFile) EndIf FileClose($File_Opt) EndSwitch WEnd Quote Link to comment Share on other sites More sharing options...
bmozdemir Posted March 26, 2012 Share Posted March 26, 2012 (edited) Arkadaşlar ben bu listelemede anlamadığım bişi var. tamam 1 den başlıyor sıralama fakat 10 ve 11 e gelince sıra karışıyor 1 10 11 2 olarak gözüküyor bunu nasıl düzenli sıra yapabilirim. [codebox]Global $i = 1 Global $Bl_Value Global $Form1 = GUICreate("Form1", 633, 449) Global $Input1 = GUICtrlCreateInput("Selam Millet", 8, 160, 241, 21) Global $Button1 = GUICtrlCreateButton("Button1", 8, 192, 243, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $Button1 MsgBox(0, "başlık", $i & " " & GUICtrlRead($Input1)) $i += 1 EndSwitch WEnd[/codebox] Edited March 27, 2012 by blue_life Codebox alanı düzeltildi! Quote Link to comment Share on other sites More sharing options...
blue_life Posted March 27, 2012 Share Posted March 27, 2012 @bmozdemir Mesajını iki defa okudum ama ilgili kod ile bir alaka kuramadım. Ilgili kod her butona basışında rakamı bir arttırp sana mesaj olarak veriyor. Herangi bir listeleme yok! Konuyu biraz daha açarsan yardımcı olmaya çalışırız... Quote Link to comment Share on other sites More sharing options...
Mehmet Posted March 27, 2012 Share Posted March 27, 2012 @bmozdemir sanırım mesajı yanlış yazmışsın 10 ve 11 e gelince sıra karışmaz Case $Button1 MsgBox(0, "başlık", $i & " " & GUICtrlRead($Input1)) $i += 1 yani burada sırayı karıştıracak bir kod yokki Quote Link to comment Share on other sites More sharing options...
bmozdemir Posted March 27, 2012 Share Posted March 27, 2012 (edited) @blue_life işin aslı evet vermiş olduğum örnekte listview ekranı olmadığından haklısınız ama ben bunu listview ekranında denedim ve orada liste karıştığından bu mesajı atmıştım elimde o sırada aşağıda gönderdiğim ve yapmaya çalıştığım ve eklemede hata oluşan kod alttadır. Bu kodu editleyen kişide @blue_life'tır ona saygısızlık olmasın o yardımcı olmuştu. fazladan bişiler sormamak için kendim yapmaya çalıştım fakat bu hatayla karşılaştım. Amacım Sıra yazan yere otomatik numaraları vermesi ve o numaralara göre sıralaması. Diğer seçeneklere göre değil yani tek baz alınacak satır sıra satırı olmalı diğer satırlara yazılanlar önemli olmamalı. Tam oldu dedğimde ise sıra karıştı . Valla kusura bakmayın belki baya cahilce sorular olabilir bunlar ama yeni yeni deniyorum ve sizlerin yardımına ihtiyacım var. şimdiden sağolun. [codebox] #include <array.au3> Global $ScriptDir = @ScriptDir If StringRight($ScriptDir, 1) <> "\" Then $ScriptDir &= "\" Global $INI_FILE = $ScriptDir & "InventoryData.ini" Global $BLUE_ARRAY Global $i=1 Global $MainForm = GUICreate("Form1", 623, 442) Global $ListView1 = GUICtrlCreateListView("Sıra|Product Code|Make|Model|Current Stock|Date Modified", 16, 8, 586, 390) GUICtrlSendMsg(-1, 4126, 0, 100) GUICtrlSendMsg(-1, 4126, 1, 100) GUICtrlSendMsg(-1, 4126, 2, 100) GUICtrlSendMsg(-1, 4126, 3, 82) GUICtrlSendMsg(-1, 4126, 4, 80) GUICtrlSendMsg(-1, 4126, 5, 120) _Update_ListView() ;ListView Güncelle Global $Button1 = GUICtrlCreateButton("Add A Product", 16, 408, 91, 25) Global $Button2 = GUICtrlCreateButton("Edit A Product", 120, 408, 91, 25) Global $Button3 = GUICtrlCreateButton("Delete A Product", 224, 408, 107, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $Button1 _Add_Edit_AProduct() Case $Button2 _Add_Edit_AProduct("Edit") Case $Button3 _DeleteItem() EndSwitch WEnd Func _READ_INI() Local $RETURN_ARRAY[25][7] ;GCID,Product Code,Make,Model,Current Stock,Date Modified= $RAD_ISName = IniReadSectionNames($INI_FILE) If Not @error Then For $i = 1 To $RAD_ISName[0] If StringLeft($RAD_ISName[$i], 0) <> "" Then ContinueLoop $RETURN_ARRAY[0][0] += 1 If UBound($RETURN_ARRAY, 1) <= $RETURN_ARRAY[0][0] Then ReDim $RETURN_ARRAY[$RETURN_ARRAY[0][0] + 25][7] $RETURN_ARRAY[$RETURN_ARRAY[0][0]][1] = IniRead($INI_FILE, $RAD_ISName[$i], "Sıra", "") $RETURN_ARRAY[$RETURN_ARRAY[0][0]][2] = StringStripWS(IniRead($INI_FILE, $RAD_ISName[$i], "Product Code", ""), 3) $RETURN_ARRAY[$RETURN_ARRAY[0][0]][3] = IniRead($INI_FILE, $RAD_ISName[$i], "Make", "") $RETURN_ARRAY[$RETURN_ARRAY[0][0]][4] = IniRead($INI_FILE, $RAD_ISName[$i], "Model", "") $RETURN_ARRAY[$RETURN_ARRAY[0][0]][5] = IniRead($INI_FILE, $RAD_ISName[$i], "Current Stock", "") $RETURN_ARRAY[$RETURN_ARRAY[0][0]][6] = IniRead($INI_FILE, $RAD_ISName[$i], "Date Modified", "") Next EndIf If UBound($RETURN_ARRAY, 1) <> ($RETURN_ARRAY[0][0] + 1) Then ReDim $RETURN_ARRAY[$RETURN_ARRAY[0][0] + 1][7] Return $RETURN_ARRAY EndFunc ;==>_READ_INI Func _Update_ListView() If IsArray($BLUE_ARRAY) = 0 Then $BLUE_ARRAY = _READ_INI() ;Read_Ini_File EndIf _ArraySort($BLUE_ARRAY, 0, 1, 0, 1) For $i = 1 To $BLUE_ARRAY[0][0] If $BLUE_ARRAY[$i][0] = -1 Then ContinueLoop If $BLUE_ARRAY[$i][0] > 0 Then GUICtrlDelete($BLUE_ARRAY[$i][0]) $BLUE_ARRAY[$i][0] = GUICtrlCreateListViewItem($BLUE_ARRAY[$i][1] & "|" & $BLUE_ARRAY[$i][2] & "|" & $BLUE_ARRAY[$i][3] & _ "|" & $BLUE_ARRAY[$i][4] & "|" & $BLUE_ARRAY[$i][5] & "|" & $BLUE_ARRAY[$i][6], $ListView1) If Number($BLUE_ARRAY[$i][4]) < 100 Then GUICtrlSetBkColor($BLUE_ARRAY[$i][0], 0xfff333) EndIf If Number($BLUE_ARRAY[$i][4]) < 10 Then GUICtrlSetBkColor($BLUE_ARRAY[$i][0], 0xff0000) EndIf Next EndFunc ;==>_Update_ListView Func _Add_Edit_AProduct($AType = "Add") Local $GuiRead Local $No, $productCode, $make, $Deneme, $model, $currentStock, $dataModified = @MON & "/" & @MDAY & "/" & @YEAR If $AType <> "Add" Then $GuiRead = GUICtrlRead($ListView1) If $GuiRead = 0 Then MsgBox(48, "Error!", "Not select item!", 0, $MainForm) SetError(1, 0, 0) EndIf If IsArray($BLUE_ARRAY) = 0 Or $GuiRead = 0 Then Return SetError(2, 0, 0) $BLUE_ARRAY[0][1] = 0 For $i = 1 To $BLUE_ARRAY[0][0] If $GuiRead = $BLUE_ARRAY[$i][0] Then $BLUE_ARRAY[0][1] = $i $No = $BLUE_ARRAY[$i][1] $productCode = $BLUE_ARRAY[$i][2] $make = $BLUE_ARRAY[$i][3] $model = $BLUE_ARRAY[$i][4] $currentStock = $BLUE_ARRAY[$i][5] $dataModified = $BLUE_ARRAY[$i][6] ExitLoop EndIf Next If $BLUE_ARRAY[0][1] = 0 Then Return SetError(3, 0, 0) EndIf GUISetState(@SW_DISABLE, $MainForm) Local $Form2 = GUICreate("Product Inventory", 336, 258, 302, 218) Local $aInput1 = GUICtrlCreateInput($productCode, 16, 24, 193, 21) Local $aInput2 = GUICtrlCreateInput($make, 16, 64, 193, 21) Local $aInput3 = GUICtrlCreateInput($model, 16, 104, 193, 21) Local $aInput4 = GUICtrlCreateInput($currentStock, 16, 144, 193, 21) Local $aInput5 = GUICtrlCreateInput($dataModified, 16, 184, 193, 21) GUICtrlCreateLabel("Product Code", 224, 24, 69, 17) GUICtrlCreateLabel("Make", 224, 64, 31, 17) GUICtrlCreateLabel("Model", 224, 104, 33, 17) GUICtrlCreateLabel("Current Stock", 224, 144, 69, 17) GUICtrlCreateLabel("Date Modified", 224, 184, 70, 17) Local $cButton3 = GUICtrlCreateButton("Add Product", 120, 216, 91, 25) If $AType <> "Add" Then GUICtrlSetData($cButton3, "Edit Product") GUISetState(@SW_SHOW, $Form2) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 ExitLoop Case $cButton3 $productCode = StringStripWS(GUICtrlRead($aInput1), 3) If $productCode = "" Then MsgBox(48, "Error!", "Enter product Code", 0, $Form2) GUICtrlSetState($aInput1, 256) ContinueCase EndIf $make = StringStripWS(GUICtrlRead($aInput2), 3) If $make = "" Then MsgBox(48, "Error!", "Enter make", 0, $Form2) GUICtrlSetState($make, 256) ContinueCase EndIf $model = StringStripWS(GUICtrlRead($aInput3), 3) If $model = "" Then MsgBox(48, "Error!", "Enter model", 0, $Form2) GUICtrlSetState($model, 256) ContinueCase EndIf $currentStock = StringStripWS(GUICtrlRead($aInput4), 3) If $currentStock = "" Then MsgBox(48, "Error!", "Enter current stock ", 0, $Form2) GUICtrlSetState($currentStock, 256) ContinueCase EndIf $dataModified = StringStripWS(GUICtrlRead($aInput5), 3) ; ------------------------------- If $AType = "Add" Then For $i = 1 To $BLUE_ARRAY[0][0] If $BLUE_ARRAY[$i][1] = $productCode Then GUICtrlSetState($aInput1, 256) MsgBox(0, "Error", "The product is already in the database") ContinueCase EndIf Next $BLUE_ARRAY[0][0] += 1 ReDim $BLUE_ARRAY[$BLUE_ARRAY[0][0] + 1][7] $BLUE_ARRAY[0][1] = $BLUE_ARRAY[0][0] EndIf $BLUE_ARRAY[$BLUE_ARRAY[0][1]][1] = $i $BLUE_ARRAY[$BLUE_ARRAY[0][1]][2] = $productCode $BLUE_ARRAY[$BLUE_ARRAY[0][1]][3] = $make $BLUE_ARRAY[$BLUE_ARRAY[0][1]][4] = $model $BLUE_ARRAY[$BLUE_ARRAY[0][1]][5] = $currentStock $BLUE_ARRAY[$BLUE_ARRAY[0][1]][6] = $dataModified IniWrite($INI_FILE, "" & $productCode, "Sıra", $i) $i += 1 IniWrite($INI_FILE, "" & $productCode, "Product Code", $productCode) IniWrite($INI_FILE, "" & $productCode, "Make", $make) IniWrite($INI_FILE, "" & $productCode, "Model", $model) IniWrite($INI_FILE, "" & $productCode, "Current Stock", $currentStock) IniWrite($INI_FILE, "" & $productCode, "Date Modified", $dataModified) ExitLoop EndSwitch WEnd _Update_ListView() GUISwitch($MainForm) GUISetState(@SW_ENABLE, $MainForm) GUIDelete($Form2) EndFunc ;==>_Add_Edit_AProduct Func _DeleteItem() Local $GuiRead = GUICtrlRead($ListView1), $GuiRead2, $SINSTR If $GuiRead <> 0 Then For $i = 1 To $BLUE_ARRAY[0][0] If $GuiRead = $BLUE_ARRAY[$i][0] Then GUICtrlDelete($BLUE_ARRAY[$i][0]) IniDelete("InventoryData.ini", "" & $BLUE_ARRAY[$i][1]) $BLUE_ARRAY[$i][0] = -1 ExitLoop EndIf Next EndIf EndFunc ;==>_DeleteItem [/codebox] Edited March 27, 2012 by bmozdemir Quote Link to comment Share on other sites More sharing options...
blue_life Posted March 27, 2012 Share Posted March 27, 2012 @bmozdemir Amacın sıra kolunu altında, itemleri 0 - 1 - 2 ... 10 - 11 vs. gibi sıralamak mı? Ilgili çalışma da _ArraySort ile yeniden sıralama yapılıyor... Quote Link to comment Share on other sites More sharing options...
bmozdemir Posted March 27, 2012 Share Posted March 27, 2012 evet sıra kolonu altında itemleri sıralamak evet biliyorum ama otomatik olarak numara vermek ve ilgili örneğe bir bakarsanızi 1 10 2 3 4 5 bu şekilde devam ediyor sıkıntı 10 numarayı 9 dan sonra değilde 1 den sonra alıyor olması. Quote Link to comment Share on other sites More sharing options...
blue_life Posted March 28, 2012 Share Posted March 28, 2012 @bmozdemir _ArraySort satırını silersen, sorunun çözülebilir! Denedin mi? Quote Link to comment Share on other sites More sharing options...
bmozdemir Posted March 28, 2012 Share Posted March 28, 2012 (edited) yok denemedim hemen deniyorum. evet düzeldi şimdi sorun array kısmıymış sağol. Edited March 28, 2012 by bmozdemir Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.