Arama butonu
Bu konudaki kullanıcılar: 1 misafir
4
Cevap
480
Tıklama
0
Öne Çıkarma
Görsel Programlama ödevi yardım??
G
5 yıl
Yarbay

ilki


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Berber
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
DataContext = new Müşteri();
}

private void Button_Click(object sender, RoutedEventArgs e)
{
var müşteri = DataContext as Müşteri;
DateTime gün = DateTime.Today.AddDays(müşteri.Gün);
if (gün.DayOfWeek==DayOfWeek.Wednesday)
{
gün=gün.AddDays(1);
}
müşteri.Mesaj = $"Sayın {müşteri.AdSoyad} Berberimizden Almış Olduğunuz {müşteri.İşlem} randevusu {string.Format("{0:dd/MM/yyyy dddd}", gün)} günüdür.";
}
}
}




using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace Berber
{
public class Müşteri : INotifyPropertyChanged
{
private string adSoyad;
private string işlem;
private string mesaj;
private int gün;
private IEnumerable<int> günler=Enumerable.Range(1,8);

public string AdSoyad
{
get { return adSoyad; }

set
{
if (adSoyad != value)
{
adSoyad = value;
OnPropertyChanged(nameof(AdSoyad));
}
}
}
public string İşlem
{
get { return işlem; }
set
{
if (işlem != value)
{
işlem = value;
OnPropertyChanged(nameof(İşlem));
}
}
}
public string Mesaj
{
get { return mesaj; }
set
{
if (mesaj != value)
{
mesaj = value;
OnPropertyChanged(nameof(Mesaj));
}
}
}
public int Gün
{
get { return gün; }
set
{
if (gün != value)
{
gün = value;
OnPropertyChanged(nameof(Gün));
}
}
}

public IEnumerable<int> Günler
{
get { return günler; }

set
{
if (günler != value)
{
günler = value;
OnPropertyChanged(nameof(Günler));
}
}
}


protected virtual void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));

public event PropertyChangedEventHandler PropertyChanged;
}
}




<Window x:Class="Berber.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Berber"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:system="clr-namespace:System;assembly=mscorlib"
Title="MainWindow"
Width="400" Height="244"
mc:Ignorable="d">
<Grid d:DataContext="{d:DesignInstance Type=local:Müşteri}">
<Grid.Resources>
<x:Array x:Key="İşlemler" Type="{x:Type system:String}">
<system:String>Sakal Traşı</system:String>
<system:String>Saç Traşı</system:String>
<system:String>Etek Traşı</system:String>
</x:Array>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock Text="ADI SOYADI" TextWrapping="Wrap" />
<TextBox Text="{Binding AdSoyad, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" TextWrapping="Wrap" />
<TextBlock Text="İŞLEM" Grid.Row="2" TextWrapping="Wrap" />
<ComboBox Grid.Row="3" ItemsSource="{Binding Mode=OneWay, Source={StaticResource İşlemler}}" SelectedItem="{Binding İşlem}" />
<TextBlock Text="Randevu Aralığı" Grid.Row="4" TextWrapping="Wrap" />
<ListBox Grid.Row="5"
ItemsSource="{Binding Günler}"
SelectedItem="{Binding Gün}"
SelectionMode="Single">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Mode=OneWay, StringFormat=\{0\} GÜN}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Button Content="Mesaj Oluştur"
Grid.Row="1" Grid.Column="1"
Click="Button_Click" />
<TextBlock Text="Gönderilecek Mesaj"
Grid.Row="2" Grid.Column="1"
TextWrapping="Wrap" />
<TextBox Text="{Binding Mesaj}"
Grid.Row="3" Grid.Column="1" Grid.RowSpan="3"
TextWrapping="Wrap" />

</Grid>
</Window>


https://www.dosyaupload.com/bvX9https://www.dosyaupload.com/sizS





< Bu mesaj bu kişi tarafından değiştirildi Gökşen PASLI -- 26 Mayıs 2020; 12:3:28 >

M
5 yıl
Er
Konu Sahibi

Öğretmenimiz böyle bir ödev verdi ama nasıl yapacağımı veya nereden başlayacağımı bilmiyorum. Yardım ederseniz sevinirim
< Resime gitmek için tıklayın >

DH forumlarında vakit geçirmekten keyif alıyor gibisin ancak giriş yapmadığını görüyoruz.

Üye olduğunda özel mesaj gönderebilir, beğendiğin konuları favorilerine ekleyip takibe alabilir ve daha önce gezdiğin konulara hızlıca erişebilirsin.

Üye Ol Şimdi Değil



R
5 yıl
Teğmen

önce iskeleti yap sayı üretme tahmin sistemi vs sonra pencere kur ve ögeleri yerleştir sonra onlara işlevsellik ver



< Bu ileti DH mobil uygulamasından atıldı >

F
5 yıl
Yarbay

Ödevlerin 2'si de resimlerdeki gibi, projelerin ikisini de mesajın en altındaki linke yükledim.

1'nci ödev bu şekilde,

< Resime gitmek için tıklayın >

< Resime gitmek için tıklayın >

2'nci ödev de bu şekilde,

< Resime gitmek için tıklayın >

< Resime gitmek için tıklayın >

< Resime gitmek için tıklayın >

< Resime gitmek için tıklayın >

(Bu son resimde denemek için hakkımı yükseltmiştim kazanınca ne olduğunu görmek için )



İndirme linki: https://www.dosya.tc/server29/oo350g/ODEVLER.rar.html





< Bu mesaj bu kişi tarafından değiştirildi Fulton -- 26 Mayıs 2020; 2:37:25 >
Bu mesaja 1 cevap geldi.
G
5 yıl
Onbaşı

DH Mobil uygulaması ile devam edin. Mobil tarayıcınız ile mümkün olanların yanı sıra, birçok yeni ve faydalı özelliğe erişin. Gizle ve güncelleme çıkana kadar tekrar gösterme.